Method and device for determining alarm message

By obtaining multimedia information and prompt messages in the video surveillance system, and calculating the similarity between the multimedia information and preset semantic elements, the problem of a large number of invalid alarm messages in the video surveillance system is solved, and the accuracy of alarm messages is improved.

CN119169537BActive Publication Date: 2025-03-07ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411663294.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-03-07
Estimated Expiration
2044-11-20

AI Technical Summary

Technical Problem

The deployment of a large number of video surveillance cameras in the video surveillance system may lead to the push of a large number of invalid alarm messages, affecting the user experience.

Method used

By acquiring the multimedia information and the prompt message, the similarity between the multimedia information and the preset semantic element set is determined, and then whether the prompt message is an alarm message.

Benefits of technology

It effectively reduces the push of invalid alarm messages, improves the accuracy of alarm messages, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119169537B_ABST
    Figure CN119169537B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method and device for determining an alarm message, including: obtaining a prompt message and multimedia information, wherein the prompt message is a message obtained by detecting the multimedia information; determining the similarity between the multimedia information and each semantic element in a preset semantic element set to obtain a first similarity set, wherein the prompt message includes at least one target semantic element, and the target semantic element is an element in the semantic element set; determining whether the prompt message is an alarm message through the first similarity set. Through the present invention, the problem of pushing a large number of invalid alarm messages during the detection process in the related art is solved, thereby achieving the effect of improving the accuracy of the alarm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the computer field, and in particular, to a method and device for determining an alarm message. Background Art

[0002] With the development of artificial intelligence technology, various intelligent technologies such as target recognition and event monitoring have been applied in all walks of life.

[0003] However, due to the deployment of a large number of video surveillance cameras in the video surveillance system, a large number of prompt messages may be generated, which need to be analyzed and identified. When the number of prompt messages is large, or the reasoning ability of the algorithm model and the model configuration items are different, it is easy to make misjudgments, resulting in false alarms, and then push a large number of invalid alarm messages to the client, affecting the user experience.

[0004] There is currently no effective solution to the above problems. Summary of the invention

[0005] The embodiments of the present invention provide a method and device for determining an alarm message, so as to at least solve the problem of pushing a large number of invalid alarm messages during the detection process in the related art.

[0006] According to one embodiment of the present invention, a method for determining an alarm message is provided, comprising: obtaining a prompt message and multimedia information, wherein the prompt message is a message obtained by detecting the multimedia information; determining the similarity between the multimedia information and each semantic element in a preset semantic element set to obtain a first similarity set, wherein the prompt message includes at least one target semantic element, and the target semantic element is an element in the semantic element set; and determining whether the prompt message is an alarm message through the first similarity set.

[0007] In an exemplary embodiment, determining whether the prompt message is an alarm message through the first similarity set includes: determining the similarity corresponding to the target semantic element in the first similarity set to obtain a second similarity set; and determining whether the prompt message is an alarm message based on a size relationship between each similarity in the first similarity set and the second similarity set.

[0008] In an exemplary embodiment, determining whether the prompt message is an alarm message based on the size relationship between the first similarity set and each similarity in the second similarity set includes: determining the numerical value of the minimum similarity in the second similarity set as the target value; obtaining the similarities in the first similarity set whose numerical value is greater than or equal to the target value to obtain a third similarity set; and determining whether the prompt message is an alarm message based on the target semantic element and the third similarity set.

[0009] In an exemplary embodiment, determining whether the prompt message is an alarm message based on the target semantic element and the third similarity set includes: obtaining a target semantic element set based on the target semantic element; determining the semantic elements corresponding to each similarity in the third similarity set based on the correspondence between each similarity in the first similarity set and each semantic element in the preset semantic element set to obtain a third semantic element set; determining a target confidence between the target semantic element set and the third semantic element set; and determining whether the prompt message is an alarm message based on the target confidence.

[0010] In an exemplary embodiment, determining a target confidence between the target semantic element set and the third semantic element set includes: determining the intersection of the target semantic element set and the third semantic element set, and determining the number of semantic elements in the intersection as a first number; determining the union of the target semantic element set and the third semantic element set, and determining the number of semantic elements in the union as a second number; and determining a ratio between the first number and the second number as the target confidence.

[0011] In an exemplary embodiment, determining whether the prompt message is an alarm message based on the target confidence includes: when the target confidence is greater than or equal to a preset confidence threshold, determining that the prompt message is an alarm message; when the target confidence is less than the preset confidence threshold, filtering the prompt message.

[0012] In an exemplary embodiment, the similarity between the multimedia information and each semantic element in a preset semantic element set is determined to obtain a first similarity set, including: encoding each semantic element in the preset semantic element set to obtain a first vector set; when the multimedia information is a picture, encoding the multimedia information to obtain a second vector; and calculating the similarity between each vector in the first vector set and the second vector to obtain a first similarity set.

[0013] In an exemplary embodiment, determining the similarity between the multimedia information and each semantic element in a preset semantic element set to obtain a first similarity set also includes: encoding each semantic element in the preset semantic element set to obtain a first vector set; when the multimedia information is a video, splitting the multimedia information into N pictures to obtain a target picture set, wherein N is an integer greater than 1; encoding the N pictures in the target picture set respectively to obtain a third vector set; performing the following operations on each vector in the first vector set, and the vector performing the following operations is called a target vector, wherein the target vector is a vector obtained by encoding a target semantic element, and the target semantic element belongs to the preset semantic element set: calculating the similarity between the target vector and N vectors in the third vector set to obtain N similarities; determining the similarity with the largest value among the N similarities as the target similarity between the target semantic element and the multimedia information, wherein the first similarity set includes the target similarity.

[0014] According to another embodiment of the present invention, there is provided a device for determining an alarm message, comprising: an acquisition module, used to acquire a prompt message and multimedia information, wherein the prompt message is a message obtained by detecting the multimedia information; a first determination module, used to determine the similarity between the multimedia information and each semantic element in a preset semantic element set, to obtain a first similarity set, wherein the prompt message includes at least one target semantic element, and the target semantic element is an element in the semantic element set; and a second determination module, used to determine whether the prompt message is an alarm message through the first similarity set.

[0015] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of any of the above methods when executed by a processor.

[0016] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0017] According to yet another embodiment of the present invention, a computer program product is provided, comprising computer instructions, wherein when the computer instructions are executed by a processor, the steps of any of the above methods are implemented.

[0018] Through the present invention, by obtaining multimedia information and detecting the prompt message obtained by the multimedia information, the similarity between the multimedia information and the preset semantic element set is determined, thereby determining whether the prompt message is an alarm message according to the similarity, and by the similarity between the multimedia information and the semantic element, a secondary match is performed between the multimedia information and the semantic element, thereby determining whether the prompt message is an alarm message according to the matching result. Therefore, the problem of pushing a large number of invalid alarm messages during the detection process in the related art can be solved, and the effect of improving the accuracy of the alarm can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a hardware structure block diagram of a mobile terminal according to a method for determining an alarm message according to an embodiment of the present invention;

[0020] Figure 2 is a flowchart of a method for determining an alarm message according to an embodiment of the present invention;

[0021] Figure 3 is a flowchart of determining a prompt message according to an embodiment of the present invention;

[0022] Figure 4 It is a structural block diagram of an apparatus for determining an alarm message according to an embodiment of the present invention. DETAILED DESCRIPTION

[0023] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0025] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for determining an alarm message according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0026] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for determining an alarm message in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0027] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0028] In this embodiment, a method running on the above mobile terminal or network architecture is provided. Figure 2 is a flow chart of a method for determining an alarm message according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0029] Step S202, obtaining a prompt message and multimedia information, wherein the prompt message is a message obtained by detecting the multimedia information;

[0030] The above-mentioned prompt message can be a message sent by the system to be analyzed and identified, which is obtained by the system based on multimedia information detection, and the prompt message contains preset warning words or semantic elements; the above-mentioned multimedia information can be information obtained by the terminal monitoring the target, such as video, audio, image and other data recorded by cameras, sensors and other devices. Through these data, the dynamic changes, behavioral characteristics, etc. of the target can be analyzed, thereby realizing effective monitoring and management of the target; at the same time, the prompt message pushed by the system and the multimedia information corresponding to the prompt message are obtained.

[0031] Step S204, determining the similarity between the multimedia information and each semantic element in a preset semantic element set, and obtaining a first similarity set, wherein the prompt message includes at least one target semantic element, and the target semantic element is an element in the semantic element set;

[0032] The above-mentioned preset semantic element set can be a set of all warning words. For example, in the case of forest fire detection, the preset semantic element set can be {smoke, flame}; in the case of some indoor detections where pets are not allowed, the preset semantic element set can be {cat, dog, bird, hedgehog, rabbit}, etc.; wherein each semantic element in the preset semantic element set can be a target category associated with the warning in the result output by the recognition model. The similarity between the multimedia information and each semantic element in the preset semantic element set is calculated respectively to obtain a first similarity set.

[0033] Optionally, determining the similarity between the multimedia information and each semantic element in a preset semantic element set to obtain a first similarity set includes: encoding each semantic element in the preset semantic element set to obtain a first vector set; when the multimedia information is a picture, encoding the multimedia information to obtain a second vector; calculating the similarity between each vector in the first vector set and the second vector to obtain a first similarity set.

[0034] The above-mentioned first vector set can be a set obtained by encoding each semantic element in a preset semantic element set. Specifically, each semantic element in the preset semantic element set is converted to obtain a sentence set, wherein each sentence in the sentence set is constructed according to a preset sentence format for each semantic element in the preset semantic element set, and each sentence in the sentence set corresponds one-to-one to each semantic element in the preset semantic element set. For example, the preset semantic element set can be {smoke, flame}, and the corresponding sentence set can be {white or gray thick cloud-like objects, orange-red or blue bright light}; each sentence in the sentence set is encoded by the text encoder of the model to obtain the first vector set, for example, each sentence in the sentence set is encoded by the text encoder of the CLIP model to obtain the first vector set.

[0035] The second vector may be a vector obtained by encoding the multimedia information. For example, when the multimedia information is a picture, the picture is encoded by a picture encoder of the CLIP model to obtain the second vector.

[0036] The similarities between the second vector and each vector in the first vector set are calculated respectively to obtain a first similarity set. For example, the cosine similarity between the second vector and each vector in the first vector set is calculated, wherein the closer the similarity is to 1, the more similar the two vectors are, and the closer the similarity is to 0, the less similar the two vectors are. This allows obtaining the correlation between the multimedia information and the preset warning words, which is helpful for subsequent screening of prompt information and improving the accuracy of the warning.

[0037] Optionally, determining the similarity between the multimedia information and each semantic element in a preset semantic element set to obtain a first similarity set also includes: encoding each semantic element in the preset semantic element set to obtain a first vector set; when the multimedia information is a video, splitting the multimedia information into N pictures to obtain a target picture set, wherein N is an integer greater than 1; encoding the N pictures in the target picture set respectively to obtain a third vector set; performing the following operations on each vector in the first vector set, and the vector performing the following operations is called a target vector, wherein the target vector is a vector obtained by encoding a target semantic element, and the target semantic element belongs to the preset semantic element set: calculating the similarity between the target vector and N vectors in the third vector set to obtain N similarities; determining the similarity with the largest numerical value among the N similarities as the target similarity between the target semantic element and the multimedia information, wherein the first similarity set includes the target similarity.

[0038] The third vector set may be a vector set obtained by encoding multimedia information. For example, when the multimedia information is a video, the video is decomposed into a target picture set consisting of N pictures, and the N pictures are encoded separately by the picture encoder of the CLIP model to obtain the third vector set.

