CN110971978B - Video playing method and device - Google Patents

Video playing method and device Download PDF

Info

Publication number
CN110971978B
CN110971978B CN201811140687.3A CN201811140687A CN110971978B CN 110971978 B CN110971978 B CN 110971978B CN 201811140687 A CN201811140687 A CN 201811140687A CN 110971978 B CN110971978 B CN 110971978B
Authority
CN
China
Prior art keywords
index
index number
time
video
point corresponding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811140687.3A
Other languages
Chinese (zh)
Other versions
CN110971978A (en
Inventor
吴佐华
丁强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201811140687.3A priority Critical patent/CN110971978B/en
Publication of CN110971978A publication Critical patent/CN110971978A/en
Application granted granted Critical
Publication of CN110971978B publication Critical patent/CN110971978B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47217End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for controlling playback functions for recorded or on-demand content, e.g. using progress bars, mode or play-point indicators or bookmarks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/432Content retrieval operation from a local storage medium, e.g. hard-disk
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8455Structuring of content, e.g. decomposing content into time segments involving pointers to the content, e.g. pointers to the I-frames of the video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/91Television signal processing therefor
    • H04N5/93Regeneration of the television signal or of selected parts thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Indexing, Searching, Synchronizing, And The Amount Of Synchronization Travel Of Record Carriers (AREA)
  • Television Signal Processing For Recording (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of video playing, in particular to a video playing method and a video playing device, wherein the method comprises the following steps of; the method comprises the steps of obtaining time hopping information according to index numbers in video indexes and corresponding time, receiving video playback information which comprises starting time and ending time and is input by a user, splitting the video indexes based on the time hopping information, searching a segment index corresponding to the starting time and a segment index corresponding to the ending time, obtaining a target starting segment index which is selected by the user from the segment indexes corresponding to the starting time, starting playing from a video data unit corresponding to the starting time in the target starting segment index in the video record, and stopping playing when the video data unit corresponding to the ending time is played. By the method, effective and reliable retrieval and playback of the video are realized, and the problem that video recording cannot be retrieved when the video is retrieved and played back in the prior art is effectively solved.

Description

Video playing method and device
Technical Field
The invention relates to the technical field of video playing, in particular to a video playing method and device.
Background
At present, the monitoring industry usually adds time information to the naming or recording of the video for retrieval and playback, and the retrieval and playback of the video is usually performed by a bisection method.
The inventor finds that due to artificial error modification or abnormal time synchronization source, time jump can be generated, so that additional time information of the stored video is abnormal, and further retrieval and playback are abnormal. Therefore, it is an urgent technical problem to provide a video playing method capable of effectively avoiding the retrieval and playback abnormality.
Disclosure of Invention
In view of the above, the present invention provides a video playing method and apparatus to effectively alleviate the above technical problems.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
a video playing method is applied to video playing equipment, the video playing equipment is used for playing video records stored in storage equipment, the storage equipment also stores a video record index, and the method comprises the following steps:
obtaining time hopping information according to a plurality of index numbers and time points corresponding to the index numbers in the video index, wherein the video index comprises a plurality of video data units, and each index number corresponds to one video data unit;
acquiring video playback information including a start time and an end time;
splitting the video index according to the time hopping information to obtain at least two segment indexes, and retrieving each segment index according to the starting time and the ending time to obtain the segment index corresponding to the starting time and the segment index corresponding to the ending time;
when the segment index corresponding to the starting time is larger than 1, prompting a user to select a target starting segment index from all segment indexes corresponding to the starting time;
and according to the target starting segmented index selected by the user, starting playing from a video data unit corresponding to the starting time in the target starting segmented index in the video record, and stopping playing when the video data unit corresponding to the ending time is played.
Optionally, in the video playing method, the step of obtaining the time jump information according to the multiple index numbers included in the video index and the time points corresponding to the index numbers includes:
acquiring an index number from the index numbers as a current index number, and comparing a time point corresponding to the current index number with a time point corresponding to a next index number adjacent to the current index number;
and if the time point corresponding to the next index number is smaller than the time point corresponding to the current index number, obtaining time jump information, wherein the time jump information comprises the current index number, the time point corresponding to the current index number and the time point corresponding to the next index number and the next index number.
Optionally, in the video playing method, the step of splitting the video index according to the time hopping information to obtain at least two segment indexes includes:
and splitting the video index according to the current index number and the time point corresponding to the next index number and the next index number included in the time hopping information, so that the current index number and the next index number are located in different segment indexes.
Optionally, in the video playing method, after performing the step of obtaining an index number from the plurality of index numbers as a current index number and comparing a time point corresponding to the current index number with a time point corresponding to a next index number adjacent to the current index number, the method further includes:
and if the time point corresponding to the next index number is larger than the time point corresponding to the current index number, taking the next index number as a new current index number, and returning to execute the step of comparing the time point corresponding to the current index number with the time point corresponding to the next index number adjacent to the current index number until the next index number is the last index number in the video index.
Optionally, in the video playing method, after the step of writing the time jump information into the video index is performed if the time point corresponding to the next index number is smaller than the time point corresponding to the current index number, the method further includes:
and if the time point corresponding to the next index number is larger than the time point corresponding to the current index number, taking the next index number as a new current index number, and returning to execute the step of comparing the time point corresponding to the current index number with the time point corresponding to the next index number adjacent to the current index number until the next index number is the last index number in the video index.
Optionally, in the video playing method, the step of obtaining an index number from the plurality of index numbers as the current index number includes:
acquiring a marked index number from the index numbers as a current index number; or
And acquiring the index number with the minimum sorting sequence from the index numbers as the current index number.
A video playing device is applied to video playing equipment, the video playing equipment is used for playing video records stored in storage equipment, the storage equipment also stores a record index, and the device comprises:
the jump information obtaining module is used for obtaining time jump information according to a plurality of index numbers and time points corresponding to the index numbers in the video index, wherein the video index comprises a plurality of video data units, and each index number corresponds to one video data unit;
a playback information obtaining module for obtaining video playback information including a start time and an end time;
the retrieval module is used for splitting the video index according to the time hopping information to obtain at least two segment indexes, and retrieving each segment index according to the starting time and the ending time to obtain the segment index corresponding to the starting time and the segment index corresponding to the ending time;
the prompting module is used for prompting a user to select a target starting segmented index from all segmented indexes corresponding to the starting time when the segmented index corresponding to the starting time is larger than 1;
and the playing module is used for starting playing from a video data unit corresponding to the starting time in the target starting segment index in the video record according to the target starting segment index selected by the user and stopping playing when the video data unit corresponding to the ending time is played.
Optionally, in the video playing apparatus, the information obtaining module includes:
the comparison submodule is used for acquiring an index number from the index numbers as a current index number and comparing a time point corresponding to the current index number with a time point corresponding to a next index number adjacent to the current index number;
and a jump information obtaining submodule, configured to obtain time jump information when a time point corresponding to the next index number is smaller than a time point corresponding to the current index number, where the time jump information includes the time points corresponding to the current index number and the time points corresponding to the next index number and the next index number.
Optionally, in the video playing apparatus, the retrieving module is further configured to split the video index according to a current index number and a time point corresponding to the current index number included in the time hopping information, and according to a next index number and a time point corresponding to the next index number, so that the current index number and the next index number are located in different segment indexes.
Optionally, in the video playing apparatus, the jump information obtaining sub-module is further configured to use the next index number as a new current index number when a time point corresponding to the next index number is greater than a time point corresponding to the current index number.
The invention provides a video playing method and a device, wherein the method comprises the following steps; the method comprises the steps of obtaining time hopping information according to index numbers in video indexes and corresponding time, receiving video playback information which comprises starting time and ending time and is input by a user, splitting the video indexes based on the time hopping information, searching a segment index corresponding to the starting time and a segment index corresponding to the ending time, starting playing from a video data unit corresponding to the starting time in the target starting segment index in the video record based on a target starting segment index selected by the user from the segment indexes corresponding to the starting time, and stopping playing when the video data unit corresponding to the ending time is played. By the method, the video is effectively and reliably retrieved and played, and the problems that the video cannot be retrieved or the video is out of order when the video is retrieved and played in the prior art are effectively solved.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
Fig. 1 is an application block diagram of a video playing device according to an embodiment of the present invention.
Fig. 2 is a schematic flowchart of a video playing method according to an embodiment of the present invention.
Fig. 3 is a schematic flowchart of step S110 in fig. 2.
Fig. 4 is a connection block diagram of a video playing apparatus according to an embodiment of the present invention.
Fig. 5 is a connection block diagram of a hopping information obtaining module according to an embodiment of the present invention.
Icon: 10-a video playback device; 12-a memory; 14-a processor; 16-a display; 20-a storage device; 100-video playing means; 110-a jump information obtaining module; 112-a comparison submodule; 114-a jump information obtaining submodule; 120-playback information obtaining module; 130-a retrieval module; 140-a prompt module; 150-playing module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
At present, the monitoring industry generally stores monitoring images of monitoring points shot by a network camera in a centralized manner so as to facilitate playback, when storage is performed, an iSCSI (SCSI transport protocol based on internet) connection is established between the network camera and a storage device, storage resources of the storage device are mounted to the local through the iSCSI protocol, then iSCSI protocol encapsulation is performed on stored video streams, and media and time index data are written into an IPSAN storage device by adopting a proprietary block storage format.
The block storage format mainly comprises a super block, a primary time index area, a data unit and a secondary time index area. The super block usually has dozens of K (such as 16K) bytes and is used for recording the version number of the block format and the camera code for shooting a monitoring point, a primary time index area is arranged behind the super block, each time index in the index area corresponds to one data unit one by one and is used for recording the storage time of the earliest frame in a frame group of video data of the data unit; the primary time index area is followed by a series of data units for storing video data for each frame group of the video recording. To ensure continuous writing of a frame of video data, the data unit typically amounts to several hundred mbytes (e.g., 256 mbytes). Each data unit starts with a secondary time index area, and each time index entry corresponds to a frame group of video data one by one and is used for recording the starting time of the frame group of video data.
The inventor finds that there are two block storage networking modes: one is that the network camera directly writes the video data into the storage device through ISCSI protocol, and the other front end IPC converges the storage stream to the data management server in the monitoring system, and the data management server writes the storage stream into the storage device. When the time jump of the network camera occurs, the video index written into the storage equipment is out of order, and when the time jump of the data management server occurs, all the videos written by the data management server also send the time jump. In addition, a file system is not arranged under a block storage format, so data is recorded in an index mode, indexes are cyclically overwritten according to a time sequence, and at present, when video retrieval and playback are carried out, an algorithm which is usually adopted is a dichotomy, so once time jump occurs, the dichotomy positioning is directly inaccurate when retrieval and playback are strongly dependent on time sequence in a video, and further, the retrieval result is inaccurate or the retrieval result cannot be obtained.
Therefore, it is an urgent technical problem to provide a video playing method capable of effectively avoiding the abnormal situations occurring in the retrieving and playback processes.
As shown in fig. 1, an embodiment of the present invention provides a video playback device 10, a storage device 20 is associated with the video playback device 10, the video playback device 10 includes a processor 14, a memory 12, and a display 16, and the memory 12, the processor 14, and the display 16 are electrically connected to each other directly or indirectly to implement data transmission or interaction.
Specifically, the memory 12, the display 16 and the storage device 20 are respectively connected to the processor 14, the storage device 20 is configured to store a video record and a record index, a software function module stored in the memory 12 in a form of software or Firmware (Firmware) is stored in the memory 12, the processor 14 executes various functional applications and data processing by running a software program and a module stored in the memory 12, such as the video playing apparatus 100 in the embodiment of the present invention, so as to implement the video playing method in the embodiment of the present invention, and the display 16 is configured to display a played video record for a user to view.
The video playing device 10 may be, but is not limited to, an electronic device such as a mobile phone, a computer, or a tablet computer, which has a display 16 and is capable of playing video, and is not limited in particular herein.
The Memory 12 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an Electrically Erasable Read-Only Memory (EEPROM), and the like. Wherein the memory 12 is used for storing a program, and the processor 14 executes the program after receiving the execution instruction.
The Processor 14 may be a general-purpose Processor including a Central Processing Unit (CPU), a Network Processor (NP), etc., and may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage device 20 may be an external storage device such as a server, a mobile hard disk, a U-disk, and the like, which can perform data transmission with the video playback device 10, such as the storage device 20 which performs iSCSI protocol encapsulation on a stored video stream and stores the stored video stream in a block format as described above, or may be the memory 12 in the video playback device 10, which is not particularly limited herein as long as the video record and the record index can be stored.
It is to be understood that the configuration shown in fig. 1 is merely illustrative, and that the video playback device 10 may include more or fewer components than shown in fig. 1, or may have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
Referring to fig. 2, the video playing method provided by the present invention is applied to the video playing device 10 to implement five steps S110 to S150.
Step S110: and obtaining time hopping information according to the plurality of index numbers included in the video index and the time points corresponding to the index numbers.
The video recording comprises a plurality of video data units, each index number corresponds to one video data unit, and the time jump information can comprise the index number before the time jump and the corresponding time point thereof, and can also comprise the index number before the time jump and the corresponding time point thereof after the time jump.
Step S110 may be to determine whether a time jump occurs according to a sequence of time points corresponding to each index number in the video index, and record time jump information when the time jump occurs.
In detail, in this embodiment, the video record and the record index are stored in a block storage format, and the record index includes a plurality of index numbers and time points corresponding to the index numbers, where the step S110 includes:
step S112: and acquiring an index number from the index numbers as a current index number, and comparing the time point corresponding to the current index number with the time point corresponding to the next index number adjacent to the current index number.
The manner of obtaining one index number from the plurality of index numbers as the current index number may be that, when a marked index number exists in the plurality of index numbers, the marked index number is used as the current index number. And when the marked index numbers do not exist in the plurality of index numbers, taking the index number with the minimum sorting sequence in the plurality of index numbers as the current index number.
It is to be understood that the marked index number may be the last index number when the last time the time jump information is detected, or may be any marked index number, and is not limited herein.
Step S114: and if the time point corresponding to the next index number is smaller than the time point corresponding to the current index number, obtaining time hopping information.
The time hopping information includes the current index number and a time point corresponding to the next index number and the next index number.
In order to obtain all the time jump information in the video index, after the step of S112 is performed, the method further includes:
and if the time point corresponding to the next index number is larger than the time point corresponding to the current index number, taking the next index number as a new current index number, and returning to execute the step of comparing the time point corresponding to the current index number with the time point corresponding to the next index number adjacent to the current index number until the next index number is the last index number in the video index.
It is understood that, after step S114 is executed to further obtain all the time jump information in the video index, the method further includes:
and if the time point corresponding to the next index number is larger than the time point corresponding to the current index number, taking the next index number as a new current index number, and returning to execute the step of comparing the time point corresponding to the current index number with the time point corresponding to the next index number adjacent to the current index number until the next index number is the last index number in the video index.
All the time hopping information in the video index is obtained through the steps of the method.
It should be noted that, when the video recording and the video recording index are stored in the block storage format, a plurality of index numbers included in the video recording index may be stored in the primary time index region or the secondary time index region, and the index numbers are sequentially arranged from small to large in the primary index region or the secondary index region, and each index number corresponds to a time point. Each video data unit may include multiple frames of video data and may also include a group of frames of video data.
It is to be understood that, when the index number is an index number in the primary index area, the unit of video data corresponding to the index number includes a plurality of I frame group video data, and the time point corresponding to the index number is a time point corresponding to a starting I frame group video data in the plurality of I frame group video data, where the plurality of I frame group video data may be video data within one hour, video data within ten minutes, or video data within one minute. When the index number is an index number in the secondary index area, the video data unit corresponding to the index number includes an I-frame group video data, the time point corresponding to the index number is the time point of the start frame video data in the I-frame group video data, and one I-frame group video data may be video data within one minute or within one second.
Step S120: video playback information including a start time and an end time is obtained.
The manner of acquiring the video playback information may be to receive video playback information including a start time and an end time input by a user, or may be to acquire video playback information including a start time and an end time pre-stored in the memory 12, which is not specifically limited herein and may be set according to actual requirements.
Step S130: and splitting the video index according to the time hopping information to obtain at least two segment indexes, and retrieving each segment index according to the starting time and the ending time to obtain the segment index corresponding to the starting time and the segment index corresponding to the ending time.
The method for splitting the video index according to the time hopping information to obtain at least two segment indexes is as follows: and splitting the video index according to the current index number and the time point corresponding to the next index number and the next index number included in the time hopping information, so that the current index number and the next index number are located in different segment indexes.
It can be understood that when the acquired time hopping information is one, the obtained segment index is split into two segments, and when the acquired time hopping information is multiple, for example, n, the obtained segment index is split into n +1 segments.
The indexing of each segment index according to the start time and the end time may be performed by indexing each segment index according to the start time and the end time by a binary method.
The number of segment indexes corresponding to the start time obtained by performing the search by using the above-described bisection method may be one or more.
Step S140: and when the segment index corresponding to the starting time is more than 1, prompting a user to select a target starting segment index from the segment indexes corresponding to the starting time.
In this embodiment, the manner for prompting the user to select a target starting segment index from the segment indexes corresponding to the starting time may be: the segment indexes corresponding to the start times and the options corresponding to the segment indexes are displayed to the user through the display 16, so that the user can select the start time to be played back according to the selection items. It should be noted that, in order to facilitate the user to select the video to be played, in this embodiment, when the index after the time jump occurs in the segment index corresponding to the selection item, the selection item should also correspond to the time jump information, or information for prompting the user that the time jump occurs, for example, the information includes the corresponding time information before the time jump occurs or the information includes the word of the time jump, which is not limited specifically herein.
Step S150: and according to the target starting segmented index selected by the user, starting playing from a video data unit corresponding to the starting time in the target starting segmented index in the video record, and stopping playing when the video data unit corresponding to the ending time is played.
In addition, in this embodiment, it should be noted that, when the obtained segment index corresponding to the start time is one, the playing may be started from the video data unit corresponding to the start time in the video record in the segment index without the selection of the user, and the playing may be stopped when the video data unit corresponding to the end time is played.
According to the method, the video index is split based on the time corresponding to each index number in the video index to obtain the segmented index, the segmented index is searched by adopting a bisection method based on the starting time and the ending time input by a user to effectively guarantee the accuracy of obtaining the segmented index corresponding to the starting time and the accuracy of obtaining the segmented index corresponding to the ending time, the video is played from the video data unit corresponding to the starting time in the target initial segmented index in the video record based on the target initial segmented index selected by the user from the segmented index corresponding to the starting time, so that the effective and reliable retrieval and playback of the video are realized, and the problem that the video cannot be retrieved or the problem that the video is out of order when the video record is retrieved and played in the prior art is effectively solved.
In addition, when the segment indexes corresponding to the retrieved start and stop times are multiple, the video data corresponding to the start time without the time jump or the video data corresponding to the start time with the time jump can be played according to the requirement of the user.
In the present invention, the description will be given by taking the example that the index number is an index number in the primary index area, the video data unit corresponding to the index number includes video data of an I-frame group, and one I-frame group is video data within one half hour. As shown in table 1, the index is recorded from zero at 30 th of 4 months to five pm at 1 st of 5 months:
TABLE 1
1 2018-04-30 00:00:00
2 2018-04-30 01:30:00
n 2018-05-01 00:00:00
n+1 2018-05-01 01:30:00
n+2 2018-05-01 03:00:00
n+3 2018-05-01 04:30:00
n+4 2018-04-30 02:00:00
n+5 2018-04-30 03:30:00
n+6 2018-05-01 09:00:00
m 2018-05-01 17:00:00
And taking the index number with the minimum sorting sequence in the index numbers as a current index number, and comparing the time corresponding to the next index number of the current index number with the time corresponding to the current index number until the last index number is reached to finish obtaining all jump information, wherein the obtained result is shown in table 2.
Table 2:
Figure BDA0001815732470000131
the segment indexes obtained by splitting the video index according to the time hopping information are shown in tables 3 and 4.
Table 3:
1 2018-04-30 00:00:00
2 2018-04-30 01:30:00
n 2018-05-01 00:00:00
n+1 2018-05-01 01:30:00
n+2 2018-05-01 03:00:00
n+3 2018-05-01 04:30:00
table 4:
Figure BDA0001815732470000132
Figure BDA0001815732470000141
receiving a start time and an end time input by a user, in this embodiment, taking the start time input by the user as 2018-04-3000: 00:00 and the end time as 2018-04-3023: 59:59 as an example, retrieving each segment index according to the start time and the end time to obtain a segment index corresponding to the start time and a segment index corresponding to the end time, and if the number of the obtained segment indexes corresponding to the start time is greater than 1, selecting a video playing period corresponding to the start time according to the start time and the end time as follows:
Figure BDA0001815732470000142
it should be noted that, when generating the video playing period option, the segment index with the time jump is labeled, so that the user can select the video playing period to be played back.
When the video playing time interval selected by the user is 2018-04-3000: 00: 00-2018-04-3023: 59:59, obtaining a segment index corresponding to the starting time in the video playing time interval, starting playing from a video data unit corresponding to 2018-04-3000: 00:00:00 in the segment index, and stopping playing when the video data unit corresponding to 2018-04-3023: 59:59 is played.
Referring to fig. 4, on the basis of the foregoing, the present invention further provides a video playing apparatus 100, where the video playing device 10 is configured to play a video record stored in a storage device 20, and the storage device 20 further stores a record index, and the apparatus includes: a jump information obtaining module 110, a playback information obtaining module 120, a retrieving module 130, a prompting module 140, and a playing module 150.
The jump information obtaining module 110 is configured to obtain time jump information according to the multiple index numbers included in the video index and the time points corresponding to the index numbers. The video record comprises a plurality of video data units, and each index number corresponds to one video data unit. In this embodiment, the jump information obtaining module 110 may be configured to perform step S110 shown in fig. 2, and the foregoing description of step S110 may be referred to for specific description of the jump information obtaining module 110.
Referring to fig. 5, optionally, in this embodiment, the transition information obtaining module 110 includes a comparing sub-module 112 and a transition information obtaining sub-module 114.
The comparing sub-module 112 is configured to obtain an index number from the plurality of index numbers as a current index number, and compare a time point corresponding to the current index number with a time point corresponding to a next index number adjacent to the current index number. In this embodiment, the comparison sub-module 112 may be configured to perform step S112 shown in fig. 3, and the detailed description about the comparison sub-module 112 may refer to the description about step S112.
The jump information obtaining sub-module 114 is configured to obtain time jump information when a time point corresponding to the next index number is smaller than a time point corresponding to the current index number, where the time jump information includes the time points corresponding to the current index number and the time points corresponding to the next index number and the next index number. In this embodiment, the jump information obtaining sub-module 114 may be configured to perform step S114 shown in fig. 3, and the detailed description about the jump information obtaining sub-module 114 may refer to the foregoing description about step S114.
Optionally, in this embodiment, the jump information obtaining sub-module 114 is further configured to use the next index number as a new current index number when the time point corresponding to the next index number is greater than the time point corresponding to the current index number.
In addition, optionally, in this embodiment, the jump information obtaining sub-module 114 is further configured to use the next index number as a new current index number when the time point corresponding to the next index number is greater than the time point corresponding to the current index number.
The playback information obtaining module 120 is configured to obtain video playback information including a start time and an end time. In the present embodiment, the playback information obtaining module 120 may be configured to perform step S120 shown in fig. 2, and the detailed description about the playback information obtaining module 120 may refer to the foregoing description about step S120.
The retrieving module 130 is configured to split the video index according to the time hopping information to obtain at least two segment indexes, and retrieve each segment index according to the start time and the end time to obtain a segment index corresponding to the start time and a segment index corresponding to the end time. In this embodiment, the retrieving module 130 may be configured to execute step S130 shown in fig. 2, and the foregoing description of step S130 may be referred to for specific description of the retrieving module 130.
Optionally, in this embodiment, the retrieving module 130 is further configured to split the video index according to the current index number and the time point corresponding to the next index number included in the time hopping information, so that the current index number and the next index number are located in different segment indexes.
The prompting module 140 is configured to prompt a user to select a target starting segment index from the segment indexes corresponding to the starting time when the segment index corresponding to the starting time is greater than 1. In this embodiment, the prompting module 140 may be configured to execute step S140 shown in fig. 2, and for the detailed description of the prompting module 140, reference may be made to the description of step S140.
The playing module 150 is configured to start playing from a video data unit in the video recording corresponding to the start time in the target start segment index according to the target start segment index selected by the user, and stop playing when playing reaches the video data unit corresponding to the end time. In this embodiment, the playing module 150 may be configured to execute step S150 shown in fig. 2, and the foregoing description of step S150 may be referred to for the detailed description of the playing module 150.
In summary, the method and apparatus for playing video according to the present invention obtain time jump information according to the index number and the corresponding time in the video index, receive the video playback information including the start time and the end time input by the user, split the video index based on the time jump information, search the segment index corresponding to the start time and the segment index corresponding to the end time, start playing the video data unit corresponding to the start time in the target start segment index in the video record based on the target start segment index selected by the user from the segment index corresponding to the start time, and stop playing the video data unit corresponding to the end time when playing the video record, so as to achieve effective and reliable retrieval and playback of the video, and effectively avoid the problem that the video record cannot be retrieved or the video is out of order when retrieving and playing the video in the prior art.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus and method embodiments described above are illustrative only, as the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. A video playing method is applied to video playing equipment, the video playing equipment is used for playing video records stored in storage equipment, and the storage equipment also stores a video index, and is characterized in that the method comprises the following steps:
obtaining time hopping information according to a plurality of index numbers and time points corresponding to the index numbers in the video index, wherein the video index comprises a plurality of video data units, and each index number corresponds to one video data unit;
acquiring video playback information including a start time and an end time;
splitting the video index according to the time hopping information to obtain at least two segment indexes, and retrieving each segment index according to the starting time and the ending time to obtain the segment index corresponding to the starting time and the segment index corresponding to the ending time;
when the segment index corresponding to the starting time is larger than 1, prompting a user to select a target starting segment index from all segment indexes corresponding to the starting time;
according to a target starting segmented index selected by a user, starting playing from a video data unit corresponding to the starting time in the target starting segmented index in the video recording, and stopping playing when the video data unit corresponding to the ending time is played;
the step of obtaining the time jump information according to the plurality of index numbers and the time points corresponding to the index numbers included in the video index comprises the following steps:
acquiring an index number from the index numbers as a current index number, and comparing a time point corresponding to the current index number with a time point corresponding to a next index number adjacent to the current index number;
if the time point corresponding to the next index number is smaller than the time point corresponding to the current index number, obtaining time jump information, wherein the time jump information comprises the time point corresponding to the current index number and the time point corresponding to the next index number and the next index number;
the step of splitting the video index according to the time hopping information to obtain at least two segment indexes comprises:
and splitting the video index according to the current index number and the time point corresponding to the next index number and the next index number included in the time hopping information, so that the current index number and the next index number are located in different segment indexes.
2. The video playing method of claim 1, wherein after the step of obtaining an index number from the plurality of index numbers as a current index number and comparing a time point corresponding to the current index number with a time point corresponding to a next index number adjacent to the current index number is performed, the method further comprises:
and if the time point corresponding to the next index number is larger than the time point corresponding to the current index number, taking the next index number as a new current index number, and returning to execute the step of comparing the time point corresponding to the current index number with the time point corresponding to the next index number adjacent to the current index number until the next index number is the last index number in the video index.
3. The video playing method of claim 1, wherein after the step of writing time jump information into the video index if the time point corresponding to the next index number is smaller than the time point corresponding to the current index number is performed, the method further comprises:
and taking the next index number as a new current index number, and returning to execute the step of comparing the time point corresponding to the current index number with the time point corresponding to the next index number adjacent to the current index number until the next index number is the last index number in the video index.
4. The video playing method of claim 1, wherein the step of obtaining an index number from the plurality of index numbers as the current index number comprises:
acquiring a marked index number from the index numbers as a current index number; or
And acquiring the index number with the minimum sorting sequence from the index numbers as the current index number.
5. The utility model provides a video playing device, is applied to video playback equipment, and this video playback equipment is used for playing the video record of storage in the storage device, and this storage device still stores the video index, its characterized in that, the device includes:
the jump information obtaining module is used for obtaining time jump information according to a plurality of index numbers and time points corresponding to the index numbers in the video index, wherein the video index comprises a plurality of video data units, and each index number corresponds to one video data unit;
a playback information obtaining module for obtaining video playback information including a start time and an end time;
the retrieval module is used for splitting the video index according to the time hopping information to obtain at least two segment indexes, and retrieving each segment index according to the starting time and the ending time to obtain the segment index corresponding to the starting time and the segment index corresponding to the ending time;
the prompting module is used for prompting a user to select a target starting segmented index from all segmented indexes corresponding to the starting time when the segmented index corresponding to the starting time is larger than 1;
the playing module is used for starting playing from a video data unit corresponding to the starting time in the target starting segment index in the video record according to the target starting segment index selected by a user and stopping playing when the video data unit corresponding to the ending time is played;
the information obtaining module includes:
the comparison submodule is used for acquiring an index number from the index numbers as a current index number and comparing a time point corresponding to the current index number with a time point corresponding to a next index number adjacent to the current index number;
a jump information obtaining submodule, configured to obtain time jump information when a time point corresponding to the next index number is smaller than a time point corresponding to the current index number, where the time jump information includes the time points corresponding to the current index number and the time points corresponding to the next index number and the next index number;
the retrieval module is further configured to split the video index according to the current index number and the time point corresponding to the next index number and the next index number included in the time hopping information, so that the current index number and the next index number are located in different segment indexes.
6. The video playing apparatus of claim 5, wherein the jump information obtaining sub-module is further configured to use the next index number as a new current index number when the time point corresponding to the next index number is greater than the time point corresponding to the current index number.
CN201811140687.3A 2018-09-28 2018-09-28 Video playing method and device Active CN110971978B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811140687.3A CN110971978B (en) 2018-09-28 2018-09-28 Video playing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811140687.3A CN110971978B (en) 2018-09-28 2018-09-28 Video playing method and device

Publications (2)

Publication Number Publication Date
CN110971978A CN110971978A (en) 2020-04-07
CN110971978B true CN110971978B (en) 2021-12-28

Family

ID=70026883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811140687.3A Active CN110971978B (en) 2018-09-28 2018-09-28 Video playing method and device

Country Status (1)

Country Link
CN (1) CN110971978B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761524A (en) * 2011-04-27 2012-10-31 中兴通讯股份有限公司 Steaming media storage and playing method and corresponding system
CN103108151A (en) * 2011-11-09 2013-05-15 华为技术有限公司 Video monitoring method and video monitoring system
CN103731716A (en) * 2014-01-08 2014-04-16 珠海全志科技股份有限公司 Method for synchronizing audio and video in TS stream playing
CN103929609A (en) * 2014-04-22 2014-07-16 浙江宇视科技有限公司 Video replaying method and device
CN104281651A (en) * 2014-09-16 2015-01-14 福建星网锐捷安防科技有限公司 Method and system for searching large volume of video data
CN105989048A (en) * 2015-02-05 2016-10-05 浙江大华技术股份有限公司 Data record processing method, equipment and system
CN106933974A (en) * 2017-02-14 2017-07-07 浙江大华技术股份有限公司 The structure and querying method and device of a kind of video file index information
CN107229418A (en) * 2017-05-02 2017-10-03 浙江宇视科技有限公司 A kind of video file storage method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8925001B2 (en) * 2008-09-12 2014-12-30 At&T Intellectual Property I, L.P. Media stream generation based on a category of user expression
US9905271B2 (en) * 2015-06-15 2018-02-27 Sling Media Pvt Ltd Real-time positioning of current-playing-position marker on progress bar and index file generation for real-time content

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761524A (en) * 2011-04-27 2012-10-31 中兴通讯股份有限公司 Steaming media storage and playing method and corresponding system
CN103108151A (en) * 2011-11-09 2013-05-15 华为技术有限公司 Video monitoring method and video monitoring system
CN103731716A (en) * 2014-01-08 2014-04-16 珠海全志科技股份有限公司 Method for synchronizing audio and video in TS stream playing
CN103929609A (en) * 2014-04-22 2014-07-16 浙江宇视科技有限公司 Video replaying method and device
CN104281651A (en) * 2014-09-16 2015-01-14 福建星网锐捷安防科技有限公司 Method and system for searching large volume of video data
CN105989048A (en) * 2015-02-05 2016-10-05 浙江大华技术股份有限公司 Data record processing method, equipment and system
CN106933974A (en) * 2017-02-14 2017-07-07 浙江大华技术股份有限公司 The structure and querying method and device of a kind of video file index information
CN107229418A (en) * 2017-05-02 2017-10-03 浙江宇视科技有限公司 A kind of video file storage method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
足球视频索引结构与检索算法研究;吴玲生;《中国优秀硕士学位论文全文数据库》;20170531;I138-846 *

Also Published As

Publication number Publication date
CN110971978A (en) 2020-04-07

Similar Documents

Publication Publication Date Title
JP5980311B2 (en) Video signature
US20140164391A1 (en) Data block saving system and method
US20100067867A1 (en) System and method for searching video scenes
US9299082B2 (en) Fast streams and substreams
US9805119B2 (en) Subtitle processing method, device and system and storage medium
US20200019559A1 (en) Synchronizing object in local object storage node
US9519836B2 (en) Locating objects using images from portable devices
US10169053B2 (en) Loading a web page
US10031936B2 (en) Database table data fabrication
WO2015096427A1 (en) Method and system for locating and searching surveillance video
CN110971978B (en) Video playing method and device
CN111757037B (en) Video file reading and writing method and device
US20170040040A1 (en) Video information processing system
WO2020056201A1 (en) Systems and methods for detecting, analyzing, and evaluating interaction paths
CN112463746B (en) File storage and generation method and device and electronic equipment
CN111371818B (en) Data request verification method, device and equipment
US10037148B2 (en) Facilitating reverse reading of sequentially stored, variable-length data
CN116226272A (en) Data synchronization method and device
CN116303271A (en) Synchronous audio/video file processing method, device and medium for business client
US20170357654A1 (en) Using audio and video matching to determine age of content
CN114710685A (en) Video stream processing method and device, terminal equipment and storage medium
CN115757448A (en) Data processing method and device, electronic equipment and storage medium
CN115337648A (en) Plug-in detection method and device, electronic equipment and computer readable storage medium
US20170169167A1 (en) Method And Electronic Device For Data Information Processing
CN117725094A (en) Data retrieval method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant