Staggering event processing method and device, storage medium and electronic equipment

By integrating the video acquisition and response processing module in the smart home device, combined with the large dangerous scene detection model on the server side, the smart home device can automatically respond to the stay in front of the door event, which solves the problem that the smart home device cannot automatically respond to the stay in front of the door event. problems, improving security and intelligence.

CN118711097APending Publication Date: 2024-09-27SHENZHEN QIHOO INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410695739.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

Smart home devices are unable to automatically respond to incidents involving stay at the door, and lack the ability to respond intelligently to different risk scenarios of stay, which affects home security and device intelligence.

Method used

By obtaining the video of staying in front of the door, the large dangerous scene detection model on the server side is used to detect dangerous scenes, generate response instructions, and automatically perform corresponding processing in smart home devices, including inquiry dialogue or intelligent eviction processing.

Benefits of technology

It enables smart home devices to respond in a targeted manner to different hazardous scenarios, improves home security and device intelligence, and reduces user participation and hardware costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118711097A
    Figure CN118711097A
Patent Text Reader

Abstract

The embodiment of the invention discloses a lingering event processing method and device, a storage medium and electronic equipment, and the method comprises the steps that smart home equipment obtains a door-front lingering video corresponding to a door-front lingering event and sends the door-front lingering video to a server; the server can perform dangerous scene detection by adopting a dangerous scene detection large model based on the door-front lingering video to obtain lingering event response indication content corresponding to the door-front lingering video; therefore, the smart home device can receive the lingering event response indication content sent by the server and perform lingering event response processing based on the lingering event response indication content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, storage medium and electronic device for processing a stay event. Background Art

[0002] With the development of smart home technology, more and more smart home products have emerged, which have brought great convenience to people's daily lives. Smart home products can not only bring convenience to users' lives, but also have security protection capabilities. For example, smart cameras installed outdoors can collect videos in the outdoor environment in real time and upload the videos to the cloud, so that users can view the videos on their mobile phones. Summary of the invention

[0003] The embodiment of the present application provides a method, device, computer storage medium and electronic device for processing a stay event. The technical solution is as follows:

[0004] In a first aspect, an embodiment of the present application provides a method for processing a stay event, which is applied to a smart home device, and the method includes:

[0005] Get the door-front lingering video corresponding to the door-front lingering event;

[0006] The video of staying in front of the door is sent to the server, so that the server uses a large model of dangerous scene detection to perform dangerous scene detection based on the video of staying in front of the door to obtain the stay event response indication content corresponding to the video of staying in front of the door;

[0007] The stay event response indication content sent by the server is received, and a stay event response process is performed based on the stay event response indication content.

[0008] In a possible implementation manner, obtaining the door-front lingering video corresponding to the door-front lingering event includes:

[0009] Acquire radar detection data, and perform stay duration detection processing based on the radar detection data to obtain a stay event detection result in front of the door;

[0010] If the door-staying event detection result indicates that there is a door-staying event, obtaining a radar detection time period corresponding to the door-staying event;

[0011] A reference video captured by the camera during the radar detection time period is obtained, and a door-front stay video corresponding to the door-front stay event is determined based on the reference video.

[0012] In a possible implementation manner, determining the door-front lingering video corresponding to the door-front lingering event based on the reference video includes:

[0013] Confirming the reference video as the door-front lingering video corresponding to the door-front lingering event; or,

[0014] Based on the reference video, frame extraction processing is performed to obtain multiple frames of door-front lingering key frame images, and a key frame video obtained by combining the door-front lingering key frame images is confirmed as the door-front lingering video corresponding to the door-front lingering event.

[0015] In a possible implementation, the performing stay event response processing based on the stay event response indication content includes:

[0016] If the stay event response instruction content is an inquiry dialogue instruction content, then the inquiry dialogue processing is performed according to the inquiry dialogue instruction content;

[0017] If the stay event response instruction content is a smart expulsion instruction content, smart expulsion processing is performed according to the smart expulsion instruction content.

[0018] In a second aspect, an embodiment of the present application provides a method for processing a stay event, which is applied to a server, and the method includes:

[0019] Receive a door-front stay video corresponding to a door-front stay event sent by a smart home device;

[0020] Based on the video of staying in front of the door, a large model of dangerous scene detection is used to perform dangerous scene detection to obtain the stay event response indication content corresponding to the video of staying in front of the door;

[0021] The stay event response indication content is sent to the smart home device, so that the smart home device performs stay event response processing based on the stay event response indication content.

[0022] In a possible implementation, the step of performing dangerous scene detection based on the video of staying in front of the door using a large dangerous scene detection model to obtain the stay event response indication content corresponding to the video of staying in front of the door, includes:

[0023] Generate prompt words based on the video of staying in front of the door; generate stay response content and generate prompt words;

[0024] The prompt words generated by the stay response content and the video of stay in front of the door are input into the dangerous scene detection large model for dangerous scene detection, and the stay event response indication content corresponding to the video of stay in front of the door is obtained.

[0025] In a possible implementation, the generating of the prompt words for the stay response content based on the stay video in front of the door includes:

[0026] Get the preset stay scenario analysis template;

[0027] The door-front stay video and the stay scene analysis template are associated to obtain a stay response content generation prompt word.

[0028] In a possible implementation, the step of generating a prompt word from the stay response content and the video of stay in front of the door into the dangerous scene detection large model for dangerous scene detection, and obtaining the stay event response indication content corresponding to the video of stay in front of the door, includes:

[0029] Inputting the prompt words generated by the stay response content and the video of stay in front of the door into the dangerous scene detection large model;

[0030] The dangerous scene detection big model generates prompt words based on the stay response content, performs stay attention pattern extraction processing on the stay video in front of the door to obtain stay text description information, performs stay scene analysis on the stay text description information through the dangerous scene detection big model to obtain the stay dangerous scene level, and determines the stay event response indication content corresponding to the stay video in front of the door based on the stay dangerous scene level and the stay text description information through the dangerous scene detection big model;

[0031] The stay event response instruction content is outputted through the dangerous scene detection big model.

[0032] In a possible implementation, the method further includes:

[0033] The basic large language model is used to create an initial dangerous scene detection large model for the stay event detection scenario;

[0034] Obtain a sample video of staying in front of the door, and mark the sample video of staying in front of the door with a label indicating a stay event response content;

[0035] The sample door-front stay video is used to perform at least one round of model training on the initial dangerous scene detection large model. During the model training process, the sample door-front stay video is used to perform dangerous scene detection on the initial dangerous scene detection large model to obtain predicted stay event response indication content. Based on the predicted stay event response indication content and the stay event response indication content label, the model parameters of the initial dangerous scene detection large model are adjusted to obtain the dangerous scene detection large model after model training.

[0036] In a third aspect, an embodiment of the present application provides a stay event processing device, which is applied to a smart home device, and the device includes:

[0037] A video acquisition module, used to acquire a door-front stay video corresponding to a door-front stay event;

[0038] A video sending module, used for sending the video of staying in front of the door to a server, so that the server uses a large model of dangerous scene detection to perform dangerous scene detection based on the video of staying in front of the door to obtain a stay event response indication content corresponding to the video of staying in front of the door;

[0039] The response processing module is used to receive the stay event response indication content sent by the server, and perform stay event response processing based on the stay event response indication content.

[0040] Optionally, the video acquisition module includes:

[0041] An event detection unit, used to obtain radar detection data, and perform stay duration detection processing based on the radar detection data to obtain a stay event detection result in front of the door;

[0042] A time acquisition unit, configured to acquire a radar detection time period corresponding to the door-staying event if the door-staying event detection result indicates that there is a door-staying event;

[0043] The video determination unit is used to obtain a reference video collected by the camera during the radar detection time period, and determine the door-front staying video corresponding to the door-front staying event based on the reference video.

[0044] Optionally, the video determination unit includes:

[0045] A first determining subunit is configured to confirm the reference video as the door-staying video corresponding to the door-staying event; or

[0046] The second determination subunit is used to perform frame extraction processing based on the reference video to obtain multiple frames of door-front lingering key frame pictures, and confirm the key frame video obtained by combining the door-front lingering key frame pictures as the door-front lingering video corresponding to the door-front lingering event.

[0047] Optionally, the response processing module includes:

[0048] A first response unit, configured to perform inquiry dialogue processing according to the inquiry dialogue instruction content if the stay event response instruction content is an inquiry dialogue instruction content;

[0049] The second response unit is configured to perform intelligent expulsion processing according to the intelligent expulsion instruction content if the stay event response instruction content is intelligent expulsion instruction content.

[0050] In a fourth aspect, an embodiment of the present application provides a stay event processing device, which is applied to a server, and the device includes:

[0051] A video acquisition module is used to receive a door-front stay video corresponding to a door-front stay event sent by a smart home device;

[0052] A video detection module, used to perform dangerous scene detection based on the video of staying in front of the door using a large dangerous scene detection model to obtain a stay event response indication content corresponding to the video of staying in front of the door;

[0053] The response sending module is used to send the stay event response indication content to the smart home device, so that the smart home device performs stay event response processing based on the stay event response indication content.

[0054] Optionally, the video detection module includes:

[0055] A prompt generating unit, configured to generate prompt words for the stay response content based on the stay video in front of the door;

[0056] The model detection unit is used to input the prompt words generated by the stay response content and the video of stay in front of the door into the dangerous scene detection large model for dangerous scene detection, and obtain the stay event response indication content corresponding to the video of stay in front of the door.

[0057] Optionally, the prompt generating unit comprises:

[0058] A template acquisition unit, used to acquire a preset stay scene analysis template;

[0059] The video association unit is used to associate the door-front stay video with the stay scene analysis template to obtain a stay response content generation prompt word.

[0060] Optionally, the model detection unit includes:

[0061] A first detection unit, used for inputting the prompt words generated by the stay response content and the video of stay in front of the door into the dangerous scene detection large model;

[0062] The second detection unit is used to generate prompt words based on the stay response content through the dangerous scene detection big model to perform stay attention pattern extraction processing on the stay video in front of the door to obtain stay text description information, perform stay scene analysis on the stay text description information through the dangerous scene detection big model to obtain a stay danger scene level, and determine the stay event response indication content corresponding to the stay video in front of the door based on the stay danger scene level and the stay text description information through the dangerous scene detection big model;

[0063] The third detection unit is used to output the stay event response indication content through the dangerous scene detection large model.

[0064] Optionally, the stay event processing device further includes:

[0065] A first training module is used to create an initial danger scene detection big model for the stay event detection scenario using a basic big language model;

[0066] The second training module is used to obtain a sample video of staying in front of the door, and mark the sample video of staying in front of the door with a label indicating a stay event response content;

[0067] The third training module is used to perform at least one round of model training on the initial dangerous scene detection big model using the sample door-front staying video. During the model training process, the initial dangerous scene detection big model is used to perform dangerous scene detection on the sample door-front staying video to obtain predicted staying event response indication content, and the model parameters of the initial dangerous scene detection big model are adjusted based on the predicted staying event response indication content and the staying event response indication content label to obtain the dangerous scene detection big model after model training.

[0068] In a fifth aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium has a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the above-mentioned method.

[0069] In a sixth aspect, an embodiment of the present application provides an electronic device, which may include: a memory and a processor; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the memory and executing the above method.

[0070] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0071] In the embodiment of the present application, the smart home device obtains the video of the lingering in front of the door corresponding to the lingering event in front of the door and sends the video of the lingering in front of the door to the server, so that the server can use the large model of dangerous scene detection to detect the dangerous scene based on the video of the lingering in front of the door to obtain the lingering event response indication content corresponding to the video of the lingering in front of the door, and then the smart home device can receive the lingering event response indication content sent by the server and perform lingering event response processing based on the lingering event response indication content. The lingering video in front of the door is detected by the large model of dangerous scene detection on the server side to obtain the lingering event response indication content, so that the smart home device can automatically perform lingering event response processing according to the lingering event response indication content sent by the server without the user's instruction, realizing the function of the smart home device to respond to different lingering persons in a targeted manner according to different lingering dangerous scenes, and in the process of the smart home device automatically performing lingering event response processing, there is no need for user participation, which not only ensures the safety of family members and household items, but also increases the intelligence of the smart home device in responding to lingering events. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0073] Figure 1 It is a flowchart of a stay event processing method provided in an embodiment of the present application;

[0074] Figure 2 It is a flowchart of another method for handling stay events provided in an embodiment of the present application;

[0075] Figure 3 It is a flowchart of another method for handling a stay event provided in an embodiment of the present application;

[0076] Figure 4 This is a flowchart of another method for handling a stay event provided in an embodiment of the present application.

[0077] Figure 5 It is a structural schematic diagram of a stay event processing device provided in an embodiment of the present application;

[0078] Figure 6 is a structural schematic diagram of another stay event processing device provided in an embodiment of the present application;

[0079] Figure 7 It is a structural schematic diagram of a smart home device provided in an embodiment of the present application;

[0080] Figure 8 It is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0081] In order to make the purpose, features, and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0082] In the description of the present application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood in specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.

[0083] In the related art, smart home products such as smart cameras can collect videos in outdoor environments and upload alarm videos, so that users can view abnormal situations through alarm videos. Although smart home products such as smart cameras can upload alarm videos in real time, smart home products will not respond to the lingering events that appear in the alarm videos. For example, for a lingering person who appears in front of the door, the smart home product will collect the video of the lingering person and upload it to the cloud, but the smart home product will not automatically communicate or interact with the lingering person.

[0084] In order to solve the above technical problems, the present application is described in detail below in conjunction with specific embodiments.

[0085] In the following Figure 1-Figure 2 In the method embodiment shown, only the execution subject of each step is introduced and explained as the smart home device.

[0086] In one embodiment, Figure 1 As shown, a method for handling stay events is proposed, which can be implemented by a computer program and can be run on a stay event processing device based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application.

[0087] Specifically, the stay event processing method includes:

[0088] See also Figure 1 , is a flow chart of a method for handling a stay event provided in an embodiment of the present application, such as Figure 1 As shown, the method of the embodiment of the present application may include the following steps:

[0089] S101, obtaining a door-front lingering video corresponding to a door-front lingering event.

[0090] The door-front loitering event can be understood as an event in which a lodger stays at the door of a home for a long time. The lodger may refer to a family member who is not pre-registered.

[0091] The door-stopping video can be understood as a video that includes the process of the door-stopping event.

[0092] In some embodiments, the smart home device can monitor whether there is a lingering event in front of the door. When the smart home device monitors the occurrence of the lingering event in front of the door, it determines the start time of the lingering event and the end time of the event, and then determines the lingering video in front of the door based on the video collected between the start time and the end time of the event. Specifically, the lingering video in front of the door can be determined by: performing face recognition on the video collected between the start time and the end time of the event, and judging whether the lingering person in the video is a pre-recorded family member; if the lingering person in the video is not a pre-recorded family member, the collected video is used as the lingering video in front of the door; or, if the lingering person in the video is not a pre-recorded family member, extracting key frame images from the collected video, and combining the key frame images in the order in which the key frame images were collected to obtain the lingering video in front of the door.

[0093] Exemplarily, the smart home device can monitor whether a lingering event occurs by means of a radar detection module installed in the smart home device. Specifically, the radar detection module can monitor the continuous length of time a person stays at the door. When the continuous length of time is greater than or equal to a preset length of time threshold, it can be determined that a lingering event occurs. When the continuous length of time is less than the preset length of time threshold, it can be determined that no lingering event occurs.

