Message pushing method and device and computer storage medium
By using scenario understanding and multi-level feature comparison of IoT devices, the problems of redundancy and missed reporting in message filtering of IoT devices are solved, and highly accurate message filtering and timely push are achieved.
Patent Information
- Application Number
- CN202511917328.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2045-12-18
AI Technical Summary
In existing technologies, message filtering mechanisms for IoT devices, which rely on keywords or text similarity, struggle to accurately identify different expressions of the same type of key event, resulting in low message filtering accuracy and redundancy or missed reports.
By performing scenario understanding on target event messages, target scenario data and risk levels are obtained. Based on the comparison of scenario data with historical event messages, scenario tags, vector features and image similarity are used to determine whether the messages belong to the same event, and low-risk events are filtered out.
It improves the accuracy of message filtering, reduces interference from redundant messages, and ensures the timely delivery of key information, balancing the rationality and timeliness of message delivery.
Smart Images

Figure CN121357239A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of Internet of Things, and in particular to a message pushing method, device and computer storage medium. BACKGROUND
[0002] With the rapid development of Internet of Things technology, Internet of Things devices have been widely applied in smart home, industrial monitoring, security and alarm, environmental sensing and other fields. Internet of Things devices can collect surrounding environment data in real time, identify abnormal intrusion, environmental parameter exceeding and other abnormal conditions, and push reminder messages to user terminals through the network, helping users to timely grasp key situations and take measures, greatly improving the convenience and safety of life and work.
[0003] In the identification process, due to device false triggering, repeated data collection and other reasons, the phenomenon of too frequent message reporting or a large number of reminder messages being pushed in a short time may occur, which interferes with the user. After filtering the messages reported by the Internet of Things device through a message filtering mechanism, the messages are pushed to the user terminal.
[0004] The message filtering mechanism in related technologies is mainly based on message text, for example, by extracting keywords in the message and matching them with preset filtering rules, or calculating the text similarity of the previous and next two messages to realize repeated message deduplication. However, special situations in different scenarios may be described through different expressions of text, and it is difficult to accurately identify the core semantics of the message based on keywords or text similarity alone, which may misjudge different expression messages of the same type of key event as non-repeated messages, resulting in low accuracy of message filtering. SUMMARY
[0005] To solve the above technical problems, the present application provides a message pushing method, device and computer storage medium.
[0006] To solve the above technical problems, the present application provides a message pushing method, which comprises: Upon receiving a target event message reported by a target device, performing scene understanding on the target event message, determining target scene data corresponding to the target event message and a risk level; In the case where the risk level is less than a preset risk threshold, comparing the target event message with historical event messages based on the target scene data to obtain a comparison result; When the comparison result indicates that the target event message and the historical event message are different event messages, pushing the target event message.
[0007] Among them, the target scene data includes a target scene label and a target scene description; The comparing the target event message with the historical event message based on the target scene data comprises: comparing the target scene label with a historical scene label corresponding to the historical event message; when the target scene label is consistent with the historical scene label, determining the comparison result according to a historical scene description corresponding to the historical event message and the target scene description.
[0008] wherein, determining the comparison result according to the historical scene description corresponding to the historical event message and the target scene description comprises: obtaining a historical vector feature corresponding to the historical scene description and a target vector feature corresponding to the target scene description; determining a feature similarity between the historical vector feature and the target vector feature; when the feature similarity is greater than or equal to a preset similarity, determining the comparison result according to an image similarity between a target image corresponding to the target event message and a historical image corresponding to the historical event message.
[0009] wherein, the method further comprises: when the feature similarity is less than the preset similarity, determining that the comparison result is that the target event message and the historical event message are different event messages.
[0010] wherein, determining the comparison result according to the image similarity between the target image and the historical image corresponding to the historical event message comprises: determining a target hash value corresponding to the target image and a historical hash value corresponding to the historical image; determining a Hamming distance between the target hash value and the historical hash value; determining the image similarity according to the Hamming distance; when the image similarity is greater than or equal to a preset image similarity, determining that the comparison result is that the target event message and the historical event message are the same event message.
[0011] wherein, comparing the target event message with the historical event message based on the target scene data further comprises: obtaining a set of historical event messages within a preset time window; comparing the target event message with each historical event message in the set of historical event messages one by one to obtain one or more comparison results; when one or more of the comparison results indicate that the target event message and the corresponding historical event message are different event messages, pushing the target event message.
[0012] The historical event message set in the preset time window is obtained, including: determining whether the cache space includes a plurality of historical event messages corresponding to the target device; if so, obtaining all historical event messages cached in the cache space to obtain a first set; determining a first timestamp according to a first preset time length corresponding to the cache space, and determining a second timestamp according to the preset time window; when the first timestamp is later than the second timestamp, determining a target time period according to the preset time window and the first timestamp; downloading historical event messages corresponding to the target time period in the database to obtain a second set; determining the first set and the second set as the historical event message set.
[0013] The method further includes: obtaining a device identifier of the target device, and determining a target server corresponding to the device identifier; sending the target event message to the target server.
[0014] To solve the above technical problems, the application further provides a message pushing device, which includes a memory and a processor coupled with the memory; wherein the memory is used to store program data, and the processor is used to execute the program data to realize the message pushing method as described above.
[0015] To solve the above technical problems, the application further provides a computer storage medium, which is used to store program data, and the program data is used to realize the message pushing method when executed by a computer.
[0016] Compared with the prior art, the beneficial effects of the application are: through the embodiments of the application, when the target event message reported by the target device is received, the target scene data and the risk level corresponding to the target event message are obtained through scene understanding, the core semantics of the event message can be effectively captured, which is not limited by the limitations of keywords and text similarity, and whether the target event message and the historical event message are the same event message can be accurately determined, thereby improving the accuracy of message filtering. In addition, in the case where the risk level is less than the preset risk threshold, the target event message and the historical event message are compared based on the target scene data, and low-risk events are ensured through risk level screening, so that message filtering is performed only for low-risk events, the timeliness and rationality of message pushing are taken into account, the interference of redundant messages on users is reduced, and key information is not missed. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and all other drawings obtained by those of ordinary skill in the art without creative work based on the drawings are within the scope of the present application. Figure 1 is an architecture diagram of the Internet of Things system provided by the present application; Figure 2 is a flow diagram of an embodiment of the message pushing method provided by the present application; Figure 3 is a space diagram of storing historical event messages in the present application; Figure 4 is a flow diagram of obtaining a set of historical event messages provided by the present application; Figure 5 is a flow diagram of comparing a target event message with a historical event message provided by the present application; Figure 6 is a flow diagram of scene description comparison provided by the present application; Figure 7 is a structure diagram of an embodiment of the message pushing device provided by the present application; Figure 8 is a structure diagram of an embodiment of the message pushing device provided by the present application; Figure 9 is a structure diagram of an embodiment of the computer storage medium provided by the present application. DETAILED DESCRIPTION
[0018] The technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work are within the scope of the present application.
[0019] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0020] The message push method of this application is applied to a message push device, wherein the message push device can be a server, a terminal device, or a system in which the server and the terminal device cooperate with each other. Accordingly, the various parts of the message push device, such as various units, sub-units, modules, and sub-modules, can all be set in the server, all in the terminal device, or separately in the server and the terminal device.
[0021] Furthermore, the aforementioned server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software programs or software modules, such as software or software modules used to provide distributed server functionality, or as a single software program or software module; no specific limitations are made here.
[0022] The message push method in this application is applied to an Internet of Things (IoT) system. Please refer to [link / reference]. Figure 1 , Figure 1 This is a schematic diagram of the architecture of the IoT system provided in this application, such as... Figure 1 As shown, the Internet of Things (IoT) system is divided into three layers: the device layer, the service layer, and the application layer. The device layer includes multiple IoT devices, the service layer includes multiple servers, and the user layer includes multiple user terminals.
[0023] The IoT devices in the device layer are used to collect raw data such as environment and status in real time. The IoT devices have built-in identification algorithms to make preliminary judgments on abnormal situations and generate event messages containing information such as event type, collection time, device identifier, collected data, and message text. These messages are then sent to the server in the service layer via the network. IoT devices can be smart home devices, in-vehicle devices, etc.
[0024] The server receives an event message reported by the Internet of Things device, executes filtering logic, and pushes the filtered event message to a user terminal at an application layer. The user terminal can remind the user in the form of a pop-up window, a ringtone, a notification, and the like. The user terminal includes a mobile phone, a tablet, and the like.
[0025] Taking a camera as an example of the Internet of Things device, the camera obtains an image by photographing a collection area. The camera determines whether a preset event occurs by detecting the image. In the related art, after determining that the preset event occurs, an event message including a message text is generated and sent to a server. The server pushes the message text to a user terminal.
[0026] However, in the camera, the same event can correspond to different message text expressions. For example, the same camera detects a stranger staying in the living room. The first reported message text is "suspicious person stays in the living room area", and the second reported message text is "non-family member appears in the shooting area". The two messages are essentially the same event description, but the text expressions are quite different. The filtering method based on keywords or text similarity cannot identify the core semantic association, and misjudges as a non-repeated message, resulting in frequent push of redundant reminders.
[0027] Moreover, different core events can have high text similarity. For example, the camera detects a pet cat moving in the living room, and the reported message text is "object moves in the living room area". The camera detects a stranger moving in the living room, and the reported message text is "stranger object moves in the living room area". The text core keywords are highly coincident, and the text similarity is high, which is easily misjudged as a repeated message and filtered, resulting in missing reports of key security events.
[0028] The message pushing method of the present application is applied to a server of an Internet of Things system, and the filtering logic of the server in the related art is improved.
[0029] For details, please refer to Figure 2 , Figure 2 is a flowchart of an embodiment of the message pushing method provided by the present application, as shown in Figure 2 The specific steps are as follows: Step S11: When a target event message reported by a target device is received, scene understanding is performed on the target event message, and target scene data and a risk level corresponding to the target event message are determined.
[0030] In this embodiment of the application, the executing entity is the server in the Internet of Things (IoT) system, and the target device is any IoT device in the IoT system that is connected to the server via the network. The built-in identification algorithm of the target device makes a preliminary judgment on the abnormal situation, generates an event message, namely the target event message, which includes information such as event type, collection time, device identifier, collected data, and message text, and forwards it to the server. After receiving the target message, the server performs a message filtering operation, that is, determines whether to push the target event message to the user terminal.
[0031] When the server performs message filtering, it first performs scenario understanding on the target event messages reported by the target device to obtain the target scenario data and risk level corresponding to the target event messages.
[0032] When the server receives a target event message, instead of filtering the message by extracting keywords from the message text for matching or calculating text similarity, it performs scene understanding on the data collected by the target device in the target event message, analyzes the overall scene in which the target event occurs, and takes the target device as the target camera as an example. It performs scene understanding on the images collected by the target camera in the target event message to obtain the target scene data and risk level.
[0033] Target scene data includes scene tags and scene descriptions. Scene tags indicate the subject of the event, such as a person, pet, or vehicle, while scene descriptions provide a detailed description of the event. AI models can intelligently analyze the collected data, such as target images, and extract features like scene tags, scene descriptions, and risk levels using pre-defined prompts.
[0034] Step S12: If the risk level is less than a preset risk threshold, compare the target event message with historical event messages based on the target scenario data to obtain the comparison result.
[0035] Step S13: When the comparison result indicates that the target event message and the historical event message are different event messages, the target event message is pushed.
[0036] In this embodiment of the application, when filtering messages, firstly, it is determined whether the risk level is less than a preset risk threshold. If not, it indicates that the event is a high-risk event and needs to be pushed to the user immediately. For high-risk events, the target event message is not further judged and is directly pushed to the full audience.
[0037] If so, it means that the event is a low-risk event with a low degree of urgency. The target event message can be compared with historical event messages before it is determined whether to push the target event message.
[0038] The preset risk threshold is preset, for example, the risk levels are divided into 1 to 5 levels, level 1 is the lowest risk, level 5 is the highest risk, and level 3 is the preset risk threshold. When the risk level is greater than or equal to level 3, the corresponding target event message is not filtered and directly pushed in full amount.
[0039] The target event message is compared with the historical event message based on the target scene data, to determine whether the target event message and the historical event message are the same event message. If they are the same event message, the target event message is filtered, that is, the target event message is not pushed. If they are different event messages, the target event message is pushed.
[0040] The historical event message is an event message reported by the target device before the target event message is reported. Specifically, it can refer to the previous event message of the target event message. At this time, the target event message and the previous event message are different event messages, and the target event message is pushed.
[0041] The historical event message can also be all event messages reported by the target device within a preset time window before the target event message is reported.
[0042] At this time, the target event message is compared with the historical event message based on the target scene data, and the comparison further includes: obtaining a historical event message set within a preset time window; comparing the target event message with each historical event message in the historical event message set one by one to obtain one or more comparison results; and when one or more comparison results all indicate that the target event message and the corresponding historical event message are different event messages, the target event message is pushed.
[0043] In the embodiments of the present application, the duration of the preset time window can be preset, for example, 10 minutes, 30 minutes, 1 hour, etc. Taking the duration of the preset time window as 10 minutes as an example, the 10 minutes before the current time is the preset time window, and all historical event messages reported by the target device within the 10 minutes before the current time form a historical event message set. The target event message is compared with each historical event message in the historical event message set one by one. When the target event message and each historical event message in the historical event message set are different event messages, that is, one or more comparison results all indicate that the target event message and the corresponding historical event message are different event messages, the target event message is pushed.
[0044] In an optional embodiment, obtaining the historical event message set within the preset time window includes: determining whether the cache space includes a plurality of historical event messages corresponding to the target device. If so, obtain all historical event messages cached in the cache space to obtain a first set; determine a first timestamp based on a first preset duration corresponding to the cache space, and determine a second timestamp based on the preset time window; when the first timestamp is later than the second timestamp, determine a target time period based on the preset time window and the first timestamp; download historical event messages corresponding to the target time period from the database to obtain a second set; and determine the first set and the second set as the historical event message set.
[0045] In the embodiments of this application, please refer to Figure 3 , Figure 3 This is a spatial diagram illustrating the storage of historical event messages in this application, such as... Figure 3 As shown, it provides cache space and database storage for historical event messages. The cache space is a Redis (RemoteDictionary Server) cache, which is a temporary cache space for data. The database is a vector database, including but not limited to Milvus (an open-source vector database based on vector retrieval) and Elasticsearch (an open-source search engine focused on full-text search), which is a long-term cache database that will not actively delete the stored data.
[0046] The server establishes a network connection with the cache and database to upload and download event messages. Downloading data from the cache is faster than downloading data from the database.
[0047] The cache space caches event messages reported by the target device. After an event message is reported to the server from the target device, it is cached in the cache space and removed from the cache space after a first preset duration. After an event message is reported to the server from the target device, it is also forwarded to the database for permanent storage.
[0048] Please see Figure 4 , Figure 4 This is a flowchart illustrating the process of obtaining a set of historical event messages provided in this application, such as... Figure 4 As shown, it includes: S21: Determine whether there is data in the cache space, i.e. whether it includes several historical event messages. If yes, proceed to step S22; otherwise, proceed to step S27.
[0049] The historical event messages stored in the cache space are event messages reported within the first preset time period before the current time. If there are several historical event messages corresponding to the target device in the cache space, it means that the target device reported event messages within the first preset time period before the current time. Otherwise, it means that the first preset time period has passed since the target device last reported event messages.
[0050] S22: Obtain all historical event messages in the cache space to obtain a first set.
[0051] S22: Obtain all historical event messages in the cache space to obtain a first set.
[0052] S23: Determine a first timestamp and a second timestamp.
[0053] The time length between the first timestamp and the current time is a first preset time length, and the first timestamp is before the current time. The second timestamp is the start time of a preset time window, the end time of the preset time window is the current time, and the time length of the preset time window is a second preset time length.
[0054] S24: Determine whether the first timestamp is later than the second timestamp. If yes, perform step S25, and if no, perform step S28.
[0055] The first timestamp is later than the second timestamp when the first preset time length is configured to be less than the second preset time length, and all historical event messages in the cache space cannot cover all event messages in the preset time window.
[0056] The first timestamp is not later than the second timestamp when the second preset time length is configured to be greater than the second preset time length, and all historical event messages in the cache space cover all event messages in the preset time window.
[0057] S25: Determine a target time period according to the preset time window and the first timestamp; download historical event messages corresponding to the target time period from the database to obtain a second set.
[0058] The first timestamp is later than the second timestamp when the first preset time length is configured to be less than the second preset time length, and all historical event messages in the cache space cannot cover all event messages in the preset time window.
[0059] The first timestamp is not later than the second timestamp when the second preset time length is configured to be greater than the second preset time length, and all historical event messages in the cache space cover all event messages in the preset time window.
[0060] S26: Determine the first set and the second set as a historical event message set.
[0061] S27: Download historical event messages corresponding to the preset time window from the database to obtain a historical event message set.
[0062] If there is no data in the cache space, i.e., a plurality of historical event messages, the target device does not report event messages for a long time before reporting the target event message, at this time, there is no historical event message in the cache space, and only the target event message currently reported is contained. At this time, the historical event message corresponding to the preset time window needs to be downloaded from the database.
[0063] S28: Determine the first set as the historical event message set.
[0064] If the first timestamp is not later than the second timestamp, the historical event message in the cache space can cover all historical event messages in the preset time window, thus, it is not necessary to download the event message from the database, and the first set is directly determined as the historical event message set.
[0065] Through the above embodiment, the cache mechanism of the cache space and the database stores the historical event message, based on the multi-level cache mechanism, a multi-level historical event message downloading mechanism is provided, the historical event message is downloaded from the cache space first, and then downloaded from the database, and then the historical event message is obtained. Since the speed of downloading the event message from the cache space is faster than that of downloading the event message from the database, through the multi-level historical event message downloading mechanism, the aggregation speed of the event information can be accelerated, and the aggregation of the event information refers to determining the historical event message set.
[0066] Optionally, the embodiment of the application further provides a multi-level cache mechanism of the server local, the cache space and the database. The historical event message set downloaded from the cache space and the database is saved in the server local for a third preset time length.
[0067] If the target device reports the event message multiple times in a short time, the historical event message set downloaded when filtering the previous event message is still cached in the server local when filtering the target event message corresponding to the current time. At this time, it is not necessary to download the historical event message from the cache space and the database, and only the first historical event message set when filtering the previous event message (denoted as the first event message) saved in the server local is added with the first event message to obtain the historical event message set corresponding to the target event message. Through the multi-level cache mechanism of the server local, the cache space and the database, the number of data downloading is reduced, and the message filtering efficiency is improved.
[0068] In an optional embodiment, the device identifier of the target device is acquired, and the corresponding target server is determined according to the device identifier; and the target event message is sent to the target server.
[0069] In the embodiments of the present application, in the case of distributed deployment of the server, after the current server receives the target event message reported by the target device, the device identifier of the target device is obtained, all servers perform consistent hash distribution based on the device identifier, and a corresponding unique server is allocated for the corresponding device, that is, all event messages reported by the same device are sent to the corresponding server, and the corresponding server performs filtering logic.
[0070] The server corresponding to the target device is the target server, and any server in the distributed deployment determines the target server corresponding to the target device after receiving the target event message reported by the target device. When the current server is not the target server, the target event message is forwarded to the target server, and the target server performs a series of operations such as scene understanding, comparison, filtering or pushing. If the current server is the target server, that is, the current server completes a series of operations such as scene understanding, comparison, filtering or pushing.
[0071] In combination with the multi-level cache mechanism of the local cache space, the database of the server, the historical event message set downloaded when filtering the previous event message is still cached in the local server, but it is necessary to ensure that the servers processing the previous event message and the target event message are the same server, so as to avoid downloading the historical event message set from the cache space and the database, and the event message cached in the local server can be directly used.
[0072] Especially when multiple event messages are triggered in a short time, processing in the same server can accelerate the filtering speed by using the historical event messages in the server, without the need to download the historical event message set from the cache space and / or the database again. If the event message reported each time is allocated to different servers, for example, the previous event message is allocated to the first server for processing, and the target event message corresponding to the current time is allocated to the second server for processing. The data downloaded when filtering the previous event message is in the local first server, and there is no data in the local second server. Therefore, the second server needs to download from the cache space and the database when processing the target event message, which increases the data download pressure and reduces the filtering speed.
[0073] Through the above embodiments, all event messages reported by the same device are filtered by the same server, which avoids the allocation of event messages reported by the same device to different servers, thereby reducing the data download pressure of the server and improving the filtering speed of the event message.
[0074] Please refer to Figure 5 , Figure 5 is a flowchart of comparison between the target event message and the historical event message provided in the present application, as shown in Figure 5 , comprising: S31, determining whether the target scene label is consistent with the historical scene label, if yes, executing step S32, if not, executing step S33.
[0075] In the comparison of the target event message and the historical event message, the final comparison result is determined by multi-level feature comparison. First, the scene labels are compared, and the target scene label corresponding to the target event message is compared with the historical scene label corresponding to the historical event message.
[0076] S32, determining the comparison result according to the historical scene description corresponding to the historical event message and the target scene description.
[0077] When the target scene label and the historical scene label are consistent, the final comparison result can be determined by the comparison of the next level feature, that is, the comparison result of the event message is determined according to the historical scene description corresponding to the historical event message and the target scene description of the event message.
[0078] S33, determining that the comparison result is that the target event message and the historical event message are different event messages.
[0079] When the target scene label and the historical scene label are inconsistent, it indicates that the target event message is necessarily in a new scene, that is, the target event message and the historical event message are different event messages, and at this time, the target event message is pushed.
[0080] Further, the comparison result is determined according to the historical scene description corresponding to the historical event message and the target scene description, including: obtaining the historical vector feature corresponding to the historical scene description and the target vector feature corresponding to the target scene description; determining the feature similarity between the historical vector feature and the target vector feature; when the feature similarity is greater than or equal to a preset similarity, determining the comparison result according to the image similarity of the target image corresponding to the target event message and the historical image corresponding to the historical event message; when the feature similarity is less than the preset similarity, determining that the comparison result is that the target event message and the historical event message are different event messages.
[0081] In the embodiments of the present application, please refer to Figure 6 , Figure 6 is a flowchart of the scene description comparison provided by the present application, as shown in Figure 6 , including: S321, obtaining the historical vector feature corresponding to the historical scene description and the target vector feature corresponding to the target scene description.
[0082] The historical scene description and the target scene description can be text messages, the scene description is subjected to vector feature extraction, semantic information in the text is learned, and corresponding vector features are obtained, the vector feature corresponding to the historical scene description is a historical vector feature, and the vector feature corresponding to the target scene description is a target vector feature.
[0083] It should be noted that the AI large model is used to understand the scene of the input image (for example, the target image), and to extract the description feature of the scene corresponding to the target image, that is, the scene description. The Embedding algorithm is used to extract the vector feature of the scene description, so as to convert the scene description from high-dimensional data to low-dimensional continuous vectors, and the similarity of the scene description is determined according to the similarity of the vector feature, so as to speed up the calculation speed of the similarity of the scene description.
[0084] S322, determining the feature similarity between the historical vector feature and the target vector feature.
[0085] S323, determining whether the feature similarity is greater than or equal to a preset similarity, if yes, performing step S324, and if no, performing step S325.
[0086] S324, determining the comparison result according to the image similarity between the target image corresponding to the target event message and the historical image corresponding to the historical event message.
[0087] When the feature similarity between the historical vector feature and the target vector feature is greater than or equal to the preset similarity, it cannot be directly determined that the target event message and the historical event message are the same event message. For example, the scene descriptions of the target event message and the historical event message are both that a black cat stays in a target area, but in fact they are two different cats. At this time, the scene descriptions are the same, the feature similarity between the historical vector feature and the target vector feature is greater than or equal to the preset similarity, but the target event message and the historical event message are different event messages, and therefore the next level of feature comparison is performed, that is, the features of the images at the time of the event are directly compared, that is, the comparison result is determined according to the image similarity between the target image and the historical image.
[0088] Specifically, determining the comparison result according to the image similarity between the target image and the historical image corresponding to the historical event message includes: determining a target hash value corresponding to the target image and a historical hash value corresponding to the historical image; determining a Hamming distance between the target hash value and the historical hash value; determining the image similarity according to the Hamming distance; and when the image similarity is greater than or equal to a preset image similarity, determining that the comparison result is that the target event message and the historical event message are the same event message.
[0089] In the embodiment of the present application, when determining the image similarity between the target image and the historical image, each image is converted into a hash value through a difference hash algorithm, the hash value corresponding to the target image is a target hash value, and the hash value corresponding to the historical image is a historical hash value; the Hamming distance between the target hash value and the historical hash value is calculated, the image similarity is determined according to the Hamming distance, the comparison result is determined according to the image similarity, when the image similarity is greater than or equal to a preset image similarity, it is determined that the comparison result is that the target event message and the historical event message are the same event message, and when the image similarity is less than the preset image similarity, it is determined that the comparison result is that the target event message and the historical event message are different event messages, and at this time, the target event message is pushed.
[0090] In S325, it is determined that the comparison result is that the target event message and the historical event message are different event messages.
[0091] Through the embodiment of the present application, when the target event message reported by the target device is received, scene understanding is first performed, target scene data and a risk level corresponding to the target event message are obtained, the core semantics of the event message can be effectively captured, which is not limited by the keyword and the text similarity, whether the target event message and the historical event message are the same event message can be accurately determined, and the accuracy of message filtering is improved. In addition, in the case where the risk level is less than a preset risk threshold, the target event message and the historical event message are compared based on the target scene data, low-risk events are ensured through risk level screening, message filtering is performed only for low-risk events, the timeliness and rationality of message pushing are taken into account, the interference of redundant messages on users is reduced, and key messages are not missed.
[0092] Those skilled in the art can understand that, in the above method of the specific implementation manner, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process, and the specific execution order of each step should be determined according to its function and possible internal logic.
[0093] To implement the above message pushing method, the present application further provides a message pushing device, and specific reference can be made to Figure 7 , Figure 7 FIG. 1 is a structural schematic diagram of an embodiment of the message pushing device provided by the present application.
[0094] The message pushing device 500 of the embodiment comprises: a scene understanding module 51, configured to perform scene understanding on a target event message reported by a target device when the target event message is received, and determine target scene data and a risk level corresponding to the target event message; The comparison module 52 compares the target event message with the historical event message based on the target scene data when the risk level is less than the preset risk threshold, and obtains a comparison result. The pushing module 53 pushes the target event message when the comparison result indicates that the target event message and the historical event message are different event messages.
[0095] To implement the message pushing method, the application further provides a message pushing device, please refer to Figure 8 , Figure 8 is a structural schematic diagram of an embodiment of the message pushing device provided by the application.
[0096] The message pushing device 400 of the embodiment comprises a processor 41, a memory 42, an input and output device 43 and a bus 44.
[0097] The processor 41, the memory 42 and the input and output device 43 are connected with the bus 44 respectively, the memory 42 stores program data, and the processor 41 is used to execute the program data to realize the message pushing method of the above-mentioned embodiments.
[0098] In the embodiment of the application, the processor 41 can also be called a CPU (Central Processing Unit). The processor 41 can be an integrated circuit chip with signal processing capability. The processor 41 can also be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor 41 can also be any conventional processor.
[0099] The application further provides a computer storage medium, please continue to refer to Figure 9 , Figure 9 is a structural schematic diagram of an embodiment of the computer storage medium provided by the application. The computer storage medium 600 stores a computer program 61. The computer program 61 is used to realize the message pushing method of the above-mentioned embodiments when executed by a processor.
[0100] The embodiments of the present application are realized in the form of software function units and sold or used as independent products, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or the whole or part of the technical solutions that essentially contribute to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0101] The above is only the embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation using the content of the specification and drawings, or direct or indirect application in other related technical fields, is also included in the patent protection scope of the present application.
Claims
1. A message pushing method, characterized by, The message pushing method comprises: Upon receiving a target event message reported by a target device, performing scene understanding on the target event message to determine target scene data corresponding to the target event message and a risk level; In a case where the risk level is less than a preset risk threshold, comparing the target event message with historical event messages based on the target scene data to obtain a comparison result; In a case where the comparison result indicates that the target event message and the historical event messages are different event messages, pushing the target event message.
2. The message pushing method of claim 1, wherein The target scene data comprises a target scene label and a target scene description; The comparing the target event message with historical event messages based on the target scene data comprises: Comparing the target scene label with a historical scene label corresponding to the historical event message; In a case where the target scene label is consistent with the historical scene label, determining the comparison result according to a historical scene description corresponding to the historical event message and the target scene description.
3. The message pushing method of claim 2, wherein The determining the comparison result according to the historical scene description corresponding to the historical event message and the target scene description comprises: Obtaining a historical vector feature corresponding to the historical scene description and a target vector feature corresponding to the target scene description; Determining a feature similarity between the historical vector feature and the target vector feature; In a case where the feature similarity is greater than or equal to a preset similarity, determining the comparison result according to an image similarity of a target image corresponding to the target event message and a historical image corresponding to the historical event message.
4. The message pushing method of claim 3, wherein, The method further comprises: In a case where the feature similarity is less than the preset similarity, determining the comparison result as the target event message and the historical event message being different event messages.
5. The message pushing method of claim 3, wherein, The determining the comparison result according to the image similarity of the target image and the historical image corresponding to the historical event message comprises: Determining a target hash value corresponding to the target image and a historical hash value corresponding to the historical image; Determining a Hamming distance of the target hash value and the historical hash value; Determining the image similarity according to the Hamming distance; In a case where the image similarity is greater than or equal to a preset image similarity, determining the comparison result as the target event message and the historical event message being the same event message.
6. The message pushing method of claim 1, wherein The comparing the target event message with historical event messages based on the target scene data further comprises: Obtaining a set of historical event messages within a preset time window; Comparing the target event message with each historical event message in the set of historical event messages one by one to obtain one or more comparison results; In a case where one or more of the comparison results indicate that the target event message and the corresponding historical event message are different event messages, pushing the target event message.
7. The message pushing method of claim 6, wherein, The obtaining the set of historical event messages within the preset time window comprises: determining whether the cache space includes a plurality of historical event messages corresponding to the target device; if yes, obtaining all historical event messages cached in the cache space to obtain a first set; determining a first timestamp according to a first preset time length corresponding to the cache space, and determining a second timestamp according to the preset time window; when the first timestamp is later than the second timestamp, determining a target time period according to the preset time window and the first timestamp; downloading historical event messages corresponding to the target time period in the database to obtain a second set; determining the first set and the second set as the historical event message set.
8. The message pushing method of claim 1, further comprising: obtaining a device identifier of the target device, and determining a target server corresponding to the device identifier; sending the target event message to the target server. The message pushing device comprises a memory and a processor coupled with the memory; 9. A message pushing device, characterized by, wherein the memory is configured to store program data, and the processor is configured to execute the program data to implement the message pushing method of any one of claims 1 to 8. The computer storage medium is configured to store program data, and the program data, when executed by a computer, is configured to implement the message pushing method of any one of claims 1 to 8.
10. A computer storage medium, characterized in that,
Citation Information
Patent Citations
Push information processing method, device, computer equipment and storage medium
CN112083980A
Message pushing method and device, computer equipment and storage medium
CN116881551A
Visual early warning method and device based on image acquisition equipment
CN117333997A
Risk identification method and system based on operation scene, and storage medium
CN118230048A
Alarm message pushing method and device, readable storage medium and computer program product
CN118298601A