[0039] Calculate the similarity between each vector in the third vector set and each vector in the first vector set respectively, and take the maximum similarity among the similarities between each vector in the first vector set and each vector in the third vector set as the similarity between each vector in the first vector set and the third vector set, so as to obtain the first vector set. For example, the first vector set is T={t1, t2, t3}, the third vector set Q={q1, q2, q3, q4, q5}, calculate the cosine similarity between t1 and each vector in the third vector set Q respectively, and obtain the set {s11, s12, s123, s14, s15}, where s11 represents the cosine similarity between t1 and q1, s12 represents the cosine similarity between t1 and q2, and so on; the maximum value in the set {s11, s12, s123, s14, s15} is s15, then it is confirmed Define s15 as the cosine similarity between t1 and the third vector set Q, calculate in sequence, determine the cosine similarities between t2, t3 and the third vector set, and obtain a first similarity set, wherein each similarity in the first similarity set is the similarity between each vector in the first vector set and the third vector set, wherein the closer the similarity is to 1, the more similar the two vectors are, and the closer the similarity is to 0, the less similar the two vectors are, thereby obtaining the correlation between the multimedia information and the preset warning words, which is helpful for subsequent screening of prompt information and improving the accuracy of the warning.

[0040] Optionally, in the case that the multimedia information is audio, the similarity between the multimedia information and the preset semantic element set may be calculated in a manner similar to the above embodiment.

[0041] Step S206: determine whether the prompt message is a warning message through the first similarity set.

[0042] Specifically, the similarity corresponding to the target semantic element is determined in the first similarity set to obtain a second similarity set; and whether the prompt message is an alarm message is determined according to the size relationship between each similarity in the first similarity set and the second similarity set.

[0043] The above-mentioned target semantic element may be a warning word contained in the prompt message, and the warning word is one or more semantic elements in the preset semantic element set; the above-mentioned second similarity set may be a set composed of the similarities between the target semantic element and the multimedia information, and the second similarity set may be searched in the first similarity set according to the target semantic element; when obtaining the target semantic element contained in the prompt message, the similarity corresponding to the target semantic element is found in the first similarity set to obtain the second similarity set, thereby obtaining the similarity between the prompt message and the multimedia information, which is helpful to determine whether the prompt message is accurate.

[0044] Optionally, the executor of the above steps may be a background processor, or other devices with similar processing capabilities, or a machine that integrates at least an image acquisition device and a data processing device, wherein the image acquisition device may include a graphics acquisition module such as a camera, and the data processing device may include a computer, a mobile phone or other terminal, but is not limited thereto.

[0045] Through the above steps, by acquiring multimedia information and the prompt message obtained by detecting the multimedia information, the similarity between the multimedia information and the preset semantic element set is determined, so as to determine whether the prompt message is an alarm message according to the similarity. Since the main change attributes in the application scene are quantified, the scene change factors are obtained in real time to match the detection tasks after the model scheduling, and finally the detection accuracy and stability of the detection system are improved as a whole. The problem of pushing a large number of invalid alarm messages during the detection process in the related technology is solved, and the alarm accuracy is improved.

[0046] As an optional implementation, determining whether the prompt message is an alarm message based on the size relationship between the first similarity set and the respective similarities in the second similarity set includes: determining the numerical value of the minimum similarity in the second similarity set as the target value; obtaining the similarities in the first similarity set whose numerical value is greater than or equal to the target value to obtain a third similarity set; and determining whether the prompt message is an alarm message based on the target semantic element and the third similarity set.

[0047] The third similarity set may be a subset of the first similarity set, and the similarity set may be determined by the first similarity set and the second similarity set. For example, the first similarity set is (0.1, 0.2, 0.3, 0.5, 0.6, 0.8, 0.9), and the second similarity set is (0.3, 0.5). Then, the minimum similarity in the second similarity set is determined to be 0.3, and all similarities greater than or equal to 0.3 are obtained in the first similarity set to obtain a third similarity set (0.3, 0.5, 0.6, 0.8, 0.9). Thus, according to the third similarity set and the target semantic element, it is determined whether the prompt message is an alarm message.

[0048] Optionally, determining whether the prompt message is an alarm message based on the target semantic element and the third similarity set includes: obtaining a target semantic element set based on the target semantic element; determining the semantic elements corresponding to each similarity in the third similarity set based on the correspondence between each similarity in the first similarity set and each semantic element in the preset semantic element set, to obtain a third semantic element set; determining a target confidence between the target semantic element set and the third semantic element set; and determining whether the prompt message is an alarm message based on the target confidence.