[0094] In the embodiments of the present application, smart home devices may refer to home security devices, such as smart door locks, smart doorbells, smart cameras and other devices.

[0095] S102, sending the video of staying in front of the door to the server, so that the server uses a large model of dangerous scene detection to perform dangerous scene detection based on the video of staying in front of the door to obtain the stay event response indication content corresponding to the video of staying in front of the door.

[0096] In some embodiments, the video of the person staying in front of the door can be encrypted with a preset encryption key to obtain an encrypted video of the person staying in front of the door, and the encrypted video of the person staying in front of the door can be sent to the server. Alternatively, the video of the person staying in front of the door can be sent to the server via a pre-established secure transmission network.

[0097] The preset encryption key may be an encryption key determined based on a symmetric encryption algorithm, or the preset encryption key may be an encryption key determined based on an asymmetric encryption algorithm.

[0098] Regarding the large model for dangerous scene detection in the server, the basic large language model (LLM) can be used directly, or it can be a large language model obtained after model training for the stay event detection scenario based on the basic large language model. LLM is an artificial intelligence content generation model designed to understand and generate human language. LLM is trained on a large amount of data and can perform a wide range of tasks, including text summarization, translation, sentiment analysis, and so on. Optionally, LLM can be a generative artificial intelligence (AIGC) model.

[0099] S103, receiving the stay event response indication content sent by the server, and performing stay event response processing based on the stay event response indication content.

[0100] The stay event response instruction content can be understood as the response prompt content that instructs the smart home device to perform stay event response processing. The stay event response instruction content may include the conversation content that the smart home device needs to output, the audio content that the smart home device needs to output, and the like.

[0101] It can be understood that the stay event response indication content corresponds to the stay danger scene level, and the stay event response indication content corresponding to different stay danger scene levels is also different. The stay danger scene level refers to the stay danger scene level detected in the process of performing dangerous scene detection on the stay video in front of the door through the dangerous scene detection large model.

[0102] It is understandable that the stay event response instruction content may be an inquiry dialogue instruction content, which is intended to instruct the smart home device to output an inquiry statement to the lingering person and continue to output the remaining inquiry statements to the lingering person after the lingering person replies to the inquiry statement. The stay event response instruction content may also be a smart expulsion instruction content, which is intended to instruct the smart home device to unilaterally output an expulsion statement or expulsion audio to the lingering person.

[0103] When the stay event response instruction content is an inquiry dialogue instruction content, the stay event response instruction content may be an inquiry dialogue instruction content with different statement tones determined according to different levels of stay danger scenarios.

[0104] When the stay event response instruction content is intelligent expulsion instruction content, the stay event response instruction content may be intelligent expulsion instruction content with different statement tones determined according to different levels of stay danger scenarios.

[0105] In some embodiments, if the stay event response indication content is an inquiry dialogue indication content, the inquiry dialogue processing is performed according to the inquiry dialogue indication content. The inquiry dialogue indication content may include a first inquiry statement and a second inquiry statement for the stay person's reply statement. The output order of the first inquiry statement is before the output order of the second inquiry statement. In this scenario, the smart home device performs the inquiry dialogue processing according to the inquiry dialogue indication content, and the smart home device may output the inquiry statements in sequence according to the output order of the inquiry statements. Among them, the second inquiry statement may include an inquiry statement set based on the stay person of different character identities, and the character identity may include a takeaway person, a courier, a building manager, an installation and maintenance person, and the like. For example, the first inquiry statement may be: "Who are you? What are you doing?", and the second inquiry statement may be: "Please put the express at the door", "Please put the takeaway at the door", "Please call the owner", and the like.

[0106] If the content of the stay event response instruction is the content of the smart expulsion instruction, the smart expulsion process is performed according to the content of the smart expulsion instruction. The smart expulsion instruction content may include at least one of a smart expulsion statement and a smart expulsion audio. In this scenario, the smart home device performs the smart expulsion process according to the content of the smart expulsion instruction, which may be that the smart home device outputs the smart expulsion statement and / or the smart expulsion audio to the lingering person. For example, the smart expulsion statement may be: "I have filmed your behavior into a video, please leave as soon as possible", "I have filmed your behavior into a video and notified the owner to call the police", etc.

[0107] Optionally, while the smart home device is performing an inquiry dialogue processing according to the inquiry dialogue instruction content, or while the smart home device is performing an intelligent expulsion processing according to the intelligent expulsion instruction content, a video of the lingering person is collected to facilitate the user to watch the video to view the lingering person's stay process.

[0108] In the embodiment of the present application, the smart home device obtains the video of the lingering in front of the door corresponding to the lingering event in front of the door and sends the video of the lingering in front of the door to the server, so that the server can use the large model of dangerous scene detection to detect the dangerous scene based on the video of the lingering in front of the door to obtain the lingering event response indication content corresponding to the video of the lingering in front of the door, and then the smart home device can receive the lingering event response indication content sent by the server and perform lingering event response processing based on the lingering event response indication content. The lingering video in front of the door is detected by the large model of dangerous scene detection on the server side to obtain the lingering event response indication content, so that the smart home device can automatically perform lingering event response processing according to the lingering event response indication content sent by the server without the user's instruction, realizing the function of the smart home device to respond to different lingering persons in a targeted manner according to different lingering dangerous scenes, and in the process of the smart home device automatically performing lingering event response processing, there is no need for user participation, which not only ensures the safety of family members and household items, but also increases the intelligence of the smart home device in responding to lingering events.

[0109] See also Figure 2 , Figure 2 This is a flowchart of another embodiment of a stay event processing method proposed in this application. Specifically:

[0110] S201, acquiring radar detection data, and performing stay duration detection processing based on the radar detection data to obtain a stay event detection result in front of the door.

[0111] The radar detection data can be understood as the length of stay of the lingering person and the distance between the lingering person and the radar detection module monitored by the radar detection module, and the radar detection module is installed in the smart home device.

[0112] The door-lingering event detection result may be understood as a detection result for indicating whether a door-lingering event exists.

[0113] In some embodiments, the smart home device can obtain radar detection data monitored by the radar detection module in real time, determine the distance between the lingering person and the radar detection module and the preset distance threshold, and when the distance between the lingering person and the radar detection module is less than the preset distance threshold, detect whether the lingering time of the lingering person is greater than or equal to the preset stay time threshold. When the stay time is greater than or equal to the preset stay time threshold, it can be determined that a lingering event in front of the door has occurred, and then a lingering event detection result in front of the door can be generated to indicate the existence of a lingering event in front of the door.

[0114] It can be understood that when the distance between the lingering person and the radar detection module is less than the preset distance threshold, it can be indicated that the lingering person is close to the smart home device. When the smart home device is a smart door lock, a smart camera, or a smart doorbell, it can be determined that the lingering person is staying in front of the door. When the distance between the lingering person and the radar detection module is greater than or equal to the preset distance threshold, it can be indicated that the lingering person is far away from the smart home device, and it can be determined that the lingering person is staying at a position far away from the door. Then, when the distance between the lingering person and the radar detection module is greater than the preset distance threshold, the detection of whether the lingering person's stay time is greater than or equal to the preset stay time threshold can be cancelled, and it can be determined that the lingering event in front of the door has not occurred, and then a lingering event detection result in front of the door indicating that there is no lingering event in front of the door can be generated.

[0115] S202: If the door-staying event detection result indicates that there is a door-staying event, a radar detection time period corresponding to the door-staying event is obtained.

[0116] The radar detection time period can be understood as the time period from the occurrence to the end of the door stay event monitored by the radar detection module.

