Video processing method and device, storage medium and electronic equipment
The security video of smart home devices is processed through the basic event recognition model and large event scene analysis model, event video cover information is generated and video scenes are classified, which solves the problem of inconvenience for users to review videos in smart home devices and improves the efficiency Convenience and safety protection for video playback.
Patent Information
- Application Number
- CN202410698018.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-05-30
AI Technical Summary
When watching videos on smart home devices, it is difficult for users to quickly and easily find videos of interest. Existing technology makes video processing inconvenient, affecting user experience and security protection.
The basic event recognition model is used to perform basic event recognition on security videos, generate event video cover information, and use event scene analysis large models to analyze event scenes and classify video scenes. Users can quickly query videos of interest on the cloud service platform.
It improves the convenience and efficiency of video playback for users, strengthens home security protection, and makes smart home device applications more complete and practical.
Smart Images

Figure CN118628800A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a video processing method, device, storage medium and electronic device. Background Art
[0002] With the development of the smart home industry, intelligence is becoming more and more popular among the market and users, and safe and convenient use is the basic goal pursued by the market and users. Smart home devices such as smart doorbells, smart cameras, smart door locks, etc. can collect videos of the environment and synchronize the videos to the cloud so that users can view the videos by accessing the cloud. Summary of the invention
[0003] The present application provides a video processing method, device, storage medium and electronic device, and the technical solution is as follows:
[0004] In a first aspect, an embodiment of the present application provides a video processing method, which is applied to a smart home device, and the method includes:
[0005] Collect security videos of the environment;
[0006] Using a basic event recognition model to perform basic event recognition on the security video to obtain event video cover information;
[0007] The event video cover information and the security video are sent to a cloud service platform, so that the cloud service platform uses an event scene analysis large model to perform event scene analysis based on the event video cover information to obtain event scene classification information, and performs video scene classification processing on the security video based on the event scene classification information and the event video cover information.
[0008] In a feasible implementation manner, the basic event recognition model is used to perform basic event recognition on the security video to obtain a basic event recognition result and an event video cover, including:
[0009] Inputting the security video into a basic event recognition model;
[0010] Performing basic scene object detection on the security video using the basic event recognition model to obtain basic scene object image information, performing basic event recognition based on the basic scene object image information to obtain a basic event recognition result, and determining a basic event video indicated by the basic event recognition result from the security video;
[0011] Performing video cover screening processing on the basic event video using the basic event recognition model to obtain an event video cover, and outputting event video cover information;
[0012] The event video cover information includes an event video cover image and video cover meta information corresponding to the event video cover image.
[0013] In a feasible implementation manner, the step of performing video cover screening processing on the basic event video using the basic event recognition model to obtain the event video cover includes:
[0014] The video frame scene information of the basic event video frames contained in the basic event video is extracted through the basic event recognition model, the basic event video frames are scored for basic scenes based on the video frame scene information, and at least one frame of event video cover is determined from the basic event video frames based on the basic scene score.
[0015] In a second aspect, an embodiment of the present application provides a video processing method, which is applied to a cloud service platform, and the method includes:
[0016] Receive event video cover information and security video uploaded by a smart home device, wherein the event video cover information is information obtained by the smart home device performing basic event recognition on the security video using a basic event recognition model;
[0017] Based on the event video cover information, an event scene analysis large model is used to perform event scene analysis to obtain event scene classification information, and based on the event scene classification information and the event video cover information, video scene classification processing is performed on the security video.
[0018] In a feasible implementation manner, the event scene analysis based on the event video cover information using an event scene analysis large model to obtain event scene classification information includes:
[0019] Acquire an event video cover image and video cover meta information corresponding to the event video cover image from the event video cover information;
[0020] Constructing event scene analysis prompt words for the event video cover image based on the video cover meta information;
[0021] The event scene analysis prompt words and the event video cover image are input into the event scene analysis large model to perform event scene analysis, and output event scene classification information.
[0022] In a feasible implementation manner, the constructing of event scene analysis prompt words for the event video cover image based on the video cover meta information includes:
[0023] The video cover meta information is added to the event scene analysis template to obtain event scene analysis prompt words for the event video cover image.
[0024] In a feasible implementation manner, the event scene analysis prompt words and the event video cover image are input into the event scene analysis big model to perform event scene analysis, and the event scene classification information is output, including:
[0025] Inputting the event scene analysis prompt words and the event video cover image into the event scene analysis large model;
[0026] The event scene analysis big model is used to convert the event video cover image into text based on the event scene analysis prompt words to obtain event cover description information, key semantic analysis is performed on the event cover description information to obtain key semantic information, and event scene classification is performed on the key semantic information to obtain event scene classification information;
[0027] The event scene classification information is outputted through the scene analysis big model.
[0028] In a feasible implementation manner, the method further includes:
[0029] An initial event scene parsing big model is created for the event scene parsing scenario using a basic big language model;
[0030] Obtaining sample event video cover information, and marking the sample event video cover information with an event scene classification information label;
[0031] The sample event video cover information is used to perform at least one round of model training on the initial event scene analysis big model. During the model training process, the sample event video cover information is used to perform event scene analysis processing on the initial event scene analysis big model to obtain predicted event scene classification information. Based on the predicted event scene classification information and the event scene classification information label, model parameters of the initial event scene analysis big model are adjusted to obtain the event scene analysis big model after model training.
[0032] In a feasible implementation manner, the performing video scene classification processing on the security video based on the event scene classification information and the event video cover information includes:
[0033] Determine an event video cover image in the event video cover information and video cover meta information corresponding to the event video cover image;
[0034] Extracting the event scene video from the security video based on the video cover meta information, and using the event video cover image as the video cover of the event scene video;
[0035] The event scene video is associated with an event scene classification set corresponding to the event scene classification information.
[0036] In a third aspect, an embodiment of the present application provides a video processing device, which is applied to a smart home device, and the device includes:
[0037] Video acquisition module, used to collect security videos of the environment;
[0038] An event recognition module, used to perform basic event recognition on the security video using a basic event recognition model to obtain event video cover information;
[0039] A scene analysis module is used to send the event video cover information and the security video to a cloud service platform, so that the cloud service platform uses an event scene analysis large model to perform event scene analysis based on the event video cover information to obtain event scene classification information, and classifies the security video into video scenes based on the event scene classification information and the event video cover information.
[0040] In a feasible implementation manner, the event identification module is used to:
[0041] Inputting the security video into a basic event recognition model;
[0042] Performing basic scene object detection on the security video using the basic event recognition model to obtain basic scene object image information, performing basic event recognition based on the basic scene object image information to obtain a basic event recognition result, and determining a basic event video indicated by the basic event recognition result from the security video;
[0043] Performing video cover screening processing on the basic event video using the basic event recognition model to obtain an event video cover, and outputting event video cover information;
[0044] The event video cover information includes an event video cover image and video cover meta information corresponding to the event video cover image.
[0045] In a feasible implementation manner, the event identification module is used to:
[0046] The video frame scene information of the basic event video frames contained in the basic event video is extracted through the basic event recognition model, the basic event video frames are scored for basic scenes based on the video frame scene information, and at least one frame of event video cover is determined from the basic event video frames based on the basic scene score.
[0047] In a fourth aspect, an embodiment of the present application provides a video processing device, which is applied to a cloud service platform. The method includes:
[0048] A data receiving module, used to receive event video cover information and security video uploaded by a smart home device, wherein the event video cover information is information obtained by the smart home device performing basic event recognition on the security video using a basic event recognition model;
[0049] The scene analysis module is used to perform event scene analysis based on the event video cover information using an event scene analysis large model to obtain event scene classification information, and to perform video scene classification processing on the security video based on the event scene classification information and the event video cover information.
[0050] In a feasible implementation manner, the scene parsing module is used to:
[0051] Acquire an event video cover image and video cover meta information corresponding to the event video cover image from the event video cover information;
[0052] Constructing event scene analysis prompt words for the event video cover image based on the video cover meta information;
[0053] The event scene analysis prompt words and the event video cover image are input into the event scene analysis large model to perform event scene analysis, and output event scene classification information.
[0054] In a feasible implementation manner, the scene parsing module is used to:
[0055] The video cover meta information is added to the event scene analysis template to obtain event scene analysis prompt words for the event video cover image.
[0056] In a feasible implementation manner, the scene parsing module is used to:
[0057] Inputting the event scene analysis prompt words and the event video cover image into the event scene analysis large model;
[0058] The event scene analysis big model is used to convert the event video cover image into text based on the event scene analysis prompt words to obtain event cover description information, key semantic analysis is performed on the event cover description information to obtain key semantic information, and event scene classification is performed on the key semantic information to obtain event scene classification information;
[0059] The event scene classification information is outputted through the scene analysis big model.
[0060] In a feasible embodiment, the device is also used for:
[0061] An initial event scene parsing big model is created for the event scene parsing scenario using a basic big language model;
[0062] Obtaining sample event video cover information, and marking the sample event video cover information with an event scene classification information label;
[0063] The sample event video cover information is used to perform at least one round of model training on the initial event scene analysis big model. During the model training process, the sample event video cover information is used to perform event scene analysis processing on the initial event scene analysis big model to obtain predicted event scene classification information. Based on the predicted event scene classification information and the event scene classification information label, model parameters of the initial event scene analysis big model are adjusted to obtain the event scene analysis big model after model training.
[0064] In a feasible implementation manner, the scene parsing module is used to:
[0065] Determine an event video cover image in the event video cover information and video cover meta information corresponding to the event video cover image;
[0066] Extracting the event scene video from the security video based on the video cover meta information, and using the event video cover image as the video cover of the event scene video;
[0067] The event scene video is associated with an event scene classification set corresponding to the event scene classification information.
[0068] In a fifth aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.
[0069] In a sixth aspect, an embodiment of the present application provides an electronic device, which may 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 above-mentioned method steps.
[0070] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:
[0071] In one or more embodiments of the present application, the smart home device collects security videos of the environment in which it is located, uses a basic event recognition model to perform basic event recognition on the security video to obtain event video cover information, and sends the event video cover information and the security video to a cloud service platform. The auxiliary service platform uses an event scene analysis large model to perform event scene analysis based on the event video cover information to obtain event scene classification information, and performs video scene classification processing on the security video based on the event scene classification information and the event video cover information. After accurately classifying the video scene based on the event video cover and the event scene classification information, the user can access the cloud service platform and quickly query videos of interest based on the video classification for video playback, thereby improving the convenience and efficiency of user video playback, and also strengthening the safety protection of the family, making the application of smart home devices more complete and practical. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] In order to more clearly illustrate the embodiments of the present application 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0073] Figure 1 It is a flowchart of a video processing method provided by an embodiment of the present application;
[0074] Figure 2 is a flowchart of another embodiment of a video processing method provided in an embodiment of the present application;
[0075] Figure 3 It is a flowchart of a video processing method provided by an embodiment of the present application;
[0076] Figure 4 is a flowchart of another embodiment of a video processing method provided in an embodiment of the present application;
[0077] Figure 5 This is a schematic diagram of an interface for intelligent cover search provided in an embodiment of the present application;
[0078] Figure 6 is a schematic diagram of a scenario of intelligent cover search provided by an embodiment of the present application;
[0079] Figure 7 is a structural schematic diagram of a video processing device provided in an embodiment of the present application;
[0080] Figure 8 is a structural schematic diagram of another video processing device provided in an embodiment of the present application;
[0081] Fig. 9 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0082] Fig.10 It is a schematic diagram of the structure of the operating system and user space provided in the embodiment of the present application;
[0083] Fig.11 yes Fig.10 The architecture diagram of the Android operating system;
[0084] Fig.12 yes Fig.10 Architecture diagram of the IOS operating system. DETAILED DESCRIPTION
[0085] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions 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 ordinary technicians in this field without creative work are within the scope of protection of this application.
[0086] 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.
[0087] In the related art, smart home devices usually only upload the collected videos to the cloud service platform. The videos saved by the cloud service platform are calculated in hours, and the video time is long. The number of videos accumulated within a period of time is large. If the user intends to review the previous scene video, it is impossible to quickly and conveniently find the video of the time period of interest. Based on this, it can be seen that the video processing in the related art has caused the limitation of inconvenient video review for users.
[0088] The present application is described in detail below with reference to specific embodiments.
[0089] In one embodiment, Figure 1 As shown, a video processing method is proposed, which can be implemented by a computer program and can be run on a video processing device based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application. The video processing device can be a smart home device, including but not limited to: a smart door lock, a smart doorbell, a smart camera, a smart home device, etc.
[0090] Specifically, the video processing method includes:
[0091] S102: Collect security video of the environment;
[0092] Smart home devices are usually equipped with video acquisition functions through integrated cameras. When smart home devices recognize the presence of monitoring objects (such as people, animals, and movable objects) in the environment, they can start the video acquisition function and collect security videos of the environment.
[0093] Specifically, the smart home device is equipped with a camera that can record high-definition video. The camera can support night vision, using infrared or other low-light technology to record clearly at night or in low-light environments.
[0094] Exemplarily, the smart home device collects security video of the environment in real time or periodically;
[0095] Furthermore, the smart home device is configured with a motion detection mode. In the motion detection mode, when the smart home device detects that an object in the environment is moving, the smart home device automatically starts recording and collecting video clips. The collected video clips can be called security videos.
[0096] S104: using a basic event recognition model to perform basic event recognition on the security video to obtain event video cover information;
[0097] In principle, the cloud service platform can pre-create and train a basic event recognition model based on a machine learning model, and deploy the basic event recognition model on smart home devices. In actual applications, the smart home devices input the collected security videos into the basic event recognition model, and use the basic event recognition model to perform basic event recognition on the security videos to obtain event video cover information.
[0098] Among them, the basic event can be one or more basic scene object events counted by the cloud service platform through big data, such as the courier's door, family members returning home, property management door, crying, pets appearing, users watching TV and other basic events for basic scene objects in home life scenes. The basic events are preset to train the basic event recognition model, and the basic event recognition model can be used to obtain event video cover information by performing basic event recognition from security videos;
[0099] The event video cover information may include an event video cover image, and in some embodiments may also include video cover meta information of the event video cover image;
[0100] Video cover meta-information is information that describes the video cover image in the security video, such as the time point corresponding to the video cover image, the video time period of the basic event corresponding to the video cover image, the acquisition device information of the video cover image, the home location corresponding to the cover, the event type, etc.
[0101] Exemplarily, a model training process for a basic event recognition model is illustrated below:
[0102] Among them, the basic event recognition model is obtained by training the machine learning model based on security video samples that have been labeled with event video cover information labels. The security video samples include the sample system operation status topology map and the sample target device operation information.
[0103] The following is an explanation of the model training process of the basic event recognition model:
[0104] Model creation: Create an initial basic event recognition model for basic event recognition scenarios based on the machine learning model;
[0105] Sample data acquisition: Obtain a large number of security video samples.
[0106] Sample data labeling: Based on the needs of basic event recognition scenarios, an expert service is introduced to manually label the security video samples with corresponding event video cover information tags. The event video cover information tags include event video cover image tags and video cover meta information tags.
[0107] Model training process: input sample data into the initial basic event recognition model for at least one round of model training to obtain the predicted event video cover information, and use the model loss function to determine the model loss value based on the predicted event video cover information and the event video cover information label. Based on the model loss value, adjust the model parameters of the initial basic event recognition model until the model training end conditions are met to obtain the basic event recognition model.
[0108] Optionally, the model loss function may be a hinge loss function, a cross entropy loss function, a feature distance loss function, etc.
[0109] 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.
[0110] It should be noted that the machine learning models involved in one or more embodiments of the present specification include but are not limited to the fitting of one or more machine learning models such as convolutional neural network (CNN) model, deep neural network (DNN) model, recurrent neural network (RNN) model, embedding model, gradient boosting decision tree (GBDT) model, logistic regression (LR) model, etc.
[0111] In a feasible implementation, the security video can be input into the basic event recognition model, the basic scene object detection is performed on the security video through the basic event recognition model to obtain the basic scene object image information, the basic event recognition is performed based on the basic scene object image information to obtain the basic event recognition result, the basic event video indicated by the basic event recognition result is determined from the security video, the video cover screening process is performed on the basic event video through the basic event recognition model to obtain the event video cover, and the event video cover information is output;
[0112] The event video cover information includes the event video cover image and the video cover meta information corresponding to the event video cover image.
[0113] S106: Send the event video cover information and the security video to the cloud service platform, so that the cloud service platform uses the event scene analysis big model to perform event scene analysis based on the event video cover information to obtain event scene classification information, and classify the security video into video scenes based on the event scene classification information and the event video cover information.
[0114] It is understandable that the event video cover information and the security video may be sent to the service platform at the same time, or the event video cover information and the security video may be sent to the service platform at different time points;
[0115] The cloud service platform establishes a communication connection with at least one smart home device in the smart home system through the network, and the data interaction in the video processing process is completed based on the communication connection. The smart home device sends the event video cover information and the security video to the cloud service platform; the cloud service platform uses the event scene analysis large model to perform event scene analysis based on the event video cover information to obtain event scene classification information, and classifies the security video based on the event scene classification information and the event video cover information. The user can access the cloud service platform (such as through a terminal) and quickly query the video of interest according to the video classification to review the video, which can facilitate the user to view more concrete scene videos;
[0116] Wherein, the network can be a wireless network or a wired network. The wireless network includes but is not limited to a cellular network, a wireless local area network, an infrared network or a Bluetooth network. The wired network includes but is not limited to Ethernet, a universal serial bus (USB) or a controller area network. In one or more embodiments of the specification, technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. are used to represent data (such as a target compressed package) exchanged through the network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec), etc. can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above-mentioned data communication technologies;
[0117] In one or more embodiments of the present application, the smart home device collects security videos of the environment in which it is located, uses a basic event recognition model to perform basic event recognition on the security video to obtain event video cover information, and sends the event video cover information and the security video to a cloud service platform. The auxiliary service platform uses an event scene analysis large model to perform event scene analysis based on the event video cover information to obtain event scene classification information, and performs video scene classification processing on the security video based on the event scene classification information and the event video cover information. After accurately classifying the video scene based on the event video cover and the event scene classification information, the user can access the cloud service platform and quickly query videos of interest based on the video classification for video playback, thereby improving the convenience and efficiency of user video playback, and also strengthening the safety protection of the family, making the application of smart home devices more complete and practical.
[0118] See also Figure 2 , Figure 2 This is a flow chart of another embodiment of a video processing method proposed in this application. Specifically:
[0119] S202: Collect security video of the environment;
[0120] For details, please refer to the method steps of other embodiments in this application specification, which will not be repeated here.
[0121] S204: Inputting the security video into a basic event recognition model;
[0122] S206: Performing basic scene object detection on the security video using the basic event recognition model to obtain basic scene object image information, performing basic event recognition based on the basic scene object image information to obtain a basic event recognition result, and determining a basic event video indicated by the basic event recognition result from the security video;
[0123] Basic scene objects, such as couriers, family members, property management, children, pets and other basic scene objects in home life scenes;
[0124] Schematically, basic scene object detection is performed on security videos through a basic event recognition model: objects in basic scenes, such as people, vehicles, animals, etc., are detected and recognized from security videos, and then image feature information is extracted from security video image frames where these basic scene objects appear to obtain basic scene object image information, which can be used to locate and mark objects in security video image frames; basic event recognition is then performed based on the basic scene object image information: events are classified and recognized based on the recognized basic scene object image information to obtain basic event recognition results, which can usually be used to recognize specific events based on the actions of basic scene objects or object interactions, such as couriers coming to the door, family members returning home, property management coming to the door, crying sounds, pets appearing, users watching TV, and other basic events for basic scene objects in home life scenes;
[0125] The basic event recognition result is used to indicate which segment in the security video is the event video segment of the basic event; according to the basic event recognition result, the corresponding event video segment is determined from the security video, such as locating the specific time period in which the basic event occurs in the security video, and then determining the event video segment.
[0126] S208: Performing video cover screening processing on the basic event video using the basic event recognition model to obtain an event video cover, and outputting event video cover information;
[0127] The event video cover information includes the event video cover image and the video cover meta information corresponding to the event video cover image. The video cover meta information is information describing the video cover image in the security video, such as the time point corresponding to the video cover image, the video time period corresponding to the basic event of the video cover image, the acquisition device information of the video cover image, the home location corresponding to the cover, the event type, etc.
[0128] By performing video cover screening on the basic event video to obtain the event video cover, the most representative frame can be screened out from the determined basic event video as the event video cover. The trained basic event recognition model analyzes the key frames in the event video, selects the event video cover that can best represent the event, and generates video cover meta information after determining the event video cover, thereby combining the event video cover image and the video cover meta information to obtain the event video cover information.
[0129] Optionally, for smart home devices, instead of directly extracting the basic event video from the security video, the event video cover information may be uploaded, and the cloud service platform may subsequently extract the basic event video;
[0130] Optionally, for smart home devices, basic event videos can be directly extracted to replace updating security videos, and the basic event videos can be uploaded to the cloud service platform as security videos.
[0131] In a feasible implementation manner, the obtaining of the event video cover by performing video cover screening processing on the basic event video through the basic event recognition model may be:
[0132] The video frame scene information of the basic event video frames contained in the basic event video is extracted through the basic event recognition model, the basic event video frames are scored for basic scenes based on the video frame scene information, and at least one frame of event video cover is determined from the basic event video frames based on the basic scene score.
[0133] S210: Send the event video cover information and the security video to the cloud service platform, so that the cloud service platform uses the event scene analysis big model to perform event scene analysis based on the event video cover information to obtain event scene classification information, and classify the security video based on the event scene classification information and the event video cover information.
[0134] For details, please refer to the method steps in other embodiments of this specification, which will not be repeated here.
[0135] In one or more embodiments of the present application, the smart home device collects security videos of the environment in which it is located, uses a basic event recognition model to perform basic event recognition on the security video to obtain event video cover information, and sends the event video cover information and the security video to a cloud service platform. The auxiliary service platform uses an event scene analysis large model to perform event scene analysis based on the event video cover information to obtain event scene classification information, and performs video scene classification processing on the security video based on the event scene classification information and the event video cover information. After accurately classifying the video scene based on the event video cover and the event scene classification information, the user can access the cloud service platform and quickly query videos of interest based on the video classification for video playback, thereby improving the convenience and efficiency of user video playback, and also strengthening the safety protection of the family, making the application of smart home devices more complete and practical.
[0136] In one embodiment, Figure 3 As shown, a video processing method is proposed, which can be implemented by a computer program and can be run on a video processing device based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application. The video processing device can be a cloud service platform.
[0137] Specifically, the video processing method includes:
[0138] S302: receiving event video cover information and security video uploaded by a smart home device, wherein the event video cover information is information obtained by the smart home device performing basic event recognition on the security video using a basic event recognition model;
[0139] According to some embodiments, the smart home device can start the video acquisition function when recognizing the presence of monitoring objects (such as people, animals, movable objects) in the environment, and collect the security video of the environment. The smart home device uses the basic event recognition model to perform basic event recognition on the security video to obtain event video cover information, and sends the event video cover information and the security video to the cloud service platform;
[0140] The service platform receives event video cover information and security videos uploaded by smart home devices.
[0141] S304: Based on the event video cover information, an event scene analysis large model is used to perform event scene analysis to obtain event scene classification information, and video scene classification processing is performed on the security video based on the event scene classification information and the event video cover information.
[0142] The event scene classification information is the event scene classification label obtained after the cloud-based event scene analysis big model classifies the event scene video in the security video (also referred to as the basic event video). Subsequently, the security video or the event scene video in the security video can be marked, that is, the event scene classification label is marked, and the security video or the event scene video in the security video can be divided into the scene classification set corresponding to the event scene classification label; in a feasible implementation mode, the event scene analysis big model can directly use the basic big language model.
[0143] In a feasible implementation, the event scene analysis large language model can be obtained by training the model for the event scene analysis scenario based on the basic large language model. The basic large language model (LLM) is an artificial intelligence content generation model that aims to understand and generate human language. The basic large language model is trained on a large amount of data and can perform a wide range of tasks, including text summarization, translation, sentiment analysis, etc.
[0144] Optionally, the basic large language model can be a common AIGC model, such as the Wenxin Yiyan large model, the Tongyi Qianwen large model, the GPT series large model, etc.
[0145] Optionally, you can obtain a trained basic big language model and adapt the basic big language model to the event scene analysis scenario. First, obtain the basic big language model to create an initial event scene analysis big language model, and obtain the sample event video cover information in the new event scene analysis scenario, the sample event video cover information, the sample event video cover image in the event scene analysis scenario, and the sample video cover meta-information corresponding to the sample event video cover image. Use the sample event video cover information to perform model fine-tuning training on the initial event scene analysis big language model, and after the model fine-tuning training is completed, obtain the event scene analysis big language model adapted to the event scene analysis scenario.
[0146] Schematically, an event scene analysis prompt word can be generated in advance based on the event video cover information using an event scene analysis template. The event scene analysis prompt word is used to instruct the event scene analysis big model to perform event scene analysis based on the event video cover information to obtain event scene classification information. The event scene analysis prompt word and the event video cover information are input into the event scene analysis big model to perform event scene analysis to obtain event scene classification information, and the event video cover image in the event video cover information and the video cover meta-information corresponding to the event video cover image are determined. The event scene video is extracted from the security video based on the video cover meta-information, and the event video cover image is used as the video cover of the event scene video. The event scene video is associated with the event scene classification set corresponding to the event scene classification information. Users can access the cloud service platform (such as through a terminal) and quickly query videos of interest for video playback based on the various event scene classification sets after the video is classified, which can facilitate users to view more concrete scene videos;
[0147] In one or more embodiments of the present application, the service platform obtains event video cover information and security videos uploaded by smart home devices, and then uses an event scene analysis large model to perform event scene analysis based on the event video cover information to obtain event scene classification information, and performs video scene classification processing on the security video based on the event scene classification information and the event video cover information. After accurately classifying the video scene based on the event video cover and the event scene classification information, the user can access the cloud service platform and quickly query videos of interest based on the video classification for video playback, thereby improving the convenience and efficiency of user video playback, and also strengthening the safety protection of the family, making the application of smart home devices more complete and practical.
[0148] See also Figure 4 , Figure 4 This is a flow chart of another embodiment of a video processing method proposed in this application. Specifically:
[0149] S402: receiving event video cover information and security video uploaded by a smart home device, wherein the event video cover information is information obtained by the smart home device performing basic event recognition on the security video using a basic event recognition model;
[0150] For details, please refer to the method steps in other embodiments of this specification, which will not be repeated here;
[0151] S404: Acquire an event video cover image and video cover meta information corresponding to the event video cover image from the event video cover information;
[0152] For details, please refer to the method steps in other embodiments of this specification, which will not be repeated here;
[0153] S406: constructing event scene analysis prompt words for the event video cover image based on the video cover meta information;
[0154] Event scene analysis prompt words for event video cover images can be constructed based on video cover meta information. Video cover meta information is information describing the video cover image in the security video, such as the time point corresponding to the video cover image, the video time period corresponding to the basic event of the video cover image, the acquisition device information of the video cover image, the home location corresponding to the cover, the event type, etc. Event scene analysis prompt words are generated by combining the video cover meta information and the event scene analysis template.
[0155] S408: Input the event scene analysis prompt words and the event video cover image into the event scene analysis big model to perform event scene analysis, and output event scene classification information.
[0156] The event video cover image is combined with the event scene analysis prompt words integrated with the video cover meta-information to provide rich contextual information for the large model to enhance the parsing accuracy of the event scene.
[0157] Key scene classification labels such as the elderly, babies / children, men, women, doing homework, looking at mobile phones, dining together, and multiple people are pre-set. The event scene analysis model will convert the event video cover image into text based on the event scene analysis prompt words to obtain the event cover description information, and then extract one or more key semantic words (which can be understood as key semantic information) according to the event cover description information, and classify the key semantic information into event scenes to obtain event scene classification information. The event scene classification information can be understood as one or more event scene classification labels divided for the event video cover image, and then it is necessary to annotate the relevant videos corresponding to the event video cover image with event scene classification labels.
[0158] In a feasible implementation, the event scene analysis prompt words and the event video cover image are input into the event scene analysis big model, the event scene analysis big model is used to convert the event video cover image into text based on the event scene analysis prompt words to obtain the event cover description information, the event cover description information is subjected to key semantic analysis to obtain key semantic information, the key semantic information is subjected to event scene classification to obtain event scene classification information, and the event scene classification information is output through the scene analysis big model. The key semantic information extracted from the video cover description can be effectively used for accurate event scene classification, thereby enhancing the intelligence and automation level of event playback. This not only improves the response speed of event playback processing, but also improves the accuracy of event processing.
[0159] The event scene analysis big model is used to convert the event video cover image from image to text based on the event scene analysis prompt words: the event scene analysis big model uses the event scene analysis prompt words and the event video cover image to generate text information describing the event scene corresponding to the event video cover image, and the text information is also the event cover description information;
[0160] The key semantic analysis of the event cover description information is: extracting key semantic elements from the generated event cover description information to obtain key semantic information, such as named entities, actions or activities, event keywords, actors, objects and time, etc.
[0161] The event scene classification of key semantic information is as follows: the key semantic information is converted into semantic vector features, and the feature labels of the semantic vector features and key scene classification labels are matched. If there is a matching key scene classification label, the event scene classification label corresponding to the matched key scene classification label is matched. In addition, if there is no matching target key scene classification label, a new target key scene label is created based on the semantic vector features, and finally the event scene classification information including these target key scene classification labels is output.
[0162] Exemplarily, the model training process of the event scene analysis large model is explained as follows:
[0163] A2: Use the basic large language model to create an initial event scene parsing large model for event scene parsing scenarios;
[0164] Optionally, a basic large language model is obtained; based on the basic large language model, an initial event scenario parsing large language model is created which includes at least an event scenario parsing scene adaptation module and a large language generation module.
[0165] A trained basic big language model can be obtained, and the basic big language model can be adapted to the event scene analysis scenario to obtain an initial event scene analysis big language model. Usually, the event scene analysis big language model is directly applied to classify event scenes in the event scene analysis scenario, which is difficult to adapt to the new event scene analysis scenario. Based on this, the basic big language model is first obtained to create an initial event scene analysis big language model, and sample data in the new event scene analysis scenario is obtained. Since the basic big language model is usually a trained open source AIGC model with content generation capabilities, based on this, this manual only needs to adapt it to the event scene analysis scenario. Specifically, the sample data can be used to perform model fine-tuning training on the initial event scene analysis big language model, and after the model fine-tuning training is completed, the event scene analysis big language model adapted to the event scene analysis scenario is obtained.
[0166] Model creation: Obtain the basic big language model, create an event scene parsing adaptation module for the event scene parsing scenario and a big language generation module based on the basic big language model, and form an initial event scene parsing big language model based on the big language generation module and the event scene parsing scenario adaptation module;
[0167] A4: Obtain sample event video cover information, and label the sample event video cover information with an event scene classification information label;
[0168] The sample event video cover information is the event video cover information in the large model training stage;
[0169] A6: Use the sample event video cover information to perform at least one round of model training on the initial event scene analysis big model. During the model training process, use the initial event scene analysis big model to perform event scene analysis processing on the sample event video cover information to obtain predicted event scene classification information. Based on the predicted event scene classification information and the event scene classification information label, adjust the model parameters of the initial event scene analysis big model to obtain the event scene analysis big model after model training.
[0170] Model training process: Input the sample event video cover information to the initial event scene analysis large language model for at least one round of model training to obtain predicted event scene classification information, calculate the model comprehensive loss based on the predicted event scene classification information and the event scene classification information label, adjust the model parameters of the event scene analysis scene adaptation module in the initial event scene analysis large language 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 event scene analysis scene adaptation module, complete the model fusion of the large language generation module and the event scene analysis scene adaptation module, and obtain a trained event scene analysis large language model.
[0171] Model fusion of the large language generation module and the event scene analysis scene adaptation module: the model structure layer weights of the event scene analysis scene adaptation module and the large language generation module are weighted and fused. 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 weights. The model structure layer weights of the event scene analysis scene adaptation module may only partially correspond to and have model structure layer weights in all model structure layers in the basic large language model. By completing the parameter update of the model structure layer based on the model structure layer weights for this part of the target model structure layer, the reference update process of all model structure layer weights is completed by analogy, thereby obtaining the event scene analysis large language model.
[0172] 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.
[0173] S410: Determine an event video cover image in the event video cover information and video cover meta information corresponding to the event video cover image;
[0174] S412: extracting an event scene video from the security video based on the video cover meta information, and using the event video cover image as a video cover of the event scene video;
[0175] The video cover meta information is information describing the video cover image in the security video, such as the time point corresponding to the video cover image, the video time period corresponding to the basic event of the video cover image, the acquisition device information of the video cover image, the home location corresponding to the cover, the event type, etc. Based on this, the event scene video can be extracted from the security video based on the video time period of the basic event in the video cover meta information; the event video cover image is used as the video cover of the event scene video;
[0176] S414: Associating the event scene video with the event scene classification set corresponding to the event scene classification information.
[0177] Exemplarily, the event scene analysis prompt words and the event video cover image are input into the event scene analysis big model, and the event scene analysis big model is used to perform event scene analysis on each event cover to output event scene classification information. Then, intelligent classification is performed based on the event scene classification information to associate the event scene video with the event scene classification set corresponding to the event scene classification information;
[0178] Optionally, after the event scene classification information of the event scene video is determined, the event scene classification information is preset as one or more event scene classification labels, such as Figure 5 As shown, Figure 5 This is a schematic diagram of the interface of intelligent cover search. The cloud service platform provides a quick search function for a large number of event scene videos. Figure 5 On the smart cover search interface shown, multiple preset event scene classification labels are defined, such as smiley face label, pet appearance label, mobile phone viewing label, homework label, TV viewing label, party and dining label, car label, multiple character classification labels, etc. Each preset event scene classification label corresponds to an associated sample event scene video;
[0179] Further, after determining the event scene classification information of the event scene video, the event scene classification information consists of one or more event scene classification labels. First, all preset event scene classification labels are checked to see whether the current event scene classification label exists. If so, the event scene video is directly associated with the event scene classification label. If not, a new event scene classification label that is not currently set can be created, and the event scene video is associated with the newly set event scene classification label. Alternatively, a candidate event scene video queue of the current event scene classification label is established, and the current event scene video is associated with the candidate event scene video queue. It is monitored whether the number of queue videos of the candidate event scene video queue is greater than the newly set label threshold. If so, a new preset event scene classification label corresponding to the candidate event scene video queue is created.
[0180] Exemplarily, a user may access the smart cover search interface of the cloud service platform, and the user may enter an event video search keyword in the smart cover search bar. The cloud service platform matches the event video search keyword based on these preset event scene classification tags, obtains a target event scene classification tag that matches the event video search keyword, and then displays one or more target event scene videos associated with the target event scene classification tag; Figure 6 As shown, Figure 6The following is a scene diagram of smart cover search. The user enters "the person in red clothes" in the smart cover search bar on the smart cover search interface. The cloud service platform matches "the person in red clothes" with the preset event scene classification tags to determine whether there is a target event scene classification tag that matches the "person in red clothes". Then, Figure 6 As shown in the figure, 6 videos associated with the target event scene classification labels are displayed, which enables users to quickly search for videos of interest based on the event scene classification sets after the videos are classified, and to review the videos, making it easier for users to view more concrete scene videos.
[0181] Optionally, users can also customize classification labels for event scenes of interest, which can be used for subsequent targeted viewing of corresponding event videos.
[0182] In one or more embodiments of the present application, the service platform obtains event video cover information and security videos uploaded by smart home devices, and then uses an event scene analysis large model to perform event scene analysis based on the event video cover information to obtain event scene classification information, and performs video scene classification processing on the security video based on the event scene classification information and the event video cover information. After accurately classifying the video scene based on the event video cover and the event scene classification information, the user can access the cloud service platform and quickly query videos of interest based on the video classification for video playback, thereby improving the convenience and efficiency of user video playback, and also strengthening the safety protection of the family, making the application of smart home devices more complete and practical.
[0183] The following will be combined Figure 7 , the video processing device provided in the embodiment of the present application is introduced in detail. It should be noted that, Figure 7 The video processing device shown is used to execute the present application Figure 1 to Figure 6 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 1 to Figure 6 The embodiment shown.
[0184] See also Figure 7 , which shows a schematic diagram of the structure of the video processing device of an embodiment of the present application. The video 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 video processing device 1 includes a video acquisition module 11, an event recognition module 12 and a scene analysis module 13, which are specifically used to:
[0185] The video acquisition module 11 is used to collect security videos of the environment;
[0186] An event recognition module 12 is used to perform basic event recognition on the security video using a basic event recognition model to obtain event video cover information;
[0187] The scene analysis module 13 is used to send the event video cover information and the security video to the cloud service platform, so that the cloud service platform uses the event scene analysis big model to perform event scene analysis based on the event video cover information to obtain event scene classification information, and classifies the security video into video scenes based on the event scene classification information and the event video cover information.
[0188] In a feasible implementation manner, the event identification module 12 is used to:
[0189] Inputting the security video into a basic event recognition model;
[0190] Performing basic scene object detection on the security video using the basic event recognition model to obtain basic scene object image information, performing basic event recognition based on the basic scene object image information to obtain a basic event recognition result, and determining a basic event video indicated by the basic event recognition result from the security video;
[0191] Performing video cover screening processing on the basic event video using the basic event recognition model to obtain an event video cover, and outputting event video cover information;
[0192] The event video cover information includes an event video cover image and video cover meta information corresponding to the event video cover image.
[0193] In a feasible implementation manner, the event identification module 12 is used to:
[0194] The video frame scene information of the basic event video frames contained in the basic event video is extracted through the basic event recognition model, the basic event video frames are scored for basic scenes based on the video frame scene information, and at least one frame of event video cover is determined from the basic event video frames based on the basic scene score.
[0195] It should be noted that, when the video processing device provided in the above embodiment executes the video processing method, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the video processing device provided in the above embodiment and the video processing method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0196] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0197] See also Figure 8 , which shows a schematic diagram of the structure of the video processing device of an embodiment of the present application. The video 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 video processing device 2 includes a data receiving module 21 and a scene analysis module 22, which are specifically used to:
[0198] The data receiving module 21 is used to receive event video cover information and security video uploaded by the smart home device, wherein the event video cover information is information obtained by the smart home device performing basic event recognition on the security video using a basic event recognition model;
[0199] The scene analysis module 22 is used to perform event scene analysis based on the event video cover information using an event scene analysis large model to obtain event scene classification information, and to perform video scene classification processing on the security video based on the event scene classification information and the event video cover information.
[0200] In a feasible implementation manner, the scene parsing module 22 is used to:
[0201] Acquire an event video cover image and video cover meta information corresponding to the event video cover image from the event video cover information;
[0202] Constructing event scene analysis prompt words for the event video cover image based on the video cover meta information;
[0203] The event scene analysis prompt words and the event video cover image are input into the event scene analysis large model to perform event scene analysis, and output event scene classification information.
[0204] In a feasible implementation manner, the scene parsing module 22 is used to:
[0205] The video cover meta information is added to the event scene analysis template to obtain event scene analysis prompt words for the event video cover image.
[0206] In a feasible implementation manner, the scene parsing module 22 is used to:
[0207] Inputting the event scene analysis prompt words and the event video cover image into the event scene analysis large model;
[0208] The event scene analysis big model is used to convert the event video cover image into text based on the event scene analysis prompt words to obtain event cover description information, key semantic analysis is performed on the event cover description information to obtain key semantic information, and event scene classification is performed on the key semantic information to obtain event scene classification information;
[0209] The event scene classification information is outputted through the scene analysis big model.
[0210] In a feasible implementation manner, the device 2 is further used for:
[0211] An initial event scene parsing big model is created for the event scene parsing scenario using a basic big language model;
[0212] Obtaining sample event video cover information, and marking the sample event video cover information with an event scene classification information label;
[0213] The sample event video cover information is used to perform at least one round of model training on the initial event scene analysis big model. During the model training process, the sample event video cover information is used to perform event scene analysis processing on the initial event scene analysis big model to obtain predicted event scene classification information. Based on the predicted event scene classification information and the event scene classification information label, model parameters of the initial event scene analysis big model are adjusted to obtain the event scene analysis big model after model training.
[0214] In a feasible implementation manner, the scene parsing module 22 is used to:
[0215] Determine an event video cover image in the event video cover information and video cover meta information corresponding to the event video cover image;
[0216] Extracting the event scene video from the security video based on the video cover meta information, and using the event video cover image as the video cover of the event scene video;
[0217] The event scene video is associated with an event scene classification set corresponding to the event scene classification information.
[0218] The present application also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figure 1 to Figure 6 The video processing method of the embodiment shown in the figure can be specifically executed by referring to Figure 1 to Figure 6 The specific description of the illustrated embodiment will not be repeated here.
[0219] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figure 1 to Figure 6 The video processing method of the embodiment shown in the figure can be specifically executed by referring to Figure 1 to Figure 6 The specific description of the illustrated embodiment will not be repeated here.
[0220] Please refer to Fig. 9 , which shows a block diagram of the structure of an electronic device provided by an exemplary embodiment of the present application. The electronic device in 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 the bus 150.
[0221] 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 and processes data of the electronic device 100 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.
[0222] 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 (such as 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. The data storage area may also store data created by the electronic device during use, such as a phone book, audio and video data, chat record data, etc.
[0223] See also Fig.10 As shown, the memory 120 can be divided into an operating system space and a user space. The operating system runs in the operating system space, and native and third-party applications run in the user space. In order to ensure that different third-party applications can achieve good operating results, the operating system allocates corresponding system resources to different third-party applications. However, different application scenarios in the same third-party application also have different requirements for system resources. For example, in the local resource loading scenario, the third-party application has higher requirements for disk reading speed; in the animation rendering scenario, the third-party application has higher requirements for GPU performance. The operating system and third-party applications are independent of each other, and the operating system often cannot perceive the current application scenario of the third-party application in a timely manner, resulting in the operating system being unable to perform targeted system resource adaptation according to the specific application scenario of the third-party application.
[0224] 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.
[0225] Taking the Android operating system as an example, the programs and data stored in the memory 120 are as follows: Fig.11As shown, the memory 120 may store a Linux kernel layer 320, a system runtime library layer 340, an application framework layer 360 and an application layer 380, wherein the Linux kernel layer 320, the system runtime library layer 340 and the application framework layer 360 belong to the operating system space, and the application layer 380 belongs to the user space. The Linux kernel layer 320 provides underlying drivers for various hardware of electronic devices, such as display drivers, audio drivers, camera drivers, Bluetooth drivers, Wi-Fi drivers, power management, etc. The system runtime library layer 340 provides the main feature support for the Android system through some C / C++ libraries. For example, the SQLite library provides database support, the OpenGL / ES library provides 3D drawing support, and the Webkit library provides browser kernel support, etc. The system runtime library layer 340 also provides an Android runtime library (Android runtime), which mainly provides some core libraries that allow developers to use Java language to write Android applications. The application framework layer 360 provides various APIs that may be used when building applications. Developers can also use these APIs to build their own applications, such as activity management, window management, view management, notification management, content provider, package management, call management, resource management, and location management. At least one application runs in the application layer 380. These applications can be native applications that come with the operating system, such as contact applications, text messaging applications, clock applications, camera applications, etc.; they can also be third-party applications developed by third-party developers, such as game applications, instant messaging applications, photo beautification applications, etc.
[0226] Taking the operating system as an IOS system as an example, the programs and data stored in the memory 120 are as follows: Fig.12As shown, the IOS system includes: a core operating system layer 420 (Core OS layer), a core service layer 440 (Core Services layer), a media layer 460 (Media layer), and a touchable layer 480 (Cocoa Touch Layer). The core operating system layer 420 includes the operating system kernel, drivers, and underlying program frameworks, which provide functions closer to the hardware for use by the program framework located in the core service layer 440. The core service layer 440 provides system services and / or program frameworks required by the application, such as the foundation framework, account framework, advertising framework, data storage framework, network connection framework, geographic location framework, motion framework, etc. The media layer 460 provides audio-visual interfaces for the application, such as graphics and image related interfaces, audio technology related interfaces, video technology related interfaces, and wireless playback (AirPlay) interfaces for audio and video transmission technologies. The touchable layer 480 provides various commonly used interface-related frameworks for application development, and the touchable layer 480 is responsible for the user's touch interaction operations on the electronic device. For example, local notification service, remote push service, advertising framework, game tool framework, message user interface (UI) framework, user interface UIKit framework, map framework, etc.
[0227] exist Fig.12 Among the frameworks shown, the frameworks related to most applications include but are not limited to: the basic framework in the core service layer 440 and the UIKit framework in the touchable layer 480. The basic framework provides many basic object classes and data types, provides the most basic system services for all applications, and has nothing to do with UI. The classes provided by the UIKit framework are basic UI class libraries for creating touch-based user interfaces. iOS applications can provide UIs based on the UIKit framework, so it provides the basic architecture of applications for building user interfaces, drawing, processing and user interaction events, responding to gestures, etc.
[0228] Among them, the method and principle of implementing data communication between third-party applications and the operating system in the IOS system can be referred to the Android system, and this application will not go into details here.
[0229] Among them, the input device 130 is used to receive input instructions or data, and the input device 130 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 instructions or data, and the output device 140 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, which are used to receive touch operations on or near the user using any suitable object such as a finger or a touch pen, and to display the user interface of each application. The touch screen display is usually set on the front panel of the electronic device. The touch screen display can be designed as a full screen, a curved screen or a special-shaped screen. The touch screen display 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.
[0230] In addition, those skilled in the art will appreciate that the structure of the electronic device shown in the above drawings does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the electronic 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.
[0231] In the embodiment of the present application, the execution subject of each step may be the electronic device described above. Optionally, the execution subject of each step is the operating system of the electronic device. The operating system may be an Android system, an IOS system, or other operating systems, which is not limited in the embodiment of the present application.
[0232] The electronic device of the embodiment of the present application may also be equipped with a display device, which may be any device capable of realizing a display function, such as a cathode ray tube display (CR), a light-emitting diode display (LED), an electronic ink screen, a liquid crystal display (LCD), a plasma display panel (PDP), etc. The user may use the display device on the electronic device 101 to view displayed text, images, videos and other information. The electronic device may be a smart phone, a tablet computer, a gaming device, an AR (Augmented Reality) device, a car, a data storage device, an audio playback device, a video playback device, a notebook, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, electronic clothing and other devices.
[0233] exist Fig. 9 In the electronic device shown, the processor 110 can be used to call the application program stored in the memory 120 and specifically execute the video processing method of one or more embodiments of the following description of this application.
[0234] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0235] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A video processing method, characterized in that: Applied to smart home devices, the method includes: Collect security videos of the environment; Using a basic event recognition model to perform basic event recognition on the security video to obtain event video cover information; The event video cover information and the security video are sent to a cloud service platform, so that the cloud service platform uses an event scene analysis large model to perform event scene analysis based on the event video cover information to obtain event scene classification information, and performs video scene classification processing on the security video based on the event scene classification information and the event video cover information.
2. The method according to claim 1, characterized in that The basic event recognition model is used to perform basic event recognition on the security video to obtain a basic event recognition result and an event video cover, including: Inputting the security video into a basic event recognition model; Performing basic scene object detection on the security video using the basic event recognition model to obtain basic scene object image information, performing basic event recognition based on the basic scene object image information to obtain a basic event recognition result, and determining a basic event video indicated by the basic event recognition result from the security video; Performing video cover screening processing on the basic event video using the basic event recognition model to obtain an event video cover, and outputting event video cover information; The event video cover information includes an event video cover image and video cover meta information corresponding to the event video cover image.
3. The method according to claim 2, characterized in that The step of performing video cover screening processing on the basic event video using the basic event recognition model to obtain the event video cover includes: The video frame scene information of the basic event video frames contained in the basic event video is extracted through the basic event recognition model, the basic event video frames are scored for basic scenes based on the video frame scene information, and at least one frame of event video cover is determined from the basic event video frames based on the basic scene score.
4. A video processing method, characterized in that: Applied to a cloud service platform, the method includes: Receive event video cover information and security video uploaded by a smart home device, wherein the event video cover information is information obtained by the smart home device performing basic event recognition on the security video using a basic event recognition model; Based on the event video cover information, an event scene analysis large model is used to perform event scene analysis to obtain event scene classification information, and based on the event scene classification information and the event video cover information, video scene classification processing is performed on the security video.
5. The method according to claim 4, characterized in that The event scene analysis based on the event video cover information is performed using an event scene analysis large model to obtain event scene classification information, including: Acquire an event video cover image and video cover meta information corresponding to the event video cover image from the event video cover information; Constructing event scene analysis prompt words for the event video cover image based on the video cover meta information; The event scene analysis prompt words and the event video cover image are input into the event scene analysis large model to perform event scene analysis, and output event scene classification information.
6. The method according to claim 5, characterized in that The step of constructing the event scene analysis prompt words for the event video cover image based on the video cover meta information includes: The video cover meta information is added to the event scene analysis template to obtain event scene analysis prompt words for the event video cover image.
7. The method according to claim 5, characterized in that The step of inputting the event scene analysis prompt words and the event video cover image into the event scene analysis big model to perform event scene analysis and output event scene classification information includes: Inputting the event scene analysis prompt words and the event video cover image into the event scene analysis large model; The event scene analysis big model is used to convert the event video cover image into text based on the event scene analysis prompt words to obtain event cover description information, key semantic analysis is performed on the event cover description information to obtain key semantic information, and event scene classification is performed on the key semantic information to obtain event scene classification information; The event scene classification information is outputted through the scene analysis big model.
8. The method according to claim 4, characterized in that The method further comprises: An initial event scene parsing big model is created for the event scene parsing scenario using a basic big language model; Obtaining sample event video cover information, and marking the sample event video cover information with an event scene classification information label; The sample event video cover information is used to perform at least one round of model training on the initial event scene analysis big model. During the model training process, the sample event video cover information is used to perform event scene analysis processing on the initial event scene analysis big model to obtain predicted event scene classification information. Based on the predicted event scene classification information and the event scene classification information label, model parameters of the initial event scene analysis big model are adjusted to obtain the event scene analysis big model after model training.
9. The method according to claim 4, characterized in that The performing video scene classification processing on the security video based on the event scene classification information and the event video cover information includes: Determine an event video cover image in the event video cover information and video cover meta information corresponding to the event video cover image; Extracting the event scene video from the security video based on the video cover meta information, and using the event video cover image as the video cover of the event scene video; The event scene video is associated with an event scene classification set corresponding to the event scene classification information.
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 steps as claimed in any one of claims 1 to 3 or 4 to 9.
Citation Information
Patent Citations
Method and system for selecting video cover, electronic equipment and storage medium
CN111143613A
Video classification method and device and storage medium
CN114238690A
Multimedia content analysis method and device, equipment and storage medium
CN116702749A
Data processing method and device, computer equipment and readable storage medium
CN116976327A
Video classification method and device, computer equipment and computer readable storage medium
CN117475351A
