Video management method and device, electronic device and computer-readable storage medium
By generating a video stream and its playback address and storing the video in the target path when receiving storage instructions, adding tags for management, the problem of low efficiency of traditional video management is solved, and efficient video storage and management is achieved.
Patent Information
- Application Number
- CN202210515542.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-12
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-05-12
AI Technical Summary
Traditional video management methods are inefficient and cannot efficiently store and manage video files.
By obtaining the video configuration file and video information, the video stream and its playback address are generated, and when the storage instructions are received, the video is stored in the target path, and tags are added, and the video is retrieved and managed using tags.
It improves the efficiency of video management and storage flexibility, reduces data processing volume, reduces resource consumption, and realizes efficient generation and sharing of video streams.
Smart Images

Figure CN114979706B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a video management method and device, an electronic device, and a computer-readable storage medium. Background Art
[0002] As video applications become more and more widespread, improving video management efficiency is of great significance. Traditional methods store and manage video files through directory structures, but this method has low management efficiency. Summary of the Invention
[0003] The present application provides a video management method and device, an electronic device, and a computer-readable storage medium.
[0004] The present application provides a video management method, the method comprising:
[0005] When receiving a first video sent by a first terminal, obtaining a configuration file of the first video;
[0006] A first video stream of the first video and a playback address thereof are generated according to the configuration file and the video information of the first video.
[0007] In combination with any embodiment of the present application, after receiving the first video sent by the first terminal and before obtaining the configuration file of the first video, the method further includes:
[0008] When a storage instruction for the first video is detected, the first video is stored in a target path, and the authorized terminal can access the target path.
[0009] In combination with any embodiment of the present application, after storing the first video in the target path, the method further includes:
[0010] Obtaining an identification code of the first video and an instruction to add a tag to the first video;
[0011] Add the tag indicated by the instruction to the identification code of the first video to obtain the second video.
[0012] In combination with any embodiment of the present application, at least one third video is stored in the target path, and the at least one third video carries a tag;
[0013] The method further comprises:
[0014] Get the tag to be retrieved;
[0015] The video stored in the target path is retrieved using the tag to be retrieved to obtain the third video whose tag matches the tag to be retrieved.
[0016] In combination with any embodiment of the present application, after generating the first video stream of the first video and its playback address, the method further includes:
[0017] When an acquisition instruction for the first video stream sent by the second terminal is detected, the first video stream is transmitted to the second terminal through a real-time transport protocol.
[0018] In combination with any embodiment of the present application, generating the first video stream of the first video and its playback address according to the configuration file and the video information of the first video includes:
[0019] When it is determined by searching the video streams in the database that the video stream of the first video does not exist in the database, the first video stream of the first video and the playback address thereof are generated according to the configuration file and the video information of the first video.
[0020] In combination with any embodiment of the present application, generating the first video stream of the first video and its playback address according to the configuration file and the video information of the first video includes:
[0021] When a video stream generation instruction input through the video management interface is detected, a first video stream of the first video and a playback address thereof are generated according to the configuration file and the video information of the first video.
[0022] In combination with any embodiment of the present application, the video management interface includes a playback area for playing the first video, and the method further includes:
[0023] When a data annotation operation input in the playback area is detected, annotation data of the first video is obtained according to the data annotation operation.
[0024] In conjunction with any embodiment of the present application, the video management method is applied to a first video management device, the first video management device belongs to a video management system, and the video management system further includes a second video management device different from the first video management device;
[0025] The second video management device stores a fourth video stream, and both the first video management device and the second video management device can access the following information: video information of the first video stream and video information of the fourth video stream.
[0026] This application also provides a video management device, including:
[0027] an acquiring unit, configured to acquire a configuration file of a first video when receiving a first video sent by a first terminal;
[0028] A processing unit is used to generate a first video stream of the first video and a playback address thereof according to the configuration file and the video information of the first video.
[0029] In combination with any embodiment of the present application, the video management device further includes: a storage unit, which is further used to store the first video in a target path when a storage instruction of the first video is detected, and the authorized terminal can access the target path.
[0030] In combination with any embodiment of the present application, the acquiring unit is further configured to acquire an identification code of the first video and an instruction to add a tag to the first video;
[0031] The processing unit is further configured to add a tag indicated by the instruction to the identification code of the first video to obtain the second video.
[0032] In combination with any embodiment of the present application, at least one third video is stored in the target path, and the at least one third video carries a tag;
[0033] The acquisition unit is further used to acquire the tag to be retrieved;
[0034] The video management device further includes: a retrieval unit, configured to use the tag to be retrieved to retrieve videos stored in the target path, and obtain the third video whose tag matches the tag to be retrieved.
[0035] In combination with any embodiment of the present application, after generating the first video stream of the first video, the video management device also includes: a transmission unit, which is used to transmit the first video stream to the second terminal via a real-time transmission protocol when an acquisition instruction for the first video stream sent by the second terminal is detected.
[0036] In combination with any embodiment of the present application, the processing unit is used to generate a first video stream of the first video based on the configuration file and the video information of the first video when it is determined that the video stream of the first video does not exist in the database by searching the video stream in the database.
[0037] In combination with any embodiment of the present application, the processing unit is used to: when a video stream generation instruction input through the video management interface is detected, generate a first video stream of the first video according to the configuration file and the video information of the first video.
[0038] In combination with any embodiment of the present application, the video management interface includes a playback area for playing the first video, and the processing unit is further used to obtain the annotation data of the first video according to the data annotation operation when a data annotation operation is detected input in the playback area.
[0039] In conjunction with any embodiment of the present application, the video management device belongs to a video management system, and the video management system further includes a second video management device different from the video management device;
[0040] The second video management device stores a fourth video stream, and both the video management device and the second video management device can access the following information: video information of the first video stream and video information of the fourth video stream.
[0041] The present application also provides an electronic device, characterized in that it includes: a processor and a memory, the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor executes the computer instructions, the electronic device executes a method such as the above-mentioned video management method and any possible implementation method thereof.
[0042] The present application also provides another electronic device, including: a processor, a sending device, an input device, an output device and a memory, wherein the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes a method such as the above-mentioned video management method and any possible implementation method thereof.
[0043] The present application also provides a computer-readable storage medium, in which a computer program is stored. The computer program includes program instructions. When the program instructions are executed by a processor, the processor is caused to execute a method such as the above-mentioned video management method and any possible implementation method thereof.
[0044] The present application also provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are run on a computer, the computer is enabled to execute the above-mentioned video management method and any possible implementation thereof.
[0045] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.
[0047] The drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and, together with the specification, are used to illustrate the technical solutions of the present application.
[0048] Figure 1 A schematic diagram of a video system architecture provided in an embodiment of the present application;
[0049] Figure 2 A flowchart of a video management method provided in an embodiment of the present application;
[0050] Figure 3 A schematic diagram of a label setting interface provided in an embodiment of the present application;
[0051] Figure 4 A schematic diagram of a video management interface provided in an embodiment of the present application;
[0052] Figure 5 A schematic diagram of another video management interface provided in an embodiment of the present application;
[0053] Figure 6 A schematic diagram of another video management interface provided in an embodiment of the present application;
[0054] Figure 7 A schematic diagram of another video management interface provided in an embodiment of the present application;
[0055] Figure 8 A schematic diagram of a tag search interface provided in an embodiment of the present application;
[0056] Figure 9 A schematic diagram of a processing flow of a video management device provided in an embodiment of the present application;
[0057] Figure 10 A schematic diagram of a video management system architecture provided in an embodiment of the present application;
[0058] Figure 11 A schematic diagram of a deployment architecture of a video management system provided in an embodiment of the present application;
[0059] Figure 12 A schematic diagram of a management interface of another video management device provided in an embodiment of the present application;
[0060] Figure 13 A schematic structural diagram of a first video management device provided in an embodiment of the present application;
[0061] Figure 14 A schematic diagram of the hardware structure of a first video management device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0062] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0063] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0064] It should be understood that, in this application, "at least one (item)" means one or more, "more than one" means two or more, "at least two (items)" means two or three or more, and "and / or" is used to describe the relationship between associated objects, indicating that three relationships can exist. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist, where A and B can be singular or plural. The character " / " can indicate that the associated objects are in an "or" relationship, referring to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or plural. The character " / " can also represent the division sign in mathematical operations, for example, a / b = a divided by b; 6 / 3 = 2. "At least one of the following" or similar expressions.
[0065] References to "embodiments" herein mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0066] Figure 1 The figure shows a schematic diagram of the architecture of a video system provided by the technical solution provided by the embodiment of the present application. Figure 1 As shown, the video system 1 includes a video management device 11 , a first terminal 12 , and a second terminal 13 .
[0067] The video management device 11 may be a server, and the first terminal 12 and the second terminal 13 may be any one of the following: a mobile phone, a computer, a tablet computer, or a smart wearable device.
[0068] A communication connection exists between the video management device 11 and both the first terminal 12 and the second terminal 13. The first terminal 12 can transmit a first video to the video management device 11 via this communication connection and access data stored in the video management device via this communication connection. The second terminal 13 can also transmit a video to the video management device 11 via this communication connection and access data stored in the video management device 11 via this communication connection.
[0069] The execution subject of the embodiment of the present application is the above-mentioned video management device, and the method embodiment of the present application can also be implemented by a processor executing a computer program code. The embodiment of the present application is described below in conjunction with the drawings in the embodiment of the present application. Figure 2 , Figure 2 This is a flowchart of a video management method provided in an embodiment of the present application.
[0070] 201. Upon receiving a first video sent by a first terminal, obtain a configuration file of the first video.
[0071] In the embodiments of the present application, the first video can be an offline video or an online video. The offline video can be a video captured by a camera or a mobile smart device. The online video can be a video captured in real time by a camera. For example, the video management device can have a communication connection with one or more cameras, and the video management device can use the real-time video captured from the camera as the first video.
[0072] In an embodiment of the present application, the configuration file includes parameters for generating a video stream corresponding to the first video. For example, the configuration file includes the duration of the video stream corresponding to the first video and the bit rate of the video stream of the first video.
[0073] Optionally, the configuration file of the video stream is stored in a storage medium of the video management device. The video management device obtains the configuration file of the first video by reading the configuration file of the video stream from the storage medium.
[0074] Optionally, the video management device receives a configuration file of the first video input by the user through an input component. The input component includes: a keyboard, a mouse, a touch screen, a touch pad, and an audio input device.
[0075] 202. Generate a first video stream of the first video and its playback address according to the configuration file and the video information of the first video.
[0076] In the embodiment of the present application, the first video stream is a real time streaming protocol (RTSP) video stream. Optionally, the video management device generates the first video stream of the first video and the playback address of the first video stream through a streaming media server, wherein the streaming media server includes: ffserver, EasyDarwin.
[0077] Optionally, the video management device uses Flask to provide an application programming interface (Web API). Optionally, Flask manages the configuration and start and stop of the streaming media server.
[0078] In the embodiment of the present application, the video information of the first video stream is the video information of the first video. That is, the video management device generates the first video stream and the playback address of the first video stream according to the configuration file and the video information of the first video without changing the video information of the first video.
[0079] The video information of the first video includes one or more of the following: duration, bit rate, frame rate, resolution, and encoding format.
[0080] In an implementation manner of obtaining video information of a first video, a video management device receives the video information of the first video input by a user through an input component.
[0081] In another implementation manner of obtaining the video information of the first video, the video management device receives the video information of the first video sent by the electronic device.
[0082] In another implementation of obtaining the video information of the first video, the video management device obtains the video information of the first video using a tool for obtaining video information, wherein the tool for obtaining video information includes: FFmpeg (FastForward Mpeg) and MediaInfo.
[0083] In this embodiment of the present application, the video management device may further generate a playback address for the first video stream by executing step 202. The electronic device may obtain the first video stream through the playback address of the first video stream. For example, a user may access the playback address of the first video stream through a mobile phone and may watch the first video stream through the mobile phone.
[0084] In an embodiment of the present application, upon receiving a first video sent by a first terminal, the video management device obtains a configuration file for the first video and, based on the configuration file and the video information of the first video, generates a first video stream for the first video and a playback address for the first video stream. Thus, the first video stream and the playback address for the first video stream can be generated without human intervention, thereby improving the efficiency of generating the first video stream.
[0085] As an optional implementation, the authorized terminal can access the play address of the first video stream. The video management device enables the authorized terminals to access the play address of the first video stream, thereby sharing the play address of the first video stream among the authorized terminals.
[0086] Optionally, the first terminal transmits the first video to the video management device through a network file system (NFS), that is, the first terminal transmits the first video to the video management device through a transmission protocol of NFS.
[0087] Optionally, the first terminal transmits the video to the video management device via the Common Internet File System (CIFS), that is, the first terminal transmits the first video to the video management device via the CIFS transmission protocol.
[0088] Optionally, the first terminal transmits the first video to the video management device through a secure copy (SCP) command, that is, the first terminal transmits the first video to the video management device through a transmission protocol of the SCP.
[0089] In the embodiment of the present application, the first terminal transmits the first video to the video management device through a transmission protocol, which can reduce the probability of transmission interruption during the transmission process and improve transmission stability.
[0090] As an optional implementation, the video management device further performs the following steps:
[0091] 301. When a storage instruction for the first video is detected, the first video is stored in a target path.
[0092] In the embodiment of the present application, the storage instruction for the first video is used to instruct the video management device to store the first video.
[0093] In the embodiment of the present application, the target path is a storage path of the data. For example, the target path is a target folder path, that is, the target path indicates the target folder.
[0094] In the embodiment of the present application, the authorized terminal can access the target path, that is, the target path can be shared among the authorized terminals.
[0095] In one possible implementation, both the first terminal and the second terminal are authorized terminals. Both the first terminal and the second terminal can access the target path, where the second terminal is a different terminal from the first terminal. That is, both the first terminal and the second terminal can access data stored in the target path.
[0096] For example, the target path indicates folder a. If folder a stores video A and video B, both the first terminal and the second terminal can access video A and video B.
[0097] The video management device stores the first video in the target path, so that both the first terminal and the second terminal can access the first video.
[0098] In an embodiment of the present application, the video management device stores the first video in a target path so that all authorized terminals can access the first video, thereby achieving sharing among authorized terminals and reducing the storage overhead of the authorized terminals.
[0099] As an optional implementation, the video management device further performs the following steps:
[0100] 401. Obtain an identification code of the first video and an instruction for adding a tag to the first video.
[0101] In the embodiment of the present application, the identification code of the first video is the identity of the first video. Optionally, the identification code of the first video is the md5 value of the first video.
[0102] In an embodiment of the present application, the instruction to add a tag is used to instruct the video management device to add a tag to the first video. The tag includes at least one of the following: the category of the content of the first video, the scene of the first video, and the purpose of the first video.
[0103] For example, the first video includes a vehicle. In this case, the category of the content of the first video is vehicle, and the tag of the first video is vehicle.
[0104] For another example, the first video is a video shot of an indoor scene. In this case, the scene of the first video is indoor, and the label of the first video is indoor.
[0105] For another example, the first video is a test case for testing the accuracy of a computer vision model in detecting illegal parking events. In this case, the purpose of the first video is to detect illegal parking events, and the label of the first row of videos can be illegal parking.
[0106] In an implementation of obtaining the identification code of the first video, the video management device receives the identification code of the first video input by the user through an input component.
[0107] In another implementation of obtaining the identification code of the first video, the video management device receives the identification code of the first video sent by an electronic device. The electronic device may be any of the following: a mobile phone, a computer, a tablet computer, or a server.
[0108] In another implementation of obtaining the identification code of the first video, the video management device calculates the MD5 value of the first video as the identification code of the first video.
[0109] In an implementation manner of obtaining an instruction to add a tag to a first video, the video management apparatus receives an instruction to add a tag to the first video input by a user through an input component.
[0110] For example, the video management device displays a tag setting interface on a display device. The tag setting interface includes an information input box, wherein the information input box is used to input a tag for the first video. The tag for the first video is input into the information input box through an input component, thereby inputting an instruction to add a tag to the first video into the video management device.
[0111] Optionally, the label setting interface is as follows Figure 3 As shown. Figure 3 In the tag setting interface shown, the user can select and set the tag for the first video by entering the file name of the first video in box 1 (e.g., selecting the file name of the first video by using the drop-down selection in box 1). The user can enter the tag of the first video into the video management device by entering the tag of the first video in box 2. The user can also enter notes for the first video in box 3.
[0112] In another implementation manner of obtaining an instruction to add a tag to the first video, the video management apparatus receives an instruction to add a tag to the first video sent by an electronic device.
[0113] In another implementation manner of obtaining an instruction to add a tag to the first video, the video management device receives an instruction to add a tag to the first video sent by the first terminal.
[0114] 402. Add the tag indicated by the instruction to the identification code of the first video to obtain the second video.
[0115] In an embodiment of the present application, the instruction to add a label to the first video includes the label added to the first video. For example, if the label added to the first video is illegal parking, then the instruction to add a label to the first video includes illegal parking.
[0116] The video management device edits the identification code of the first video and adds the tag added to the first video to the identification code of the first video to obtain the second video.
[0117] At this time, in the identification code of the second video, the tag of the second video is the tag indicated by the instruction to add a tag to the first video, that is, the tag of the second video is the tag added to the first video.
[0118] The identification code of the second video is the identity of the second video. Optionally, the identification code of the second video is the hash (md5) value of the second video.
[0119] For example, if the tag added to the first video is "a pedestrian falls down," that is, the instruction to add a tag to the first video indicates the tag "a pedestrian falls down." The video management device edits the identification code of the first video and adds the tag "a pedestrian falls down" to the identification code of the first video to obtain the second video. Thus, the tag in the identification code of the second video is "a pedestrian falls down," that is, the tag of the second video is "a pedestrian falls down."
[0120] In an embodiment of the present application, when the video management device obtains the identification code of the first video and an instruction to add a tag to the first video, the video management device adds the tag indicated by the instruction to the identification code of the first video to obtain the second video.
[0121] Based on this implementation, tags are added to videos under the target path without building a corresponding directory structure for the tags, thereby reducing the amount of data processing and improving the processing speed.
[0122] As an optional implementation, when the video management device searches the database for video streams and determines that the video stream of the first video does not exist in the database, it generates the first video stream of the first video and its playback address according to the configuration file and the video information of the first video.
[0123] In an embodiment of the present application, the video stream information of the video stored in the target path is stored in a database, wherein the video stream information includes one or more of the following: duration, bit rate, frame rate, resolution, encoding format, and playback address.
[0124] Optionally, the video management device searches for the identity identifier of the video in the database, and if it is determined that there is no identity identifier matching the identity identifier of the first video in the database, determines that the video stream of the first video does not exist in the database; if it is determined that there is an identity identifier matching the identity identifier of the first video in the database, determines that the video stream of the first video exists in the database.
[0125] If the video management device determines that the video stream of the first video does not exist in the database by searching the video stream in the database, it means that the video stream of the first video has not yet been generated. Therefore, the video management device can obtain the video stream corresponding to the first video and the playback address of the first video stream by generating the first video stream and the playback address of the first video stream.
[0126] If the video management device searches the database for video streams and determines that a video stream corresponding to the first video exists in the database, the video stream of the first video has been generated. In this case, the video management device does not need to expend computing resources to generate the video stream of the first video and the playback address of the first video stream. In other words, the video management device does not generate the first video stream and the playback address of the first video stream based on the configuration file and the video information of the first video.
[0127] In this way, the processing resources consumed by the video management device can be reduced and the processing efficiency of the video management device can be improved.
[0128] Optionally, the video management device determines that the video stream of the first video exists in the database when it determines that there is a video stream in the database whose video stream information matches the video information of the first video by searching the video stream in the database; the video management device determines that the video stream of the first video does not exist in the database when it determines that there is no video stream in the database whose video stream information matches the video information of the first video by searching the video stream in the database.
[0129] As an optional implementation, upon detecting a video stream generation instruction input through the video management interface, the video management device generates a first video stream of the first video and a playback address of the first video stream according to the configuration file and the video information of the first video.
[0130] In the embodiment of the present application, the video management interface is an interactive interface for users to manage videos through the video management device.
[0131] In a possible implementation, the video management interface includes a video stream generation instruction input area, in which a user can input a video stream generation instruction through an input component.
[0132] For example, in Figure 4 The video management interface shown includes an area for inputting video stream generation instructions and an area for displaying videos and video stream information. The area for inputting video stream generation instructions includes a scan button, which allows users to input video stream generation instructions into the video management device. Upon receiving the video stream generation instruction, the video management device generates a video stream based on the configuration file and the video information stored in the target path.
[0133] The video and video stream information display area is used to display the videos stored in the target path and the playback address of the video stream corresponding to the video stored in the target path. Figure 4 As shown, the playback address of the video stream corresponding to video 1 is video stream address 1, and the playback address of the video stream corresponding to video 2 is video stream address 2.
[0134] Optionally, when the video management device detects a video stream generation instruction input through the video management interface and determines that the video stream of the first video does not exist in the database, it generates the first video stream of the first video and the playback address of the first video stream according to the configuration file and the video information of the first video.
[0135] As an optional implementation, the video management interface includes a play area for playing the first video. The video management device further performs the following steps:
[0136] 501. When a data annotation operation input in the playback area is detected, the annotation data of the first video is obtained according to the data annotation operation.
[0137] In this embodiment of the present application, the data annotation operation includes at least one of the following: clicking and determining an area. If the data annotation operation includes clicking, the video management device uses the position of the clicked point within the playback area as the annotation data. If the data annotation operation includes determining an area, the video management device uses the position of the determined area within the playback area as the annotation data.
[0138] In the embodiment of the present application, when the first video is used for testing, the labeled data can be used as a basis for the test.
[0139] For example, if the labeled data indicates the location of illegal parking in the first video, then the first video should be used to test the accuracy of the illegal parking detection model in detecting illegal parking events. The illegal parking detection model needs to determine whether there is an illegal parking event in the first video by detecting whether there are vehicles parked in the area indicated by the labeled data.
[0140] For example, if the labeled data is the color of a person's clothing in a video, and the first video is used to test the color recognition accuracy of the color recognition model, the clothing color recognized by the color recognition model can be compared with the labeled data to determine the recognition accuracy of the color recognition model.
[0141] For another example, the labeled data may be the start time and the end time of a target event. If the first video is used to test the target event detection model's accuracy in detecting the target event, the target event's start time detected by the target event detection model can be compared with the target event's start time in the labeled data, and the target event's end time detected by the target event detection model can be compared with the target event's end time in the labeled data to determine the target event's accuracy in detecting the target event.
[0142] The video management device determines the input annotation data according to the data annotation operation input in the playback area, and then obtains the annotation data of the first video.
[0143] In one possible implementation, during the process of playing the first video in the play area, the user determines an area in the play area as the region of interest. At this time, the annotation data includes the location of the region of interest.
[0144] For example, in Figure 5 In the video management interface shown, while playing the first video in the playback area, the user can determine an area surrounded by a quadrilateral ABCD in the playback area as the area of interest. The video management device then determines the position of the quadrilateral ABCD in the playback area as annotation data.
[0145] In the embodiment of the present application, the video management device determines the annotation data of the first video based on the data annotation operation in the playback area. In this way, the video management device can obtain the annotation data of the first video without the user having to input the annotation data in a specific format.
[0146] When at least one video is stored in the target path, the video annotation data obtained by this implementation does not require different users to input the annotation data in a unified format, and the format of the video annotation data obtained by the video management device is unified.
[0147] As an optional implementation, the video management interface includes a video information display area for the first video in addition to the playback area for the first video. Figure 6 The video management interface shown can display the name of the first video, the address of the first video stream, the content of the first video being played, and the video information of the first video.
[0148] As an optional implementation, the video management interface further includes a tag data input area. The video management device obtains the tag data of the first video according to the tag information input in the tag data input area.
[0149] For example, in Figure 7In the video management interface shown, the user can input annotation data through the playback area, and can also input annotation information through the annotation data input area.
[0150] Optionally, the user inputs the annotation information by entering text information in the annotation data input area. For example, the user inputs computer program code written in JSON format in the annotation data input area to input the annotation information to the video management device.
[0151] As an optional implementation manner, at least one third video is stored under the target path, wherein the at least one third video carries a tag.
[0152] In this embodiment, the video management device further performs the following steps:
[0153] 601. Obtain the tag to be searched.
[0154] In the embodiment of the present application, the tags to be retrieved are tags possessed by the video to be retrieved.
[0155] In an implementation of obtaining a tag to be retrieved, the video management apparatus receives the tag to be retrieved input by a user through an input component.
[0156] In another implementation of obtaining the tag to be retrieved, the video management device receives the tag to be retrieved sent by the terminal.
[0157] 602. Use the tag to be retrieved to retrieve videos stored in the target path to obtain the third video whose tag matches the tag to be retrieved.
[0158] Since the third videos stored in the target path all carry tags, the video management device can determine the third videos whose tags match the tag to be retrieved by searching the videos stored in the target path.
[0159] For example, the tag to be retrieved is vehicle. The video management device uses the tag to be retrieved to retrieve videos stored in the target path, and obtains a third video whose tag includes vehicle.
[0160] For another example, the tag to be retrieved is illegal parking. The video management device uses the tag to be retrieved to retrieve the videos stored in the target path, and obtains a third video whose tag includes illegal parking.
[0161] In the embodiment of the present application, the video management device, upon obtaining the tag to be retrieved, uses the tag to be retrieved to retrieve videos stored in the target path, and obtains a third video whose tag matches the tag to be retrieved. Thus, the user can complete the retrieval of videos stored in the target path by inputting the tag into the video management device.
[0162] It should be understood that the at least one third video may include the second video, or may not include the second video.
[0163] If at least one third video includes the second video, the video management apparatus performs steps 601 and 602 after performing step 402. If at least one third video does not include the second video, the video management apparatus performs steps 601 and 602 before performing step 402.
[0164] As an optional implementation, the video management device further performs the following steps: obtaining video information to be retrieved; using the video information to be retrieved to retrieve videos stored in the target path, and obtaining a fifth video whose video information matches the video information to be retrieved.
[0165] In this embodiment, the video information to be retrieved includes at least one of the following information: duration, bit rate, frame rate, resolution, encoding format, and playback address of the video stream.
[0166] In this embodiment, upon obtaining the video information to be retrieved, the video management device uses the video information to be retrieved to search for videos stored in the target path, obtaining a fifth video whose video information matches the video information to be retrieved. Thus, a user can complete the retrieval of videos stored in the target path by inputting video information into the video management device.
[0167] Optionally, the tag search interface is as follows Figure 8 In the tag search interface, the tag search button display area includes a tag search button. When a user clicks the tag search button, the video management device searches for video streams stored in the target path based on the tags and displays the search results in the tag search result display area.
[0168] If the user clicks on a tag name in the tag search result display area, the video management device will further display the video stream information having the tag name clicked by the user.
[0169] like Figure 8 As shown, after the user clicks tag name 2, the video management device displays the video stream information with tag name 2 below tag name 2 (ie, the video stream information display area of tag name 2).
[0170] Optionally, the architecture diagram of the video management device is as follows: Figure 9 As shown. Figure 9As shown, the video management device includes a database (data base, DB), Flask, and FFseverver, wherein the DB includes a video number (ID), a video MD5, an address of a video stream (RTSP), information of a streaming server for generating a video stream (ff_port.conf), a video storage path (Path), a video tag (Tag), a video resolution, and a video duration.
[0171] The video management device has a communication connection with the first terminal and the display device. The first terminal can upload files to the video management device through the communication connection. When the first terminal uploads the first video to the video management device, the video management device can generate a first video stream of the first video using the technical solution described above.
[0172] When the first video stream is generated, the video management device may transmit the first video stream to the display device through the communication connection, so that the display device plays the first video stream.
[0173] As an optional implementation, the video management device is a video management system, which also includes a second video management device different from the video management device. For ease of description, the video management device that is the execution subject of the embodiment of the present application is referred to as the first video management device.
[0174] In one possible implementation, a video management system such as Figure 10 As shown. Figure 10 As shown, the video management system includes a first video management device 10001 and a second video management device 10002. The first video management device 10001 is connected to both the first terminal and the second terminal. The second video management device 10002 is also connected to both the first terminal and the second terminal.
[0175] In the embodiment of the present application, the second video management device stores the fourth video stream. The first video management device and the second video management device can both access the following information: video information of the first video stream and video information of the fourth video stream. That is, the video information of the first video stream and the video information of the fourth video stream are shared between the first video management device and the second video management device.
[0176] In this embodiment, the user accesses the video information of the fourth video stream through the first video management device, and can obtain the video information of the video stream stored in the second video management device (such as the duration of the fourth video stream and the bit rate of the fourth video stream) through the first video management device, and then determine the video stream stored in the video management system.
[0177] In addition, since transmitting video streams through RTSP requires a large amount of hardware resources, by storing the video streams in the video management system in different video management devices, the resource consumption of a single video management device in transmitting the video stream can be reduced. In the case of limited hardware resources of a single video management device, the storage overhead, CPU overhead, and network overhead of transmitting the video stream of the single video management device can be reduced, and the speed of transmitting the video stream through RTSP of a single video management device can be increased, and the data lost during the transmission process can be reduced.
[0178] Optionally, the user performs at least one of the following operations on the video files stored in the video management system through the first video management device or the second video management device: deletion, editing.
[0179] Optionally, when the user logs into the video management system through the first video management device or the second video management device, the user can view the processing results and processing logs of the streaming media server by logging into the video management system. For example, by logging into the video management system, the user can view which video streams the streaming media server generated and when the video streams were generated.
[0180] Optionally, the first video management device and the second video management device can also access the tag of the first video stream and the tag of the fourth video stream. In this way, the user can view the tags of the video streams stored in the video management system through the first video management device.
[0181] Optionally, the first video management device and the second video management device can also access the annotation data of the first video and the annotation data of the second video. In this way, the user can view the annotation data of the video stream stored in the video management system through the first video management device.
[0182] Optional, Figure 11 The following is a diagram of the deployment architecture of the video management system. Figure 11 As shown, different video management devices in the video management system perform remote operation calls (such as performing scans, starting and closing video stream services, etc.) through XMLRPC.
[0183] Optionally, the user can add a video management device to the video management system through the first video management device. For example, when the first video management device detects an instruction to add a video management device to the video management system, it displays Figure 11 The video management device management interface shown.
[0184] Figure 12The video management device management interface shown includes five network addresses of the video management device and a button for adding a node. Specifically, the five network addresses are: 10.151.3.74, 10.159.4.251, 10.151.116.110, 10.151.3.78, and 10.151.3.73.
[0185] The user clicks the "+" (i.e., the button for adding a node) in the interface to enter the program for inputting the network address of the video management device to be added. When the first video management device detects the network address of the video management device to be added, the video management device to be added is added to the video management system.
[0186] exist Figure 12 In the video management device management interface shown, four operation icons are displayed on the right side of each network address. The operations corresponding to the four operation icons from left to right are: viewing the remark information of the video management device corresponding to the network address, editing the remark information of the video management device corresponding to the network address, deleting the video management device corresponding to the network address from the video management system, and scanning the videos stored in the video management device corresponding to the network address.
[0187] By clicking a corresponding icon, the user can cause the first video management device to perform a corresponding operation. Scanning the video stream stored in the video management device corresponding to the network address refers to determining whether there is a video to be processed that has not yet generated a video stream among the videos stored in the video management device corresponding to the network address. If there is a video to be processed, generating a video stream for the video to be processed based on the video information of the video to be processed.
[0188] As an optional implementation, the video management device further performs the following steps:
[0189] 701. When detecting an acquisition instruction for the first video stream sent by a second terminal, transmit the first video stream to the second terminal through RTSP.
[0190] When the second terminal obtains the first video stream transmitted by the first video management device through RTSP, the second terminal can use the first video stream to test the computer vision model.
[0191] In one possible scenario, a user of a second terminal needs to test the recognition accuracy of a color recognition model using the second terminal. The user of the second terminal uses the second terminal to query that a first video stream is stored on the first terminal, and that the first video stream is labeled as a color. Therefore, the user of the second terminal uses the second terminal to send a command to obtain the first video stream to the first video management device, thereby obtaining the first video stream from the first video management device.
[0192] When the first video management device detects the acquisition instruction for the first video stream sent by the second terminal, it transmits the first video stream to the second terminal via RTSP. The second terminal can then use the first video stream to test the recognition accuracy of the color recognition model on the video stream when receiving the first video stream via RTSP.
[0193] In another possible implementation scenario, a user of a second terminal needs to test the recognition accuracy of a fall detection model through the second terminal. The user of the second terminal queries the first terminal and finds that a first video stream is stored on the first terminal, and that the first video stream is labeled "fall." Therefore, the user of the second terminal sends a command to obtain the first video stream to the first video management device through the second terminal, thereby obtaining the first video stream from the first video management device.
[0194] When the first video management device detects an acquisition instruction for the first video stream sent by the second terminal, it transmits the first video stream to the second terminal via RTSP. The second terminal can then use the first video stream to test the detection accuracy of the fall detection model on the video stream when receiving the first video stream via RTSP.
[0195] As an optional embodiment, upon detecting an export instruction for the first video stream sent by the first terminal, the first video management device exports the video information of the first video stream to the first terminal. In this way, the user can obtain the first video stream transmitted by the first video management device via RTSP through the video information of the first video stream received by the first terminal.
[0196] Those skilled in the art will understand that in the above-mentioned method of the specific implementation method, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0197] If the technical solution of this application involves personal information, the product that applies the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing personal information. If the technical solution of this application involves sensitive personal information, the product that applies the technical solution of this application has obtained the individual's separate consent before processing sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, a clear and prominent sign is set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that they agree to the collection of their personal information; or on the personal information processing device, when the personal information processing rules are notified by obvious signs / information, the individual's authorization is obtained through pop-up information or by asking the individual to upload their personal information; among which, personal information processing may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
[0198] The above describes in detail the method of the embodiment of the present application, and the following provides an apparatus of the embodiment of the present application.
[0199] See also Figure 13 , Figure 13 This is a structural diagram of a video management device 1 provided in an embodiment of the present application, wherein the video management device 1 may be the first video management device mentioned above, or the second video management device mentioned above.
[0200] The video management device 1 includes: an acquisition unit 11 and a processing unit 12. Optionally, the video management device 1 further includes: a storage unit 13, a retrieval unit 14, and a transmission unit 15.
[0201] An acquiring unit 11 is configured to acquire a configuration file of a first video when receiving the first video sent by the first terminal;
[0202] The processing unit 12 is configured to generate a first video stream of the first video and a playback address thereof according to the configuration file and the video information of the first video.
[0203] In combination with any embodiment of the present application, the video management device 1 further includes: a storage unit 13, which is also used to store the first video in a target path when a storage instruction of the first video is detected, and the authorized terminal can access the target path.
[0204] In combination with any embodiment of the present application, the obtaining unit 11 is further configured to obtain an identification code of the first video and an instruction to add a tag to the first video;
[0205] The processing unit 12 is further configured to add a tag indicated by the instruction to the identification code of the first video to obtain a second video.
[0206] In combination with any embodiment of the present application, at least one third video is stored in the target path, and the at least one third video carries a tag;
[0207] The acquisition unit 11 is further used to acquire the tag to be retrieved;
[0208] The video management device 1 further includes: a retrieval unit 14, configured to retrieve videos stored in the target path using the tag to be retrieved, and obtain the third video whose tag matches the tag to be retrieved.
[0209] In combination with any embodiment of the present application, after generating the first video stream of the first video and its playback address, the video management device 1 also includes: a transmission unit 15, which is used to transmit the first video stream to the second terminal via a real-time transmission protocol when an acquisition instruction for the first video stream sent by the second terminal is detected.
[0210] In combination with any embodiment of the present application, the processing unit 12 is used to generate the first video stream and its playback address of the first video according to the configuration file and the video information of the first video when it is determined that the video stream of the first video does not exist in the database by searching the video stream in the database.
[0211] In combination with any embodiment of the present application, the processing unit 12 is used to: when a video stream generation instruction input through the video management interface is detected, generate the first video stream of the first video and its playback address according to the configuration file and the video information of the first video.
[0212] In combination with any embodiment of the present application, the video management interface includes a playback area for playing the first video, and the processing unit 12 is further used to obtain the annotation data of the first video according to the data annotation operation when a data annotation operation is detected input in the playback area.
[0213] In conjunction with any embodiment of the present application, the video management device 1 belongs to a video management system, and the video management system further includes a second video management device different from the video management device;
[0214] The second video management device stores a fourth video stream. Both the video management device 1 and the second video management device 1 can access the following information: video information of the first video stream and video information of the fourth video stream.
[0215] In some embodiments, the functions or modules included in the device provided in the embodiments of the present application can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0216] Figure 14 A schematic diagram of the hardware structure of a first video management device provided in an embodiment of the present application. The first video management device 2 includes a processor 21, a memory 22, an input device 23, and an output device 24. The processor 21, the memory 22, the input device 23, and the output device 24 are coupled via a connector, which includes various interfaces, transmission lines, or buses, etc., and is not limited to this embodiment of the present application. It should be understood that in various embodiments of the present application, coupling refers to mutual connection in a specific manner, including direct connection or indirect connection through other devices, for example, connection through various interfaces, transmission lines, buses, etc.
[0217] The processor 21 may be one or more graphics processing units (GPUs). If the processor 21 is a GPU, the GPU may be a single-core GPU or a multi-core GPU. Alternatively, the processor 21 may be a processor group consisting of multiple GPUs, with the multiple processors coupled to each other via one or more buses. Alternatively, the processor may be another type of processor, etc., which is not limited in the present embodiment.
[0218] The memory 22 can be used to store computer program instructions and various computer program codes, including program codes for executing the solution of the present application. Optionally, the memory includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or portable compact disc read-only memory (CD-ROM), which is used for related instructions and data.
[0219] The input device 23 is used to input data and / or signals, and the output device 24 is used to output data and / or signals. The input device 23 and the output device 24 can be independent devices or an integrated device.
[0220] It can be understood that in the embodiment of the present application, the memory 22 can be used not only to store relevant instructions, but also to store relevant data. For example, the memory 22 can be used to store the first video obtained through the input device 23. The embodiment of the present application does not limit the specific data stored in the memory.
[0221] It is understandable that Figure 14 Only a simplified design of a video management device is shown. In actual applications, the video management device may further include other necessary components, including but not limited to any number of input / output devices, processors, memories, etc., and all first video management devices that can implement the embodiments of the present application are within the scope of protection of this application.
[0222] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0223] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here. Those skilled in the art will also clearly understand that the descriptions of the various embodiments of this application have different focuses. For the convenience and brevity of description, the same or similar parts may not be repeated in different embodiments. Therefore, for parts not described or not described in detail in a certain embodiment, reference can be made to the descriptions of other embodiments.
[0224] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0225] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0226] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0227] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted via the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0228] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by a computer program instructing related hardware to perform the processes. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A video management method, characterized in that: The method comprises: When receiving a first video sent by a first terminal, obtaining a configuration file of the first video; When a storage instruction for the first video is detected, the first video is stored in a target path, and the authorized terminal can access the target path; Generating a first video stream of the first video and its playback address according to the configuration file and the video information of the first video, wherein the first video stream is an RTSP video stream; generating the first video stream of the first video and its playback address according to the configuration file and the video information of the first video includes: upon detecting a video stream generation instruction input through a video management interface, generating the first video stream of the first video and its playback address according to the configuration file and the video information of the first video, wherein the video management interface includes a playback area for playing the first video; When a data annotation operation is detected within the playback area, obtaining annotation data of the first video according to the data annotation operation; When an acquisition instruction for the first video stream is detected from a second terminal, the first video stream and the annotation data are transmitted to the second terminal via a real-time transport protocol, the first terminal and the second terminal are different authorized terminals, and the second terminal tests a computer vision model based on the first video stream and the annotation data.
2. The method according to claim 1, characterized in that Authorized terminals can access the playback address of the first video stream.
3. The method according to claim 1 or 2, characterized in that After storing the first video in the target path, the method further includes: Obtaining an identification code of the first video and an instruction to add a tag to the first video; Add the tag indicated by the instruction to the identification code of the first video to obtain the second video.
4. The method according to claim 1, wherein At least one third video is stored in the target path, and each of the at least one third video carries a tag; The method further comprises: Get the tag to be retrieved; The video stored in the target path is retrieved using the tag to be retrieved to obtain the third video whose tag matches the tag to be retrieved.
5. The method according to claim 1 or 2, characterized in that The step of generating a first video stream of the first video and a playback address thereof according to the configuration file and the video information of the first video includes: When it is determined by searching the video stream in the database that the video stream of the first video does not exist in the database, the first video stream of the first video and the playback address thereof are generated according to the configuration file and the video information of the first video.
6. The method according to claim 1 or 2, characterized in that The video management method is applied to a first video management device, the first video management device belongs to a video management system, and the video management system further includes a second video management device different from the first video management device; The second video management device stores a fourth video stream, and both the first video management device and the second video management device can access the following information: video information of the first video stream and video information of the fourth video stream.
7. A video management device, characterized in that: include: an acquiring unit, configured to acquire a configuration file of a first video when receiving a first video sent by a first terminal; a storage unit, configured to, upon detecting a storage instruction for the first video, store the first video in a target path, wherein the target path is accessible to authorized terminals; a processing unit, configured to generate a first video stream of the first video and a playback address thereof according to the configuration file and the video information of the first video, wherein the first video stream is an RTSP video stream; The generating, based on the configuration file and the video information of the first video, a first video stream of the first video and a playback address thereof, includes: upon detecting a video stream generation instruction input through a video management interface, generating, based on the configuration file and the video information of the first video, a first video stream of the first video and a playback address thereof, wherein the video management interface includes a playback area for playing the first video; a processing unit configured to, upon detecting a data annotation operation input within the playback area, obtain annotation data for the first video according to the data annotation operation; A transmission unit is used to transmit the first video stream and the annotation data to the second terminal through a real-time transmission protocol when an acquisition instruction for the first video stream sent by the second terminal is detected, the first terminal and the second terminal are different authorized terminals, and the second terminal tests the computer vision model based on the first video stream and the annotation data.
8. An electronic device, characterized in that: include: A processor and a memory, the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor executes the computer instructions, the electronic device executes the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor is caused to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method for carrying out live playing of monitoring video on mobile terminal
CN104735407A
Audio and video playing method and device, computer equipment and readable storage medium
CN111510791A