[0117] In some embodiments, when the door lingering event detection result indicates that there is a door lingering event, a time period from the occurrence to the end of the door lingering event is obtained, and the time period is the radar detection time period.

[0118] S203, obtaining a reference video collected by the camera during the radar detection time period, and determining a door-front stay video corresponding to the door-front stay event based on the reference video.

[0119] The reference video can be understood as a video recording the event of staying in front of the door from its occurrence to its end.

[0120] In some embodiments, a reference video captured by the camera during the radar detection time period may be obtained, and further, the reference video may be confirmed as a door-in-front-stay video corresponding to the door-in-front-stay event.

[0121] Alternatively, after obtaining the reference video, frame extraction processing is performed based on the reference video to obtain multiple frames of key frame images of lingering in front of the door, and the key frame video obtained by combining the key frame images of lingering in front of the door is confirmed as the lingering in front of the door video corresponding to the lingering in front of the door event. Among them, the key frame images of lingering in front of the door can be key frame images containing important information extracted from the reference video. For example, the key frame images of lingering in front of the door can include but are not limited to key frame images containing front-facing photos of lingering persons, key frames containing half-length photos of lingering persons, key frame images of lingering persons in a stationary state, and the like. Specifically, the lingering in front of the door video can be obtained by combining the key frame images of lingering in front of the door in the order in which they appear in the reference video by combining the front and back frames of the key frame images of lingering in front of the door.

[0122] S204, sending the video of staying in front of the door to the server, so that the server uses a large model of dangerous scene detection to perform dangerous scene detection based on the video of staying in front of the door to obtain the stay event response indication content corresponding to the video of staying in front of the door.

[0123] Specifically, see Figure 1 The description of S102 in the illustrated embodiment will not be repeated here.

[0124] S205: Receive the stay event response indication content sent by the server.

[0125] It is understandable that when the server sends the stay event response indication content to the smart home device, it is not necessary to encrypt the stay event response indication content, and directly send the stay event response indication content to the smart home device in plain text. When the server sends the stay event response indication content to the smart home device, it is also possible to encrypt the stay event response indication content, and then send the encrypted stay event response indication content to the smart home device, and the smart home device can obtain the stay event response indication content only after decrypting it using a preset decryption key.

[0126] S206: If the stay event response instruction content is an inquiry dialogue instruction content, then an inquiry dialogue process is performed according to the inquiry dialogue instruction content.

[0127] The inquiry dialogue instruction content can be understood as the instruction content intended to instruct the smart home device to output an inquiry statement to the lingering person, and continue to output the remaining inquiry statements to the lingering person after the lingering person replies to the inquiry statement. The inquiry dialogue instruction content can be an inquiry dialogue instruction content with different statement tones determined according to different levels of dangerous stay scenarios. For dangerous stay scenarios with a higher risk level, the inquiry dialogue instruction content with a strong tone can be set so that the lingering person who is likely to be dangerous leaves as soon as possible after hearing the inquiry statement. For dangerous stay scenarios with a lower risk level, the inquiry dialogue instruction content with a calm tone can be set so that the lingering person who is not dangerous contacts the owner or leaves the house after hearing the inquiry statement.

[0128] The inquiry dialogue indication content may include a first inquiry statement and a second inquiry statement for the reply statement of the lingering person. The number of the first inquiry statement is one, and the number of the second inquiry statement may be one or more, and the output order of the first inquiry statement is before the output order of all the second inquiry statements. The smart home device outputs the inquiry statements in sequence according to the output order of the inquiry statements, that is, the smart home device first outputs the first inquiry statement, and then outputs at least one second inquiry statement after collecting the reply statement of the lingering person. Among them, the second inquiry statement may include inquiry statements set based on the lingering person with different identities, and the identity of the person may include takeaway personnel, couriers, building managers, installation and maintenance personnel, etc. For example, the first inquiry statement may be: "Who are you? What are you doing?", and the second inquiry statement may be: "Please put the express at the door", "Please put the takeaway at the door", "Please call the owner", etc.

[0129] S207: If the stay event response instruction content is a smart expulsion instruction content, perform smart expulsion processing according to the smart expulsion instruction content.

[0130] The intelligent expulsion instruction content can be understood as the instruction content intended to instruct the smart home device to unilaterally output an expulsion statement or expulsion audio to the lingering person. The intelligent expulsion instruction content can be an intelligent expulsion instruction content with different statement tones determined according to different levels of dangerous lingering scenarios. For dangerous lingering scenarios with a higher danger level, a strong tone of intelligent expulsion instruction content can be set so that the lingering persons who are likely to be dangerous leave as soon as possible after hearing the expulsion statement. For dangerous lingering scenarios with a lower danger level, a calm tone of intelligent expulsion instruction content can be set so that the lingering persons who are not dangerous contact the owner or leave the house after hearing the expulsion statement.

[0131] The smart expulsion instruction content may include at least one of a smart expulsion statement and a smart expulsion audio, and the smart home device outputs the smart expulsion statement and / or the smart expulsion audio to the lingering person. For example, the smart expulsion statement may be: "I have recorded your behavior into a video, please leave as soon as possible", "I have recorded your behavior into a video and notified the owner to call the police", etc.

[0132] In the embodiment of the present application, after the occurrence of a loitering event in front of a door is monitored by a smart home device, the loitering video in front of the door is sent to a server, so that the server can detect the danger scene of the loitering video in front of the door to obtain the loitering event response indication content, so that the smart home device can automatically perform the loitering event response processing according to the loitering event response indication content sent by the server, realizing the function of the smart home device to respond to different loitering persons in a targeted manner according to different loitering danger scenes, and in the process of the smart home device automatically performing the loitering event response processing, there is no need for user participation, which not only ensures the safety of family members and household items, but also increases the intelligence of the smart home device in responding to the loitering event. In addition, the embodiment of the present application does not need to arrange a large model for dangerous scene detection in the smart home device, so there is no need to configure a chip with high computing power for the smart home device, reducing the hardware cost of the smart home device, and the large model for dangerous scene detection is arranged in the server, which can realize the detection of loitering videos in front of the door sent by multiple smart home devices through one server, saving the deployment cost of the large model for dangerous scene detection.

[0133] In the following Figure 3-Figure 4 In the method embodiment shown, only the execution subject of each step is introduced and explained as a server.

[0134] See also Figure 3 , Figure 3 This is a flow chart of another embodiment of a stay event processing method proposed in this application. Specifically:

[0135] S301, receiving a door-front stay video corresponding to a door-front stay event sent by a smart home device.

[0136] For details on the meaning of the door-to-door stay event and the door-to-door stay video, please refer to Figure 1 The description of S101 in the illustrated embodiment will not be repeated here.

[0137] In some embodiments, the server may receive the video of the stay in front of the door sent by the smart home device through a pre-established secure transmission network. Alternatively, the server may receive the encrypted video of the stay in front of the door sent by the smart home device, and the server may use a preset decryption key to decrypt the encrypted video of the stay in front of the door to obtain the video of the stay in front of the door.

[0138] S302, based on the video of staying in front of the door, a large model of dangerous scene detection is used to perform dangerous scene detection to obtain the stay event response indication content corresponding to the video of staying in front of the door.

[0139] The big model for detecting dangerous scenes can be a big language model obtained by training the model for the detection scene of staying events based on the basic big language model. The big model for detecting dangerous scenes can also directly use the basic big language model.

[0140] The stay event response instruction content can be understood as the response prompt content that instructs the smart home device to perform stay event response processing. The stay event response instruction content may include the conversation content that the smart home device needs to output, the audio content that the smart home device needs to output, and the like.

[0141] It can be understood that the stay event response indication content corresponds to the stay danger scene level, and the stay event response indication content corresponding to different stay danger scene levels is also different. The stay danger scene level refers to the stay danger scene level detected in the process of performing dangerous scene detection on the stay video in front of the door through the dangerous scene detection large model.

