Video data processing method, device, electronic device and storage medium
By constructing a time queue and filtering candidate time intervals, the problem of video loss and storage differences is solved, accurate and timely detection and fault repair of missing video is achieved, and data processing efficiency is improved.
Patent Information
- Application Number
- CN202111619410.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-27
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2041-12-27
AI Technical Summary
In video surveillance systems, recorded videos are lost or saved differently due to network and equipment performance problems, and there is a lack of methods to quickly calculate missing data.
By constructing a time queue, the missing recording time interval is determined, the planned recording data and actual recording data are obtained, candidate time intervals are constructed after sorting, and the missing recording time interval is screened out.
It realizes accurate and timely detection of video missing, provides an effective reference for video missing fault repair, and improves data processing efficiency and fault repair speed.
Smart Images

Figure CN114329066B
Abstract
Description
Technical Field
[0001] The present invention relates to data processing technology, and in particular to a video data processing method, device, electronic equipment and storage medium. Background Art
[0002] Video surveillance has the functions of real-time monitoring and saving recorded videos in security systems. After an incident occurs, the recorded videos by the camera play a very important role in tracing back the entire incident process.
[0003] When tracing back the entire event process based on recorded video, it is often the case that the recorded video does not exist or is lost. To solve the problem of recorded video loss, users will configure recording and video storage plans for each camera according to actual needs, such as 24-hour recording, or set a fixed time range for video recording as needed.
[0004] However, due to various factors such as network and device performance, for example, the network between the IP Camera (IPC) and the Network Video Recorder (NVR) is often disconnected, resulting in a large amount of video not being recorded; or in abnormal circumstances, a camera will generate hundreds or thousands of video clips within the planned time, resulting in a certain difference between the actual video saved and the planned video. There is currently no method to quickly calculate the missing video data. Summary of the invention
[0005] The embodiments of the present invention provide a method, device, electronic device and storage medium for processing video data, which construct candidate time intervals according to a time queue and then determine the time interval of video missing, and can accurately and timely detect video missing, thereby providing an effective reference for troubleshooting video missing.
[0006] In a first aspect, an embodiment of the present invention provides a method for processing video data, comprising:
[0007] Acquire planned recording data and actual recording data of a target recording device, wherein the planned recording data includes a plurality of planned recording time intervals, each of which includes a planned recording start time and a planned recording end time, and the actual recording data includes a plurality of actual recording time intervals, each of which includes an actual recording start time and an actual recording end time;
[0008] Arrange the planned recording start time, planned recording end time included in the multiple planned recording time intervals and the actual recording start time, actual recording end time included in the multiple actual recording time intervals in chronological order to obtain a time queue;
[0009] Sequentially taking two adjacent times from the time queue to construct multiple candidate time intervals;
[0010] A video recording missing time interval of the target video recording device is determined from the multiple candidate time intervals.
[0011] In a second aspect, an embodiment of the present invention provides a video data processing device, the device comprising:
[0012] A data acquisition module, used to acquire planned recording data and actual recording data of a target recording device, wherein the planned recording data includes a plurality of planned recording time intervals, each of which includes a planned recording start time and a planned recording end time, and the actual recording data includes a plurality of actual recording time intervals, each of which includes an actual recording start time and an actual recording end time;
[0013] A time queue determination module is used to sort the planned recording start time, planned recording end time included in the multiple planned recording time intervals and the actual recording start time, actual recording end time included in the multiple actual recording time intervals in chronological order to obtain a time queue;
[0014] A time interval construction module, used to sequentially select two adjacent times from the time queue to construct multiple candidate time intervals;
[0015] The video missing time determination module is used to determine the video missing time interval of the target video recording device from the multiple candidate time intervals.
[0016] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a video data processing method as described in any one of the embodiments of the present invention is implemented.
[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the video data processing method as described in any one of the embodiments of the present invention is implemented.
[0018] In an embodiment of the present invention, by acquiring the planned recording data and the actual recording data of the target recording device, the planned recording data includes a plurality of planned recording time intervals, each of which includes a planned recording start time and a planned recording end time, and the actual recording data includes a plurality of actual recording time intervals, each of which includes an actual recording start time and an actual recording end time; the planned recording start time, the planned recording end time included in the plurality of planned recording time intervals and the actual recording start time and the actual recording end time included in the plurality of actual recording time intervals are sorted in time order to obtain a time queue; two adjacent times are sequentially taken from the time queue to construct a plurality of candidate time intervals; and the recording missing time interval of the target recording device is determined from the plurality of candidate time intervals. In an embodiment of the present invention, by constructing a time queue including the planned recording time and the actual recording time, constructing a candidate time interval according to the time queue, and then determining the recording missing time interval, the recording missing can be accurately and timely discovered, thereby providing an effective reference for troubleshooting the recording missing. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 It is a flowchart of a method for processing video data provided by an embodiment of the present invention;
[0021] Figure 2 is another flowchart of the video data processing method provided by an embodiment of the present invention;
[0022] Figure 3 is a structural schematic diagram of a video data processing device provided by an embodiment of the present invention;
[0023] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0025] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0026] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0027] It should be noted that the concepts such as "first" and "second" mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0028] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.
[0030] In the following embodiments, each embodiment provides both optional features and examples. The various features recorded in the embodiments can be combined to form multiple optional solutions. Each numbered embodiment should not be regarded as only one technical solution.
[0031] The following describes a method for processing video data provided by an embodiment of the present invention. Figure 1 The present invention provides a flowchart of a video data processing method. The method can be executed by a video data processing device provided by an embodiment of the present invention. The device can be implemented in software and / or hardware. In a specific embodiment, the device can be integrated into an electronic device, such as a computer or a server. The following embodiments will be described by taking the device integrated into an electronic device as an example. Figure 1 , the method may specifically include the following steps:
[0032] S101. Acquire the planned recording data and actual recording data of the target recording device, wherein the planned recording data includes a plurality of planned recording time intervals, each of which includes a planned recording start time and a planned recording end time, and the actual recording data includes a plurality of actual recording time intervals, each of which includes an actual recording start time and an actual recording end time.
[0033] Among them, the target recording device can be understood as a designated recording device for recording video at a designated location, such as an IPC; the planned recording data may include the recording time data of the target recording device within the planned recording time; the actual recording data may include the recording time data of the target recording device within the actual recording time; the planned recording time interval can be understood as the planned recording time range; the actual recording time interval can be understood as the actual recording time range, for example, the planned recording time interval can be 8:00-10:00, that is, the planned recording start time is 8:00 and the planned recording end time is 10:00; the actual recording time interval can be 9:00-10:00, that is, the actual recording start time is 9:00 and the actual recording end time is 10:00.
[0034] Specifically, the planned recording data and the actual recording data of the target recording device can be obtained through the NVR.
[0035] Exemplarily, the planned recording data and actual recording data of the target recording device are obtained through the NVR, and the multiple planned recording time intervals in the planned recording data can be respectively: 8:00-10:00, 11:00-13:00 and 14:00-15:00; the planned recording start times in the above multiple planned recording time intervals are respectively: 8:00, 11:00 and 14:00, and the planned recording end times are respectively: 10:00, 13:00 and 15:00; the multiple actual recording time intervals in the actual recording data are respectively: 9:00-10:00, 12:00-13:00 and 14:00-15:00; the actual recording start times in the above multiple actual recording time intervals are respectively: 9:00, 12:00 and 14:00, and the actual recording end times are respectively: 10:00, 13:00 and 15:00.
[0036] S102: sort the planned recording start time and the planned recording end time included in the multiple planned recording time intervals and the actual recording start time and the actual recording end time included in the multiple actual recording time intervals in chronological order to obtain a time queue.
[0037] The time queue can be understood as a sequential queue of start time and end time of different types (planned and actual) of recording time intervals.
[0038] Exemplarily, continuing with the above example, the planned recording start time and planned recording end time included in multiple planned recording time intervals and the actual recording start time and actual recording end time included in multiple actual recording time intervals are sorted in chronological order to obtain a time queue: 8:00, 9:00, 10:00, 10:00, 11:00, 12:00, 13:00, 13:00, 14:00, 14:00, 15:00 and 15:00.
[0039] S103 , sequentially taking two adjacent times from the time queue to construct a plurality of candidate time intervals.
[0040] Specifically, multiple times in the time queue may be grouped in pairs according to adjacent times, and multiple candidate time intervals may be determined from the time queue in sequence.
[0041] Exemplarily, continuing the above example, two adjacent times are taken from the time queue in sequence to construct multiple candidate time intervals: 8:00-9:00, 10:00-10:00, 11:00-12:00, 13:00-13:00, 14:00-14:00 and 15:00-15:00.
[0042] S104: Determine a video recording missing time interval of the target video recording device from a plurality of candidate time intervals.
[0043] The video missing time interval may be understood as a time interval during which the target video recording device does not perform video recording.
[0044] Specifically, a time length restriction of the candidate time interval may be set, and a candidate time interval satisfying the time length restriction may be screened out from multiple candidate time intervals, and the screened out candidate time interval may be determined as the recording missing time interval of the target recording device.
[0045] Exemplarily, continuing with the above example, assuming that the time interval length is limited to more than 1 minute, the candidate time intervals retained after screening are: 8:00-9:00 and 11:00-12:00. The two candidate time intervals (8:00-9:00 and 11:00-12:00) are determined as the recording missing time intervals of the target recording device.
[0046] In the embodiment of the present invention, by constructing a time queue including the planned recording time and the actual recording time, constructing a candidate time interval according to the time queue, and then determining the time interval of missing recording, the missing recording can be accurately and timely discovered, thereby providing an effective reference for troubleshooting the missing recording.
[0047] In some embodiments, the planned recording start time, planned recording end time included in multiple planned recording time intervals and the actual recording start time, actual recording end time included in multiple actual recording time intervals are sorted in chronological order to obtain a time queue, including: converting the planned recording start time, planned recording end time included in multiple planned recording time intervals and the actual recording start time, actual recording end time included in multiple actual recording time intervals into time values; sorting the time values to obtain a time queue.
[0048] The time value can be understood as a timestamp, which refers to the total number of seconds from 00:00:00 Greenwich time on January 1, 1970 (08:00:00 Beijing time on January 1, 1970) to the present.
[0049] Specifically, the specific time can be converted into the corresponding time value through the timestamp conversion tool.
[0050] For example, for example, Beijing time December 16, 2021 8:42:30 (2021-12-16 8:42:30), this time can be converted into an integer value 1639615350 by the timestamp conversion tool. Multiple times can also be converted into corresponding time values by the timestamp conversion tool, and then the time values are sorted in ascending order to obtain a time queue.
[0051] In an embodiment of the present invention, by converting a planned recording start time, a planned recording end time included in a plurality of planned recording time intervals and an actual recording start time, an actual recording end time included in a plurality of actual recording time intervals into time values; and sorting the time values to obtain a time queue, the processing speed of the recording data can be improved, thereby improving the processing efficiency of the recording data processing method.
[0052] The following further describes the video data processing method provided by the embodiment of the present invention. Figure 2 This is another flow chart of the video data processing method provided by an embodiment of the present invention. The method of this embodiment further optimizes the above-mentioned step of sequentially taking two adjacent times from the time queue to construct multiple candidate time intervals. The specific optimization includes the following steps:
[0053] S201. Each of the multiple candidate time intervals has a left endpoint and a right endpoint. The candidate time intervals having the same left endpoint and right endpoint are removed from the multiple candidate time intervals to obtain a suspected time interval.
[0054] The left endpoint can be understood as the first time point of each candidate time interval, and the right endpoint can be understood as the last time point of each candidate time interval.
[0055] Exemplarily, continuing with the above example, taking the two candidate time intervals 8:00-9:00 and 10:00-10:00 as examples, the left endpoints are 8:00 and 10:00 respectively, and the right endpoints are 9:00 and 10:00 respectively. It can be determined that the candidate time interval with the same left endpoint and right endpoint is 10:00-10:00, and 10:00-10:00 can be deleted from the two candidate time intervals; similarly, by removing the candidate time intervals with the same left endpoint and right endpoint from the above multiple candidate time intervals, the suspected time intervals can be obtained: 8:00-9:00 and 11:00-12:00.
[0056] S202: Determine a target time interval from the suspected time intervals.
[0057] Specifically, a suspected time interval that meets one of the following conditions in the suspected time interval is determined as a target time interval:
[0058] The left endpoint and the right endpoint are both from the planned recording time interval, and the left endpoint belongs to the planned recording start time, and the right endpoint belongs to the planned recording end time;
[0059] The left endpoint is from the planned recording time interval, and the right endpoint is from the actual recording time interval. The left endpoint belongs to the planned recording start time, and the right endpoint belongs to the actual recording start time.
[0060] The left endpoint is from the actual recording time interval, the right endpoint is from the planned recording time interval, and the left endpoint belongs to the actual recording end time, and the right endpoint belongs to the planned recording end time;
[0061] The left endpoint and the right endpoint are both from the actual recording time interval, and the left endpoint belongs to the actual recording end time, and the right endpoint belongs to the actual recording start time.
[0062] In the embodiment of the present invention, by satisfying the restriction of the target time interval condition, the speed of determining the target time interval can be increased, thereby improving the data processing efficiency of the video data mathematical method.
[0063] Exemplarily, continuing with the above example, in the suspected time interval of 8:00-9:00, the left endpoint is 8:00, which belongs to the planned recording start time; the right endpoint is 9:00, which belongs to the actual recording start time. By comparing with the above conditions one by one, it can be determined that the suspected time interval of 8:00-9:00 satisfies the conditions that the left endpoint is from the planned recording time interval, the right endpoint is from the actual recording time interval, and the left endpoint belongs to the planned recording start time, and the right endpoint belongs to the actual recording start time. Then the suspected time interval 8:00-9:00 is determined as the target time interval; the suspected time interval 11:00-12:00 can be determined as the target time interval through the same method of determining the target time interval.
[0064] In an embodiment of the present invention, each of the multiple candidate time intervals has a left endpoint and a right endpoint, and the candidate time intervals with the same left endpoint and right endpoint are removed from the multiple candidate time intervals to obtain suspected time intervals. The target time interval is determined from the suspected time intervals, thereby improving the candidate time interval data processing efficiency of the video data processing method.
[0065] S203: Determine the duration of the target time interval.
[0066] Specifically, the duration of the target time interval may be determined by calculating the time length between the first time point and the last time point of the target time interval.
[0067] Exemplarily, the first time point of the target time interval 8:00-9:00 is 8:00, and the last time point is 9:00, then the duration of the target time interval 8:00-9:00 is 60 minutes; the first time point of the target time interval 11:00-12:00 is 11:00, and the last time point is 12:00, then the duration of the target time interval 8:00-9:00 is also 60 minutes.
[0068] Optionally, the duration of the target time interval may be determined by first converting the first time point and the last time point of the target time interval into corresponding time values, and then determining the duration of the target time interval by calculating the difference between the time values of the first time point and the last time point of the target time interval.
[0069] S204, determine whether the target time interval duration exceeds the interval duration tolerance threshold; if the target time interval duration does not exceed the interval duration tolerance threshold, execute S205; if the target time interval duration exceeds the interval duration tolerance threshold, execute S206.
[0070] The interval time tolerance threshold may be understood as a specific time length value, such as 2 seconds.
[0071] S205: Determine that the target time interval is a non-video missing time interval.
[0072] Specifically, by comparing the duration of the target time interval with the interval duration tolerance threshold, the target time interval that does not exceed the interval duration tolerance threshold is determined as the non-video missing time interval.
[0073] S206: Determine the target time interval whose duration exceeds the interval duration tolerance threshold as the video recording missing time interval.
[0074] Specifically, by comparing the duration of the target time interval with the interval duration tolerance threshold, the target time interval exceeding the interval duration tolerance threshold can be determined as the video recording missing time interval.
[0075] Exemplarily, the duration of the target time interval 8:00-9:00 is 60 minutes, and 60 minutes exceeds the interval length tolerance threshold of 2 seconds, so the target time interval 8:00-9:00 can be determined as the video missing time interval; the duration of the target time interval 11:00-12:00 is 60 minutes, and 60 minutes exceeds the interval length tolerance threshold of 1 minute, so the target time interval 11:00-12:00 can also be determined as the video missing time interval.
[0076] In an embodiment of the present invention, by determining the duration of the target time interval, the target time interval whose duration exceeds the interval duration tolerance threshold is determined as the video missing time interval, which provides a limitation on the determination conditions for determining the video missing time interval and can improve the accuracy of determining the video missing time interval.
[0077] S207: Determine the cumulative duration of missing video based on the duration of the missing video time interval.
[0078] The cumulative duration of missing video recordings may be understood as the cumulative total duration of multiple missing video recording time intervals.
[0079] Specifically, the cumulative duration of missing video in a time interval with missing video can be determined by calculating the time length between the first time point and the last time point of the time interval with missing video; the actual cumulative duration of video in multiple time intervals with missing video can be determined by calculating the time length between the first time point and the last time point of each time interval with missing video; the cumulative duration of each time interval with missing video can be added up to determine the cumulative duration of missing video in multiple time intervals with missing video.
[0080] Exemplarily, by calculating the time length between the first time point and the last time point of the video missing time interval 8:00-9:00, it can be determined that the cumulative duration of the first video missing time interval 8:00-9:00 is 60 minutes; by calculating the time length between the first time point and the last time point of the video missing time interval 11:00-12:00, it can be determined that the cumulative duration of the second video missing time interval 11:00-12:00 is 60 minutes, and the cumulative total durations of the two video missing time intervals are added up to determine that the cumulative duration of video missing in the two video missing time intervals (8:00-9:00 and 11:00-12:00) is 120 minutes.
[0081] S208, determine whether the cumulative duration of video missing exceeds the cumulative duration tolerance threshold; if the target time interval duration does not exceed the cumulative duration tolerance threshold, execute S209; if the target time interval duration exceeds the interval duration tolerance threshold, execute S210.
[0082] The cumulative duration tolerance threshold may be understood as a time limit for the cumulative duration of video missing, for example, 1 minute.
[0083] S209: Determine that the video missing time interval is a normal video missing phenomenon.
[0084] Specifically, if the duration of the target time interval does not exceed the cumulative duration tolerance threshold, it can be determined that the video missing time interval is a normal video missing phenomenon.
[0085] S210: Generate video missing alarm information of the target video recording device.
[0086] Specifically, if the duration of the target time interval exceeds the cumulative duration tolerance threshold, a video recording missing alarm message of the target video recording device may be generated.
[0087] Exemplarily, continuing the above example, the cumulative duration of video missing in the two video missing time intervals 8:00-9:00 and 11:00-12:00 is 120 minutes, which far exceeds the cumulative duration tolerance threshold of 1 minute, and it is necessary to generate video missing alarm information for the target video device.
[0088] In an embodiment of the present invention, the cumulative duration of video missing is determined based on the duration of the video missing time interval; when the cumulative duration of video missing exceeds the cumulative duration tolerance threshold, video missing alarm information of the target video recording device is generated. Based on the determination of whether the cumulative duration of video missing exceeds the cumulative duration tolerance threshold, the video missing alarm information of the target video recording device can be generated, thereby improving the speed of generating the video missing alarm information of the target video recording device, thereby also improving the video missing time interval data processing efficiency of the video data processing method.
[0089] S211. Sending video missing alarm information to the management terminal, where the video missing alarm information includes at least one of the identification information of the target video recording device, the accumulated duration of video missing, and the time interval of video missing.
[0090] The identification information of the video recording device may be understood as information for identifying the video recording device, such as the name, number, serial number, etc. of the video recording device.
[0091] Specifically, the identification information of the target video recording device may be obtained through the NVR.
[0092] Exemplarily, a missing video alarm message is sent to the management terminal, and the missing video alarm message includes at least one of the identification information of the target video device obtained through the NVR, the cumulative duration of missing video (120 minutes), and the missing video time interval (8:00-9:00 and 11:00-12:00).
[0093] In an embodiment of the present invention, by sending a missing video recording alarm message to a management terminal, the missing video recording alarm message includes identification information of a target video recording device, cumulative duration of missing video recording, and at least one of a missing video recording time interval. This allows a user to promptly and quickly repair fault problems that cause missing video recordings based on the information content in the missing video recording warning message, and also improves the data processing speed of a video recording data processing method.
[0094] In the embodiment of the present invention, each of the multiple candidate time intervals has a left endpoint and a right endpoint, and the candidate time intervals with the same left endpoint and right endpoint are removed from the multiple candidate time intervals to obtain a suspected time interval, and a target time interval is determined from the suspected time interval; the duration of the target time interval is determined, and it is determined whether the duration of the target time interval exceeds a tolerance threshold of the interval duration; if the duration of the target time interval does not exceed the tolerance threshold of the interval duration, the target time interval is determined to be a non-video missing time interval; if the duration of the target time interval exceeds the tolerance threshold of the interval duration, the target time interval is determined to be a non-video missing time interval; if the duration of the target time interval exceeds the tolerance threshold of the interval duration, the target time interval whose duration exceeds the tolerance threshold of the interval duration is The time interval is determined as a video missing time interval; the cumulative duration of video missing is determined based on the duration of the video missing time interval; whether the cumulative duration of video missing exceeds the cumulative duration tolerance threshold is determined; if the target time interval duration does not exceed the cumulative duration tolerance threshold, the video missing time interval is determined to be a normal video missing phenomenon; if the target time interval duration exceeds the interval duration tolerance threshold, video missing alarm information of the target video recording device is generated, and the video missing alarm information is sent to the management terminal, and the video missing alarm information includes the identification information of the target video recording device, the cumulative duration of video missing, and at least one of the video missing time interval. That is, in the embodiment of the present invention, a time queue is determined by planning the video recording time interval, a candidate time interval is constructed according to the time queue, and then the video missing time interval is determined, the video missing alarm information of the target video recording device is generated, and the video missing alarm information is sent to the management terminal, so that the user can accurately and timely discover the video missing, thereby providing an effective reference for the fault repair of the video missing.
[0095] Figure 3 FIG. 1 is a schematic diagram of a structure of a video data processing device provided by an embodiment of the present invention. The device is suitable for executing the video data processing method provided by an embodiment of the present invention. Figure 3 As shown, the device may specifically include:
[0096] The data acquisition module 301 is used to acquire the planned recording data and the actual recording data of the target recording device, wherein the planned recording data includes a plurality of planned recording time intervals, each of which includes a planned recording start time and a planned recording end time, and the actual recording data includes a plurality of actual recording time intervals, each of which includes an actual recording start time and an actual recording end time;
[0097] The time queue determination module 302 is used to sort the planned recording start time and the planned recording end time included in the multiple planned recording time intervals and the actual recording start time and the actual recording end time included in the multiple actual recording time intervals in chronological order to obtain a time queue;
[0098] A time interval construction module 303 is used to sequentially select two adjacent times from the time queue to construct multiple candidate time intervals;
[0099] The video missing time determination module 304 is used to determine the video missing time interval of the target video recording device from the multiple candidate time intervals.
[0100] Optionally, each of the multiple candidate time intervals has a left endpoint and a right endpoint;
[0101] Furthermore, the device also includes a suspected time interval determination module, which is used to:
[0102] Remove the candidate time intervals with the same left and right endpoints from the multiple candidate time intervals to obtain the suspected time interval;
[0103] Furthermore, the video missing time determination module 304 is specifically used for:
[0104] Determine a target time interval from the suspected time intervals;
[0105] The video recording missing time interval of the target video recording device is determined from the target time interval.
[0106] Optionally, the video missing time determination module 304 determines a target time interval from the suspected time interval, including:
[0107] The suspected time interval that satisfies one of the following conditions in the suspected time interval is determined as the target time interval:
[0108] The left endpoint and the right endpoint are both from the planned recording time interval, and the left endpoint belongs to the planned recording start time, and the right endpoint belongs to the planned recording end time;
[0109] The left endpoint is from the planned recording time interval, and the right endpoint is from the actual recording time interval. The left endpoint belongs to the planned recording start time, and the right endpoint belongs to the actual recording start time.
[0110] The left endpoint is from the actual recording time interval, the right endpoint is from the planned recording time interval, and the left endpoint belongs to the actual recording end time, and the right endpoint belongs to the planned recording end time;
[0111] The left endpoint and the right endpoint are both from the actual recording time interval, and the left endpoint belongs to the actual recording end time, and the right endpoint belongs to the actual recording start time.
[0112] Optionally, the video missing time determination module 304 determines the video missing time interval of the target video recording device from the target time interval, including:
[0113] Determining the duration of the target time interval;
[0114] The target time interval whose duration exceeds the interval duration tolerance threshold is determined as the video recording missing time interval.
[0115] Optionally, the device further includes an alarm information generating module, which is used to:
[0116] Determine the cumulative duration of video missing based on the duration of the video missing time interval;
[0117] When the accumulated duration of the video recording loss exceeds the accumulated duration tolerance threshold, video recording loss alarm information of the target video recording device is generated.
[0118] Optionally, the device further includes an alarm module, which is used to:
[0119] The video missing alarm information is sent to the management terminal, wherein the video missing alarm information includes at least one of the identification information of the target video recording device, the accumulated duration of the video missing, and the video missing time interval.
[0120] Optionally, the data acquisition module 301 is specifically used for:
[0121] Converting the planned recording start time, the planned recording end time and the actual recording start time and the actual recording end time included in the multiple planned recording time intervals into time values;
[0122] The time values are sorted to obtain the time queue.
[0123] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0124] The device of the embodiment of the present invention can accurately and timely detect video missing by constructing a time queue including the planned recording time and the actual recording time, constructing a candidate time interval based on the time queue, and then determining the time interval of video missing, thereby providing an effective reference for repairing the fault of video missing.
[0125] An embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the video data processing method provided in any of the above embodiments is implemented.
[0126] An embodiment of the present invention further provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the video data processing method provided by any of the above embodiments is implemented.
[0127] Reference below Figure 4 , which shows a schematic diagram of the structure of an electronic device 400 suitable for implementing an embodiment of the present invention. The electronic device in the embodiment of the present invention may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0128] like Figure 4 As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0129] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0130] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a non-transient computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication device 409, or installed from a storage device 408, or installed from a ROM 402. When the computer program is executed by the processing device 401, the above functions defined in the method of the embodiment of the present invention are executed. It should be noted that the computer-readable medium shown in the present invention can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more conductors, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device, or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, device, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0131] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0132] The modules and / or units involved in the embodiments of the present invention may be implemented by software or hardware. The modules and / or units described may also be set in a processor, for example, it may be described as: a processor includes a data acquisition module, a time queue determination module, a time interval construction module, and a video missing time determination module. The names of these modules do not, in some cases, constitute limitations on the modules themselves.
[0133] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: obtaining the planned recording data and actual recording data of the target recording device, the planned recording data includes multiple planned recording time intervals, each planned recording time interval includes a planned recording start time and a planned recording end time, and the actual recording data includes multiple actual recording time intervals, each actual recording time interval includes an actual recording start time and an actual recording end time; sorting the planned recording start time, planned recording end time included in the multiple planned recording time intervals and the actual recording start time and actual recording end time included in the multiple actual recording time intervals in time order to obtain a time queue; sequentially taking two adjacent times from the time queue to construct multiple candidate time intervals; and determining the recording missing time interval of the target recording device from the multiple candidate time intervals.
[0134] According to the technical solution of the embodiment of the present invention, by obtaining the planned recording data and the actual recording data of the target recording device, the planned recording data includes multiple planned recording time intervals, each of which includes the planned recording start time and the planned recording end time, and the actual recording data includes multiple actual recording time intervals, each of which includes the actual recording start time and the actual recording end time; the planned recording start time, planned recording end time included in the multiple planned recording time intervals and the actual recording start time and actual recording end time included in the multiple actual recording time intervals are sorted in time order to obtain a time queue; two adjacent times are taken from the time queue in turn to construct multiple candidate time intervals; and the recording missing time interval of the target recording device is determined from the multiple candidate time intervals. In the embodiment of the present invention, by constructing a time queue including the planned recording time and the actual recording time, constructing the candidate time interval according to the time queue, and then determining the recording missing time interval, the recording missing can be accurately and timely discovered, thereby providing an effective reference for the fault repair of the recording missing.
[0135] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A video data processing method, characterized in that: include: Acquire planned recording data and actual recording data of a target recording device, wherein the planned recording data includes a plurality of planned recording time intervals, each of which includes a planned recording start time and a planned recording end time, and the actual recording data includes a plurality of actual recording time intervals, each of which includes an actual recording start time and an actual recording end time; Arrange the planned recording start time, planned recording end time included in the multiple planned recording time intervals and the actual recording start time, actual recording end time included in the multiple actual recording time intervals in chronological order to obtain a time queue; Sequentially taking two adjacent times from the time queue to construct multiple candidate time intervals; Determine a video missing time interval of the target video recording device from the multiple candidate time intervals; Each of the multiple candidate time intervals has a left endpoint and a right endpoint, and after sequentially taking two adjacent times from the time queue to construct multiple candidate time intervals, the method further includes: Remove the candidate time intervals having the same left and right endpoints from the multiple candidate time intervals to obtain a suspected time interval; The step of determining the video missing time interval of the target video recording device from the multiple candidate time intervals includes: Determine a target time interval from the suspected time intervals; Determine the video missing time interval of the target video recording device from the target time interval; The step of determining the target time interval from the suspected time interval includes: The suspected time interval that satisfies one of the following conditions in the suspected time interval is determined as the target time interval: The left endpoint and the right endpoint are both from the planned recording time interval, and the left endpoint belongs to the planned recording start time, and the right endpoint belongs to the planned recording end time; The left endpoint is from the planned recording time interval, the right endpoint is from the actual recording time interval, and the left endpoint belongs to the planned recording start time, and the right endpoint belongs to the actual recording start time; The left endpoint is from the actual recording time interval, the right endpoint is from the planned recording time interval, and the left endpoint belongs to the actual recording end time, and the right endpoint belongs to the planned recording end time; The left endpoint and the right endpoint are both from the actual recording time interval, and the left endpoint belongs to the actual recording end time, and the right endpoint belongs to the actual recording start time; The step of sorting the planned recording start time and the planned recording end time included in the multiple planned recording time intervals and the actual recording start time and the actual recording end time included in the multiple actual recording time intervals in chronological order to obtain a time queue includes: Convert the planned recording start time, planned recording end time included in the multiple planned recording time intervals and the actual recording start time, actual recording end time included in the multiple actual recording time intervals into a time value; wherein the time value is a timestamp, and the timestamp refers to the total number of seconds from 00:00:00 on January 1, 1970, Greenwich Mean Time to the present; The time values are sorted to obtain the time queue.
2. The method according to claim 1, characterized in that The step of determining the video missing time interval of the target video recording device from the target time interval includes: Determining the duration of the target time interval; The target time interval whose duration exceeds the interval duration tolerance threshold is determined as the video recording missing time interval.
3. The method according to claim 2, characterized in that The method further comprises: Determine the cumulative duration of video missing based on the duration of the video missing time interval; When the accumulated duration of the video recording loss exceeds the accumulated duration tolerance threshold, video recording loss alarm information of the target video recording device is generated.
4. The method according to claim 3, characterized in that The method further comprises: The video missing alarm information is sent to the management terminal, wherein the video missing alarm information includes at least one of the identification information of the target video recording device, the accumulated duration of the video missing, and the video missing time interval.
5. A video data processing device, characterized in that: include: A data acquisition module, used to acquire the planned recording data and actual recording data of the target recording device, wherein the planned recording data includes a plurality of planned recording time intervals, each of which includes a planned recording start time and a planned recording end time, and the actual recording data includes a plurality of actual recording time intervals, each of which includes an actual recording start time and an actual recording end time; A time queue determination module is used to sort the planned recording start time, planned recording end time included in the multiple planned recording time intervals and the actual recording start time, actual recording end time included in the multiple actual recording time intervals in chronological order to obtain a time queue; A time interval construction module, used to sequentially select two adjacent times from the time queue to construct multiple candidate time intervals; A video missing time determination module, used to determine the video missing time interval of the target video recording device from the multiple candidate time intervals; A suspected time interval determination module, configured to remove candidate time intervals having the same left and right endpoints from the plurality of candidate time intervals to obtain a suspected time interval; The video missing time determination module is specifically used to determine a target time interval from the suspected time interval; and determine the video missing time interval of the target video recording device from the target time interval; Among them, the video missing time determination module is specifically used to determine the target time interval from the suspected time interval, that is, to determine the suspected time interval that meets one of the following conditions in the suspected time interval as the target time interval: the left endpoint and the right endpoint are both from the planned video recording time interval, and the left endpoint belongs to the planned video recording start time, and the right endpoint belongs to the planned video recording end time; the left endpoint is from the planned video recording time interval, and the right endpoint is from the actual video recording time interval, and the left endpoint belongs to the planned video recording start time, and the right endpoint belongs to the actual video recording start time; the left endpoint is from the actual video recording time interval, and the right endpoint is from the planned video recording time interval, and the left endpoint belongs to the actual video recording end time, and the right endpoint belongs to the planned video recording end time; the left endpoint and the right endpoint are both from the actual video recording time interval, and the left endpoint belongs to the actual video recording end time, and the right endpoint belongs to the actual video recording start time; Among them, the data acquisition module is specifically used to convert the planned recording start time, planned recording end time included in the multiple planned recording time intervals and the actual recording start time, actual recording end time included in the multiple actual recording time intervals into time values; wherein, the time value is a timestamp, and the timestamp refers to the total number of seconds from 00:00:00 Greenwich time on January 1, 1970 to the present; the time values are sorted to obtain the time queue.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the video data processing method as described in any one of claims 1 to 4 is implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the video data processing method as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Data processing method and device
CN110019932A
Storage integrity detection method and device and computer equipment
CN110662027A
Video integrity detection method and device, computer equipment and readable storage medium
CN110798678A
Video integrity determination method and device and readable storage medium
CN112752100A
Method and device for detecting time period overlap
CN112860762A