[0049] By using the minimum similarity in the second similarity set, a third similarity set is determined in the first similarity set, and a third semantic element set is determined based on the third similarity set, so as to obtain all semantic elements with high similarity to the multimedia information. Thus, based on the confidence between the semantic element set with high similarity and the target semantic set contained in the prompt message, it is judged whether the prompt message is an alarm message, thereby effectively avoiding false detection and missed detection of alarm elements and improving the accuracy of alarms.

[0050] As an optional implementation, determining the target confidence between the target semantic element set and the third semantic element set includes: determining the intersection of the target semantic element set and the third semantic element set, and determining the number of semantic elements in the intersection as a first number; determining the union of the target semantic element set and the third semantic element set, and determining the number of semantic elements in the union as a second number; and determining the ratio between the first number and the second number as the target confidence.

[0051] Specifically, the target confidence can be obtained through the following formula:

[0052]

[0053] in, is the target confidence, is the target semantic element set, It is the third semantic element set.

[0054] Optionally, when the target semantic element set is {"cat"} and the third semantic element set is {"cat", "dog", "snake"}, the target confidence is:

[0055]

[0056] As an optional implementation, determining whether the prompt message is an alarm message based on the target confidence includes: when the target confidence is greater than or equal to a preset confidence threshold, determining that the prompt message is an alarm message; when the target confidence is less than the preset confidence threshold, filtering the prompt message.

[0057] As an optional implementation, Figure 3 is a flowchart of determining a prompt message according to an embodiment of the present invention, such as Figure 3 As shown, the specific process is as follows:

[0058] S301, obtaining a preset semantic element set E1 (e1, e2, ..., em) related to the alarm that can be output by the model used in the current scene. Since most detection and recognition models have a process of identifying the target position and adding target category information, the set of all target types associated with the alarm in the model output result can be used as the composition of the preset semantic element set E1 according to the actual alarm business requirements;

[0059] S302, constructing prompt sentences for the semantic elements in E1, and constructing a sentence set S1 with the same structure according to the prompt sentence format used by the CLIP model in the training phase, wherein each element in E1 has a prompt sentence in S1 corresponding to it;

[0060] S303, using the text encoder of the pre-trained CLIP model to encode the text sentences in S1, and obtain the first vector set T1 corresponding to S1.

[0061] S304, obtaining multimedia information pushed simultaneously with the prompt message, wherein the multimedia information is usually in the form of pictures and video data, and corresponding processing is performed according to different forms of the multimedia information. If the multimedia information is a picture, jump to step S305; if the multimedia information is a video, jump to step S306;

[0062] S305, when the multimedia information is a picture, encode the picture using the picture encoder of the pre-trained CLIP model to obtain a second vector, and perform cosine similarity calculation on the second vector and each vector in T1 to obtain a first similarity set R1; jump to step S307;

[0063] S306, when the multimedia information is a video, decode the video data into a picture set (including N pictures), use the picture encoder of the pre-trained CLIP model to encode and vectorize the N pictures respectively to obtain a third vector set, and calculate the cosine similarity between each vector in T1 and the vectors in the third vector set, and take the maximum value as the association degree between the corresponding semantic element and the multimedia information (video), and obtain the first similarity set R1'; jump to step S307;

[0064] S307, obtaining the second similarity set R2 corresponding to the target semantic element set E2 appearing in the prompt message in R1(R1'), that is, R2 is a proper subset of R1(R1'), wherein E2 can be obtained in the following ways: by using NLP models such as spaCy to decompose the prompt information into semantic elements, or by analyzing the sentence format (for prompt messages using fixed sentence formats, key semantic elements can be directly extracted according to the fixed positions of the key semantic elements in the prompt message), or by extracting the target category information output by the original detection model when prompting, and treating it as a semantic element to form the target semantic element set E2;

[0065] S308, sorting R1' or R1 in step S305 or step S306 from large to small, selecting the value of the smallest similarity V2 in R2 as the target value, and selecting the semantic elements corresponding to the similarity greater than or equal to the target value in (R1)R1', to obtain a third semantic element set E3;