[0142] It is understandable that the stay event response instruction content may be an inquiry dialogue instruction content, which is intended to instruct the smart home device to output an inquiry statement to the lingering person and continue to output the remaining inquiry statements to the lingering person after the lingering person replies to the inquiry statement. The stay event response instruction content may also be a smart expulsion instruction content, which is intended to instruct the smart home device to unilaterally output an expulsion statement or expulsion audio to the lingering person.

[0143] When the stay event response instruction content is an inquiry dialogue instruction content, the stay event response instruction content may be an inquiry dialogue instruction content with different statement tones determined according to different levels of stay danger scenarios.

[0144] When the stay event response instruction content is intelligent expulsion instruction content, the stay event response instruction content may be intelligent expulsion instruction content with different statement tones determined according to different levels of stay danger scenarios.

[0145] In some embodiments, a stay response content generation prompt word can be generated based on the stay video in front of the door, and the stay response content prompt word and the stay video in front of the door are input into the dangerous scene detection model for dangerous scene detection to obtain the stay event response indication content.

[0146] S303: Send the stay event response indication content to the smart home device, so that the smart home device performs stay event response processing based on the stay event response indication content.

[0147] When the server receives the video of staying in front of the door sent by the smart home device, it can associate and store the video of staying in front of the door with the device identification of the smart home device. After obtaining the stay event response indication content corresponding to the video of staying in front of the door by executing S302, the stay event response indication content is sent to the smart home device indicated by the device identification.

[0148] It is understandable that if the stay event response indication content is an inquiry dialogue indication content, the smart home device performs inquiry dialogue processing according to the inquiry dialogue indication content. The inquiry dialogue indication content may include a first inquiry statement and a second inquiry statement for the stay person's reply statement. The output order of the first inquiry statement is before the output order of the second inquiry statement. In this scenario, the smart home device outputs the inquiry statements in sequence according to the output order of the inquiry statements. Among them, the second inquiry statement may include inquiry statements set based on stay persons with different identities, and the identity of the person may include takeaway personnel, couriers, building managers, installation and maintenance personnel, etc. For example, the first inquiry statement may be: "Who are you? What are you doing?", and the second inquiry statement may be: "Please put the express at the door", "Please put the takeaway at the door", "Please call the owner", etc.

[0149] If the stay event response instruction content is a smart expulsion instruction content, the smart home device performs smart expulsion processing according to the smart expulsion instruction content. The smart expulsion instruction content may include at least one of a smart expulsion statement and a smart expulsion audio. In this scenario, the smart home device outputs a smart expulsion statement and / or a smart expulsion audio to the lingering person. For example, a smart expulsion statement may be: "I have recorded your behavior into a video, please leave as soon as possible", "I have recorded your behavior into a video and notified the owner to call the police", etc.

[0150] In an embodiment of the present application, the server receives a video of a person staying in front of a door corresponding to a stay event in front of a door sent by a smart home device, performs a dangerous scene detection based on the video of the person staying in front of the door using a large model of dangerous scene detection to obtain a stay event response indication content corresponding to the video of the person staying in front of the door, and sends the stay event response indication content to the smart home device, so that the smart home device performs stay event response processing based on the stay event response indication content. The video of the person staying in front of the door is detected by the large model of dangerous scene detection on the server side to obtain the stay event response indication content, so that the smart home device can automatically perform stay event response processing according to the stay event response indication content sent by the server without user instruction, realizing the function of the smart home device to respond to different stayers in a targeted manner according to different stay dangerous scenes, and in the process of the smart home device automatically performing stay event response processing, there is no need for user participation, which not only ensures the safety of family members and household items, but also increases the intelligence of the smart home device in responding to stay events.

[0151] See also Figure 4 , Figure 4 This is a flow chart of another embodiment of a stay event processing method proposed in this application. Specifically:

[0152] S401, receiving a door-front loitering video corresponding to a door-front loitering event sent by a smart home device.

[0153] The server may receive the video of the stay in front of the door sent by the smart home device through a pre-established secure transmission network. Alternatively, the server may receive the encrypted video of the stay in front of the door sent by the smart home device, and the server may decrypt the encrypted video of the stay in front of the door using a preset decryption key to obtain the video of the stay in front of the door.

[0154] S402, generating prompt words based on the video of staying in front of the door and generating stay response content.

[0155] The prompt words generated by the stay response content are used to prompt the dangerous scene detection large model to perform dangerous scene detection on the video of stay in front of the door to obtain the prompt words of the stay event response indication content.

[0156] Specifically, a preset stay scene analysis template is obtained, and the stay video in front of the door is associated with the stay scene analysis template to obtain a stay response content generation prompt word. Among them, the stay scene analysis template contains keywords that prompt the dangerous scene detection large model to perform dangerous scene detection on the target video, and the target video is used to refer to the stay video in front of the door. The stay scene analysis template can be preset and stored in a template configuration file, and the server can obtain the stay scene analysis template from the template configuration file. The target video in the stay scene molecular template can be associated with the stay video in front of the door to obtain the stay response content generation prompt word.

[0157] S403, input the prompt words generated by the stay response content and the stay video in front of the door into the dangerous scene detection large model for dangerous scene detection, and obtain the stay event response indication content corresponding to the stay video in front of the door.

[0158] In some embodiments, executing S403 may specifically include: A1, inputting the prompt words generated by the stay response content and the video of stay in front of the door into the dangerous scene detection big model; A2, performing stay attention pattern extraction processing on the video of stay in front of the door based on the prompt words generated by the stay response content through the dangerous scene detection big model to obtain stay text description information, performing stay scene analysis on the stay text description information through the dangerous scene detection big model to obtain the stay danger scene level, and determining the stay event response indication content corresponding to the video of stay in front of the door based on the stay danger scene level and the stay text description information through the dangerous scene detection big model; A3, outputting the stay event response indication content through the dangerous scene detection big model.

[0159] In step A2, the danger scene detection large model generates prompt words based on the stay response content to extract the attention intention of the video of staying in front of the door to obtain the stay text description information, which can be: the danger scene detection large model generates prompt words based on the stay response content to identify the video content of the video of staying in front of the door, so as to obtain the stay text description information used to describe the video content in the video of staying in front of the door. When the video of staying in front of the door is a reference video, the danger scene detection large model can identify the video content such as the movement trajectory of the characters, the characters' clothes, and the characters' behaviors and actions in the video of staying in front of the door to obtain the stay text description information. When the video of staying in front of the door is a video composed of key frame pictures, the danger scene detection large model can directly identify the key frame pictures to obtain the stay text description information. For the interpretation of reference videos and key frame pictures, please refer to Figure 1 The description in step S101 in the illustrated embodiment. The lingering text description information may be text description information including the identity of the character, the character's clothing, the character's actions, and the like.

[0160] In step A2, the stay text description information is analyzed for stay scenarios by using the big model for dangerous scene detection to obtain the stay dangerous scene level, which can be: the big model for dangerous scene detection calls the built-in dangerous scene level recognition model of the big model to analyze the stay text description information for stay scenarios to obtain the stay dangerous scene level. Among them, the dangerous scene level recognition model can be obtained by training with a machine learning model. The training process of the dangerous scene level recognition model can be: based on the machine learning model, an initial dangerous scene level recognition model for the stay dangerous scene is created, sample stay text description information is obtained, and the stay dangerous scene level label corresponding to the sample stay text description information is marked, and the sample stay text description information is input into the initial dangerous scene level recognition model for at least one round of model training to obtain the predicted stay dangerous scene level, and the model loss value is determined based on the predicted stay dangerous scene level and the stay dangerous scene level label by using the model loss function, and the model parameters of the initial dangerous scene level recognition model are adjusted based on the model loss value until the model training end condition is met to obtain the dangerous scene level recognition model. Optionally, the model training termination conditions of the model may include conditions such as the value of the loss function being less than or equal to a preset loss function threshold, the number of iterations reaching a preset number threshold, etc. The specific model training termination conditions can be determined based on actual conditions and are not specifically limited here. It should be noted that the machine learning models involved in one or more embodiments of the present application include but are not limited to convolutional neural network (CNN) models, deep neural network (DNN) models, recurrent neural networks (RNN) models, embedding models, gradient boosting decision tree (GBDT) models, logistic regression (LR) models and other machine learning models. One or more fitting.

