CN111078155B - Video file reading method, device, equipment and medium - Google Patents

Video file reading method, device, equipment and medium Download PDF

Info

Publication number
CN111078155B
CN111078155B CN201911332556.XA CN201911332556A CN111078155B CN 111078155 B CN111078155 B CN 111078155B CN 201911332556 A CN201911332556 A CN 201911332556A CN 111078155 B CN111078155 B CN 111078155B
Authority
CN
China
Prior art keywords
target
reading
content
read
video file
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
CN201911332556.XA
Other languages
Chinese (zh)
Other versions
CN111078155A (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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201911332556.XA priority Critical patent/CN111078155B/en
Publication of CN111078155A publication Critical patent/CN111078155A/en
Application granted granted Critical
Publication of CN111078155B publication Critical patent/CN111078155B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The application discloses a video file reading method, a device, equipment and a medium, wherein the method comprises the following steps: acquiring a pre-reading request of a target video segment in a target video file; analyzing the pre-reading request to obtain a target identifier; determining target pre-reading content from a preset storage pool according to the target identifier, wherein the preset storage pool is used for storing the pre-reading content corresponding to each video segment in the target video file and the identifier corresponding to the pre-reading content; reading the target pre-reading content and the target video segment matched with the target identifier. Therefore, the pre-reading hit rate and the pre-reading efficiency can be improved, the skip reading of different video segments is realized, and the hit rate and the efficiency of video reading are improved.

Description

Video file reading method, device, equipment and medium
Technical Field
The present application relates to the field of video file read-write technologies, and in particular, to a method, an apparatus, a device, and a medium for reading a video file.
Background
Before saving, a video file is divided into video segments with a certain size, the video data with the certain size in front of each video segment is used as a video head of the video segment, and when a client reads the video file, the client reads the video head once in the first 16k of every 8m of the video data, but the video head is read in the pre-reading mode, and the data after the reading mode is not read, wherein the reading mode is determined by the format of the file. Therefore, when the client reads the video file, the client can only read the video file in sequence, that is, the client reads the video head of the first section of video first, then reads the rest part of the first section of video, then reads the video head of the second section of video, and reads the rest part of the second section of video, and so on, which causes low pre-reading hit rate, low pre-reading efficiency and low video efficiency.
Disclosure of Invention
In view of this, an object of the present application is to provide a method, an apparatus, a device, and a medium for reading a video file, which can improve a pre-reading hit rate and a pre-reading efficiency, implement skip reading of different video segments, and improve a hit rate and efficiency of video reading. The specific scheme is as follows:
in a first aspect, the present application discloses a video file reading method, including:
acquiring a pre-reading request of a target video segment in a target video file;
analyzing the pre-reading request to obtain a target identifier;
determining target pre-reading content from a preset storage pool according to the target identifier, wherein the preset storage pool is used for storing the pre-reading content corresponding to each video segment in the target video file and the identifier corresponding to the pre-reading content;
reading the target pre-reading content and the target video segment matched with the target identifier.
Optionally, before the obtaining of the read-ahead request for the target video segment in the target video file, the method further includes:
adding the preset storage pool;
and storing the pre-read contents, which need to be pre-read, of each video segment in the target video file into the preset storage pool according to a preset format.
Optionally, the storing, according to a preset format, pre-read content that is required to be pre-read for each video segment in the target video file into the preset storage pool includes:
determining the pre-read content of each video segment in a target video file from the content of each video segment in the preset size from the beginning;
determining the identifier corresponding to the read-ahead content;
and storing the identifier and the pre-read content into the preset storage pool according to the sequence of the video segments in the target video file and a preset format.
Optionally, the storing the identifier and the pre-read content into the preset storage pool according to a preset format according to the order of the video segments in the target video file includes:
and storing the identifiers and the pre-read contents into the preset storage pool according to the sequence of the video segments in the target video file, storing the identifiers firstly, and storing the corresponding pre-read contents after the identifiers.
In a second aspect, the present application discloses a video file reading apparatus, comprising:
the request acquisition module is used for acquiring a pre-reading request of a target video segment in a target video file;
the request analysis module is used for analyzing the pre-reading request to obtain a target identifier;
a pre-read content determining module, configured to determine target pre-read content from a preset storage pool according to the target identifier, where the preset storage pool is used to store pre-read content corresponding to each video segment in the target video file and an identifier corresponding to the pre-read content;
and the content reading module is used for reading the target pre-read content and the target video segment matched with the target identifier.
Optionally, the video file reading apparatus further includes:
the storage pool adding module is used for adding the preset storage pool;
and the content storage module is used for storing the pre-read content which needs to be pre-read in each video segment in the target video file into the preset storage pool according to a preset format.
Optionally, the content storage module includes:
the pre-read content determining submodule is used for determining the pre-read content of each video segment in the target video file from the content of the video segment in the preset size from the beginning;
an identifier determining submodule for determining the identifier corresponding to the pre-read content;
and the storage submodule is used for storing the identifier and the pre-read content into the preset storage pool according to a preset format according to the sequence of the video segments in the target video file.
Optionally, the storage sub-module is specifically configured to:
and storing the identifiers and the pre-read contents into the preset storage pool according to the sequence of the video segments in the target video file, storing the identifiers firstly, and storing the corresponding pre-read contents after the identifiers.
In a third aspect, the present application discloses a video file reading apparatus, comprising:
a memory and a processor;
wherein the memory is used for storing a computer program;
the processor is configured to execute the computer program to implement the video file reading method disclosed above.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the video file reading method disclosed in the foregoing.
Therefore, the method comprises the steps of firstly obtaining a pre-reading request of a target video segment in a target video file; then, analyzing the pre-reading request to obtain a target identifier; determining target pre-reading content from a preset storage pool according to the target identifier, wherein the preset storage pool is used for storing pre-reading content corresponding to each video segment in the target video file and the identifier corresponding to the pre-reading content; and reading the target pre-read content and the target video segment matched with the target identifier. Therefore, when the pre-reading request of the target video end in the target video file is acquired, the pre-reading request is analyzed to obtain the target identifier, the target pre-reading content is determined from the preset storage pool according to the target identifier, and the target pre-reading content and the target video segment matched with the target pre-reading content are read, so that the pre-reading hit rate and the pre-reading efficiency can be improved, skip reading of different video segments is realized, and the hit rate and the efficiency of video reading are improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a video file reading method disclosed in the present application;
FIG. 2 is a flowchart of a specific video file reading method disclosed in the present application;
FIG. 3 is a schematic diagram illustrating storing pre-read content in a video file into a predetermined storage pool according to the present disclosure;
fig. 4 is a schematic structural diagram of a video file reading apparatus disclosed in the present application;
FIG. 5 is a block diagram of a video file reading apparatus according to the present disclosure;
fig. 6 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
At present, a video file is divided into video segments of a certain size before being saved, and the video data of the certain size in front of each video segment is used as a video head of the video segment, and when a client reads the video file, the client performs pre-reading once every first 16k of 8m of the video data, but the pre-reading reads the video head, and the subsequent data are not read, and the reading mode is determined by the format of the file. Therefore, when the client reads the video file, the client can only read the video file in sequence, that is, the client reads the video head of the first section of video first, then reads the rest part of the first section of video, then reads the video head of the second section of video, and reads the rest part of the second section of video, and so on, which causes low pre-reading hit rate, low pre-reading efficiency and low video efficiency. In view of this, the present application provides a video file reading method, which can improve the pre-reading hit rate and the pre-reading efficiency, implement skip reading of different video segments, and improve the hit rate and the efficiency of video reading.
Referring to fig. 1, an embodiment of the present application discloses a video file reading method, including:
step S11: and acquiring a pre-reading request of a target video segment in the target video file.
In this embodiment, when a target video segment in a target video needs to be read, a corresponding pre-reading operation is performed first, so that a pre-reading request for the target video segment in the target video needs to be obtained first.
Step S12: and analyzing the pre-reading request to obtain a target identifier.
It can be understood that after the read-ahead request is acquired, the read-ahead request needs to be parsed to obtain a target identifier, so as to determine read-ahead content that needs to be read ahead and the target video segment that needs to be read.
Step S13: and determining target pre-reading content from a preset storage pool according to the target identifier, wherein the preset storage pool is used for storing the pre-reading content corresponding to each video segment in the target video file and the identifier corresponding to the pre-reading content.
In this embodiment, a preset storage pool is used to store the pre-read content corresponding to each video segment in the target video file and the identifier corresponding to the pre-read content, and after the target identifier is determined, the target pre-read content is determined from the preset storage pool according to the target identifier.
Step S14: reading the target pre-reading content and the target video segment matched with the target identifier.
After the target pre-read content is determined from the preset storage pool, the target pre-read content and the target video segment matched with the target pre-read content are read.
Therefore, the method comprises the steps of firstly obtaining a pre-reading request of a target video segment in a target video file; then, analyzing the pre-reading request to obtain a target identifier; determining target pre-reading content from a preset storage pool according to the target identifier, wherein the preset storage pool is used for storing pre-reading content corresponding to each video segment in the target video file and the identifier corresponding to the pre-reading content; and reading the target pre-read content and the target video segment matched with the target identifier. Therefore, when the pre-reading request of the target video end in the target video file is acquired, the pre-reading request is analyzed to obtain the target identifier, the target pre-reading content is determined from the preset storage pool according to the target identifier, and the target pre-reading content and the target video segment matched with the target pre-reading content are read, so that the pre-reading hit rate and the pre-reading efficiency can be improved, skip reading of different video segments is realized, and the hit rate and the efficiency of video reading are improved.
Referring to fig. 2, an embodiment of the present application discloses a specific method, which includes:
step S21: the pre-set storage pool is added.
In this embodiment, a preset storage pool needs to be added first, so that the pre-read content that needs to be pre-read when each video segment in the target video file is pre-read is stored in the preset storage pool according to a preset format, so as to find the pre-read content to be pre-read.
Step S22: and storing the pre-read contents, which need to be pre-read, of each video segment in the target video file into the preset storage pool according to a preset format.
It can be understood that, after the preset storage pool is added, the pre-read content, which needs to be pre-read, of each video segment in the target file needs to be stored in the preset storage pool according to a preset format. Storing the pre-read contents, which need to be pre-read, of each video segment in the target video file into the preset storage pool according to a preset format, including: determining the pre-read content of each video segment according to the content of each video segment in the target video file, which starts from the beginning and has a preset size; determining an identifier corresponding to the read-ahead content; and storing the identifier and the pre-read content into the preset storage pool according to the sequence of the video segments in the target video file and a preset format. Specifically, the pre-read content of each video segment is determined according to the content of a preset size from the beginning of each video segment in the target video file, that is, the video head of each video segment in the target video file is determined as the pre-read content, an identifier corresponding to the pre-read content is determined, and then the identifier and the pre-read content are stored in the preset storage pool according to the sequence of the video segments in the target video file according to a preset format. The storing the identifier and the pre-read content into the preset storage pool according to the sequence of the video segments in the target video file according to a preset format includes: and storing the identifiers and the pre-read contents into the preset storage pool according to the sequence of the video segments in the target video file, storing the identifiers firstly, and storing the corresponding pre-read contents after the identifiers. For example, the target video file includes 2 video segments, the read-ahead content corresponding to the first video segment is read-ahead content 1, the read-ahead content corresponding to the second video segment is read-ahead content 2, the identifier corresponding to the read-ahead content 1 is a1, and the identifier corresponding to the read-ahead content 2 is a2, and the read-ahead content is stored in the preset storage pool according to the format of "a 1+ read-ahead content 1+ a2+ read-ahead content 2".
Referring to fig. 3, a schematic diagram of storing the pre-read content in the video file into the predetermined storage pool is shown. The target video comprises 1 to n video segments, the video with the preset size at the beginning of each video segment is taken as pre-read content, namely pre-read content 1 to pre-read content n, the pre-read content 1 to pre-read content n with the identifier is stored in a preset storage pool, and when the client needs to read the pre-read content, the client can directly read the pre-read content from the preset storage pool.
Step S23: and acquiring a pre-reading request of a target video segment in the target video file.
Step S24: and analyzing the pre-reading request to obtain a target identifier.
Step S25: and determining target pre-reading content from the preset storage pool according to the target identifier.
Step S26: reading the target pre-reading content and the target video segment matched with the target identifier.
Referring to fig. 4, an embodiment of the present application discloses a video file reading apparatus, including:
a request obtaining module 11, configured to obtain a read-ahead request for a target video segment in a target video file;
a request analysis module 12, configured to analyze the read-ahead request to obtain a target identifier;
a pre-read content determining module 13, configured to determine, according to the target identifier, target pre-read content from a preset storage pool, where the preset storage pool is used to store pre-read content corresponding to each video segment in the target video file and an identifier corresponding to the pre-read content;
and a content reading module 14, configured to read the target pre-read content and the target video segment matching the target identifier.
Therefore, the method comprises the steps of firstly obtaining a pre-reading request of a target video segment in a target video file; then, analyzing the pre-reading request to obtain a target identifier; determining target pre-reading content from a preset storage pool according to the target identifier, wherein the preset storage pool is used for storing pre-reading content corresponding to each video segment in the target video file and the identifier corresponding to the pre-reading content; and reading the target pre-read content and the target video segment matched with the target identifier. Therefore, when the pre-reading request of the target video end in the target video file is acquired, the pre-reading request is analyzed to obtain the target identifier, the target pre-reading content is determined from the preset storage pool according to the target identifier, and the target pre-reading content and the target video segment matched with the target pre-reading content are read, so that the pre-reading hit rate and the pre-reading efficiency can be improved, skip reading of different video segments is realized, and the hit rate and the efficiency of video reading are improved.
Further, the video file reading apparatus further includes:
the storage pool adding module is used for adding the preset storage pool;
and the content storage module is used for storing the pre-read content which needs to be pre-read in each video segment in the target video file into the preset storage pool according to a preset format.
Specifically, the content storage module includes:
the pre-read content determining submodule is used for determining the pre-read content of each video segment in the target video file from the content of the video segment in the preset size from the beginning;
an identifier determining submodule for determining the identifier corresponding to the pre-read content;
and the storage submodule is used for storing the identifier and the pre-read content into the preset storage pool according to a preset format according to the sequence of the video segments in the target video file.
Further, the storage submodule is specifically configured to:
and storing the identifiers and the pre-read contents into the preset storage pool according to the sequence of the video segments in the target video file, storing the identifiers firstly, and storing the corresponding pre-read contents after the identifiers.
Further, referring to fig. 5, an embodiment of the present application further discloses a file system abnormality monitoring device, including: a processor 21 and a memory 22.
Wherein the memory 22 is used for storing a computer program; the processor 21 is configured to execute the computer program to implement the following steps:
acquiring a pre-reading request of a target video segment in a target video file; analyzing the pre-reading request to obtain a target identifier; determining target pre-reading content from a preset storage pool according to the target identifier, wherein the preset storage pool is used for storing the pre-reading content corresponding to each video segment in the target video file and the identifier corresponding to the pre-reading content; reading the target pre-reading content and the target video segment matched with the target identifier.
Therefore, the method comprises the steps of firstly obtaining a pre-reading request of a target video segment in a target video file; then, analyzing the pre-reading request to obtain a target identifier; determining target pre-reading content from a preset storage pool according to the target identifier, wherein the preset storage pool is used for storing pre-reading content corresponding to each video segment in the target video file and the identifier corresponding to the pre-reading content; and reading the target pre-read content and the target video segment matched with the target identifier. Therefore, when the pre-reading request of the target video end in the target video file is acquired, the pre-reading request is analyzed to obtain the target identifier, the target pre-reading content is determined from the preset storage pool according to the target identifier, and the target pre-reading content and the target video segment matched with the target pre-reading content are read, so that the pre-reading hit rate and the pre-reading efficiency can be improved, skip reading of different video segments is realized, and the hit rate and the efficiency of video reading are improved.
In this embodiment, when the processor 21 executes the computer subprogram stored in the memory 22, the following steps may be specifically implemented: adding the preset storage pool; and storing the pre-read contents, which need to be pre-read, of each video segment in the target video file into the preset storage pool according to a preset format.
In this embodiment, when the processor 21 executes the computer subprogram stored in the memory 22, the following steps may be specifically implemented: determining the pre-read content of each video segment in a target video file from the content of each video segment in the preset size from the beginning; determining the identifier corresponding to the read-ahead content; and storing the identifier and the pre-read content into the preset storage pool according to the sequence of the video segments in the target video file and a preset format.
In an embodiment, when the processor 21 executes the computer subprogram stored in the memory 22, the following steps may be specifically implemented: and storing the identifiers and the pre-read contents into the preset storage pool according to the sequence of the video segments in the target video file, storing the identifiers firstly, and storing the corresponding pre-read contents after the identifiers.
FIG. 6 is a block diagram illustrating one type of electronic device 20 according to an example embodiment. The electronic device 20 comprises a processor 21 and a memory 22 as in the previous embodiments. The electronic device 20 may also include one or more of a multimedia component 23, an input/output (I/O) interface 24, and a communications component 25.
The processor 21 is configured to control the overall operation of the electronic device 20, so as to complete all or part of the steps in the above-mentioned video file reading method. The memory 22 is used to store various types of data to support operation at the electronic device 20, such as instructions for any application or method operating on the electronic device 20, and application-related data, such as contact data, messaging, pictures, audio, video, and so forth. The Memory 22 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. The multimedia components 23 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 22 or transmitted via the communication component 25. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 24 provides an interface between the processor 21 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 25 is used for wired or wireless communication between the electronic device 20 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so that the corresponding Communication component 25 may include: Wi-Fi module, bluetooth module, NFC module.
In an exemplary embodiment, the electronic Device 20 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components for executing the above-mentioned video file reading method.
Further, an embodiment of the present application also discloses a computer readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the following steps:
acquiring a pre-reading request of a target video segment in a target video file; analyzing the pre-reading request to obtain a target identifier; determining target pre-reading content from a preset storage pool according to the target identifier, wherein the preset storage pool is used for storing the pre-reading content corresponding to each video segment in the target video file and the identifier corresponding to the pre-reading content; reading the target pre-reading content and the target video segment matched with the target identifier.
Therefore, the method comprises the steps of firstly obtaining a pre-reading request of a target video segment in a target video file; then, analyzing the pre-reading request to obtain a target identifier; determining target pre-reading content from a preset storage pool according to the target identifier, wherein the preset storage pool is used for storing pre-reading content corresponding to each video segment in the target video file and the identifier corresponding to the pre-reading content; and reading the target pre-read content and the target video segment matched with the target identifier. Therefore, when the pre-reading request of the target video end in the target video file is acquired, the pre-reading request is analyzed to obtain the target identifier, the target pre-reading content is determined from the preset storage pool according to the target identifier, and the target pre-reading content and the target video segment matched with the target pre-reading content are read, so that the pre-reading hit rate and the pre-reading efficiency can be improved, skip reading of different video segments is realized, and the hit rate and the efficiency of video reading are improved.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: adding the preset storage pool; and storing the pre-read contents, which need to be pre-read, of each video segment in the target video file into the preset storage pool according to a preset format.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: determining the pre-read content of each video segment in a target video file from the content of each video segment in the preset size from the beginning; determining the identifier corresponding to the read-ahead content; and storing the identifier and the pre-read content into the preset storage pool according to the sequence of the video segments in the target video file and a preset format.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: and storing the identifiers and the pre-read contents into the preset storage pool according to the sequence of the video segments in the target video file, storing the identifiers firstly, and storing the corresponding pre-read contents after the identifiers.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of other elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing describes a video file reading method, apparatus, device, and medium provided by the present application in detail, and specific examples are applied herein to illustrate the principles and embodiments of the present application, and the description of the foregoing examples is only used to help understand the method and core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (4)

1. A method for reading a video file, comprising:
acquiring a pre-reading request of a target video segment in a target video file;
analyzing the pre-reading request to obtain a target identifier;
determining target pre-reading content from a preset storage pool according to the target identifier, wherein the preset storage pool is used for storing the pre-reading content corresponding to each video segment in the target video file and the identifier corresponding to the pre-reading content;
reading the target pre-reading content and the target video segment matched with the target identifier;
before the obtaining of the read-ahead request for the target video segment in the target video file, the method further includes:
adding the preset storage pool;
storing pre-read contents, which need to be pre-read, of each video segment in a target video file into the preset storage pool according to a preset format;
the storing, according to a preset format, pre-read content that is required to be pre-read for each video segment in the target video file into the preset storage pool includes:
determining the pre-read content of each video segment in a target video file from the content of each video segment in the preset size from the beginning;
determining the identifier corresponding to the read-ahead content;
storing the identifier and the pre-read content into the preset storage pool according to the sequence of the video segments in the target video file and a preset format;
wherein the storing the identifier and the pre-read content into the preset storage pool according to a preset format according to the sequence of the video segments in the target video file comprises:
and storing the identifiers and the pre-read contents into the preset storage pool according to the sequence of the video segments in the target video file, storing the identifiers firstly, and storing the corresponding pre-read contents after the identifiers.
2. A video file reading apparatus, comprising:
the request acquisition module is used for acquiring a pre-reading request of a target video segment in a target video file;
the request analysis module is used for analyzing the pre-reading request to obtain a target identifier;
a pre-read content determining module, configured to determine target pre-read content from a preset storage pool according to the target identifier, where the preset storage pool is used to store pre-read content corresponding to each video segment in the target video file and an identifier corresponding to the pre-read content;
the content reading module is used for reading the target pre-read content and the target video segment matched with the target identifier;
wherein, still include:
the storage pool adding module is used for adding the preset storage pool;
the content storage module is used for storing pre-read contents which need to be pre-read in each video segment in the target video file into the preset storage pool according to a preset format;
wherein the content storage module comprises:
the pre-read content determining submodule is used for determining the pre-read content of each video segment in the target video file from the content of the video segment in the preset size from the beginning;
an identifier determining submodule for determining the identifier corresponding to the pre-read content;
the storage submodule is used for storing the identifier and the pre-read content into the preset storage pool according to a preset format according to the sequence of the video segments in the target video file;
the storage submodule is specifically configured to:
and storing the identifiers and the pre-read contents into the preset storage pool according to the sequence of the video segments in the target video file, storing the identifiers firstly, and storing the corresponding pre-read contents after the identifiers.
3. A video file reading apparatus, comprising:
a memory and a processor;
wherein the memory is used for storing a computer program;
the processor is configured to execute the computer program to implement the video file reading method according to claim 1.
4. A computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the video file reading method according to claim 1.
CN201911332556.XA 2019-12-22 2019-12-22 Video file reading method, device, equipment and medium Active CN111078155B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911332556.XA CN111078155B (en) 2019-12-22 2019-12-22 Video file reading method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911332556.XA CN111078155B (en) 2019-12-22 2019-12-22 Video file reading method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN111078155A CN111078155A (en) 2020-04-28
CN111078155B true CN111078155B (en) 2022-03-22

Family

ID=70316634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911332556.XA Active CN111078155B (en) 2019-12-22 2019-12-22 Video file reading method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN111078155B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102547447A (en) * 2010-12-14 2012-07-04 腾讯科技(深圳)有限公司 Method, device and system for downloading video files
US9066115B1 (en) * 2011-07-29 2015-06-23 Arris Enterprises, Inc. Structuring dynamic advertisement breaks in video manifest files
CN107800988A (en) * 2017-11-08 2018-03-13 青岛海信移动通信技术股份有限公司 A kind of method and device of video record, electronic equipment
CN109947720A (en) * 2019-04-12 2019-06-28 苏州浪潮智能科技有限公司 A kind of pre-reading method of files, device, equipment and readable storage medium storing program for executing
CN110245258A (en) * 2018-12-10 2019-09-17 浙江大华技术股份有限公司 Video file establishes method, video file analytic method and the related system of index

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170123713A1 (en) * 2015-10-30 2017-05-04 Imagine Communications Corp. Device and process for data storage and read/write efficiency

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102547447A (en) * 2010-12-14 2012-07-04 腾讯科技(深圳)有限公司 Method, device and system for downloading video files
US9066115B1 (en) * 2011-07-29 2015-06-23 Arris Enterprises, Inc. Structuring dynamic advertisement breaks in video manifest files
CN107800988A (en) * 2017-11-08 2018-03-13 青岛海信移动通信技术股份有限公司 A kind of method and device of video record, electronic equipment
CN110245258A (en) * 2018-12-10 2019-09-17 浙江大华技术股份有限公司 Video file establishes method, video file analytic method and the related system of index
CN109947720A (en) * 2019-04-12 2019-06-28 苏州浪潮智能科技有限公司 A kind of pre-reading method of files, device, equipment and readable storage medium storing program for executing

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Impact of Video File Format on Quality of Experience (QoE) of Multimedia Content;Asif Ali Laghari等;《3D Research》;20180901;第1-11页 *
基于HDFS的视频帧分布式读取模型的研究;袁天宇;《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》;20180715;I138-1371 *
多媒体视频教学中关键帧的提取;熊皓;《科技创业月刊》;20130430;第100-101页 *

Also Published As

Publication number Publication date
CN111078155A (en) 2020-04-28

Similar Documents

Publication Publication Date Title
US10554805B2 (en) Information processing method, terminal, and computer-readable storage medium
CN108804299B (en) Application program exception handling method and device
CN109542361B (en) Distributed storage system file reading method, system and related device
CN110515871B (en) Interrupt method, interrupt device, FPGA (field programmable Gate array) and storage medium
CN104808983A (en) Application program push method and server
US11837234B2 (en) Subtitle generation method and apparatus, and device and storage medium
CN109684008B (en) Card rendering method, device, terminal and computer readable storage medium
CN111031110A (en) File uploading method and device, electronic equipment and storage medium
RU2610245C2 (en) Method and device for web page encode identification
CN106162362B (en) Video playing method and player
CN108092667B (en) Method and device for compressing time series data and inquiring time series data
CN111158597A (en) Metadata reading method and device, electronic equipment and storage medium
CN110808877A (en) Statistical analysis method and device based on interface response duration and computer equipment
CN113934913A (en) Data capture method and device, storage medium and electronic equipment
CN111026400A (en) Method and device for analyzing service data stream
US9946712B2 (en) Techniques for user identification of and translation of media
CN111200744A (en) Multimedia playing control method and device and intelligent equipment
CN108509228B (en) Page loading method, terminal equipment and computer readable storage medium
WO2024099359A1 (en) Voice detection method and apparatus, electronic device and storage medium
CN111078155B (en) Video file reading method, device, equipment and medium
CN112307386A (en) Information monitoring method, system, electronic device and computer readable storage medium
CN111124308A (en) Performance analysis method and device, electronic equipment and storage medium
CN106657316B (en) Message withdrawing method and device
EP3598738A1 (en) Video synthesis method, apparatus and device, and video playing method, apparatus and device
CN111124627A (en) Method, device, terminal and storage medium for determining application program caller

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