[0066] S309, determining the target confidence α of the prompt message according to the hit situation of E2 in the set E3, and the specific calculation method is as follows:

[0067]

[0068] in, is the target confidence, is the target semantic element set, is the third semantic element set;

[0069] For example, the third semantic element set E3 is {"cat", "dog", "snake"}, and the target semantic element set E2 is {"cat"}, then the confidence α is calculated as follows:

[0070]

[0071] S310, determine the filtering degree of the prompt message according to the preset confidence threshold β configured by the user. When the calculated target confidence α of the current prompt message is α<β, directly filter this prompt message and multimedia information. Otherwise, determine the prompt message as an alarm message and save the corresponding prompt message and multimedia information.

[0072] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0073] In this embodiment, a device for determining an alarm message is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0074] Figure 4 is a structural block diagram of an apparatus for determining an alarm message according to an embodiment of the present invention, such as Figure 4 As shown, the device includes: an acquisition module 402, used to acquire a prompt message and multimedia information, wherein the prompt message is a message obtained by detecting the multimedia information; a first determination module 404, used to determine the similarity between the multimedia information and each semantic element in a preset semantic element set, and obtain a first similarity set, wherein the prompt message includes at least one target semantic element, and the target semantic element is an element in the semantic element set; a second determination module 406, used to determine whether the prompt message is an alarm message through the first similarity set.

[0075] In an exemplary embodiment, the device is also used to determine the similarity corresponding to the target semantic element in the first similarity set to obtain a second similarity set; and determine whether the prompt message is an alarm message based on the size relationship between the first similarity set and the respective similarities in the second similarity set.

[0076] In an exemplary embodiment, the device is also used to determine the numerical value of the minimum similarity in the second similarity set as the target value; obtain the similarities whose numerical values ​​are greater than or equal to the target value in the first similarity set to obtain a third similarity set; and determine whether the prompt message is an alarm message based on the target semantic element and the third similarity set.

[0077] In an exemplary embodiment, the device is also used to obtain a target semantic element set based on the target semantic element; determine the semantic elements corresponding to each similarity in the third similarity set based on the correspondence between each similarity in the first similarity set and each semantic element in the preset semantic element set to obtain a third semantic element set; determine the target confidence between the target semantic element set and the third semantic element set; and determine whether the prompt message is an alarm message based on the target confidence.

[0078] In an exemplary embodiment, the device is also used to determine the intersection of the target semantic element set and the third semantic element set, and determine the number of semantic elements in the intersection as a first number; determine the union of the target semantic element set and the third semantic element set, and determine the number of semantic elements in the union as a second number; and determine the ratio between the first number and the second number as the target confidence.

[0079] In an exemplary embodiment, the device is also used to determine that the prompt message is a warning message when the target confidence is greater than or equal to a preset confidence threshold; and filter the prompt message when the target confidence is less than the preset confidence threshold.

[0080] In an exemplary embodiment, the device is also used to encode each semantic element in the preset semantic element set to obtain a first vector set; when the multimedia information is a picture, encode the multimedia information to obtain a second vector; calculate the similarity between each vector in the first vector set and the second vector to obtain a first similarity set.

[0081] In an exemplary embodiment, the device is also used to encode each semantic element in the preset semantic element set to obtain a first vector set; when the multimedia information is a video, split the multimedia information into N pictures to obtain a target picture set, where N is an integer greater than 1; encode the N pictures in the target picture set respectively to obtain a third vector set; perform the following operations on each vector in the first vector set, and the vector performing the following operations is called a target vector, wherein the target vector is a vector obtained by encoding a target semantic element, and the target semantic element belongs to the preset semantic element set: calculate the similarity between the target vector and N vectors in the third vector set to obtain N similarities; determine the similarity with the largest value among the N similarities as the target similarity between the target semantic element and the multimedia information, wherein the first similarity set includes the target similarity.

[0082] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0083] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0084] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0085] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0086] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0087] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the steps of the method described in each embodiment of the present application when executed by a processor.