[0161] In step A2, the stay event response indication content corresponding to the stay video in front of the door is determined based on the stay danger scene level and the stay text description information by using the danger scene detection big model, which can be: extracting the key information of the person (including the identity and action of the person) in the stay text description information, calling the built-in response indication content mapping relationship of the big model through the danger scene detection big model, and querying the stay event response indication content corresponding to the stay danger scene level and the key information of the person in the response indication content mapping relationship. Among them, the response indication content mapping relationship can include the reference stay event response indication content corresponding to the reference stay danger scene level and the reference key information of the person.

[0162] S404: Send the stay event response indication content to the smart home device, so that the smart home device performs stay event response processing based on the stay event response indication content.

[0163] For details, the implementation process of S404 can be found in Figure 3 The description of S303 in the illustrated embodiment will not be repeated here.

[0164] Before executing step S401, the embodiment of the present application further executes the following steps:

[0165] A basic large language model is used to create an initial dangerous scene detection large model for the stay event detection scenario; a sample door-front stay video is obtained, and the sample door-front stay video is labeled with a stay event response indication content label; the sample door-front stay video is used to perform at least one round of model training on the initial dangerous scene detection large model. During the model training process, the initial dangerous scene detection large model is used to perform dangerous scene detection on the sample door-front stay video to obtain predicted stay event response indication content, and model parameters of the initial dangerous scene detection large model are adjusted based on the predicted stay event response indication content and the stay event response indication content label to obtain the dangerous scene detection large model after model training.

[0166] Specifically, the execution of using the basic big language model to create an initial danger scene detection big model for the stay event detection scenario can be: obtaining the basic big language model, creating a stay event danger detection scenario adaptation module for the stay event danger detection scenario and a big language generation module based on the basic big language model, and forming the initial danger scene detection big model based on the big language generation module and the stay event danger detection scenario adaptation module.

[0167] Specifically, the model training process of the initial dangerous scene detection large model can be as follows: input the sample door-front lingering video into the initial dangerous scene detection large model for at least one round of model training to obtain the predicted lingering event response indication content, calculate the model comprehensive loss based on the predicted lingering event response indication content and the lingering event response indication content label, adjust the model parameters of the lingering event dangerous detection scene adaptation module in the initial dangerous scene detection large model based on the comprehensive model loss, and control the model parameters of the large language generation module to remain unchanged. Until the model training end conditions are met to obtain the large language generation module and the lingering event dangerous detection scene adaptation module, complete the model fusion of the large language generation module and the lingering event dangerous detection scene adaptation module, and obtain the trained dangerous scene detection large model.

[0168] Specifically, the model fusion of the large language generation module and the stay event hazard detection scenario adaptation module can be: weight fusion of the model structure layer weight of the stay event hazard detection scenario adaptation module and the large language generation module, by determining the target model structure layer corresponding to the model structure layer weight in the large language generation module, the model structure layer parameters of the target model structure layer are parameter fused with the model structure layer weight, the model structure layer weight of the stay event hazard detection scenario adaptation module may only partially correspond to and exist in all model structure layers in the basic large language model, by completing the model structure layer parameter update based on the model structure layer weight for this part of the target model structure layer, and so on to complete the reference update process of all model structure layer weights, thereby obtaining a large model for hazard scene detection.

[0169] Optionally, the model training end condition of the model may include, for example, the value of the loss function is less than or equal to a preset loss function threshold, the number of iterations reaches a preset number threshold, etc. The specific model training end condition can be determined based on actual conditions and is not specifically limited here.

[0170] In an embodiment of the present application, a server receives a door-front stay video corresponding to a door-front stay event sent by a smart home device, generates a stay response content generation prompt word based on the door-front stay video, inputs the stay response content generation prompt word and the door-front stay video into a dangerous scene detection large model for dangerous scene detection, obtains the stay event response indication content corresponding to the door-front stay video, and sends the stay event response indication content to the smart home device, so that the smart home device performs a stay event response processing based on the stay event response indication content, so that the smart home device can automatically perform a stay event response processing according to the stay event response indication content sent by the server, thereby realizing the function of the smart home device to respond to different staying persons in a targeted manner according to different stay danger scenes, and in the process of the smart home device automatically performing the stay event response processing, there is no need for user participation, which not only ensures the safety of family members and household items, but also increases the intelligence of the smart home device in responding to stay events. In addition, the embodiments of the present application do not need to deploy a large model for detecting dangerous scenes in smart home devices, so there is no need to configure smart home devices with chips with high computing power, reducing the hardware cost of smart home devices. The large model for detecting dangerous scenes is deployed in the server, and it is possible to detect videos of people staying in front of the door sent by multiple smart home devices through one server, saving the deployment cost of the large model for detecting dangerous scenes.

[0171] The following will be combined Figure 5 , the stay event processing device provided in the embodiment of the present application is introduced in detail. It should be noted that, Figure 5 The stay event processing device shown is used to execute the application Figure 1-2For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 1-2 The embodiment shown.

[0172] See also Figure 5 , which shows a schematic diagram of the structure of the stay event processing device of an embodiment of the present application. The stay event processing device 1 can be implemented as all or part of the device through software, hardware or a combination of both. According to some embodiments, the stay event processing device 1 includes a video acquisition module 11, a video sending module 12, and a response processing module 13, which are specifically used to:

[0173] The video acquisition module 11 is used to acquire the door-front lingering video corresponding to the door-front lingering event;

[0174] The video sending module 12 is used to send the video of staying in front of the door to the server, so that the server uses a large model of dangerous scene detection to perform dangerous scene detection based on the video of staying in front of the door to obtain the stay event response indication content corresponding to the video of staying in front of the door;

[0175] The response processing module 13 is used to receive the stay event response indication content sent by the server, and perform stay event response processing based on the stay event response indication content.

[0176] Optionally, the video acquisition module 11 includes:

[0177] An event detection unit, used to obtain radar detection data, and perform stay duration detection processing based on the radar detection data to obtain a stay event detection result in front of the door;

[0178] A time acquisition unit, configured to acquire a radar detection time period corresponding to the door-staying event if the door-staying event detection result indicates that there is a door-staying event;

[0179] The video determination unit is used to obtain a reference video collected by the camera during the radar detection time period, and determine the door-front staying video corresponding to the door-front staying event based on the reference video.

[0180] Optionally, the video determination unit includes:

[0181] A first determining subunit is configured to confirm the reference video as the door-staying video corresponding to the door-staying event; or

[0182] The second determination subunit is used to perform frame extraction processing based on the reference video to obtain multiple frames of door-front lingering key frame pictures, and confirm the key frame video obtained by combining the door-front lingering key frame pictures as the door-front lingering video corresponding to the door-front lingering event.

[0183] Optionally, the response processing module includes:

[0184] A first response unit, configured to perform inquiry dialogue processing according to the inquiry dialogue instruction content if the stay event response instruction content is an inquiry dialogue instruction content;

[0185] The second response unit is configured to perform intelligent expulsion processing according to the intelligent expulsion instruction content if the stay event response instruction content is intelligent expulsion instruction content.

