Video storage and calling method for railway system video monitoring scene
Patent Information
- Application Number
- CN202411356299.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-27
AI Technical Summary
The slow video query and retrieval speed in the railway video surveillance system affects user experience and system efficiency.
Using an index information structure, the index information structure of the video data is constructed through a time stamp, and the continuous video segments are stored, and the query time period is compared with the index information structure is quickly feedback the query results, and the video data is divided into small time period files. For storage and retrieval.
It improves the speed of video query and retrieval, reduces time overhead, and improves user experience and system efficiency.
Smart Images

Figure CN119211463A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video monitoring, and in particular to a method for storing and retrieving video recordings used in a railway system video monitoring scene. Background Art
[0002] The video surveillance system is an important subsystem of the railway system, providing important support for the safe operation and management of the railway. The railway video surveillance system deploys cameras at key monitoring points such as along the railway line, stations, platforms, entrances and exits, waiting halls, etc., and provides real-time viewing, video query, video retrieval, PTZ control and other functions, providing strong support for the dispatching command, safety protection, event backtracking, etc. of the railway system.
[0003] As an important part of the video surveillance system, the video recording function is a frequently used function in the railway system. When tracing back and tracking historical events, the functions of video storage, query and retrieval are used.
[0004] When using the video surveillance system recording function, the main problems encountered are slow video query speed and slow video retrieval speed. How to quickly and efficiently complete video query and video retrieval is particularly important, and it will also improve the user experience. Therefore, it is necessary to make improvements to the existing technology. Summary of the invention
[0005] In view of the above problems, the purpose of the present invention is to provide a video storage and retrieval method for railway system video surveillance scenarios, which can provide a novel and efficient index information structure to construct a mapping relationship between index information and video data. On this basis, the video data is further stored. When querying and retrieving, the query time period is compared with the index information structure, so that the query results can be fed back more quickly and accurately, and the corresponding video data can be quickly presented.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present application provides a method for storing and retrieving video recordings for a railway system video surveillance scenario, the method comprising:
[0008] S1, obtaining video surveillance video data, wherein the video data includes video frames carrying timestamp information;
[0009] S2, constructing an index information structure of the video data according to the continuity of the timestamp information corresponding to the video frames; the index information structure includes at least one time period identification number of the video segments with a sequential relationship, and the timestamps of the start time and the end time of the continuous video segments corresponding to each time period identification number;
[0010] S3, storing the video data of a plurality of continuous video segments according to the order of the time period identification numbers;
[0011] S4, obtaining the query time period information of the video to be queried by the user;
[0012] S5, returning the query result to the user based on the overlap between the query time period information and the start time and the end time of the continuous video segments corresponding to each time period identification number in the index information structure.
[0013] In one implementation, in S2, the continuity of the timestamp information corresponding to the video frames is determined using seconds as the time unit.
[0014] In one implementation, in S3, each continuous video segment is segmented into preset small time periods, and each segmented video data file is stored.
[0015] In one implementation, the preset small time period is 5 seconds.
[0016] In one implementation, the video data file is named according to the timestamp information of the video data file and / or the sequence number of the segmentation result.
[0017] In one implementation, in S4, the query time period information of the video to be queried by the user includes the start time and the end time of the video to be queried.
[0018] In one implementation, in S5,
[0019] If the start time and end time of the video to be queried are not included in the time range of the start time and end time of the continuous video segment corresponding to any time period identification number, the query result is fed back to the user as empty.
[0020] In one implementation, in S5,
[0021] If the start time and the end time of the video to be queried are both included in the time range of the start time and the end time of the same continuous video segment, the query result is fed back to the user as the serial number corresponding to the continuous video segment, and the video data file of the continuous video segment is retrieved.
[0022] In one implementation, in S5,
[0023] If the start time and the end time of the video to be queried are included in the time range of the start time and the end time of two consecutive video segments, the query result is fed back to the user as the serial numbers of all video segments between the two consecutive video segments, and the video data files of these consecutive video segments are retrieved.
[0024] The present invention adopts the above technical solution, proposes a lightweight and simple index information structure and a simple and efficient mapping relationship between index information and video data, which reduces the time cost of video query and improves the speed of video query. Through the simple and efficient mapping relationship between index information and video data, the corresponding video data can be determined more quickly according to the video retrieval time period, thereby improving the speed of video retrieval. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 is a schematic diagram of an index information structure according to an embodiment of the present invention;
[0026] Figure 2 is a schematic diagram of a process of video query according to an embodiment of the present invention;
[0027] Figure 3 is a schematic diagram of the mapping relationship between index information and stored video data files according to an embodiment of the present invention;
[0028] Figure 4 It is a schematic diagram of a video recording retrieval process according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.
[0030] In view of the above problems in the prior art, an embodiment of the present invention provides a method for storing and retrieving video recordings for a railway system video surveillance scene, the method comprising:
[0031] S1, obtaining video surveillance video data, wherein the video data includes video frames carrying timestamp information;
[0032] S2, constructing an index information structure of the video data according to the continuity of the timestamp information corresponding to the video frames; the index information structure includes at least one time period identification number of the video segments with a sequential relationship, and the timestamps of the start time and the end time of the continuous video segments corresponding to each time period identification number;
[0033] S3, storing the video data of a plurality of continuous video segments according to the order of the time period identification numbers;
[0034] S4, obtaining the query time period information of the video to be queried by the user;
[0035] S5, returning the query result to the user based on the overlap between the query time period information and the start time and the end time of the continuous video segments corresponding to each time period identification number in the index information structure.
[0036] The above method is described in a more detailed embodiment below in conjunction with more drawings of the present application.
[0037] The method provided by the present invention consists of a lightweight and simple index information structure and a simple and efficient mapping relationship between the index information and the video data.
[0038] Regarding video query, this method uses a lightweight and simple index information structure. The index information structure is mainly composed of continuous video time periods (in seconds), and the time periods are composed of start time and end time. If the video is interrupted, a new continuous video time period will be added. The start time of the new time period is different from the end time of the previous video segment, which is used to indicate that the video is interrupted in this time period. If the video is not interrupted, a continuous time period will be used to represent it. The index information structure is as follows Figure 1 shown.
[0039] When querying a video, the input query time period (in seconds), including the start time and the end time, is compared with the continuous time period in the index information structure above. If the video query time period does not overlap with the continuous time period in the index information structure, it returns empty, indicating that there is no video in the corresponding video query time period. If the video query time period overlaps with the continuous time period in the index information structure, determine whether the overlapping part is continuous. If the overlapping part is continuous, a continuous time period for recording is returned. If the overlapping part is discontinuous, multiple continuous time periods for recording are returned, and the end time of the previous continuous time period is different from the start time of the next continuous time period, which is used to indicate that the recording was interrupted during this time period. The video query process is as follows: Figure 2 shown.
[0040] Regarding video retrieval, this method uses a simple and efficient mapping relationship between index information and video data for video storage, in order to facilitate video retrieval. The index information is stored according to the above-mentioned index information structure, and is composed of one or more continuous time periods of video recording. For video data, the video data is divided into small video data files according to the time of the video data. The duration of each video data file is fixed at 5 seconds, and 5 seconds of data is stored. The name of each video data file is named: year + month + day + serial number (1 day is divided into 5 seconds, and the serial number represents the order of the current 5 seconds in 1 day). In this way, the mapping relationship between the index information and the video data is established. According to the continuous time period of the video recording, the name of the corresponding video data file can be directly determined. The mapping relationship between the index information and the video data is as follows: Figure 3 shown.
[0041] When retrieving video, the input video retrieval time period (in seconds) is compared with the video continuous time period in the index information structure. If the video retrieval time period does not overlap with the video continuous time period in the index information structure, no video data is returned. If there is an overlap, the video data file is determined based on the overlapping video continuous time period and the mapping relationship between the index information and the video data, and the video data is returned. The video retrieval process is as follows: Figure 4 shown.
[0042] In summary, the present application reduces the time cost of video query and improves the speed of video query due to the light and simple index information structure. Through the simple and efficient mapping relationship between index information and video data, the corresponding video data can be determined more quickly according to the video retrieval time period, thereby improving the speed of video retrieval.
[0043] In the several embodiments provided by the present invention, it should be understood that the disclosed method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0044] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (Processor) to perform some steps of the above-mentioned method of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0045] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A video storage and retrieval method for railway system video surveillance scenes, characterized in that: The method comprises: S1, obtaining video surveillance video data, wherein the video data includes video frames carrying timestamp information; S2, constructing an index information structure of the video data according to the continuity of the timestamp information corresponding to the video frames; the index information structure includes at least one time period identification number of the video segments with a sequential relationship, and the timestamps of the start time and the end time of the continuous video segments corresponding to each time period identification number; S3, storing the video data of a plurality of continuous video segments according to the order of the time period identification numbers; S4, obtaining the query time period information of the video to be queried by the user; S5, returning the query result to the user based on the overlap between the query time period information and the start time and the end time of the continuous video segments corresponding to each time period identification number in the index information structure.
2. The video recording storage and retrieval method for railway system video monitoring scenes according to claim 1 is characterized in that: In S2, the continuity of the timestamp information corresponding to the video frames is determined using seconds as the time unit.
3. The video recording storage and retrieval method for railway system video monitoring scene according to claim 1 is characterized in that: In S3, each continuous video segment is divided into preset small time periods, and each divided video data file is stored.
4. The video recording storage and retrieval method for railway system video monitoring scene according to claim 3 is characterized in that: The preset small time period is 5 seconds.
5. The video recording storage and retrieval method for railway system video monitoring scene according to claim 3 is characterized in that: The video data file is named according to the timestamp information of the video data file and / or the sequence number of the segmentation result.
6. The video recording storage and retrieval method for railway system video monitoring scene according to claim 5 is characterized in that: In S4, the query time period information of the video to be queried by the user includes the start time and the end time of the video to be queried.
7. The video recording storage and retrieval method for railway system video monitoring scenes according to claim 6 is characterized in that: In said S5, If the start time and end time of the video to be queried are not included in the time range of the start time and end time of the continuous video segment corresponding to any time period identification number, the query result is fed back to the user as empty.
8. The video recording storage and retrieval method for railway system video monitoring scenes according to claim 6 is characterized in that: In said S5, If the start time and the end time of the video to be queried are both included in the time range of the start time and the end time of the same continuous video segment, the query result is fed back to the user as the serial number corresponding to the continuous video segment, and the video data file of the continuous video segment is retrieved.
9. The video recording storage and retrieval method for railway system video monitoring scenes according to claim 6, characterized in that: In said S5, If the start time and the end time of the video to be queried are included in the time range of the start time and the end time of two consecutive video segments, the query result is fed back to the user as the serial numbers of all video segments between the two consecutive video segments, and the video data files of these consecutive video segments are retrieved.
