Video storage method and apparatus, and video playback method, apparatus, and system
By storing the event identifier and the associated video file in the terminal device, the client can obtain the start and end time of the video file based on the event identifier and the terminal device identifier, which solves the problem of video files occupying a large amount of storage space and failing to play back, and realizes video recording Accurate playback of files and saving of storage space.
Patent Information
- Application Number
- PCT/CN2024/075677
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-13
- Filing Date
- 2024-02-04
- Publication Date
- 2024-09-19
AI Technical Summary
Terminal devices occupy a large amount of storage space when recording, and it is difficult for users to accurately obtain the required video files from a large number of video files, resulting in video playback failure.
By storing event identification and associated recording files in the terminal device, the client can obtain the start time and end time of the recording file based on the event identification and terminal device identification, thereby achieving accurate playback of the recording file.
It saves storage space, enables accurate playback of video files, and improves user experience.
Smart Images

Figure CN2024075677_19092024_PF_FP_ABST
Abstract
Description
Video storage and playback method, device and system
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 13, 2023, with application number 202310259198.4 and invention name “A video storage, playback method, device and system”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of video processing technology, and in particular to a method, device and system for storing and replaying video. Background Art
[0003] Currently, when recording, terminal devices will maintain a 24-hour recording state, which will take up a lot of storage space. In addition, due to the large number of stored video files, users cannot accurately obtain the video files they want to play back from the large number of video files, resulting in video playback failure.
[0004] Summary of the Invention
[0005] The purpose of the embodiments of the present application is to provide a method, device, and system for storing and replaying video files, so as to save storage space and achieve accurate playback of video files. The specific technical solutions are as follows:
[0006] In a first aspect, an embodiment of the present application provides a video playback method, which is applied to a client included in a video playback system, wherein the video playback system also includes at least one terminal device and a platform, wherein the terminal device stores an event identifier and a video file associated with the event identifier; the method includes:
[0007] Acquire target event information of a target event from the platform, wherein the target event information includes a target event identifier, a target linkage video tag, and a target device identifier;
[0008] When the target linked recording mark indicates that the target event has linked recording, the target event identifier and the target device identifier are sent to the platform, so that the platform obtains the recording status, start time, and end time of the target recording file associated with the target event identifier from the device corresponding to the target device identifier, and sends the obtained recording status, start time, and end time to the client;
[0009] When the acquired video status is that the video is successfully recorded, the target video file is played back according to the acquired start time and end time.
[0010] In some embodiments, the method further comprises:
[0011] When the acquired video recording status is recording, outputting first prompt information, wherein the first prompt information indicates that the target video file is being recorded; or
[0012] When the acquired video recording status is video recording failure, a second prompt message is output, where the second prompt message indicates a reason why the acquisition of the target video file failed.
[0013] In some embodiments, the step of playing back the target video file according to the obtained start time and end time includes: obtaining the target video file from the terminal device according to the obtained start time and end time, and playing back the target video file on a video playback interface;
[0014] The method further comprises:
[0015] When the target linked video mark indicates that the target event is not linked to video, the video playback interface is hidden.
[0016] In a second aspect, an embodiment of the present application further provides a video playback method, which is applied to a platform included in a video playback system, wherein the video playback system further includes a client and at least one terminal device, wherein the terminal device stores an event identifier and a video file associated with the event identifier; the method includes:
[0017] receiving a target event identifier and a target device identifier sent by the client;
[0018] Determine the terminal device corresponding to the target device identifier;
[0019] Sending a video acquisition request to the determined terminal device, wherein the video acquisition request includes the target event identifier;
[0020] receiving the video recording status, start time, and end time of the target video file associated with the target event identifier fed back by the determined terminal device;
[0021] The acquired recording status, start time, and end time are sent to the client, so that the client plays back the target recording file according to the acquired start time and end time when the acquired recording status is that the recording is successful.
[0022] In some embodiments, the video playback system further includes a database storing event information collected by the at least one terminal device, and the method further includes:
[0023] receiving a first acquisition request sent by the client, where the first acquisition request includes a specified acquisition condition;
[0024] Sending a second acquisition request to the database, where the second acquisition request includes the specified acquisition condition;
[0025] Receiving event information of an event that meets the specified acquisition condition fed back by the database;
[0026] The acquired event information is sent to the client, so that the client determines target event information from the received event information, where the target event information includes the target event identifier and the target device identifier.
[0027] In a third aspect, an embodiment of the present application provides a video storage method, which is applied to a terminal device included in a video playback system, wherein the video playback system also includes a platform; the method includes:
[0028] When an event occurs, an event identifier is assigned to the event, and a linkage recording mark of the event is determined according to a preset linkage recording rule;
[0029] Assembling the event identifier of the event, the linked video record mark of the event, and the identifier of the terminal device to obtain event information of the event;
[0030] Sending event information of the event to the platform so that the platform stores the event information of the event;
[0031] When the linked video mark of the event indicates that the event has linked video, video storage is executed to obtain a video file associated with the event identifier of the event.
[0032] In some embodiments, the video playback system further includes a database; the platform stores the event information of the event in the database.
[0033] In a fourth aspect, an embodiment of the present application provides a video playback system, the system comprising: a client, at least one terminal device, and a platform, wherein the terminal device stores an event identifier and a video file associated with the event identifier;
[0034] The client is configured to obtain target event information of a target event from the platform, the target event information including a target event identifier, a target linkage recording mark, and a target device identifier; and when the target linkage recording mark indicates that the target event has linkage recording, send the target event identifier and the target device identifier to the platform;
[0035] The platform is configured to obtain the recording status, start time, and end time of the target recording file associated with the target event identifier from the terminal device corresponding to the target device identifier; and send the obtained recording status, start time, and end time to the client;
[0036] The client is further configured to play back the target video file according to the acquired start time and end time when the acquired video status is that the video is successfully recorded.
[0037] In some embodiments, the client is specifically configured to send a first acquisition request to the platform, the first acquisition request including a specified acquisition condition; receive event information of an event that meets the specified acquisition condition fed back by the platform; and determine target event information from the received event information;
[0038] The platform is further configured to obtain event information of events that meet the specified acquisition conditions; and send the obtained event information to the client.
[0039] In some embodiments, the system further comprises a database storing event information collected by the at least one terminal device;
[0040] The platform is specifically configured to send a second acquisition request to the database, where the second acquisition request includes a specified acquisition condition; and receive event information of an event that meets the specified acquisition condition and is fed back by the database.
[0041] In some embodiments, the platform is specifically configured to determine a terminal device corresponding to the target device identifier, send a video acquisition request to the determined terminal device, the video acquisition request including the target event identifier; and receive the video status, start time, and end time of the target video file associated with the target event identifier fed back by the determined terminal device;
[0042] The determined terminal device is used to obtain the recording status, start time and end time of the target recording file associated with the target event identifier based on the preset stored event identifier and the recording file associated with the event identifier, and feed back the obtained recording status, start time and end time to the platform.
[0043] In some embodiments, the client is further configured to output a first prompt message when the acquired video status is recording, wherein the first prompt message indicates that the target video file is being recorded; or
[0044] The client is further configured to output a second prompt message when the acquired video status is video recording failure, wherein the second prompt message indicates a reason why the acquisition of the target video file failed.
[0045] In some embodiments, the client is specifically configured to obtain the target video file from the terminal device according to the obtained start time and end time, and play back the target video file on the video playback interface;
[0046] The client is further configured to hide the video playback interface when the target linked video mark indicates that the target event is not linked to video.
[0047] In some embodiments, the terminal device is further configured to, when an event occurs, assign an event identifier to the event, determine a linkage recording tag for the event according to a preset linkage recording rule; assemble the event identifier of the event, the linkage recording tag of the event, and the identifier of the terminal device to obtain event information of the event; send the event information of the event to the platform; and when the linkage recording tag of the event indicates that the event has linkage recording, execute recording storage to obtain a recording file associated with the event identifier of the event;
[0048] The platform is further configured to store event information of the event.
[0049] In some embodiments, the system further comprises a database;
[0050] The platform is specifically configured to send event information of the event to the database;
[0051] The database is used to store event information of the event.
[0052] In a fifth aspect, an embodiment of the present application provides a video playback device, which is applied to a client included in a video playback system, wherein the video playback system also includes at least one terminal device and a platform, wherein the terminal device stores an event identifier and a video file associated with the event identifier; the device includes:
[0053] A first acquisition module is used to acquire target event information of a target event from the platform, wherein the target event information includes a target event identifier, a target linkage video tag, and a target device identifier;
[0054] A first sending module is configured to, when the target linkage recording mark indicates that the target event has linkage recording, send the target event identifier and the target device identifier to the platform, so that the platform obtains the recording status, start time, and end time of the target recording file associated with the target event identifier from the terminal device corresponding to the target device identifier, and sends the obtained recording status, start time, and end time to the client;
[0055] Playback module: when the acquired video status is that the video is successfully recorded, the target video file is played back according to the acquired start time and end time.
[0056] In some embodiments, the apparatus further comprises:
[0057] A first output module is configured to output a first prompt message when the acquired video status is recording, wherein the first prompt message indicates that the target video file is being recorded; or
[0058] The second output module is configured to output a second prompt message when the acquired video status is video recording failure, wherein the second prompt message indicates a reason why the acquisition of the target video file fails.
[0059] In some embodiments, the playback module is specifically configured to obtain the target video file from the terminal device according to the obtained start time and end time, and play back the target video file on the video playback interface;
[0060] The device further comprises:
[0061] Hiding module: used for hiding the video playback interface when the target linked video mark indicates that the target event has no linked video.
[0062] In a sixth aspect, embodiments of the present application further provide a video playback device, which is applied to a platform included in a video playback system, wherein the video playback system further includes a client and at least one terminal device, wherein the terminal device stores an event identifier and a video file associated with the event identifier; the device includes:
[0063] A first receiving module: configured to receive a target event identifier and a target device identifier sent by the client;
[0064] A second acquisition module is configured to determine a terminal device corresponding to the target device identifier; send a video acquisition request to the determined terminal device, the video acquisition request including the target event identifier; and receive the video status, start time, and end time of the target video file associated with the target event identifier fed back by the determined terminal device;
[0065] The second sending module is used to send the acquired recording status, start time and end time to the client, so that the client can play back the target recording file according to the acquired start time and end time when the acquired recording status is successful.
[0066] In some embodiments, the video playback system further includes a database storing event information collected by the at least one terminal device, and the apparatus further includes:
[0067] A second receiving module is configured to receive a first acquisition request sent by the client, where the first acquisition request includes a specified acquisition condition;
[0068] A third acquisition module is configured to send a second acquisition request to the database, wherein the second acquisition request includes a specified acquisition condition; and receive event information of an event that meets the specified acquisition condition fed back by the database;
[0069] The third sending module is configured to send the acquired event information to the client, so that the client can determine target event information from the received event information, where the target event information includes the target event identifier and the target device identifier.
[0070] In a seventh aspect, an embodiment of the present application provides a video storage device, which is applied to a terminal device included in a video playback system, wherein the video playback system also includes a platform; the device includes:
[0071] Assignment module: used for assigning an event identifier to the event when the event occurs, and determining the linkage recording mark of the event according to the preset linkage recording rules;
[0072] Assembling module: used for assembling the event identifier of the event, the linkage recording mark of the event and the identifier of the terminal device to obtain the event information of the event;
[0073] A fourth sending module: configured to send the event information of the event to the platform, so that the platform stores the event information of the event;
[0074] Execution module: for executing video storage when the linkage video mark of the event indicates that the event has linkage video, and obtaining the video file associated with the event identifier of the event.
[0075] In some embodiments, the video playback system further includes a database; the platform stores the event information of the event in the database.
[0076] In an eighth aspect, an embodiment of the present application provides an electronic device, including:
[0077] Memory for storing computer programs;
[0078] The processor is used to implement any of the above-mentioned video playback method steps applied to the client, or any of the above-mentioned video playback method steps applied to the platform, or any of the above-mentioned video storage method steps applied to the terminal device when executing the program stored in the memory.
[0079] In the ninth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements any of the above-mentioned video playback method steps applied to the client, or implements any of the above-mentioned video playback method steps applied to the platform, or implements any of the above-mentioned video storage method steps applied to the terminal device.
[0080] In the tenth aspect, an embodiment of the present application provides a computer program product, which, when running on a computer, enables the computer to execute any of the steps of the video playback method described above applied to the client, or execute any of the steps of the video playback method described above applied to the platform, or execute any of the steps of the video storage method described above applied to the terminal device.
[0081] Beneficial effects of the embodiments of the present application:
[0082] In the technical solution provided by the embodiment of the present application, the terminal device locally stores the event identifier and the video file associated with the event identifier. Here, the terminal device only needs to store the video file when the event occurs, which saves storage space. When the video needs to be replayed, the client can obtain the start time and end time of the event-linked video file from the terminal device based on the event identifier and the terminal device identifier. The start time and end time obtained here are obtained based on the stored video file, that is, the obtained start time and end time are the actual start time and actual end time of the video file. Therefore, based on the obtained start time and end time, the video file can be accurately replayed.
[0083] Of course, it is not necessary to achieve all the advantages described above at the same time when implementing any product or method of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0085] FIG1 is a schematic structural diagram of a video playback system provided in an embodiment of the present application;
[0086] FIG2 is a schematic diagram of a first flow chart of a video playback method provided in an embodiment of the present application;
[0087] FIG3 is a schematic diagram of a second flow chart of a video playback method provided in an embodiment of the present application;
[0088] FIG4 is a schematic diagram of a third flow chart of the video playback method provided in an embodiment of the present application;
[0089] FIG5 is a schematic diagram of a fourth flow chart of the video playback method provided in an embodiment of the present application;
[0090] FIG6 is another structural diagram of a video playback system provided in an embodiment of the present application;
[0091] FIG7 is a schematic diagram of a fifth flow chart of the video playback method provided in an embodiment of the present application;
[0092] FIG8 is a flow chart of a method for storing video recordings provided in an embodiment of the present application;
[0093] FIG9 is a signaling diagram of a video storage method provided in an embodiment of the present application;
[0094] FIG10 is a signaling diagram of a video playback method provided in an embodiment of the present application;
[0095] FIG11 is a schematic structural diagram of a video playback device provided in an embodiment of the present application;
[0096] FIG12 is another structural diagram of a video playback device provided in an embodiment of the present application;
[0097] FIG13 is a schematic structural diagram of a video storage device provided in an embodiment of the present application;
[0098] FIG14 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0099] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field based on this application are within the scope of protection of this application.
[0100] Currently, terminal devices are widely used, such as access control devices, Internet Protocol Cameras (IPCs), and Network Video Recorders (NVRs). The following explanation takes the access control device as an example. Users can configure linked recording for events. In addition, users can also configure the recording to start a few seconds before the event and the duration of the recording, so that users can accurately verify event information through the video file. In this case, when an event occurs, the access control device starts recording and stores the video file obtained by the recording. Based on the event that needs to be played back, the user can obtain the start time and end time of the video file obtained by the linked recording, and then play back the video file according to the obtained start time and end time.
[0101] In actual applications, access control devices record in groups of pictures (GoPs). That is, when the access control device records, the start frame of the recording file is the start frame of a GoP (i.e., the key frame), and the end frame of the recording file is the end frame of a GoP. Accordingly, the access control device plays back recording files in GoP units. However, the recording start time configured in the access control device is not necessarily the start frame of a GoP, and the recording end time determined based on the configured recording start time and duration is not necessarily the end frame of a GoP. This means that the actual recording start time and end time may not strictly match the recording start time and end time configured in the access control device. The client plays back recording files strictly according to the configured recording start time and end time. Because the actual recording start time and end time may not strictly match the recording start time and end time configured in the access control device, the client will not be able to obtain the recording file that matches the recording start time and end time configured in the access control device, and will not be able to play back the recording file.
[0102] To address this issue, access control devices can upload events and video files to the platform only after recording is complete and the start and end times are determined. However, determining an event is simpler and less time-consuming, allowing the access control device to quickly process and report the event to the platform. Recording, on the other hand, takes longer. If the event and video files are uploaded to the platform only after recording is complete, the event will be delayed significantly, preventing it from serving as an alarm and rendering it unusable. Furthermore, if the start and end times are not reported when the event is reported to the platform, the platform will be unable to replay the video files.
[0103] In order to save storage space and accurately play back video files, an embodiment of the present application provides a video playback system. As shown in Figure 1, the video playback system includes a client 11, at least one terminal device 12 and a platform 13, wherein the terminal device 12 stores event identifiers and video files associated with the event identifiers; the client can be a mobile phone, tablet, PC (Personal Computer) and other electronic devices with human-computer interaction functions, and the terminal device can be an access control device or other electronic device with a video recording function.
[0104] The client 11 is configured to obtain target event information of a target event from the platform 13, the target event information including a target event identifier, a target linkage recording identifier, and a target device identifier; and send the target event identifier and the target device identifier to the platform 13 when the target linkage recording identifier indicates that the target event has linkage recording.
[0105] The platform 13 is configured to obtain the recording status, start time, and end time of the target recording file associated with the target event identifier from the terminal device 12 corresponding to the target device identifier; and send the obtained recording status, start time, and end time to the client 11;
[0106] The client 11 is further configured to play back the target video file according to the acquired start time and end time when the acquired video status is that the video is successfully recorded.
[0107] In the technical solution provided by the embodiment of the present application, the terminal device locally stores the event identifier and the video file associated with the event identifier. Here, the terminal device only needs to store the video file when the event occurs, which saves storage space. When the video needs to be replayed, the client can obtain the start time and end time of the event-linked video file from the terminal device based on the event identifier and the terminal device identifier. The start time and end time obtained here are obtained based on the stored video file, that is, the obtained start time and end time are the actual start time and actual end time of the video file. Therefore, based on the obtained start time and end time, the video file can be accurately replayed.
[0108] Based on the above video playback system, the embodiment of the present application further provides a video playback method and a video storage method. The video playback method and the video storage method provided by the embodiment of the present application are described in detail below through specific embodiments.
[0109] Referring to FIG. 2 , FIG. 2 is a schematic flow chart of a first method for video playback provided in an embodiment of the present application, which is applied to the video playback system shown in FIG. 1 , including a client 11. The video playback system further includes at least one terminal device 12 and a platform 13. The terminal device stores an event identifier and a video file associated with the event identifier. The method includes the following steps:
[0110] Step S21: acquiring target event information of a target event from the platform, where the target event information includes a target event identifier, a target linkage recording tag, and a target device identifier.
[0111] In an embodiment of the present application, the event information of an event includes the event identifier of the event, the linkage recording mark of the event and the terminal device identifier of the event. Each event has a unique identifier, that is, the event identifier, and the event identifier can be represented by a number, such as 1, 2 or 3. The event identifier of an event can be a unique identifier assigned to the event by the terminal device (such as an access control device) when the event occurs, or it can be a unique identifier set by the user for the event. The linkage recording mark is used to indicate whether the corresponding event has linkage recording. For example, when the linkage recording mark is 1, it indicates that the corresponding event has linkage recording; when the linkage recording mark is 0, it indicates that the corresponding event does not have linkage recording. The linkage recording mark of an event can be determined by the terminal device (such as an access control device) according to the pre-stored linkage recording rules when the event occurs. The terminal device identifier of an event is the identifier (Identify, ID) of the terminal device that collected the event. The target event is the event that the user is concerned about, that is, the event associated with the video file that needs to be played back.
[0112] During video playback, the client obtains event information for the target event, i.e., the target event information, from the platform. The target event information includes an event identifier, a linked video tag, and a terminal device identifier, which are the target event identifier, the target linked video tag, and the target device identifier, respectively. In embodiments of the present application, the client can passively obtain the target event information from the platform. For example, the platform sends event information for each event to the client at preset time intervals; the client determines the target event information from the event information for each event sent by the platform. The preset time interval can be set according to actual needs.
[0113] In the embodiment of the present application, the client can also actively obtain target event information of the target event from the platform, which will be described in detail later and will not be elaborated here.
[0114] Step S22: When the target linkage recording mark indicates that the target event has linkage recording, the target event identifier and the target device identifier are sent to the platform, so that the platform obtains the recording status, start time and end time of the target recording file associated with the target event identifier from the terminal device corresponding to the target device identifier, and sends the obtained recording status, start time and end time to the client.
[0115] In an embodiment of the present application, after obtaining the target event information, the client obtains the target event identifier, the target linkage recording mark and the target device identifier from the target event information, and detects the target linkage recording mark; when the target linkage recording mark indicates that the target event has linkage recording, the client sends the target event identifier and the target device identifier to the platform. After the platform receives the target event identifier and the target device identifier sent by the client, it finds the corresponding terminal device according to the target device identifier, and then obtains the recording status, start time and end time of the recording file associated with the target event identifier from the found terminal device according to the target event identifier, and sends the obtained recording status, start time and end time to the client. Among them, the recording file associated with the target event identifier is the target recording file. The recording status can include three states: recording successful, recording in progress and recording failed. The recording status can also include other states, such as recording for 10 minutes, 20 minutes, etc., which are not limited to this.
[0116] Step S23: When the acquired video status is that the video is successfully recorded, the target video file is played back according to the acquired start time and end time.
[0117] When the client detects that the target event has linked recording and obtains the recording status of the target recording file through the platform, if the client detects that the obtained recording status is successful, it can obtain the stream to the terminal device based on the obtained start time and end time to complete the playback of the target recording file.
[0118] When the video status obtained by the client is recording, the client can output a first prompt message, which is used to indicate that the target video file is being recorded. For example, the client outputs a pop-up window containing the text "Recording, please try again later".
[0119] When the video status obtained by the client is video recording failure, the client can output a second prompt message, and the second prompt message is used to indicate the reason for the failure to obtain the target video file. The reason for the failure to obtain the target video file may be insufficient hard disk space of the terminal device, damaged memory card, damaged hard disk, etc. The specific reason for the failure to obtain the target video file can be notified to the client by the terminal device (such as an access control device) in the form of an error code and displayed on the client. To ensure that the client correctly identifies the error code, the terminal device (such as an access control device) and the client can negotiate in advance to determine the error code for the reasons for the failure to obtain various video files. In addition, in order to ensure that the second prompt message is output on the client, the platform can also feedback the reason for the failure to obtain the target video file to the client when it feeds back the obtained video status, start time and end time to the client.
[0120] In the embodiment of the present application, a prompt message is output when recording is in progress or when recording fails, and the reason why the video file cannot be played is promptly reported to the user, which facilitates the user's subsequent operations and improves the user experience.
[0121] In the video playback method provided in the embodiment of the present application, the client obtains event information of the target event from the platform, and determines whether the target event has linked recording based on the target linked recording tag included in the target event information. If linked recording is available, the platform obtains the recording status, start time and end time of the target video file from the corresponding terminal device based on the target event identifier and the target device identifier, and sends the obtained recording status, start time and end time to the client. When the client detects that the recording status is successful, it can replay the target video file based on the start time and end time, thereby achieving accurate playback of the video file.
[0122] In some embodiments, as shown in FIG3 , embodiments of the present application further provide a video playback method, which is applied to a client included in a video playback system, wherein the video playback system further includes at least one terminal device and a platform, wherein the terminal device stores an event identifier and a video file associated with the event identifier. The method may include the following steps:
[0123] Step S31: Send a first acquisition request to the platform, where the first acquisition request includes a specified acquisition condition.
[0124] In this embodiment of the present application, the client can proactively obtain target event information of a target event from the platform. For example, in steps S31-S33, the client sends a request to the platform for obtaining event information, i.e., a first request. The first request includes specified acquisition conditions. The specified acquisition conditions may include, but are not limited to, the time period to which the event information belongs and the terminal device that collected the event information.
[0125] To improve the efficiency of obtaining target event information, the client can provide a human-computer interaction interface in which the user enters specified acquisition conditions; after the client obtains the specified acquisition conditions entered by the user, it generates a first acquisition request and sends the first acquisition request to the platform.
[0126] Step S32: receiving event information of events that meet the specified acquisition conditions fed back by the platform.
[0127] In the embodiment of the present application, the event information of each event can be stored locally on the platform or in a database connected to the platform to conserve the platform's storage resources. After receiving the first acquisition request, the platform obtains the specified acquisition conditions from the first acquisition request, searches for event information that meets the specified acquisition conditions from the pre-stored event information, and feeds the found event information back to the client.
[0128] For example, the specified acquisition conditions include time period 1 and terminal device 1. The platform searches for event information of events collected by terminal device 1 within time period 1 from the event information of events previously stored in the database, and feeds back the found event information to the client.
[0129] Step S33: determining target event information from the received event information, where the target event information includes a target event identifier, a target linkage recording tag, and a target device identifier.
[0130] In the embodiment of the present application, after receiving the event information fed back by the platform, the client determines the target event information from the received event information according to a preset rule, wherein the preset rule can be set according to actual needs.
[0131] For example, the preset rule may be random selection, where the client randomly selects an event from the received event information as the target event information. Another example may be user selection, where the client displays the received event information through a human-computer interaction interface; the user selects an event in the human-computer interaction interface; and the client uses the user-selected event as the target event information.
[0132] Step S34: When the target linked recording flag indicates that the target event is linked to recording, the target event identifier and target device identifier are sent to the platform. The platform then obtains the recording status, start time, and end time of the target recording file associated with the target event identifier from the terminal device corresponding to the target device identifier, and sends the obtained recording status, start time, and end time to the client. This is the same as step S22 above.
[0133] Step S35: When the acquired video status is that the video is successfully recorded, the target video file is played back according to the acquired start time and end time, which is the same as the above step S23.
[0134] In the technical solution provided by the embodiments of this application, the client proactively sends a first acquisition request to the platform on demand to obtain event information that meets the specified acquisition criteria. The client then determines the target event information from a small amount of event information that meets the specified acquisition criteria, thereby improving the efficiency of determining the target event information and the efficiency of video playback. Furthermore, the client proactively sends event information that meets the specified acquisition criteria from the platform on demand, reducing the amount of information transmitted between the client and the platform and conserving network resources.
[0135] In some embodiments, as shown in FIG4 , embodiments of the present application further provide a video playback method, which is applied to a client included in a video playback system, wherein the video playback system further includes at least one terminal device and a platform, wherein the terminal device stores an event identifier and a video file associated with the event identifier. The method may include the following steps:
[0136] Step S41: Obtain target event information of the target event from the platform, the target event information including the target event identifier, the target linkage recording tag and the target device identifier, which is the same as the above step S21.
[0137] Step S42: When the target linked recording flag indicates that the target event has linked recording, the target event identifier and target device identifier are sent to the platform. The platform then obtains the recording status, start time, and end time of the target recording file associated with the target event identifier from the terminal device corresponding to the target device identifier, and sends the obtained recording status, start time, and end time to the client. This is the same as step S22 above.
[0138] Step S43: When the acquired video status is that the video is successfully recorded, the target video file is acquired from the terminal device according to the acquired start time and end time, and the target video file is played back on the video playback interface.
[0139] In the embodiment of the present application, when the target linked recording mark indicates that the target event has linked recording, the client can provide a recording playback interface. When the client detects that the acquired recording status is recording successful, the client can obtain the stream from the terminal device based on the acquired start time and end time, and play back the target recording file on the recording playback interface.
[0140] Step S44: When the target linked video mark indicates that the target event is not linked to video, the video playback interface is hidden.
[0141] In the embodiment of the present application, when the target linked video mark indicates that the target event is not linked to video recording, the client does not display the video playback interface, or closes the displayed video playback interface.
[0142] In the video playback method provided in the embodiment of the present application, the client includes a video playback interface. When the target event has a linked video and the video status of the target event obtained by the client is a successful video recording, the target video file can be displayed on the video playback interface. By setting the video playback interface, the user can watch the replayed video playback file. When the target linked video mark of the target event indicates that the target event has no linked video recording, the video playback interface is hidden to avoid interface clutter and improve the user experience.
[0143] Based on the above-mentioned video playback method, as shown in FIG5 , an embodiment of the present application further provides a video playback method, which is applied to a platform included in a video playback system, wherein the video playback system further includes a client and at least one terminal device, wherein the terminal device stores an event identifier and a video file associated with the event identifier. The method includes the following steps:
[0144] Step S51: receiving the target event identifier and target device identifier sent by the client.
[0145] In this embodiment of the present application, the client obtains target event information of the target event from the platform and sends the target event identifier and target device identifier included in the target event information to the platform. The platform receives the target event identifier and target device identifier sent by the client. For details, refer to the above steps S21 and S22, which will not be repeated here.
[0146] In some embodiments, the platform receives a first acquisition request from a client, the first acquisition request including specified acquisition conditions; acquires event information for events that meet the specified acquisition conditions; and transmits the acquired event information to the client. Subsequently, the client determines target event information from the received event information, the target event information including a target event identifier, a target linked recording tag, and a target device identifier; and transmits the target event identifier and target device identifier included in the target event information to the platform. For details, see the description of FIG. 3 above.
[0147] In the embodiment of the present application, the client proactively sends a first acquisition request to the platform on demand to obtain event information that meets the specified acquisition criteria. The client then determines the target event information from a small amount of event information that meets the specified acquisition criteria, thereby improving the efficiency of determining the target event information and the efficiency of video playback. Furthermore, the client proactively sends event information that meets the specified acquisition criteria from the platform on demand, reducing the amount of information transmitted between the client and the platform and conserving network resources.
[0148] In some embodiments, the video playback system may further include a database 14, as shown in Figure 6. Database 14 stores event information collected by at least one terminal device included in the video playback system. Based on this, the steps of obtaining event information for events that meet specified acquisition criteria may include: sending an acquisition request, such as a second acquisition request, to database 14. The second acquisition request may include specified acquisition criteria; and receiving event information from database 14 for events that meet the specified acquisition criteria. Subsequently, the platform may provide the retrieved event information to the client.
[0149] In an embodiment of the present application, event information collected by at least one terminal device included in the video playback system can also be stored locally on the platform. In this way, the platform can quickly obtain event information of events that meet specified acquisition conditions from the local platform, thereby improving the efficiency of obtaining event information.
[0150] Step S52: Obtain the recording status, start time, and end time of the target recording file associated with the target event identifier from the terminal device corresponding to the target device identifier.
[0151] In an embodiment of the present application, the platform can determine the corresponding terminal device according to the received target device identifier, and obtain the recording status, start time and end time of the target video file from the determined terminal device according to the target event identifier.
[0152] Step S53: sending the acquired recording status, start time and end time to the client, so that the client can play back the target recording file according to the acquired start time and end time when the acquired recording status is recording success.
[0153] In the embodiment of the present application, after obtaining the recording status, start time, and end time of the target video file, the platform forwards the obtained recording status, start time, and end time to the client. When the client detects that the obtained recording status is successful, it can obtain the stream from the corresponding terminal device based on the obtained start time and end time to play back the target video file. For details, please refer to the relevant description of step S23 above.
[0154] In the video playback method provided in the embodiment of the present application, the terminal device locally stores the event identifier and the video file associated with the event identifier. Here, the terminal device only needs to store the video file when the event occurs, which saves storage space. When the video needs to be played back, the client can obtain the start time and end time of the event-linked video file from the terminal device based on the event identifier and the terminal device identifier. The start time and end time obtained here are obtained based on the stored video file, that is, the obtained start time and end time are the actual start time and actual end time of the video file. Therefore, based on the obtained start time and end time, accurate playback of the video file can be achieved.
[0155] In some embodiments, as shown in FIG7 , embodiments of the present application further provide a video playback method, which is applied to a platform included in a video playback system. The video playback system also includes a client and at least one terminal device, wherein the terminal device stores an event identifier and a video file associated with the event identifier. The method may include the following steps:
[0156] Step S71: Receive the target event identifier and target device identifier sent by the client, which is the same as the above step S51.
[0157] Step S72: Determine the terminal device corresponding to the target device identifier.
[0158] In the embodiment of the present application, the platform determines the corresponding terminal device according to the target device identifier. The terminal device corresponding to the target device identifier can be understood as the terminal device that records and stores the target video file after the target event occurs.
[0159] Step S73: Send a video acquisition request to the determined terminal device, where the video acquisition request includes a target event identifier.
[0160] In an embodiment of the present application, after obtaining the target event identifier and determining the terminal device corresponding to the target device identifier, the platform can generate a video acquisition request including the target event identifier and send the video acquisition request to the determined terminal device. The video acquisition request can be used to obtain the video status, start time and end time of the video file.
[0161] Step S74: Receive the recording status, start time, and end time of the target recording file associated with the target event identifier fed back by the determined terminal device.
[0162] In this embodiment of the present application, after sending a video acquisition request to a determined terminal device, the terminal device obtains the target event identifier from the video acquisition request and, based on the pre-stored event identifier and the video file associated with the event identifier, determines the recording status, start time, and end time of the target video file associated with the target event identifier. The terminal device then feeds back the recording status, start time, and end time of the target video file to the platform.
[0163] Step S75: Send the acquired recording status, start time and end time to the client, so that the client can play back the target recording file according to the acquired start time and end time when the acquired recording status is recording success. This is the same as the above step S53.
[0164] In the video playback method provided in the embodiment of the present application, the terminal device locally stores the event identifier and the video file associated with the event identifier. Here, the terminal device only needs to store the video file when the event occurs, which saves storage space. When the video needs to be played back, the client can obtain the start time and end time of the event-linked video file from the terminal device based on the event identifier and the terminal device identifier. The start time and end time obtained here are obtained based on the stored video file, that is, the obtained start time and end time are the actual start time and actual end time of the video file. Therefore, based on the obtained start time and end time, accurate playback of the video file can be achieved.
[0165] Based on the above video playback method, as shown in FIG8 , the embodiment of the present application further provides a video storage method, which is applied to a terminal device included in a video playback system, and the video playback system also includes a platform. The above video storage method includes the following steps:
[0166] Step S81: When an event occurs, an event identifier is assigned to the event, and a linkage recording mark of the event is determined according to a preset linkage recording rule.
[0167] In an embodiment of the present application, the type of event can be determined based on the specific application scenario of the terminal device. For example, when the terminal device is used as an access control device, the event detected by the terminal device can be events such as card swiping authentication or door opening and closing. When the terminal device detects the occurrence of an event, it can assign an event identifier to the event and determine the event's linkage recording tag based on pre-stored linkage recording rules. The event identifier can be a unique number for the event, the linkage recording rules can indicate which events require the addition of linkage recording tags, and the linkage recording tag can be used to indicate whether the event is linked to recording.
[0168] Step S82: Assemble the event identifier of the event, the linked video record mark of the event, and the identifier of the terminal device to obtain the event information of the event.
[0169] In the embodiment of the present application, the terminal device assembles the event identifier, the event's linked recording tag, and the terminal device's identifier according to a specified data arrangement order to obtain event information for the event. For example, the specified data arrangement order is event identifier, linked recording tag, and terminal device identifier; when determining event identifier 1 for event 1, linked recording tag 1 for event 1, and the identifier of terminal device 1 that captured event 1, the event information for event 1 obtained by the terminal device is assembled as follows: {event identifier 1, linked recording tag 1, terminal device 1 identifier}.
[0170] Step S83: Send the event information of the event to the platform so that the platform stores the event information of the event.
[0171] In the embodiment of the present application, after assembling the event information of the event, the terminal device sends the event information of the event to the platform. The platform can store the event information locally on the platform.
[0172] In order to save the storage resources of the platform, the video playback system may further include a database. After receiving the event information sent by the terminal device, the platform may store the received event information in the database, thereby saving the storage space of the platform.
[0173] Step S84: When the linked video mark of the event indicates that the event has linked video, video storage is executed to obtain a video file associated with the event identifier of the event.
[0174] In an embodiment of the present application, when the terminal device detects that the linked recording mark of an event indicates that the event has linked recording, the recording is performed, and the obtained recording file is used as the recording file associated with the event identifier of the event and stored locally on the terminal device.
[0175] Based on steps S81 to S84, after the terminal device stores the video file, the video playback can be achieved according to the embodiments shown in Figures 2 to 7 above.
[0176] In the video storage method provided in the embodiment of the present application, the terminal device locally stores the event identifier and the video file associated with the event identifier. Here, the terminal device only needs to store the video file when the event occurs, which saves storage space. When the video needs to be played back, the client can obtain the start time and end time of the event-linked video file from the terminal device based on the event identifier and the terminal device identifier. The start time and end time obtained here are obtained based on the stored video file, that is, the obtained start time and end time are the actual start time and actual end time of the video file. Therefore, based on the obtained start time and end time, the video file can be accurately played back.
[0177] The following describes in detail the video storage method and video playback method provided by the embodiment of the present application in conjunction with the signaling diagram of video storage shown in Figure 9 and the signaling diagram of video playback shown in Figure 10. In Figures 9 and 10, the terminal device is an access control device as an example.
[0178] As shown in FIG9 , the video storage process may include the following steps:
[0179] Step S91: At the access control device, the user swipes the card for authentication, opens or closes the door, etc.
[0180] Step S92: The access control device generates an access control event, processes and assembles the event information: assigns a unique event number, and adds a tag indicating whether to link the event to video recording.
[0181] When a user swipes a card, opens or closes a door, etc., the access control device generates an access control event, assigns a unique number to the access control event, and adds a tag indicating whether the event is linked to video recording. The unique number assigned to the access control event, the tag indicating whether the event is linked to video recording, and the access control device identifier are then combined to obtain event information for the access control event. For details, please refer to the description of steps S81 and S82 above.
[0182] In the embodiment of the present application, the event information of the access control event may also include captured images, user identity information, etc., which is not limited to this.
[0183] Step S93: The access control device reports the event information to the platform. The specific content is as shown in the above step S83.
[0184] Step S94: The platform sends the event information to the database.
[0185] Step S95: The database stores the event information.
[0186] Step S96: When the access control device is configured with linkage recording for this event, the access control device starts recording according to the recording start time and recording duration configured in the access control device, generates a recording file, and stores it locally in the access control device.
[0187] In this embodiment of the present application, the access control device detects whether linked recording is configured for this event. If a linked recording flag is added in step S92, this indicates that linked recording is configured for this event; otherwise, linked recording is not configured for this event. If linked recording is configured for this event, the access control device executes step S96; if linked recording is not configured for this event, the video storage process is terminated.
[0188] As shown in Figure 10, the video playback process may include the following steps:
[0189] Step S101: The user searches for access control history events.
[0190] The user can enter search conditions on the human-computer interaction interface provided by the client (also known as the web terminal) to retrieve access control historical events. Access control historical events can be understood as access control events that have occurred. The search conditions can be understood as the above-mentioned specified acquisition conditions. For specific search steps, please refer to the above-mentioned step S31.
[0191] Step S102: The client requests access control history events.
[0192] After receiving the user's search conditions for historical access control events, the client requests the platform for event information of historical access control events that meet the search conditions. The specific request steps are shown in step S32 above. The event information of each historical access control event may include the ID of the access control device, the linkage recording tag, and the unique number of the event.
[0193] Step S103: The platform obtains access control history events from the database.
[0194] After receiving the request from the client for access control historical events, the platform obtains event information of the access control historical events from the database. The specific acquisition steps are as shown in the above step S51.
[0195] Step S104: the database returns access control history events.
[0196] The database retrieves the event information of all access control historical events according to the retrieval conditions, and returns the event information of all retrieved access control historical events that meet the retrieval conditions to the platform.
[0197] Step S105: The platform returns access control history events to the client.
[0198] Step S106: The client determines whether there is a linked recording mark and performs corresponding operations according to the determination result, as follows:
[0199] The client determines the target event information from the event information of the received access control historical events, and determines that the target event information has a linkage recording mark, that is, the judgment result is that there is a linkage recording mark, then obtains the recording start time and end time from the platform according to the ID of the access control device and the unique number of the event included in the target event information; the platform finds the corresponding access control device according to the ID of the received access control device, and obtains the recording start time and end time from the corresponding access control device according to the unique number of the received event; the access control device returns the recording status, start time and end time of the recording file corresponding to the unique number of the event to the platform; the platform returns the recording status, start time and end time of the recording file corresponding to the unique number of the event to the client.
[0200] After receiving the recording status, start time, and end time of the recording file corresponding to the unique number of the event returned by the platform, the client determines the recording status; if the recording status is successful, the target recording file is obtained from the terminal device based on the start time and end time, and the recording file is played back in the recording playback interface; if the recording status is recording, the user is prompted to try again later; if the recording status is recording failed, the user is prompted with the cause of the error.
[0201] The client determines the target event information from the event information of the received access control historical events, and determines that the target event information has no linkage recording mark, that is, if the judgment result is that there is no linkage recording mark, the recording playback interface is hidden.
[0202] Based on the video playback method and video storage method shown in Figures 2-5 and 7-10 above, the video playback system shown in Figure 1 above, including the client 11, at least one terminal device 12 and the platform 13, can also perform corresponding steps to implement the above video playback method and video storage method.
[0203] In some embodiments, the client 11 may be configured to send a first acquisition request to the platform 13, the first acquisition request including a specified acquisition condition; receive event information of an event that meets the specified acquisition condition fed back by the platform 13; and determine target event information from the received event information.
[0204] The platform 13 can also be used to obtain event information of events that meet specified acquisition conditions; and send the obtained event information to the client 11.
[0205] In some embodiments, the video playback system may further include a database 14 , in which event information collected by at least one terminal device is stored;
[0206] The platform 13 may be specifically configured to send a second acquisition request to the database 14 , where the second acquisition request includes a specified acquisition condition; and receive event information of an event that meets the specified acquisition condition fed back by the database 14 .
[0207] In some embodiments, the platform 13 may be specifically configured to determine a terminal device corresponding to a target device identifier, send a video acquisition request to the determined terminal device, the video acquisition request including a target event identifier, and receive a video status, start time, and end time of a target video file associated with the target event identifier fed back by the determined terminal device.
[0208] The determined terminal device is used to obtain the recording status, start time and end time of the target recording file associated with the target event identifier based on the preset stored event identifier and the recording file associated with the event identifier, and feed back the obtained recording status, start time and end time to the platform 13.
[0209] In some embodiments, the client 11 may also be configured to output a first prompt message when the acquired video status is recording, the first prompt message indicating that the target video file is being recorded; or
[0210] The client 11 may also be configured to output a second prompt message when the acquired video status is video recording failure, where the second prompt message indicates a reason why acquisition of the target video file failed.
[0211] In some embodiments, the client 11 may be specifically configured to obtain a target video file from a terminal device according to the obtained start time and end time, and to play back the target video file on a video playback interface;
[0212] The client 11 may also be configured to hide the video playback interface when the target linked video mark indicates that the target event is not linked to video.
[0213] In some embodiments, the terminal device 12 may also be configured to, when an event occurs, assign an event identifier to the event, determine a linkage recording tag for the event based on a preset linkage recording rule, assemble the event identifier, the linkage recording tag for the event, and the terminal device identifier to obtain event information for the event, send the event information to the platform 13, and, when the linkage recording tag for the event indicates that the event has linkage recording, execute recording storage to obtain a recording file associated with the event identifier.
[0214] The platform 13 can also be used to store event information of events.
[0215] In some embodiments, the video playback system may further include a database 14;
[0216] The platform 13 may be used to send event information of the event to the database 14;
[0217] The database 14 is used to store event information of events.
[0218] In the technical solution provided by the embodiment of the present application, the terminal device locally stores the event identifier and the video file associated with the event identifier. Here, the terminal device only needs to store the video file when the event occurs, which saves storage space. When the video needs to be replayed, the client can obtain the start time and end time of the event-linked video file from the terminal device based on the event identifier and the terminal device identifier. The start time and end time obtained here are obtained based on the stored video file, that is, the obtained start time and end time are the actual start time and actual end time of the video file. Therefore, based on the obtained start time and end time, the video file can be accurately replayed.
[0219] Corresponding to the above-mentioned video playback method, an embodiment of the present application provides a video playback device, which is applied to a client included in a video playback system. The video playback system also includes at least one terminal device and a platform, wherein the terminal device stores an event identifier and a video file associated with the event identifier. As shown in Figure 11, the device includes:
[0220] The first acquisition module 111 is used to obtain target event information of a target event from the platform, where the target event information includes a target event identifier, a target linkage recording identifier, and a target device identifier;
[0221] The first sending module 112 is configured to, when the target linked recording mark indicates that the target event has linked recording, send the target event identifier and the target device identifier to the platform, so that the platform obtains the recording status, start time, and end time of the target recording file associated with the target event identifier from the terminal device corresponding to the target device identifier, and sends the obtained recording status, start time, and end time to the client;
[0222] The playback module 113 is configured to play back the target video file according to the acquired start time and end time when the acquired video status is that the video is successfully recorded.
[0223] In some embodiments, the apparatus further comprises:
[0224] A first output module is configured to output a first prompt message when the acquired video status is recording, the first prompt message indicating that the target video file is being recorded; or
[0225] The second output module is configured to output a second prompt message when the acquired video status is video recording failure, wherein the second prompt message indicates the reason why the acquisition of the target video file fails.
[0226] In some embodiments, the playback module 113 is specifically configured to obtain a target video file from the terminal device according to the obtained start time and end time, and to play back the target video file on the video playback interface;
[0227] The device further comprises:
[0228] Hidden module: used to hide the video playback interface when the target linked video mark indicates that the target event has no linked video.
[0229] In the technical solution provided by the embodiment of the present application, the terminal device locally stores the event identifier and the video file associated with the event identifier. Here, the terminal device only needs to store the video file when the event occurs, which saves storage space. When the video needs to be replayed, the client can obtain the start time and end time of the event-linked video file from the terminal device based on the event identifier and the terminal device identifier. The start time and end time obtained here are obtained based on the stored video file, that is, the obtained start time and end time are the actual start time and actual end time of the video file. Therefore, based on the obtained start time and end time, the video file can be accurately replayed.
[0230] The present application also provides a video playback device, which is applied to a platform included in a video playback system. The video playback system also includes a client and at least one terminal device, wherein the terminal device stores an event identifier and a video file associated with the event identifier. As shown in FIG12 , the device includes:
[0231] The first receiving module 121 is configured to receive a target event identifier and a target identifier sent by a client;
[0232] The second acquisition module 122 is configured to determine the terminal device corresponding to the target device identifier; send a video acquisition request to the determined terminal device, the video acquisition request including the target event identifier; and receive the video status, start time, and end time of the target video file associated with the target event identifier fed back by the determined terminal device;
[0233] The second sending module 123 is configured to send the acquired recording status, start time and end time to the client, so that the client can play back the target recording file according to the acquired start time and end time when the acquired recording status indicates that the recording is successful.
[0234] In some embodiments, the video playback system further includes a database storing event information collected by the at least one terminal device, and the apparatus further includes:
[0235] A second receiving module is configured to receive a first acquisition request sent by a client, where the first acquisition request includes a specified acquisition condition;
[0236] A third acquisition module is configured to send a second acquisition request to the database, wherein the second acquisition request includes a specified acquisition condition; and receive event information of an event that meets the specified acquisition condition fed back by the database;
[0237] The third sending module is configured to send the acquired event information to the client, so that the client can determine target event information from the received event information, where the target event information includes a target event identifier and a target device identifier.
[0238] In the technical solution provided by the embodiment of the present application, the terminal device locally stores the event identifier and the video file associated with the event identifier. Here, the terminal device only needs to store the video file when the event occurs, which saves storage space. When the video needs to be replayed, the client can obtain the start time and end time of the event-linked video file from the terminal device based on the event identifier and the terminal device identifier. The start time and end time obtained here are obtained based on the stored video file, that is, the obtained start time and end time are the actual start time and actual end time of the video file. Therefore, based on the obtained start time and end time, the video file can be accurately replayed.
[0239] Corresponding to the above-mentioned video storage method, an embodiment of the present application provides a video storage device, which is applied to a terminal device included in a video playback system, and the video playback system also includes a platform; referring to FIG13 , the device includes:
[0240] Assignment module 131: used for assigning an event identifier to an event when an event occurs, and determining a linkage recording mark for the event according to a preset linkage recording rule;
[0241] Assembling module 132: used to assemble the event identifier of the event, the linked recording tag of the event, and the identifier of the terminal device to obtain the event information of the event;
[0242] The fourth sending module 133 is used to send the event information of the event to the platform so that the platform can store the event information of the event;
[0243] The execution module 134 is configured to execute the video storage when the linked video mark of the event indicates that the event has linked video, and obtain the video file associated with the event identifier of the event.
[0244] In some embodiments, the video playback system further includes a database; the platform stores event information of the event in the database.
[0245] In the technical solution provided by the embodiment of the present application, the terminal device locally stores the event identifier and the video file associated with the event identifier. Here, the terminal device only needs to store the video file when the event occurs, which saves storage space. When the video needs to be replayed, the client can obtain the start time and end time of the event-linked video file from the terminal device based on the event identifier and the terminal device identifier. The start time and end time obtained here are obtained based on the stored video file, that is, the obtained start time and end time are the actual start time and actual end time of the video file. Therefore, based on the obtained start time and end time, the video file can be accurately replayed.
[0246] An embodiment of the present application also provides an electronic device, such as the above-mentioned client, platform and terminal device, as shown in Figure 14, including a memory 141 for storing computer programs; a processor 142 for executing the program stored in the memory, implementing any of the above-mentioned video playback method steps, or implementing any of the above-mentioned video storage method steps applied to the terminal device.
[0247] Furthermore, the electronic device may further include a communication bus and / or a communication interface, and the processor, the communication interface, and the memory communicate with each other via the communication bus.
[0248] The communication bus mentioned in the electronic device mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0249] The communication interface is used for communication between the above electronic device and other devices.
[0250] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0251] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0252] In another embodiment provided in the present application, a computer-readable storage medium is further provided, in which a computer program is stored. When the computer program is executed by a processor, it implements any of the above-mentioned video playback method steps, or implements any of the above-mentioned video storage method steps applied to the terminal device.
[0253] In another embodiment provided by the present application, a computer program product is also provided. When the computer is run on a computer, the computer executes any of the above-mentioned video playback method steps, or executes any of the above-mentioned video storage method steps applied to a terminal device.
[0254] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, 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 from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0255] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0256] Each embodiment in this specification is described in a related manner. Similar portions between the various embodiments can be referenced to each other. Each embodiment focuses on the differences between the other embodiments. In particular, since the system, device, electronic device, computer-readable storage medium, and computer program product embodiments are generally similar to the method embodiments, their descriptions are relatively simplified. For related portions, reference can be made to the descriptions of the method embodiments.
[0257] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application are included in the scope of protection of the present application.
Claims
1. A video playback method, characterized in that: The method is applied to a client included in a video playback system, wherein the video playback system further includes at least one terminal device and a platform, wherein the terminal device stores an event identifier and a video file associated with the event identifier; and the method includes: Acquire target event information of a target event from the platform, wherein the target event information includes a target event identifier, a target linkage video tag, and a target device identifier; When the target linkage video mark indicates that the target event has linkage video, the target event identifier and the target device identifier are sent to the platform, so that the platform obtains the video status, start time and end time of the target video file associated with the target event identifier from the terminal device corresponding to the target device identifier, and sends the obtained video status, start time and end time to the client; When the acquired video recording status is that the video recording is successful, the target video recording file is played back according to the acquired start time and end time.
2. The method according to claim 1, characterized in that The method further comprises: When the acquired video recording status is recording, outputting first prompt information, wherein the first prompt information indicates that the target video file is being recorded; or When the acquired video recording status is video recording failure, second prompt information is output, where the second prompt information indicates the reason why the acquisition of the target video file fails.
3. The method according to claim 1, characterized in that The step of playing back the target video file according to the acquired start time and end time comprises: acquiring the target video file from the terminal device according to the acquired start time and end time, and playing back the target video file on a video playback interface; The method further comprises: When the target linked video mark indicates that the target event is not linked to video, the video playback interface is hidden.
4. A video playback method, characterized in that: The platform is applied to a video playback system, the video playback system further includes a client and at least one terminal device, wherein the terminal device stores an event identifier and a video file associated with the event identifier; the method includes: Receiving a target event identifier and a target device identifier sent by the client; Determine the terminal device corresponding to the target device identifier; Sending a video acquisition request to the determined terminal device, wherein the video acquisition request includes the target event identifier; Receive the video status, start time and end time of the target video file associated with the target event identifier fed back by the determined terminal device; The acquired recording state, start time and end time are sent to the client, so that when the acquired recording state is recording success, the client plays back the target recording file according to the acquired start time and end time.
5. The method according to claim 4, characterized in that The video playback system further includes a database, wherein the database stores event information collected by the at least one terminal device, and the method further includes: Receiving a first acquisition request sent by the client, where the first acquisition request includes a specified acquisition condition; Sending a second acquisition request to the database, where the second acquisition request includes the specified acquisition condition; Receiving event information of events meeting the specified acquisition condition fed back by the database; The acquired event information is sent to the client, so that the client determines the target event information from the received event information, The target event information includes the target event identifier and the target device identifier.
6. A video storage method, characterized in that: The method is applied to a terminal device included in a video playback system, wherein the video playback system also includes a platform; and the method includes: When an event occurs, an event identifier is assigned to the event, and a linkage recording mark of the event is determined according to a preset linkage recording rule; Assembling the event identifier of the event, the linkage video mark of the event, and the identifier of the terminal device to obtain event information of the event; Sending event information of the event to the platform so that the platform stores the event information of the event; When the linked video mark of the event indicates that the event has linked video, video storage is performed to obtain a video file associated with the event identifier of the event.
7. A video playback system, characterized in that: The system comprises: a client, at least one terminal device and a platform, wherein the terminal device stores an event identifier and a video file associated with the event identifier; The client is used to obtain target event information of the target event from the platform, wherein the target event information includes a target event identifier, a target linkage video mark, and a target device identifier; when the target linkage video mark indicates that the target event has a linkage video, the target event identifier and the target device identifier are sent to the platform; The platform is used to obtain the recording status, start time and end time of the target recording file associated with the target event identifier from the terminal device corresponding to the target device identifier; and send the obtained recording status, start time and end time to the client; The client is further configured to play back the target video file according to the acquired start time and end time when the acquired video status is that the video is successfully recorded.
8. The system according to claim 7, characterized in that The client is specifically configured to send a first acquisition request to the platform, wherein the first acquisition request includes a specified acquisition condition; receive event information of an event that meets the specified acquisition condition fed back by the platform; and determine target event information from the received event information; The platform is also used to obtain event information of events that meet the specified acquisition conditions; and send the obtained event information to the client.
9. The system according to claim 8, characterized in that The system further comprises a database, wherein the event information collected by the at least one terminal device is stored in the database; The platform is specifically used to send a second acquisition request to the database, where the second acquisition request includes a specified acquisition condition; and receive event information of an event that meets the specified acquisition condition and is fed back by the database.
10. The system according to claim 7, characterized in that The platform is specifically used to determine the terminal device corresponding to the target device identifier, send a video acquisition request to the determined terminal device, and the video acquisition request includes the target event identifier; receive the video status, start time and end time of the target video file associated with the target event identifier fed back by the determined terminal device; The determined terminal device is used to obtain the recording status, start time and end time of the target recording file associated with the target event identifier according to the preset stored event identifier and the recording file associated with the event identifier, and feed back the obtained recording status, start time and end time to the platform.
11. The system according to claim 7, characterized in that The client is further configured to output first prompt information when the acquired video status is recording, wherein the first prompt information indicates that the target video file is being recorded; or The client is further configured to output second prompt information when the acquired video status is video recording failure, wherein the second prompt information indicates a reason why the acquisition of the target video file fails.
12. The system according to claim 7, characterized in that The client is specifically used to obtain the target video file from the terminal device according to the obtained start time and end time, and play back the target video file on the video playback interface; The client is further configured to hide the video playback interface when the target linked video mark indicates that the target event is not linked to video.
13. The system according to claim 7, characterized in that The terminal device is further used to assign an event identifier to the event when an event occurs, determine a linkage recording mark of the event according to a preset linkage recording rule, and assemble the event identifier of the event, the linkage recording mark of the event, and the identifier of the terminal device to obtain event information of the event; Sending event information of the event to the platform; when the linked video mark of the event indicates that the event has linked video, executing video storage to obtain a video file associated with the event identifier of the event; The platform is also used to store event information of the event.
14. The system according to claim 13, characterized in that The system also includes a database; The platform is specifically used to send event information of the event to the database; The database is used to store event information of the event.
15. A video playback device, characterized in that: The device is applied to a client included in a video playback system, wherein the video playback system further includes at least one terminal device and a platform, wherein the terminal device stores an event identifier and a video file associated with the event identifier; the device includes: A first acquisition module: used to acquire target event information of a target event from the platform, wherein the target event information includes a target event identifier, a target linkage video tag, and a target device identifier; A first sending module: when the target linkage video mark indicates that the target event has linkage video, sends the target event identifier and the target device identifier to the platform, so that the platform obtains the video status, start time and end time of the target video file associated with the target event identifier from the terminal device corresponding to the target device identifier, and sends the obtained video status, start time and end time to the client; Playback module: when the acquired video status is successful, the target video file is played back according to the acquired start time and end time.
16. The device according to claim 15, characterized in that The device also includes: A first output module: configured to output first prompt information when the acquired video recording status is recording, wherein the first prompt information indicates that the target video file is being recorded; or The second output module is used for outputting second prompt information when the acquired video status is video failure, wherein the second prompt information indicates the reason why the acquisition of the target video file fails.
17. The device according to claim 15, characterized in that The playback module is specifically used to obtain the target video file from the terminal device according to the acquired start time and end time, and play back the target video file on the video playback interface; The device also includes: Hiding module: used for hiding the video playback interface when the target linked video mark indicates that the target event has no linked video.
18. A video playback device, characterized in that: The platform is applied to a video playback system, the video playback system also includes a client and at least one terminal device, wherein the terminal device stores an event identifier and a video file associated with the event identifier; the device includes: A first receiving module: used for receiving a target event identifier and a target device identifier sent by the client; The second acquisition module is used to determine the terminal device corresponding to the target device identifier; send a video acquisition request to the determined terminal device, wherein the video acquisition request includes the target event identifier; receive the video status, start time and end time of the target video file associated with the target event identifier fed back by the determined terminal device; The second sending module is used to send the acquired recording status, start time and end time to the client, so that the client can play back the target recording file according to the acquired start time and end time when the acquired recording status is successful recording.
19. The device according to claim 18, characterized in that The video playback system further includes a database, wherein the database stores event information collected by the at least one terminal device, and the device further includes: A second receiving module: configured to receive a first acquisition request sent by the client, wherein the first acquisition request includes a specified acquisition condition; A third acquisition module: configured to send a second acquisition request to the database, wherein the second acquisition request includes a specified acquisition condition; and receive event information of an event that meets the specified acquisition condition fed back by the database; The third sending module is used to send the acquired event information to the client, so that the client can determine the target event information from the received event information, and the target event information includes the target event identifier and the target device identifier.
20. A video storage device, characterized in that: The terminal device used in the video playback system includes a platform; the device includes: Allocation module: used for allocating an event identifier to the event when the event occurs, and determining the linkage recording mark of the event according to the preset linkage recording rule; Assembling module: used for assembling the event identifier of the event, the linkage recording mark of the event and the identifier of the terminal device to obtain the event information of the event; A fourth sending module: used for sending the event information of the event to the platform, so that the platform stores the event information of the event; Execution module: used for executing video storage to obtain a video file associated with the event identifier of the event when the linked video mark of the event indicates that the event has linked video.
21. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, for implementing the method described in any one of claims 1 to 3, claims 4 to 5, or claim 6 when executing a program stored in a memory.
22. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 3, claims 4 to 5, or claim 6 is implemented.
23. A computer program product, characterized in that When the method is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 3, claims 4 to 5, or claim 6.
Citation Information
Patent Citations
Method, equipment and system for achieving video retrieval
CN103248853A
Video retrieval method and device for video surveillance system
CN109213898A
Event information retrieval and storage method and device
CN112287143A
Video recording retrieval method and device
CN113254702A
Data processing method and device, electronic equipment and storage medium
CN114663089A
Cited By
Storage management method of video surveillance video, electronic equipment and storage medium
CN119520844A