[0186] The following will be combined Figure 6 , the stay event processing device provided in the embodiment of the present application is introduced in detail. It should be noted that, Figure 6 The stay event processing device shown is used to execute the application Figure 2-3 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 2-3 The embodiment shown.

[0187] See also Figure 6 , which shows a schematic diagram of the structure of the stay event processing device of an embodiment of the present application. The stay event processing device 2 can be implemented as all or part of the device through software, hardware or a combination of both. According to some embodiments, the stay event processing device 1 includes a video acquisition module 21, a video sending module 22, and a response processing module 23, which are specifically used to:

[0188] The video acquisition module 21 is used to receive the door-front stay video corresponding to the door-front stay event sent by the smart home device;

[0189] The video detection module 22 is used to perform dangerous scene detection based on the video of staying in front of the door using a large dangerous scene detection model to obtain a stay event response indication content corresponding to the video of staying in front of the door;

[0190] The response sending module 23 is used to send the stay event response indication content to the smart home device, so that the smart home device performs stay event response processing based on the stay event response indication content.

[0191] Optionally, the video detection module 22 includes:

[0192] A prompt generating unit, configured to generate prompt words for the stay response content based on the stay video in front of the door;

[0193] The model detection unit is used to input the prompt words generated by the stay response content and the video of stay in front of the door into the dangerous scene detection large model for dangerous scene detection, and obtain the stay event response indication content corresponding to the video of stay in front of the door.

[0194] Optionally, the prompt generating unit comprises:

[0195] A template acquisition unit, used to acquire a preset stay scene analysis template;

[0196] The video association unit is used to associate the door-front stay video with the stay scene analysis template to obtain a stay response content generation prompt word.

[0197] Optionally, the model detection unit includes:

[0198] A first detection unit, used for inputting the prompt words generated by the stay response content and the video of stay in front of the door into the dangerous scene detection large model;

[0199] The second detection unit is used to generate prompt words based on the stay response content through the dangerous scene detection big model to perform stay attention pattern extraction processing on the stay video in front of the door to obtain stay text description information, perform stay scene analysis on the stay text description information through the dangerous scene detection big model to obtain a stay danger scene level, and determine the stay event response indication content corresponding to the stay video in front of the door based on the stay danger scene level and the stay text description information through the dangerous scene detection big model;

[0200] The third detection unit is used to output the stay event response indication content through the dangerous scene detection large model.

[0201] Optionally, the stay event processing device 2 further includes:

[0202] A first training module is used to create an initial danger scene detection big model for the stay event detection scenario using a basic big language model;

[0203] The second training module is used to obtain a sample video of staying in front of the door, and mark the sample video of staying in front of the door with a label indicating a stay event response content;

[0204] The third training module is used to perform at least one round of model training on the initial dangerous scene detection big model using the sample door-front staying video. During the model training process, the initial dangerous scene detection big model is used to perform dangerous scene detection on the sample door-front staying video to obtain predicted staying event response indication content, and the model parameters of the initial dangerous scene detection big model are adjusted based on the predicted staying event response indication content and the staying event response indication content label to obtain the dangerous scene detection big model after model training.

[0205] Please refer to Figure 7, which shows a schematic diagram of the structure of a smart home device provided by an exemplary embodiment of the present application. The smart home device in the embodiment of the present application may include one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, the memory 120, the input device 130, and the output device 140 may be connected via a bus 150.

[0206] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.

[0207] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 120 includes a non-transitory computer-readable storage medium. The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (e.g., a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The operating system may be an Android system, including a system deeply developed based on the Android system, an IOS system developed by Apple, including a system deeply developed based on the IOS system or other systems.

[0208] In order for the operating system to distinguish the specific application scenarios of third-party applications, it is necessary to open up data communication between third-party applications and the operating system so that the operating system can obtain the current scenario information of third-party applications at any time, and then perform targeted system resource adaptation based on the current scenario.

[0209] The input device 130 is used to receive input commands or data, and includes but is not limited to a keyboard, a mouse, a camera, a microphone, or a touch device. The output device 140 is used to output commands or data, and includes but is not limited to a display device and a speaker. In one example, the input device 130 and the output device 140 can be combined, and the input device 130 and the output device 140 are touch screen displays.

[0210] The touch display screen can be designed as a full screen, a curved screen or a special-shaped screen. The touch display screen can also be designed as a combination of a full screen and a curved screen, or a combination of a special-shaped screen and a curved screen, which is not limited in the embodiments of the present application.

[0211] In addition, those skilled in the art can understand that the structure of the smart home device shown in the above drawings does not constitute a limitation on the smart home device, and the smart home device may include more or fewer components than shown in the drawings, or combine certain components, or arrange the components differently. For example, the smart home device also includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WiFi) module, a power supply, a Bluetooth module and other components, which will not be described in detail here.

[0212] exist Figure 7In the smart home device shown, the processor 110 can be used to call the program of the stay event processing method stored in the memory 120, and specifically perform the following operations:

[0213] Get the door-front lingering video corresponding to the door-front lingering event;

[0214] The video of staying in front of the door is sent to the server, so that the server uses a large model of dangerous scene detection to perform dangerous scene detection based on the video of staying in front of the door to obtain the stay event response indication content corresponding to the video of staying in front of the door;

[0215] The stay event response indication content sent by the server is received, and a stay event response process is performed based on the stay event response indication content.

[0216] In one embodiment, when the processor 110 executes the step of obtaining the door-front lingering video corresponding to the door-front lingering event, the processor 110 specifically performs the following operations:

[0217] Acquire radar detection data, and perform stay duration detection processing based on the radar detection data to obtain a stay event detection result in front of the door;

[0218] If the door-staying event detection result indicates that there is a door-staying event, obtaining a radar detection time period corresponding to the door-staying event;

[0219] A reference video captured by the camera during the radar detection time period is obtained, and a door-front stay video corresponding to the door-front stay event is determined based on the reference video.

[0220] In one embodiment, when the processor 110 executes the step of determining the door-front lingering video corresponding to the door-front lingering event based on the reference video, the processor 110 specifically performs the following operations:

[0221] Confirming the reference video as the door-front lingering video corresponding to the door-front lingering event; or,

[0222] Based on the reference video, frame extraction processing is performed to obtain multiple frames of door-front lingering key frame images, and a key frame video obtained by combining the door-front lingering key frame images is confirmed as the door-front lingering video corresponding to the door-front lingering event.

[0223] In one embodiment, when the processor 110 executes the step of performing a stay event response process based on the stay event response indication content, the processor 110 specifically performs the following operations:

[0224] If the stay event response instruction content is an inquiry dialogue instruction content, then the inquiry dialogue processing is performed according to the inquiry dialogue instruction content;

[0225] If the stay event response instruction content is a smart expulsion instruction content, smart expulsion processing is performed according to the smart expulsion instruction content.

[0226] Please refer to Figure 8 , which shows a schematic diagram of the structure of a server provided by an exemplary embodiment of the present application. The server in the embodiment of the present application may include one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, the memory 120, the input device 130, and the output device 140 may be connected via a bus 150.

[0227] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.

