Security event information generation method, device, equipment and computer readable medium
By obtaining surveillance videos in the security system, determining the events of users' attention and generating video feature information for matching, the problem that existing security systems cannot adapt to different scenarios and useless alarms is solved, and high-accuracy and targeted security event detection and alarms are achieved.
Patent Information
- Application Number
- CN202410752046.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-06-12
AI Technical Summary
When identifying and alerting security events, existing security systems are unable to adapt to different scenarios, resulting in the need to design visual perception algorithms for specific scenarios, and alarms are made through simple rules, which lacks focus, resulting in a lot of useless alarm information.
By obtaining the monitoring video of the target security scene, determining the event information that users are concerned about, generating video feature information related to the text, and matching it, identifying and alerting security events to reduce useless alarm information.
It realizes security incident detection that adapts to different scenarios, reduces useless alarm information, and improves the accuracy and targetedness of alarms.
Smart Images

Figure CN118784790B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a method, device, equipment, and computer-readable medium for generating security event information. Background Art
[0002] Intelligent security systems can analyze the data collected by sensors to generate alerts for events. At present, the common method for identifying and alerting security events is to pre-define some security events of concern in specific scenarios, and then extract information through various basic visual perception algorithms (target detection, tracking, face recognition, anomaly detection, etc.), artificially combine them through some rules, realize semantic judgment of security events, and configure alert rules according to scenarios and specific functions to realize alerts for security events.
[0003] However, the inventors have found that when using the above method to identify and alert security events, the following technical problems often occur: when identifying security events, it is necessary to design a visual perception algorithm based on specific scenarios, which cannot adapt to different scenarios; when alerting security events, simple rules are used to issue alerts, and there is a lack of alert push focus, resulting in a large amount of useless alert information.
[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 a method, device, electronic device and computer-readable medium for generating security event information 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 security event information, the method comprising: acquiring a surveillance video of a target security scene; determining at least one event information of interest previously input by a user to obtain an event information set of interest; determining a text feature information set corresponding to the event information set of interest; generating video feature information based on the surveillance video, wherein the video feature information is a visual representation related to the text; generating matching information between each text feature information in the text feature information set and the video feature information to obtain a matching information set; determining whether there is event information of interest matching the video feature information in the event information set of interest based on the matching information set; in response to determining that there is event information of interest matching the video feature information in the event information set of interest, determining each event information of interest matching the video feature information in the event information set of interest as each event information; adding each determined event information to the event information set to update the event information set; in response to detecting event query information input by the user, generating security event summary information corresponding to the event query information based on the event query information and the updated event information set.
[0008] In a second aspect, some embodiments of the present disclosure provide a security event information generation device, the device comprising: an acquisition unit, configured to acquire a surveillance video of a target security scene; a first determination unit, configured to determine at least one event of interest information previously input by a user, and obtain a set of event of interest information; a second determination unit, configured to determine a text feature information set corresponding to the above event of interest information set; a first generation unit, configured to generate video feature information based on the surveillance video, wherein the video feature information is a visual representation related to the text; the second generation unit, configured to generate matching information between each text feature information in the text feature information set and the video feature information, and obtain a matching information set; a third determination unit, configured to The fourth determining unit is configured to determine, based on the above-mentioned matching information set, whether there is event information of interest that matches the above-mentioned video feature information in the above-mentioned event information set; in response to determining that there is event information of interest that matches the above-mentioned video feature information in the above-mentioned event information set, determine each event information of interest that matches the above-mentioned video feature information in the above-mentioned event information set as each event information; the adding unit is configured to add each determined event information to the event information set to update the event information set; the third generating unit is configured to generate, in response to detecting event query information input by the user, security event summary information corresponding to the above-mentioned event query information based on the above-mentioned event query information and the updated event information set.
[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 embodiments of the present disclosure have the following beneficial effects: through the security event information generation method of some embodiments of the present disclosure, it is possible to adapt to the security event detection of different scenes and reduce useless alarm information. Specifically, the reasons for not being able to adapt to different scenes and having more useless alarm information are: when identifying security events, it is necessary to design a visual perception algorithm according to a specific scene, which cannot adapt to different scenes; when alerting security events, simple rules are used to alert, and there is a lack of alert push focus, resulting in more useless alarm information. Based on this, the security event information generation method of some embodiments of the present disclosure first obtains the surveillance video of the target security scene. Thus, real-time video data in a security scene can be obtained. Then, at least one event information of interest input by the user is determined to obtain an event information set of interest. Thus, each event of interest customized by the user can be determined. Next, a text feature information set corresponding to the above event information set of interest is determined. Thus, the event information of interest input by the user can be text-encoded. Secondly, based on the above surveillance video, video feature information is generated, wherein the above video feature information is a visual representation related to the text. Thus, the visual representation related to the video and the text can be learned. Then, matching information between each text feature information in the above text feature information set and the above video feature information is generated to obtain a matching information set. Thus, the obtained matching information can be used to determine whether the surveillance video matches the event information of interest to the user. Then, based on the above matching information set, determine whether there is event information of interest matching the above video feature information in the above event information set of interest. Afterwards, in response to determining that there is event information of interest matching the above video feature information in the above event information set of interest, each event information of interest matching the above video feature information in the above event information set of interest is determined as each event information. Thus, it can be determined whether an event is detected from each event of interest to the user. Then, each determined event information is added to the event information set to update the event information set. Thus, the set of detected event information can be updated synchronously. Finally, in response to detecting the event query information input by the user, security event summary information corresponding to the event query information is generated based on the above event query information and the updated event information set. Thus, the security event summary information to be displayed to the user can be summarized according to the event query information actively input by the user and the security event detection result. Also, because the detection of security events is based on the various events that users are interested in matching the surveillance video, the learned text-related visual representation can be matched with the various event information that users are interested in, so there is no need to design visual perception algorithms for specific scenarios, so it can adapt to security event detection in different scenarios. Also, because the security event summary information to be displayed to the user is a summary of the event query information actively input by the user, it has an alarm push focus, so it can reduce useless alarm information.In this way, it is possible to adapt to security event detection in different scenarios and reduce useless alarm information. 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 reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0013] Figure 1 is a flow chart of some embodiments of the method for generating security event information according to the present disclosure;
[0014] Figure 2 is a schematic diagram of the structure of some embodiments of the security event 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] With regard to the collection, storage, and use of user personal information (such as surveillance videos) involved in this disclosure, before performing the corresponding operations, the relevant organizations or individuals shall fulfill their obligations, including conducting personal information security impact assessments, fulfilling the obligation to inform the personal information subject, and obtaining the authorization and consent of the personal information subject in advance.
[0022] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0023] Figure 1 The process 100 of some embodiments of the method for generating security event information according to the present disclosure is shown. The method for generating security event information comprises the following steps:
[0024] Step 101, obtaining surveillance video of the target security scene.
[0025] In some embodiments, the execution subject (such as a computing device) of the security event information generation method can obtain the monitoring video of the target security scene from the camera device of the target security scene through a wired connection or a wireless connection. Among them, the above-mentioned target security scene can be any scene of the security event that the user needs to pay attention to. For example, the above-mentioned target security scene can be but not limited to one of the following: a factory, a supermarket, a home scene, a construction site. The above-mentioned execution subject can be a server or a terminal device. The above-mentioned monitoring video can be a video of the above-mentioned target security scene collected in real time by the camera device. It should be pointed out that the above-mentioned wireless connection method can include but is not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0026] Step 102: determine at least one event information previously input by the user, and obtain a set of event information.
[0027] In some embodiments, the above-mentioned execution subject can determine at least one event of interest information previously input by the user, and obtain a set of event of interest information. Among them, the event of interest information can represent the security event that the user wants to pay attention to. At least one event of interest information can be configured by the user in advance. The user can manually enter the event of interest information, or select the event option to be concerned about from various event options, and each event option corresponds to the event of interest information. When the above-mentioned execution subject is a server, the user can enter the event of interest information through a web page. The event of interest information can correspond to the above-mentioned target security scene. For example, when the target security scene is a home scene, the event of interest information may include but is not limited to: a child climbs over a fence, someone takes a package, a car is driven away, someone is smashing a window, and a child goes out.
[0028] Step 103: determine a text feature information set corresponding to the attention event information set.
[0029] In some embodiments, the execution subject may determine a text feature information set corresponding to the above-mentioned event information set. In practice, the text feature information may be obtained by encoding the event information input by the user. Specifically, the event information may be encoded by a text encoder to obtain the text feature information.
[0030] Step 104: Generate video feature information based on the surveillance video.
[0031] In some embodiments, the execution subject may generate video feature information based on the surveillance video, wherein the video feature information may be a visual representation related to the text.
[0032] In some optional implementations of some embodiments, the execution subject may generate video feature information based on the surveillance video through the following steps:
[0033] The first step is to mark each surveillance image frame included in the surveillance video to obtain a sequence of marked surveillance images. Each surveillance image after marking corresponds to image label information. The image label information can be a text description of the event in the image. In practice, the execution entity can determine the image label information of the surveillance image through the Detic algorithm, and use the image label information as the label of the surveillance image to mark the surveillance image and obtain the marked surveillance image.
[0034] In the second step, based on the above-mentioned event information set and the image label information corresponding to each monitoring image in the above-mentioned monitoring image sequence, the above-mentioned monitoring image sequence is sampled to obtain a sampled monitoring image set.
[0035] The third step is to perform image stitching processing on each of the sampled monitoring images in the above-mentioned sampled monitoring image set to obtain a stitched monitoring image. In practice, the above-mentioned execution subject can arrange the above-mentioned sampled monitoring images in sequence according to the image acquisition time to obtain a sampled monitoring image sequence. Then, the sampled monitoring images in the above-mentioned sampled monitoring image sequence can be stitched into one image in sequence according to a preset arrangement method to obtain a stitched monitoring image. For example, the above-mentioned preset arrangement method can be to arrange 4 images in each row in order from left to right.
[0036] The fourth step is to extract visual features from the spliced surveillance image to obtain visual feature information. In practice, the execution subject may use an image encoder to extract visual features from the spliced surveillance image to obtain visual feature information. For example, the image encoder may be Vit-B-32.
[0037] In the fifth step, the visual feature information is subjected to text alignment processing, and the visual feature information after the text alignment processing is obtained as the video feature information. In practice, the execution subject may use a fused visual encoder to perform text alignment processing on the visual feature information, and obtain the visual feature information after the text alignment processing as the video feature information. For example, the fused visual encoder may be BLIP2 QFormer. Thus, the extraction of video features related to text may be realized through a multimodal algorithm based on a large visual model.
[0038] In some optional implementations of some embodiments, the execution subject may perform sampling processing on the surveillance image sequence based on the focus event information set and the image tag information corresponding to each surveillance image in the surveillance image sequence through the following steps to obtain a sampled surveillance image set:
[0039] In the first step, for each surveillance image in the surveillance image sequence, the following steps are performed:
[0040] The first sub-step is to determine the image label information corresponding to the monitoring image as the target image label information.
[0041] The second sub-step is to generate label matching information between the above-mentioned event information and the above-mentioned target image label information for each event information in the above-mentioned event information set. In practice, the above-mentioned execution subject may determine the text similarity between the above-mentioned event information and the above-mentioned target image label information as the label matching information.
[0042] In the third sub-step, the tag matching information that satisfies the preset tag matching condition among the generated tag matching information is determined as the target tag matching information to obtain the target tag matching information set. The preset tag matching condition may be that the tag matching information is greater than or equal to the preset text similarity. Here, the specific setting of the preset text similarity is not limited.
[0043] The fourth sub-step is to generate sampling weight information of the monitoring image according to the target tag matching information set. In practice, the execution subject may determine the sum of each target tag matching information included in the target tag matching information set as the sampling weight information.
[0044] The second step is to sort the surveillance images included in the surveillance image sequence according to the sampling weight information corresponding to each surveillance image in the surveillance image sequence to obtain a re-sorted surveillance image sequence. In practice, the execution subject may sort the surveillance images included in the surveillance image sequence in descending order according to the sampling weight information corresponding to each surveillance image to obtain a re-sorted surveillance image sequence.
[0045] The third step is to select a preset number of surveillance images from the above reordered surveillance image sequence as a set of sampled surveillance images. The preset number may be an integer multiple of the number of per-row arrangements in the preset arrangement. For example, when the preset number is 8, 16, or 32, the number of per-row arrangements may be 4. Thus, the surveillance images may be sampled based on the matching degree between the images and the security events that the user is concerned about, thereby increasing the correlation between the sampled surveillance images and the security events that the user is concerned about, so that the sampled surveillance images may contain more useful information. At the same time, sampling surveillance videos can also increase the speed of extracting video feature information.
[0046] Step 105: Generate matching information between each text feature information in the text feature information set and the video feature information to obtain a matching information set.
[0047] In some embodiments, the execution entity may generate matching information between each text feature information in the text feature information set and the video feature information to obtain a matching information set. In practice, the execution entity may determine the similarity between the text feature information and the video feature information as the matching information. For example, the similarity may be cosine similarity.
[0048] Step 106: Based on the matching information set, determine whether there is any event information of interest that matches the video feature information in the event information set of interest.
[0049] In some embodiments, the execution subject may determine whether there is event information of interest that matches the video feature information in the event information set based on the matching information set. In practice, the execution subject may determine whether there is event information of interest that matches the video feature information in the event information set in response to determining that there is matching information that satisfies a preset matching condition in the matching information set. Among them, the preset matching condition may be that the matching information is greater than or equal to a preset similarity. Here, the specific setting of the preset similarity is not limited. The text feature information corresponding to the matching information that satisfies the preset matching condition is the text feature information corresponding to the event information of interest that matches the video feature information, so that the event information of interest that matches the video feature information can be determined by determining the matching information that satisfies the preset matching condition.
[0050] Step 107: in response to determining that there is event information of interest matching the video feature information in the event information set of interest, each event information of interest matching the video feature information in the event information set of interest is determined as each event information.
[0051] In some embodiments, the execution subject may, in response to determining that there is event information of interest that matches the video feature information in the event information set of interest, determine each event information of interest that matches the video feature information in the event information set of interest as each event information. In practice, the execution subject may determine each matching information that satisfies a preset matching condition in the matching information set as a target matching information set. Then, each text feature information in the text feature information set corresponding to each target matching information in the target matching information set may be determined as a screening text feature information set. Finally, each event information of interest in the event information set of interest that corresponds to each screening text feature information in the screening text feature information set may be determined as each event information.
[0052] Optionally, for each determined event information, the execution subject may perform the following steps:
[0053] The first step is to determine the text feature information corresponding to the event information in the text feature information set as the target text feature information.
[0054] The second step is to generate label matching information between the target text feature information and each image label information corresponding to the monitoring image sequence as feature matching information, and obtain each feature matching information. In practice, for each monitoring image in the monitoring image sequence, the execution subject can use the text similarity between the target text feature information and the image label information of the monitoring image as label matching information.
[0055] The third step is to determine the feature matching information that meets the preset feature matching condition among the above-mentioned feature matching information as the target feature matching information. The above-mentioned preset feature matching condition may be that the feature matching information is the largest feature matching information among the above-mentioned feature matching information.
[0056] The fourth step is to determine the monitoring image corresponding to the target feature matching information in the monitoring image sequence as the matching monitoring image corresponding to the event information.
[0057] The fifth step is to determine the image acquisition time corresponding to the above matching surveillance image as the event occurrence time.
[0058] Step 6: Determine the video capture time period based on the time of occurrence of the above event. In practice, the execution subject can use the time of occurrence of the above event as the central time point, the time point of the first preset time before the central time point as the start time, and the time point of the second preset time after the central time point as the end time, and determine the time period from the above start time to the above end time as the video capture time period. Here, there is no limitation on the specific settings of the above first preset time length and the second preset time length. For example, the above first preset time length and the second preset time length can both be 1 minute.
[0059] Step 7: According to the video capture time period, a positioning video corresponding to the event information is captured from the surveillance video. In practice, the execution subject can capture a video segment within the video capture time period from the surveillance video as a positioning video corresponding to the event information. Thus, the captured positioning video can be used as an evidence reference for the detected event information.
[0060] Optionally, after capturing the positioning video corresponding to the event information from the surveillance video according to the video capture time period, the execution subject may further perform the following steps:
[0061] The first step is to extract a foreground image from each frame of the positioning video to obtain each foreground image. In practice, the execution subject can perform background subtraction on each frame of the positioning video using inter-frame differences to extract the foreground image and obtain each foreground image.
[0062] In the second step, the foreground image corresponding to the matching monitoring image among the foreground images is determined as the matching foreground image. The foreground image corresponding to the matching monitoring image can be the foreground image of the foreground target extracted from the matching monitoring image among the foreground images.
[0063] In the third step, for each of the foreground images above, perform the following steps:
[0064] In the first sub-step, the similarity between the foreground image and the matching foreground image is determined as the image matching degree. In practice, the execution subject may determine the image similarity between the foreground image and the matching foreground image as the image matching degree. Thus, the similarity between the foreground objects may be used to determine the matching degree between the images, thereby reducing the impact of background differences.
[0065] The second sub-step is to determine the similarity between the image label information of the image corresponding to the foreground image and the event information as the text matching degree. In practice, the execution subject may determine the text similarity between the image label information and the event information as the text matching degree.
[0066] The third sub-step is to generate image matching information between the image corresponding to the foreground image and the matching monitoring image based on the image matching degree and the text matching degree. In practice, the execution entity may determine the weighted sum of the image matching degree and the text matching degree as the image matching information between the image corresponding to the foreground image and the matching monitoring image. Here, there is no limitation on the specific setting of the weighting coefficient. Thus, the matching degree between the image in the positioning video and the matching monitoring image can be determined from two dimensions: image features and text features.
[0067] In the fourth step, each image before the matching monitoring image in the positioning video is determined as a first image set.
[0068] The fifth step is to determine the first frame of the first image in the first image set as the first target image.
[0069] Step 6: Based on the first target image, perform the following sequential loop steps:
[0070] The first sub-step is to determine whether the image matching information of the first target image satisfies a preset image matching condition. The preset image matching condition may be that the image matching information is greater than or equal to a preset value. Here, the specific setting of the preset value is not limited.
[0071] The second sub-step, in response to determining that the image matching information of the first target image does not satisfy the above-mentioned preset image matching condition, deletes the first target image from the positioning video to update the positioning video, and uses the image that follows the first target image in the above-mentioned first image set as the first target image, and executes the above-mentioned sequential loop steps again.
[0072] In the third sub-step, in response to determining that the image matching information of the first target image satisfies the preset image matching condition, the obtained positioning video is determined as a sequentially deleted positioning video. Thus, the images with a lower degree of matching with the matching monitoring image in the first part of the positioning video can be deleted from the front to the back, and the deleted positioning video can be ensured to be continuous and uninterrupted.
[0073] In the seventh step, each image after the matched monitoring image in the positioning video is determined as a second image set.
[0074] Step 8: Reverse the order of the second image set to obtain a second image sequence. In practice, the execution subject may sort the second images in the second image set in descending order of the corresponding image acquisition time to obtain a second image sequence.
[0075] In the ninth step, the first second image in the second image sequence is determined as the second target image.
[0076] Step 10: Based on the second target image, perform the following reverse loop steps:
[0077] The first sub-step is to determine whether the image matching information of the second target image meets a preset image matching condition.
[0078] The second sub-step, in response to determining that the image matching information of the second target image does not satisfy the above-mentioned preset image matching condition, deletes the second target image from the sequential deletion positioning video to update the sequential deletion positioning video, and uses the image that precedes the second target image in the above-mentioned second image set as the second target image, and executes the above-mentioned reverse loop step again.
[0079] In the third sub-step, in response to determining that the image matching information of the second target image satisfies the preset image matching condition, the obtained sequential deletion positioning video is determined as the reverse deletion positioning video. Thus, the images with a lower matching degree with the matching monitoring image in the latter part of the positioning video can be deleted from the back to the front, and the deleted positioning video can be ensured to be continuous and uninterrupted.
[0080] In the eleventh step, the determined reverse-order deleted positioning video is determined as the positioning video to update the positioning video.
[0081] The above-mentioned first step to the eleventh step, as an inventive point of an embodiment of the present disclosure, solves the technical problem that "the intercepted video used as evidence reference for security events contains video frames with a low degree of association with security events, resulting in waste of storage resources and network resources when users view videos". The factors that lead to waste of storage resources and network resources when users view videos are often as follows: the intercepted video used as evidence reference for security events contains video frames with a low degree of association with security events. If the above factors are solved, the effect of reducing waste of storage resources and network resources when users view videos can be achieved. In order to achieve this effect, the present disclosure uses the frame of image that best matches the security event in the positioning video as a reference, divides the positioning video into two sets of images, front and back, and uses the comprehensive matching degree of each image in each set of images with the reference image to delete images with a poor comprehensive matching degree in the positioning video while ensuring the continuity of the positioning video. As a result, each image in the deleted positioning video can have a higher matching degree with the reference image, that is, a higher matching degree with the security event. In turn, the waste of storage resources and network resources when users view videos can be reduced.
[0082] Optionally, each event of interest in the above event of interest information set corresponds to security level information. The security level information can characterize the urgency of the security event. The security level information can be set by the user or pre-set by the developer. For example, the security level information can include but is not limited to: level 1, level 2, level 3, and level 4. The smaller the level number, the higher the urgency can be.
[0083] Optionally, for each determined event information, the execution subject may perform the following steps:
[0084] The first step is to determine whether the security level information corresponding to the event information satisfies a preset alarm condition. The preset alarm condition may be that the security level information is less than or equal to a preset level number. For example, the preset level number may be level two.
[0085] In the second step, in response to determining that the security level information corresponding to the above event information meets the preset alarm condition, a positioning video link is generated according to the positioning video corresponding to the above event information. In practice, the above execution subject can generate a positioning video link according to the storage address of the above positioning video. The positioning video link can include but is not limited to at least one of the following: QR code, URL, text password.
[0086] The third step is to input the security level information, the positioning video link and the event information into a preset security alarm information template to obtain security alarm information. In practice, the execution subject may input the security level information, the positioning video link and the event information into corresponding positions in the preset security alarm information template to obtain security alarm information. The preset security alarm information template may be a template for combining various information required for security alarm.
[0087] The fourth step is to determine the device address information of at least one pre-bound terminal device. In practice, the execution subject may determine the device address information of each terminal device pre-bound to the target security scene.
[0088] The fifth step is to send the security alarm information to at least one of the terminal devices according to the determined address information of each device, so that the terminal device displays the received security alarm information. When the terminal device displays the security alarm information, it also displays a real-time monitoring link corresponding to the target security scene. The real-time monitoring link may include but is not limited to at least one of the following: a control, a QR code, a URL, and a text password. The user can view the real-time video monitoring of the target security scene by implementing the monitoring link. In this way, the user can be actively alerted only when the security level reaches a certain level of urgency, thereby reducing useless alarm information.
[0089] Step 108: Add each determined event information to the event information set to update the event information set.
[0090] In some embodiments, the above-mentioned execution entity may add each determined event information to an event information set to update the event information set. Among them, the event information set may be used to store detected event information. Event information in the event information set may be eliminated at intervals of a preset duration. For example, the preset duration may be 3 months. The elimination method may be to eliminate event information added within a preset time period with the longest elimination time. The time interval corresponding to the preset time period may be a preset time interval. For example, the preset time interval may be 1 month. In the initial state, the event information set may be an empty set.
[0091] Step 109 , in response to detecting the event query information input by the user, generating security event summary information corresponding to the event query information based on the event query information and the updated event information set.
[0092] In some embodiments, the execution subject may generate security event summary information corresponding to the event query information based on the event query information and the updated event information set in response to detecting the event query information input by the user. Optionally, when the execution subject is a server, the execution subject may send the security event summary information to a terminal device corresponding to the user. When the execution subject is a terminal device, the execution subject may display the security event summary information for the user to view.
[0093] In some optional implementations of some embodiments, the execution subject may generate security event summary information corresponding to the event query information based on the event query information and the updated event information set through the following steps:
[0094] In the first step, for each event information in the event information set, the event occurrence time corresponding to the event information is added to the event information to update the event information. Thus, the event occurrence time can provide a time reference when the user asks questions related to the event time. At the same time, the acquisition time of the surveillance image that best matches the event information is used as the event occurrence time, which can more accurately locate the actual occurrence time of the event.
[0095] In the second step, the event query information and the updated event information set are input into the pre-trained security event language model to obtain the security event text information. The security event text information corresponds to at least one event information. The security event language model can be a language model that takes security-related text information as input and takes reply information as output. The input security-related text information can include the event query information input by the user and the event information set automatically identified by the system. The event query information can be a question in text form input by the user. The security event text information can be the reply information made to the user's question. For example, the event query information can be "What time did my child go out?" The security event text information can be "Your child went out at 7 o'clock in the morning." The event information corresponding to the security event text information can include "The child went out." The language model can be LLM (Large Language Model). The sample for training the security event language model can be a video containing a security event.
[0096] The third step is to generate security event summary information based on the security event text information and at least one event information corresponding to the security event text information. In practice, first, for each event information in the at least one event information, the execution subject can generate a dynamic image based on the positioning video corresponding to the event information. Specifically, the execution subject can use a video conversion tool to convert the positioning video into a dynamic image. The format of the dynamic image can be GIF. Then, the security event summary information in a preset format can be generated based on the security event text information and the generated dynamic images. Specifically, the execution subject can input the security event text information and the dynamic images into a security event summary template corresponding to the preset format to obtain the security event summary information. For example, the preset format can be an html format. The security event summary template can be an html code block to be filled with the security event text information and the dynamic image. The generated security event summary information can be used to load in a page in a terminal device.
[0097] Optionally, the security event language model may be trained by the following steps:
[0098] The first step is to obtain a security event image set, wherein the security event image may be an image representing the occurrence of a security event, and the security event image set may correspond to different types of security events in different scenarios.
[0099] In the second step, for each security event image in the above security event image set, the following steps are performed:
[0100] In the first sub-step, the security event image is converted into text to obtain image text information. In practice, the security event image can be converted into text using an image description model to obtain image text information. For example, the image description model can be GPT-4V.
[0101] The second sub-step is to mark the security event image to obtain the marked security event image. The marked security event image corresponds to image label information. In practice, the image label information of the security event image can be determined by the Detic algorithm, and the image label information can be used as the label of the security event image to mark the security event image to obtain the marked security event image.
[0102] The third sub-step is to combine the security event image, the image label information and the image text information into a sample. The image label information can be used as input data of the model. The image text information can be used as a training target of the model.
[0103] The third step is to determine the combined samples as a sample set.
[0104] The fourth step is to perform the following training steps based on the sample set:
[0105] In the first sub-step, the image label information included in at least one sample in the sample set is input into the initial security event language model to obtain the security event text information corresponding to each sample in the at least one sample. When the training step is performed for the first time, the initial security event language model can be a language model whose model parameters have not been adjusted. In this way, a relatively complete image text description can be generated using simple image labels.
[0106] The second sub-step is to compare the security event text information corresponding to each sample in the at least one sample with the corresponding image text information. In practice, the similarity between the generated security event text information and the image text information can be compared. The number of samples with a similarity greater than or equal to a preset threshold is determined as the comparison result.
[0107] The third sub-step is to determine whether the initial security event language model has reached a preset optimization target based on the comparison result. In practice, it can be determined whether the initial security event language model has reached a preset optimization target in response to determining that the proportion of the comparison result to the at least one sample is greater than or equal to a preset proportion.
[0108] In a fourth sub-step, in response to determining that the initial security event language model achieves the above optimization goal, the initial security event language model is used as a trained security event language model.
[0109] The fifth sub-step is, in response to determining that the initial security event language model does not achieve the above optimization goal, adjusting the network parameters of the initial security event language model, and using unused samples to form a sample set, using the adjusted initial security event language model as the initial security event language model, and performing the above training steps again. In practice, the network parameters can be adjusted by gradient descent, grid search, random search or Bayesian optimization. In this way, the trained security event language model can generate a relatively complete event description using a series of labeled event descriptions.
[0110] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the security event information generation method of some embodiments of the present disclosure, it is possible to adapt to the security event detection of different scenes and reduce useless alarm information. Specifically, the reasons for not being able to adapt to different scenes and having more useless alarm information are: when identifying security events, it is necessary to design a visual perception algorithm according to a specific scene, which cannot adapt to different scenes; when alerting security events, simple rules are used to alert, and there is a lack of alert push focus, resulting in more useless alarm information. Based on this, the security event information generation method of some embodiments of the present disclosure first obtains the surveillance video of the target security scene. Thus, real-time video data in a security scene can be obtained. Then, at least one event information of interest input by the user is determined to obtain an event information set of interest. Thus, each event of interest customized by the user can be determined. Next, a text feature information set corresponding to the above event information set of interest is determined. Thus, the event information of interest input by the user can be text-encoded. Secondly, based on the above surveillance video, video feature information is generated, wherein the above video feature information is a visual representation related to the text. Thus, the visual representation related to the video and the text can be learned. Then, matching information between each text feature information in the above text feature information set and the above video feature information is generated to obtain a matching information set. Thus, the obtained matching information can be used to determine whether the surveillance video matches the event information of interest to the user. Then, based on the above matching information set, determine whether there is event information of interest matching the above video feature information in the above event information set of interest. Afterwards, in response to determining that there is event information of interest matching the above video feature information in the above event information set of interest, each event information of interest matching the above video feature information in the above event information set of interest is determined as each event information. Thus, it can be determined whether an event is detected from each event of interest to the user. Then, each determined event information is added to the event information set to update the event information set. Thus, the set of detected event information can be updated synchronously. Finally, in response to detecting the event query information input by the user, security event summary information corresponding to the event query information is generated based on the above event query information and the updated event information set. Thus, the security event summary information to be displayed to the user can be summarized according to the event query information actively input by the user and the security event detection result. Also, because the detection of security events is based on the various events that users are interested in matching the surveillance video, the learned text-related visual representation can be matched with the various event information that users are interested in, so there is no need to design visual perception algorithms for specific scenarios, so it can adapt to security event detection in different scenarios. Also, because the security event summary information to be displayed to the user is a summary of the event query information actively input by the user, it has an alarm push focus, so it can reduce useless alarm information.In this way, it is possible to adapt to security event detection in different scenarios and reduce useless alarm information.
[0111] Further references Figure 2 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a security event information generating device. These device embodiments are similar to Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0112] like Figure 2 As shown, the security event information generating device 200 of some embodiments includes: an acquisition unit 201, a first determination unit 202, a second determination unit 203, a first generation unit 204, a second generation unit 205, a third determination unit 206, a fourth determination unit 207, an adding unit 208 and a third generation unit 209. The acquisition unit 201 is configured to acquire a surveillance video of a target security scene; the first determination unit 202 is configured to determine at least one event information of interest previously input by a user to obtain an event information set of interest; the second determination unit 203 is configured to determine a text feature information set corresponding to the event information set of interest; the first generation unit 204 is configured to generate video feature information based on the surveillance video, wherein the video feature information is a visual representation related to the text; the second generation unit 205 is configured to generate matching information between each text feature information in the text feature information set and the video feature information to obtain a matching information set; the third determination unit 206 is configured to determine the text feature information set corresponding to the event information set of interest based on the matching information set. The fourth determining unit 207 is configured to, in response to determining that there is event information matching the video feature information in the above-mentioned event information set, determine each event information matching the video feature information in the above-mentioned event information set as each event information; the adding unit 208 is configured to add each determined event information to the event information set to update the event information set; the third generating unit 209 is configured to, in response to detecting event query information input by the user, generate security event summary information corresponding to the above-mentioned event query information based on the above-mentioned event query information and the updated event information set.
[0113] It is understood that the units described in the device 200 are similar to those described in the reference Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 200 and the units included therein, and will not be described in detail here.
[0114] Reference below Figure 3, which shows a structural schematic diagram of an electronic device 300 suitable for implementing some embodiments of the present disclosure. 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.
[0115] like Figure 3 As shown, the electronic device 300 may include a processing device 301 (e.g., a central processing unit, a graphics processing unit, etc.), 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.
[0116] 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.
[0117] 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.
[0118] 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.
[0119] 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.
[0120] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a surveillance video of a target security scene; determines at least one event of interest information previously input by a user to obtain an event of interest information set; determines a text feature information set corresponding to the event of interest information set; generates video feature information based on the surveillance video, wherein the video feature information is a visual representation related to the text; generates matching information between each text feature information in the text feature information set and the video feature information to obtain a matching information set; determines whether there is event of interest information matching the video feature information in the event of interest information set based on the matching information set; in response to determining that there is event of interest information matching the video feature information in the event of interest information set, determines each event of interest information matching the video feature information in the event of interest information set as each event information; adds each determined event information to the event information set to update the event information set; in response to detecting event query information input by a user, generates security event summary information corresponding to the event query information based on the event query information and the updated event information set.
[0121] 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).
[0122] 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.
[0123] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The units described may also be set in a processor, for example, may be described as: a processor includes an acquisition unit, a first determination unit, a second determination unit, a first generation unit, a second generation unit, a third determination unit, a fourth determination unit, an addition unit, and a third 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 video of a target security scene."
[0124] 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.
[0125] 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 security event information, comprising: Obtain surveillance video of the target security scene; Determine at least one event of interest information previously input by the user, and obtain a set of event of interest information; Determine a text feature information set corresponding to the attention event information set; Based on the surveillance video, video feature information is generated, wherein the video feature information is a visual representation related to the text, and the generating of the video feature information based on the surveillance video includes: Marking each surveillance image frame included in the surveillance video to obtain a surveillance image sequence after the marking process, wherein each surveillance image after the marking process corresponds to image label information; Based on the set of attention event information and the image label information corresponding to each surveillance image in the surveillance image sequence, sampling the surveillance image sequence to obtain a set of sampled surveillance images; Performing image stitching processing on each sampled monitoring image in the sampled monitoring image set to obtain a stitched monitoring image; Performing visual feature extraction processing on the spliced monitoring image to obtain visual feature information; Performing text alignment processing on the visual feature information to obtain the visual feature information after the text alignment processing as video feature information; Generate matching information between each text feature information in the text feature information set and the video feature information to obtain a matching information set; Based on the matching information set, determining whether there is event information of interest matching the video feature information in the event information set of interest; In response to determining that there is event information of interest matching the video feature information in the event information set of interest, determining each event information of interest matching the video feature information in the event information set of interest as each event information; Adding each determined event information to the event information set to update the event information set; In response to detecting event query information input by a user, generating security event summary information corresponding to the event query information based on the event query information and the updated event information set; For each event information identified, perform the following steps: Determining the text feature information corresponding to the event information in the text feature information set as target text feature information; Generate label matching information of the target text feature information and each image label information corresponding to the monitoring image sequence as feature matching information, and obtain each feature matching information; Determining the feature matching information that meets the preset feature matching condition among the individual feature matching information as the target feature matching information; Determining a monitoring image in the monitoring image sequence corresponding to the target feature matching information as a matching monitoring image corresponding to the event information; Determining the image acquisition time corresponding to the matching surveillance image as the event occurrence time; Determine the video capture time period according to the time when the event occurred; According to the video capture time period, capturing a positioning video corresponding to the event information from the surveillance video; Extracting a foreground image from each frame of the positioning video to obtain each foreground image; Determining a foreground image corresponding to the matching monitoring image among the foreground images as a matching foreground image; For each of the foreground images, the following steps are performed: Determining the similarity between the foreground image and the matching foreground image as an image matching degree; Determine the similarity between the image tag information of the image corresponding to the foreground image and the event information as the text matching degree; Generating image matching information between an image corresponding to the foreground image and the matching monitoring image according to the image matching degree and the text matching degree; Determine each image before the matching surveillance image in the positioning video as a first image set; Determine a first frame of a first image in the first image set as a first target image; Based on the first target image, the following sequential loop steps are performed: Determining whether the image matching information of the first target image meets a preset image matching condition; In response to determining that the image matching information of the first target image does not satisfy the preset image matching condition, the first target image is deleted from the positioning video to update the positioning video, and the image arranged after the first target image in the first image set is used as the first target image, and the sequential loop step is performed again; In response to determining that the image matching information of the first target image satisfies the preset image matching condition, determining the obtained positioning video as a sequentially deleted positioning video; Determine each image after the matching surveillance image in the positioning video as a second image set; Performing reverse processing on the second image set to obtain a second image sequence; Determine the first second image in the second image sequence as the second target image; and based on the second target image, perform the following reverse loop steps: Determining whether the image matching information of the second target image meets a preset image matching condition; In response to determining that the image matching information of the second target image does not satisfy the preset image matching condition, the second target image is deleted from the sequential deletion positioning video to update the sequential deletion positioning video, and the image in the second image set that is arranged before the second target image is used as the second target image, and the reverse loop step is performed again; In response to determining that the image matching information of the second target image satisfies the preset image matching condition, the obtained sequential deletion positioning video is determined as a reverse deletion positioning video; and the determined reverse deletion positioning video is determined as the positioning video to update the positioning video.
2. The method according to claim 1, wherein: The sampling process of the monitoring image sequence based on the set of attention event information and the image label information corresponding to each monitoring image in the monitoring image sequence to obtain a set of sampled monitoring images includes: For each surveillance image in the surveillance image sequence, the following steps are performed: Determining the image label information corresponding to the monitoring image as the target image label information; For each piece of attention event information in the attention event information set, generating label matching information between the attention event information and the target image label information; Determine the tag matching information that meets the preset tag matching condition among the generated tag matching information as the target tag matching information, and obtain the target tag matching information set; Generating sampling weight information of the monitoring image according to the target tag matching information set; sorting the surveillance images included in the surveillance image sequence according to the sampling weight information corresponding to each surveillance image in the surveillance image sequence to obtain a re-sorted surveillance image sequence; A preset number of monitoring images are selected from the reordered monitoring image sequence as a sampled monitoring image set.
3. The method according to claim 1, wherein: Each piece of attention event information in the attention event information set corresponds to security level information; And the method further comprises: For each event information identified, perform the following steps: Determine whether the security level information corresponding to the event information meets the preset alarm condition; In response to determining that the security level information corresponding to the event information meets a preset alarm condition, generating a positioning video link according to the positioning video corresponding to the event information; Input the security level information, the positioning video link and the event information into a preset security alarm information template to obtain security alarm information; Determine device address information of at least one pre-bound terminal device; According to the determined address information of each device, the security alarm information is sent to the at least one terminal device, so that the terminal device displays the received security alarm information, wherein when the terminal device displays the security alarm information, it also displays a real-time monitoring link corresponding to the target security scene.
4. The method according to claim 1, wherein: The generating security event summary information corresponding to the event query information based on the event query information and the updated event information set includes: For each event information in the event information set, adding the event occurrence time corresponding to the event information to the event information to update the event information; Inputting the event query information and the updated event information set into a pre-trained security event language model to obtain security event text information, wherein the security event text information corresponds to at least one event information; Security event summary information is generated according to the security event text information and at least one event information corresponding to the security event text information.
5. The method according to claim 4, wherein: The security event language model is trained by the following steps: Get a collection of security event images; For each security event image in the security event image set, the following steps are performed: Performing text conversion processing on the security event image to obtain image text information; Marking the security event image to obtain a marked security event image, wherein the marked security event image corresponds to image label information; Combining the security event image, the image label information and the image text information into a sample; Determine the combined samples as a sample set; Based on the sample set, the following training steps are performed: Inputting the image label information included in at least one sample in the sample set into the initial security event language model respectively, to obtain the security event text information corresponding to each sample in the at least one sample; Comparing the security event text information corresponding to each sample in the at least one sample with the corresponding image text information; Determine whether the initial security event language model reaches a preset optimization goal based on the comparison result; In response to determining that the initial security event language model achieves the optimization goal, using the initial security event language model as a trained security event language model; In response to determining that the initial security event language model does not achieve the optimization goal, the network parameters of the initial security event language model are adjusted, and a sample set is composed of unused samples, and the adjusted initial security event language model is used as the initial security event language model, and the training step is performed again.
6. A security event information generating device, comprising: An acquisition unit configured to acquire surveillance video of a target security scene; A first determining unit is configured to determine at least one event of interest information previously input by a user, and obtain an event of interest information set; A second determining unit is configured to determine a text feature information set corresponding to the attention event information set; The first generating unit is configured to generate video feature information based on the monitoring video, wherein the video feature information is a visual representation related to the text, and the generating of the video feature information based on the monitoring video includes: marking each monitoring image frame included in the monitoring video to obtain a monitoring image sequence after marking, wherein each monitoring image after marking corresponds to image label information; based on the set of attention event information and the image label information corresponding to each monitoring image in the monitoring image sequence, sampling the monitoring image sequence to obtain a sampled monitoring image set; performing image stitching processing on each sampled monitoring image in the sampled monitoring image set to obtain a stitched monitoring image; performing visual feature extraction processing on the stitched monitoring image to obtain visual feature information; performing text alignment processing on the visual feature information to obtain the visual feature information after text alignment processing as the video feature information; A second generating unit is configured to generate matching information between each text feature information in the text feature information set and the video feature information to obtain a matching information set; A third determining unit is configured to determine whether there is event information of interest matching the video feature information in the event information set based on the matching information set; a fourth determining unit, configured to, in response to determining that there is event information of interest matching the video feature information in the event information set of interest, determine each event information of interest matching the video feature information in the event information set of interest as each event information; an adding unit, configured to add each determined event information to the event information set to update the event information set; A third generating unit is configured to generate security event summary information corresponding to the event query information based on the event query information and the updated event information set in response to detecting the event query information input by the user; The first execution unit is configured to perform the following steps for each determined event information: determine the text feature information corresponding to the event information in the text feature information set as target text feature information; generate label matching information of the target text feature information and each image label information corresponding to the monitoring image sequence as feature matching information to obtain each feature matching information; determine the feature matching information that meets the preset feature matching condition in each feature matching information as target feature matching information; determine the monitoring image corresponding to the target feature matching information in the monitoring image sequence as the matching monitoring image corresponding to the event information; determine the image acquisition time corresponding to the matching monitoring image as the event occurrence time; determine the video capture time period according to the event occurrence time; and capture the positioning video corresponding to the event information from the monitoring video according to the video capture time period; An extraction unit is configured to extract a foreground image from each frame of the positioning video to obtain each foreground image; a fifth determining unit, configured to determine a foreground image corresponding to the matching monitoring image among the foreground images as a matching foreground image; The second execution unit is configured to perform the following steps for each foreground image of the foreground images: determining the similarity between the foreground image and the matching foreground image as an image matching degree; determining the similarity between the image tag information of the image corresponding to the foreground image and the event information as a text matching degree; and generating image matching information between the image corresponding to the foreground image and the matching surveillance image according to the image matching degree and the text matching degree; A sixth determining unit is configured to determine each image before the matching surveillance image in the positioning video as a first image set; a seventh determining unit, configured to determine a first frame of a first image in the first image set as a first target image; The third execution unit is configured to perform the following sequential loop steps based on the first target image: determine whether the image matching information of the first target image satisfies a preset image matching condition; in response to determining that the image matching information of the first target image does not satisfy the preset image matching condition, delete the first target image from the positioning video to update the positioning video, and use the image arranged after the first target image in the first image set as the first target image, and perform the sequential loop steps again; in response to determining that the image matching information of the first target image satisfies the preset image matching condition, determine the obtained positioning video as a sequentially deleted positioning video; an eighth determining unit, configured to determine each image after the matching surveillance image in the positioning video as a second image set; a reverse processing unit, configured to perform reverse processing on the second image set to obtain a second image sequence; a ninth determining unit, configured to determine the first second image in the second image sequence as a second target image; The fourth execution unit is configured to perform the following reverse loop steps based on the second target image: determine whether the image matching information of the second target image satisfies a preset image matching condition; in response to determining that the image matching information of the second target image does not satisfy the preset image matching condition, delete the second target image from the sequential deletion positioning video to update the sequential deletion positioning video, and use the image in the second image set that is arranged before the second target image as the second target image, and perform the reverse loop steps again; in response to determining that the image matching information of the second target image satisfies the preset image matching condition, determine the obtained sequential deletion positioning video as the reverse deletion positioning video; The tenth determining unit is configured to determine the determined reverse-order deleted positioning video as the positioning video to update the positioning video.
7. 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 according to any one of claims 1 to 5.
8. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Remote intelligent monitoring system facing home furnishing and control method thereof
CN104122863A
Video processing method, sample generation method, model training method and device
CN115098729A
Video generation method, video display method and device
CN115357755A
Event detection method and device, equipment and storage medium
CN116824455A