[0088] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0089] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0090] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for determining an alarm message, characterized in that: include: Acquire a prompt message and multimedia information, wherein the prompt message is a message obtained by detecting the multimedia information; Determine the similarity between the multimedia information and each semantic element in a preset semantic element set to obtain a first similarity set, wherein the prompt message includes at least one target semantic element, and the target semantic element is an element in the semantic element set; Determining the similarity corresponding to the target semantic element in the first similarity set to obtain a second similarity set; Determine the value of the minimum similarity in the second similarity set as a target value; Obtain similarities whose values ​​are greater than or equal to the target value in the first similarity set to obtain a third similarity set; Determine, according to the correspondence between each similarity in the first similarity set and each semantic element in the preset semantic element set, the semantic element corresponding to each similarity in the third similarity set, to obtain a third semantic element set; Determining an intersection of the target semantic element set and the third semantic element set, and determining the number of semantic elements in the intersection as a first number, wherein the target semantic element set includes the at least one target semantic element; Determine a union of the target semantic element set and the third semantic element set, and determine the number of semantic elements in the union as a second number; determining a ratio between the first number and the second number as a target confidence level; Determine whether the prompt message is a warning message according to the target confidence.

2. The method according to claim 1, characterized in that: Determining whether the prompt message is a warning message according to the target confidence level includes: When the target confidence is greater than or equal to a preset confidence threshold, determining that the prompt message is a warning message; When the target confidence is less than the preset confidence threshold, the prompt message is filtered.

3. The method according to claim 1, characterized in that Determining the similarity between the multimedia information and each semantic element in a preset semantic element set to obtain a first similarity set includes: Encoding each semantic element in the preset semantic element set to obtain a first vector set; When the multimedia information is a picture, encoding the multimedia information to obtain a second vector; The similarity between each vector in the first vector set and the second vector is calculated to obtain a first similarity set.

4. The method according to claim 1, characterized in that: Determining the similarity between the multimedia information and each semantic element in a preset semantic element set to obtain a first similarity set further includes: Encoding each semantic element in the preset semantic element set to obtain a first vector set; In the case where the multimedia information is a video, splitting the multimedia information into N pictures to obtain a target picture set, where N is an integer greater than 1; Encode N pictures in the target picture set respectively to obtain a third vector set; Perform the following operations on each vector in the first vector set, where the vector that performs the following operations is called a target vector, where the target vector is a vector obtained by encoding a target semantic element, and the target semantic element belongs to the preset semantic element set: Calculating similarities between the target vector and N vectors in the third vector set to obtain N similarities; The similarity with the largest value among the N similarities is determined as the target similarity between the target semantic element and the multimedia information, wherein the first similarity set includes the target similarity.

5. A device for determining an alarm message, characterized in that: include: An acquisition module, used for acquiring a prompt message and multimedia information, wherein the prompt message is a message obtained by detecting the multimedia information; a first determination module, configured to determine a similarity between the multimedia information and each semantic element in a preset semantic element set, to obtain a first similarity set, wherein the prompt message includes at least one target semantic element, and the target semantic element is an element in the semantic element set; A second determination module, configured to determine whether the prompt message is a warning message through the first similarity set; The second determination module is further configured to determine the similarity corresponding to the target semantic element in the first similarity set to obtain a second similarity set; Determine the value of the minimum similarity in the second similarity set as a target value; Obtain similarities whose values ​​are greater than or equal to the target value in the first similarity set to obtain a third similarity set; Determine, according to the correspondence between each similarity in the first similarity set and each semantic element in the preset semantic element set, the semantic element corresponding to each similarity in the third similarity set, to obtain a third semantic element set; Determine an intersection of the target semantic element set and the third semantic element set, and determine the number of semantic elements in the intersection as a first number, the target semantic element set including the at least one target semantic element, and the target semantic element set including the at least one target semantic element; Determine a union of the target semantic element set and the third semantic element set, and determine the number of semantic elements in the union as a second number; A ratio between the first number and the second number is determined as a target confidence level.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 4 when executed by a processor.

7. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 4.

8. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method described in any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Video monitoring method and device and related equipment

    CN114007131A