[0228] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 120 includes a non-transitory computer-readable storage medium. The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (e.g., a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The operating system may be an Android system, including a system deeply developed based on the Android system, an IOS system developed by Apple, including a system deeply developed based on the IOS system or other systems.

[0229] In order for the operating system to distinguish the specific application scenarios of third-party applications, it is necessary to open up data communication between third-party applications and the operating system so that the operating system can obtain the current scenario information of third-party applications at any time, and then perform targeted system resource adaptation based on the current scenario.

[0230] The input device 130 is used to receive input commands or data, and includes but is not limited to a keyboard, a mouse, a camera, a microphone, or a touch device. The output device 140 is used to output commands or data, and includes but is not limited to a display device and a speaker. In one example, the input device 130 and the output device 140 can be combined, and the input device 130 and the output device 140 are touch screen displays.

[0231] The touch display screen can be designed as a full screen, a curved screen or a special-shaped screen. The touch display screen can also be designed as a combination of a full screen and a curved screen, or a combination of a special-shaped screen and a curved screen, which is not limited in the embodiments of the present application.

[0232] In addition, those skilled in the art can understand that the structure of the smart home device shown in the above drawings does not constitute a limitation on the smart home device, and the smart home device may include more or fewer components than shown in the drawings, or combine certain components, or arrange the components differently. For example, the smart home device also includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WiFi) module, a power supply, a Bluetooth module and other components, which will not be described in detail here.

[0233] exist Figure 8In the server shown, the processor 110 can be used to call the program of the stay event processing method stored in the memory 120, and specifically perform the following operations:

[0234] Receive a door-front stay video corresponding to a door-front stay event sent by a smart home device;

[0235] Based on the video of staying in front of the door, a large model of dangerous scene detection is used to perform dangerous scene detection to obtain the stay event response indication content corresponding to the video of staying in front of the door;

[0236] The stay event response indication content is sent to the smart home device, so that the smart home device performs stay event response processing based on the stay event response indication content.

[0237] In one embodiment, when the processor 110 performs the step of performing dangerous scene detection based on the video of staying in front of the door using a large dangerous scene detection model to obtain the stay event response indication content corresponding to the video of staying in front of the door, the processor 110 specifically performs the following operations:

[0238] Generate prompt words based on the video of staying in front of the door; generate stay response content and generate prompt words;

[0239] The prompt words generated by the stay response content and the video of stay in front of the door are input into the dangerous scene detection large model for dangerous scene detection, and the stay event response indication content corresponding to the video of stay in front of the door is obtained.

[0240] In one embodiment, when the processor 110 executes the step of generating a prompt word based on the video of staying in front of the door, the processor 110 specifically executes the following steps:

[0241] Get the preset stay scenario analysis template;

[0242] The door-front stay video and the stay scene analysis template are associated to obtain a stay response content generation prompt word.

[0243] In one embodiment, when the processor 110 executes the step of generating a prompt word from the stay response content and inputting the video of stay in front of the door into the dangerous scene detection large model for dangerous scene detection, and obtaining the stay event response indication content corresponding to the video of stay in front of the door, the processor 110 specifically performs the following operations:

[0244] Inputting the prompt words generated by the stay response content and the video of stay in front of the door into the dangerous scene detection large model;

[0245] The dangerous scene detection big model generates prompt words based on the stay response content, performs stay attention pattern extraction processing on the stay video in front of the door to obtain stay text description information, performs stay scene analysis on the stay text description information through the dangerous scene detection big model to obtain the stay dangerous scene level, and determines the stay event response indication content corresponding to the stay video in front of the door based on the stay dangerous scene level and the stay text description information through the dangerous scene detection big model;

[0246] The stay event response instruction content is outputted through the dangerous scene detection big model.

[0247] In one embodiment, the processor 110 further performs the following steps:

[0248] The basic large language model is used to create an initial dangerous scene detection large model for the stay event detection scenario;

[0249] Obtain a sample video of staying in front of the door, and mark the sample video of staying in front of the door with a label indicating a stay event response content;

[0250] The sample door-front staying video is used to perform at least one round of model training on the initial dangerous scene detection big model. During the model training process, the sample door-front staying video is used to perform dangerous scene detection on the initial dangerous scene detection big model to obtain predicted staying event response indication content. Based on the predicted staying event response indication content and the staying event response indication content label, the model parameters of the initial dangerous scene detection big model are adjusted to obtain the dangerous scene detection big model after model training.

[0251] An embodiment of the present application further provides a computer-readable storage medium, which stores at least one instruction, and the at least one instruction is used to be executed by a processor to implement the stay event processing method as described in the above embodiments.

[0252] An embodiment of the present application further provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the stay event processing method described in the above embodiments.

[0253] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0254] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for handling a stay event, characterized in that: Applied to smart home devices, the method includes: Get the door-front lingering video corresponding to the door-front lingering event; The video of staying in front of the door is sent to the server, so that the server uses a large model of dangerous scene detection to perform dangerous scene detection based on the video of staying in front of the door to obtain the stay event response indication content corresponding to the video of staying in front of the door; The stay event response indication content sent by the server is received, and a stay event response process is performed based on the stay event response indication content.

2. The method according to claim 1, characterized in that The step of obtaining the door-front stay video corresponding to the door-front stay event includes: Acquire radar detection data, and perform stay duration detection processing based on the radar detection data to obtain a stay event detection result in front of the door; If the door-staying event detection result indicates that there is a door-staying event, obtaining a radar detection time period corresponding to the door-staying event; A reference video captured by the camera during the radar detection time period is obtained, and a door-front stay video corresponding to the door-front stay event is determined based on the reference video.

3. The method according to claim 2, characterized in that The determining the door-front lingering video corresponding to the door-front lingering event based on the reference video includes: Confirming the reference video as the door-front lingering video corresponding to the door-front lingering event; or, Based on the reference video, frame extraction processing is performed to obtain multiple frames of door-front lingering key frame images, and a key frame video obtained by combining the door-front lingering key frame images is confirmed as the door-front lingering video corresponding to the door-front lingering event.

4. The method according to claim 1, characterized in that: The performing stay event response processing based on the stay event response indication content includes: If the stay event response instruction content is an inquiry dialogue instruction content, then the inquiry dialogue processing is performed according to the inquiry dialogue instruction content; If the stay event response instruction content is a smart expulsion instruction content, smart expulsion processing is performed according to the smart expulsion instruction content.

5. A method for handling a stay event, characterized in that: Applied to a server, the method comprises: Receive a door-front stay video corresponding to a door-front stay event sent by a smart home device; Based on the video of staying in front of the door, a large model of dangerous scene detection is used to perform dangerous scene detection to obtain the stay event response indication content corresponding to the video of staying in front of the door; The stay event response indication content is sent to the smart home device, so that the smart home device performs stay event response processing based on the stay event response indication content.

6. The method according to claim 5, characterized in that The method of performing dangerous scene detection based on the video of staying in front of the door using a large dangerous scene detection model to obtain the stay event response indication content corresponding to the video of staying in front of the door includes: Generate prompt words based on the video of staying in front of the door; generate stay response content and generate prompt words; The prompt words generated by the stay response content and the video of stay in front of the door are input into the dangerous scene detection large model for dangerous scene detection, and the stay event response indication content corresponding to the video of stay in front of the door is obtained.

7. A stay event processing device, characterized in that: Applied to smart home equipment, the device comprises: A video acquisition module, used to acquire a door-front stay video corresponding to a door-front stay event; A video sending module is used to send the video of staying in front of the door to the server, so that the server uses a large model of dangerous scene detection to perform dangerous scene detection based on the video of staying in front of the door to obtain the stay event response indication content corresponding to the video of staying in front of the door; The response processing module is used to receive the stay event response indication content sent by the server, and perform stay event response processing based on the stay event response indication content.

8. A stay event processing device, characterized in that: Applied to a server, the device comprises: A video acquisition module is used to receive a door-front stay video corresponding to a door-front stay event sent by a smart home device; A video detection module, used to perform dangerous scene detection based on the video of staying in front of the door using a large dangerous scene detection model to obtain a stay event response indication content corresponding to the video of staying in front of the door; The response sending module is used to send the stay event response indication content to the smart home device, so that the smart home device performs stay event response processing based on the stay event response indication content.

9. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method according to any one of claims 1 to 4 or 5 to 6.

10. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method according to any one of claims 1 to 4 or 5 to 6.