WO2015131700A1 - File storage method and device - Google Patents

File storage method and device Download PDF

Info

Publication number
WO2015131700A1
WO2015131700A1 PCT/CN2015/071449 CN2015071449W WO2015131700A1 WO 2015131700 A1 WO2015131700 A1 WO 2015131700A1 CN 2015071449 W CN2015071449 W CN 2015071449W WO 2015131700 A1 WO2015131700 A1 WO 2015131700A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
video
buffers
recording
unit
Prior art date
Application number
PCT/CN2015/071449
Other languages
French (fr)
Chinese (zh)
Inventor
吴飞
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015131700A1 publication Critical patent/WO2015131700A1/en

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/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/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4335Housekeeping operations, e.g. prioritizing content for deletion because of storage space restrictions
    • 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/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24568Data stream processing; Continuous queries
    • 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/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4334Recording operations

Definitions

  • the present invention relates to the field of communications, and in particular to a file storage method and apparatus.
  • the functions of smart phones are increasing, which greatly enriches people's lives.
  • the video recording function of the mobile phone greatly improves the user's life, so that the user can record the wonderful moment without purchasing an expensive video recorder.
  • the current video recording function of the smartphone has the following problems: when the user shoots some scenes that may be sudden, such as shooting a scene on the court and shooting a scene with a cute expression of the child, it is not sure when these wonderful things will occur.
  • the screen must be recorded all the time, which may cause the memory card of the mobile phone to be fully stored, but the user wants to take the picture, so the user needs to delete the original stored file to ensure that the mobile phone has extra storage space.
  • the present invention provides a file storage method and apparatus to solve at least the problem that the user cannot save the recorded content in time due to the limited storage space of the terminal existing in the related art.
  • a file storage method comprising: establishing two or more file buffers configured to store a predetermined duration video file; and sequentially or two or more in a manner of overlay update The video file is input into the file buffer in a time period; the video file is stored according to the video file input in the two or more file buffers.
  • establishing two or more file buffers configured to store the predetermined duration video file includes: determining a time-limited mode set to limit the recording duration; establishing two or more of the file buffers according to the time-limited mode .
  • inputting the video file in a time period of two or more of the file buffers by using an overlay update manner includes: determining whether a video file before the current time period is input in the file buffer; If the result of the determination is YES, the recording file before the current time period input in the file buffer is updated to the recording file recorded in the current time period.
  • storing the video file according to the video file stored in the two or more file buffers comprises: acquiring video files stored in two or more file buffers; Or recording the video files in the two or more file buffers separately; splicing the video files in the two or more file buffers after the segmentation processing in time series; storing the video after the splicing process file.
  • separately performing the segmentation processing on the video files in the two or more file buffers includes: acquiring key frame information of the video files in the two or more file buffers, where The key frame information includes a time stamp and an offset; and the video file is segmented according to the key frame information.
  • a file storage apparatus comprising: an establishing module configured to establish two or more file buffers configured to store a predetermined duration video file; and an input module configured to use overlay update The method sequentially inputs the video files in two or more of the file buffers in a time period; the storage module is configured to pair the video files according to the video files input in the two or more file buffers. Store.
  • the establishing module comprises: a determining unit configured to determine a time-limited mode set to limit a recording duration; and an establishing unit configured to establish two or more file buffers according to the time-limited mode.
  • the input module includes: a determining unit, configured to determine whether a recording file before the current time period is input in the file buffer; and an updating unit, configured to: if the determination result is yes, the file The video file before the current time period entered in the buffer is updated to the video file recorded in the current time period.
  • the storage module includes: an obtaining unit configured to acquire a video file stored in two or more file buffers; and a dividing unit, configured to pair two or more of the file buffers
  • the video files are respectively divided and processed;
  • the splicing unit is configured to splicing the video files in the two or more file buffers after the segmentation process in time series;
  • the storage unit is set to store the video after the splicing process file.
  • the segmentation unit includes: an acquisition subunit configured to acquire key frame information of a video file in two or more file buffers, wherein the key frame information includes a time stamp and an offset And dividing the subunit, configured to divide the video file according to the key frame information.
  • two or more file buffers configured to store a predetermined duration video file are created; and the recording is sequentially input in two or more of the file buffers in a time interval by means of overlay update.
  • File storing the video file according to the video file input in the file buffer of the two or more files, which solves the problem that the user cannot save the video content in time due to limited storage space of the terminal in the related art.
  • the video content that the user wants can be saved in time to improve the user experience.
  • FIG. 1 is a flow chart of a file storage method according to an embodiment of the present invention.
  • FIG. 2 is a block diagram showing the structure of a file storage device according to an embodiment of the present invention.
  • FIG. 3 is a structural block diagram of a building module 22 in a file storage device according to an embodiment of the present invention
  • FIG. 4 is a block diagram showing the structure of an input module 24 in a file storage device according to an embodiment of the present invention.
  • FIG. 5 is a structural block diagram of a storage module 26 in a file storage device according to an embodiment of the present invention.
  • FIG. 6 is a structural block diagram of a dividing unit 54 in a file storage device according to an embodiment of the present invention.
  • FIG. 7 is a block diagram showing the structure of a time-limited video recording apparatus according to an embodiment of the present invention.
  • FIG. 8 is a flowchart of a display recording method according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of recording data storage according to an embodiment of the present invention.
  • FIG. 10 is a flow chart of processing a video file according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a file storage method according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
  • Step S102 establishing two or more file buffers configured to store a predetermined duration video file
  • Step S104 sequentially inputting a video file in a time period of two or more file buffers by using an overlay update manner
  • Step S106 The video file is stored according to the video file input in the two or more file buffers.
  • two or more file buffers configured to store a predetermined duration video file are created; in the overlay update manner, video files are input in time segments in two or more file buffers; Or the video file input in the two or more file buffers stores the video file, so that when the time is not recorded to the user, the latest recorded content is replaced by the original recorded content until the recording is waited for the user.
  • the problem that the user cannot save the recorded content in time due to the limited storage space of the terminal in the related art is solved, thereby achieving the effect that the video content desired by the user can be saved in time and the user experience is improved.
  • establishing two or more file buffers configured to store the predetermined duration video file includes: determining a time-limited mode set to limit the recording duration; establishing two or more file buffers according to the time-limited mode Area.
  • the length of the video files that can be cached by two or more file buffers can be the same or different from each other. When the length of the video to be obtained is long, the recording duration that can be cached in each file buffer can be set larger. When the length of the desired recording is short, the recording duration of each file buffer can be buffered. The settings are smaller. Therefore, it can be well adapted to different video environments.
  • the step of inputting the video file into the two or more file buffers in a time interval by using the overlay update method includes: determining whether the video file before the current time period is input in the file buffer; If the result of the determination is YES, the recording file before the current time period input in the file buffer is updated to the recording file recorded in the current time period. Realize the deletion of redundant recording content in real time, ensuring that the terminal has enough memory to store the video content that the user wants.
  • storing the video file according to the video files stored in the two or more file buffers includes: acquiring video files stored in two or more file buffers; The video files in the two or more file buffers are separately divided; the video files in the two or more file buffers after the split processing are spliced in time series; and the video files after the stitching processing are stored.
  • separately performing the segmentation processing on the video files in the two or more file buffers includes: acquiring key frame information of the video files in the two or more file buffers, where The key frame information includes a time stamp and an offset; and the video file is divided according to the key frame information.
  • the key frame information includes a time stamp and an offset
  • file segmentation can also be performed based on other information.
  • a file storage device is also provided in the embodiment, and the device is configured to implement the foregoing embodiments and preferred embodiments, and details are not described herein.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 2 is a block diagram showing the structure of a file storage device according to an embodiment of the present invention. As shown in FIG. 2, the device includes an establishing module 22, an input module 24, and a storage module 26. The device will be described below.
  • the establishing module 22 is configured to establish two or more file buffers configured to store the recording files of the predetermined duration; the input module 24 is connected to the establishing module 22, and is set to use two or two in the manner of overlay update.
  • the video file is input into the above file buffer in a time period; the storage module 26 is connected to the input module 24, and is configured to store the video file according to the video file input in the two or more file buffers.
  • FIG. 3 is a structural block diagram of the establishing module 22 in the file storage device according to the embodiment of the present invention. As shown in FIG. 3, the establishing module 22 includes a determining unit 32 and an establishing unit 34. The building module 22 will be described below.
  • the determining unit 32 is arranged to determine a time-limited mode set to limit the recording duration; the establishing unit 34 is connected to the determining unit 32, and is configured to establish two or more file buffers according to the time-limited mode.
  • FIG. 4 is a block diagram showing the structure of an input module 24 in a file storage device according to an embodiment of the present invention. As shown in FIG. 4, the input module 24 includes a judging unit 42 and an updating unit 44. The input module 24 will be described below.
  • the determining unit 42 is configured to determine whether a recording file before the current time period is input in the file buffer; the updating unit 44 is connected to the determining unit 42 and is set to input the file buffer if the determination result is yes.
  • the video file before the current time period is updated to the video file recorded in the current time period.
  • FIG. 5 is a structural block diagram of a storage module 26 in a file storage device according to an embodiment of the present invention. As shown in FIG. 5, the storage module 26 includes an obtaining unit 52, a dividing unit 54, a splicing unit 56, and a storage unit 58. The storage module 26 will be described below.
  • the obtaining unit 52 is configured to acquire the video files stored in the two or more file buffers; the dividing unit 54 is configured to separately perform the segmentation processing on the video files in the two or more file buffers; the splicing unit 56 And configured to splicing the video files in the two or more file buffers after the split processing in time series; the storage unit 58 is configured to store the video files after the stitching processing.
  • FIG. 6 is a block diagram showing the structure of a dividing unit 54 in a file storage device according to an embodiment of the present invention.
  • the dividing unit 54 includes an obtaining sub-unit 62 and a dividing sub-unit 64.
  • the division unit 54 will be described below.
  • the obtaining sub-unit 62 is configured to acquire key frame information of the video file in the two or more file buffers, wherein the key frame information includes a time stamp and an offset; the dividing sub-unit 64 is connected to the above acquiring sub- Unit 62 is arranged to split the video file based on the key frame information.
  • FIG. 7 is a structural block diagram of a time-limited recording apparatus according to an embodiment of the present invention.
  • the apparatus includes the following modules: a recording module 72 (same as the above input module 24) and a file pool module 74 (same as the above-mentioned establishing module 22).
  • the file processing module 76 (same as the above storage module 26) and the recording management module 78 (same as the above-described building module 22).
  • the recording module 72 is configured to collect images, sounds, and encodes;
  • the file pool module 74 is configured to open a file buffer and provide a function for reading and writing multimedia files; and the file processing module 76 is configured to perform multimedia files in the file pool.
  • the video management module 78 provides the user with an interface for setting time-limited recording, such as selecting a recording mode and selecting the duration of the recording.
  • the user sets the recording mode to the time-limited mode through the recording management module 78 and selects an appropriate duration, and then the user starts the recording module 72 to start recording, and the multimedia data generated during the recording process is written into a file through the file pool module 74.
  • the new video file automatically overwrites the "old" file, and the user stops recording after capturing the desired scene.
  • the file processing module 76 starts splitting and merging the video files, and saves the latest content as a separate video file. And ultimately to the user.
  • a new recording mode a time-limited mode, in which only the most recent content is recorded, the length of the time can be specified by the user as needed, such as 1 minute, 5 minutes.
  • the content before this time will be overwritten during the shooting process, thus ensuring that the file generated by the recording only contains a scene that has just appeared, so that the file size can be controlled; and the wonderful content that you want to shoot is not missed.
  • FIG. 8 is a flowchart of a display recording method according to an embodiment of the present invention. As shown in FIG. 8, the method includes the following steps:
  • Step S802 the recording function of the mobile terminal is turned on.
  • step S804 the user selects the time-limited mode through the recording management module and selects the required duration, such as 1 minute and 5 minutes.
  • step S806 the recording module is started to start recording, and the “old” content is automatically overwritten during the recording process, and the latest content is saved.
  • This step can be implemented by the following method: opening two file buffers A and B through the file pool module, each buffer restricts the recording time to the length selected by the user (for example, 1 minute), and the recorded data is first output to the A buffer. When the A buffer is full, it starts to output to the B buffer. When the B buffer is slow, it will output to the A buffer again, overwriting the contents of the original A buffer, and then changing to B when A is full, thus alternately used.
  • FIG. 9 is a schematic diagram of recording data storage according to an embodiment of the present invention.
  • step S808 the user stops recording after capturing the desired scene, and the file processing module generates a corresponding video file.
  • the A buffer saves the time of 00'00"-04'59
  • the B buffer saves the time of 05'00"-06'59"
  • the user stops recording if the content of the most recent time is saved in the same buffer, you can directly generate the file with the corresponding buffer; if the content is distributed in two buffers (that is, each part is saved), Then two pieces of data need to be spliced to generate a file, and the process mainly involves the generation of a file header.
  • the A buffer saves
  • FIG. 10 is a video file processing flow according to an embodiment of the present invention. The figure is illustrated by taking the format of the video file as the mp4 format as an example. The process includes the following steps.
  • step S1002 two file key frame lists are obtained.
  • Step S1004 selecting a time period to be divided, A takes 02'00"-04'59", B takes 05'00"-06'59", and obtains key frame information in the corresponding time, including time Poke, offset, due to the nonlinear characteristics of multimedia coding, the key frame may be slightly deviated from this time, resulting in the actual generated file length is slightly larger than the required time, because the impact of this point is minimal, the impact on the user experience can be ignored.
  • step S1006 the moov box (the most important information in the mp4 file header) and other mp4 file header contents are regenerated according to the key frame information.
  • step S1008 the corresponding media data in the two files is copied, and a new mp4 file is generated.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. Perform the steps shown or described, or separate them into individual integrated circuit modules, or Multiple of these modules or steps are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
  • the problem that the user cannot save the recorded content in time due to the limited storage space of the terminal in the related art is solved, thereby achieving the effect of timely saving the video content desired by the user and improving the user experience. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

A file storage method and device. The method comprises: establishing two or more than two file buffering areas for recording video files of a pre-set length (S102); inputting a video file in sequence in the two or more than two file buffering areas by continuously overwriting the buffer areas (S104); storing the video file according to the video files inputted into the two or more than two file buffering areas (S106). The method solves the problem in the prior art of limited storage space in a terminal that causes a user's inability to timely store video content, thereby enabling users to store video content desired and improving user experience.

Description

文件存储方法及装置File storage method and device 技术领域Technical field
本发明涉及通信领域,具体而言,涉及一种文件存储方法及装置。The present invention relates to the field of communications, and in particular to a file storage method and apparatus.
背景技术Background technique
随着科技的发展,移动终端在人们的生活中起着越来越重要的作用,以智能手机为例,目前智能手机的功能越来越多,极大的丰富着人们的生活,其中,智能手机的录像功能极大的改善了用户的生活,使用户在不购买昂贵的录像机的前提下,也能记录精彩的瞬间。但是目前智能手机的录像功能会存在如下问题:用户在拍摄一些可能会突发的场景时,例如拍摄球场上进球场景、拍摄小朋友可爱表情的场景时,由于不确定何时会出现这些精彩的画面,就必须一直录像,可能会导致手机的存储卡已经存储满了,但是还没拍到用户想要的画面,这样,用户就需要删除原来存储的文件,以保证手机有额外的存储空间去存储用户想要的画面,而当等到删除原来存储的一些文件后,再想重新拍摄时精彩画面可能已经错过了,或者拍了很多冗余不想要的内容,而造成存储文件庞大不便于分享给其他人,既浪费了存储空间也浪费了用户的时间。With the development of science and technology, mobile terminals play an increasingly important role in people's lives. Taking smartphones as an example, the functions of smart phones are increasing, which greatly enriches people's lives. The video recording function of the mobile phone greatly improves the user's life, so that the user can record the wonderful moment without purchasing an expensive video recorder. However, the current video recording function of the smartphone has the following problems: when the user shoots some scenes that may be sudden, such as shooting a scene on the court and shooting a scene with a cute expression of the child, it is not sure when these wonderful things will occur. The screen must be recorded all the time, which may cause the memory card of the mobile phone to be fully stored, but the user wants to take the picture, so the user needs to delete the original stored file to ensure that the mobile phone has extra storage space. Store the picture that the user wants, and when I wait to delete some of the original stored files, I want to re-shoot the wonderful picture may have been missed, or take a lot of redundant unwanted content, which makes the storage file huge and inconvenient to share Others waste both storage space and user time.
上述场景的共同点是:精彩画面不知道何时会出现以及该精彩画面持续的时间并不长。并且相关技术中的拍摄方式只能是持续录像直到拍到想要的画面,造成的问题是文件庞大甚至没有拍到想要的画面,这给用户带来了很大的不方便,在一定程度上降低了用户体验。What the above scenes have in common is that the wonderful picture does not know when it will appear and that the wonderful picture does not last long. And the shooting mode in the related art can only be continuous recording until the desired picture is taken, and the problem is that the file is huge or even not taken, which brings great inconvenience to the user, to a certain extent. Reduced user experience.
针对相关技术中存在的由于终端存储空间有限,导致用户无法及时保存录像内容的问题,目前尚未提出有效的解决方案。In view of the problem that the terminal has limited storage space due to the limited storage space of the user, the user cannot save the recorded content in time, and no effective solution has been proposed yet.
发明内容Summary of the invention
本发明提供了一种文件存储方法及装置,以至少解决相关技术中存在的由于终端存储空间有限,导致用户无法及时保存录像内容的问题。The present invention provides a file storage method and apparatus to solve at least the problem that the user cannot save the recorded content in time due to the limited storage space of the terminal existing in the related art.
根据本发明的一个方面,提供了一种文件存储方法,包括:建立两个或两个以上设置为存储预定时长录像文件的文件缓冲区;采用覆盖更新的方式依次在两个或两个以上所述文件缓冲区中分时间段输入录像文件;根据两个或两个以上所述文件缓冲区中输入的录像文件对所述录像文件进行存储。 According to an aspect of the present invention, a file storage method is provided, comprising: establishing two or more file buffers configured to store a predetermined duration video file; and sequentially or two or more in a manner of overlay update The video file is input into the file buffer in a time period; the video file is stored according to the video file input in the two or more file buffers.
优选地,建立两个或两个以上设置为存储预定时长录像文件的文件缓冲区包括:确定设置为限定录制时长的限时模式;根据所述限时模式建立两个或两个以上所述文件缓冲区。Preferably, establishing two or more file buffers configured to store the predetermined duration video file includes: determining a time-limited mode set to limit the recording duration; establishing two or more of the file buffers according to the time-limited mode .
优选地,采用覆盖更新的方式依次在两个或两个以上所述文件缓冲区中分时间段输入所述录像文件包括:判断所述文件缓冲区中是否输入有当前时间段之前的录像文件;在判断结果为是的情况下,将所述文件缓冲区中输入的当前时间段之前的录像文件更新为当前时间段录制的录像文件。Preferably, inputting the video file in a time period of two or more of the file buffers by using an overlay update manner includes: determining whether a video file before the current time period is input in the file buffer; If the result of the determination is YES, the recording file before the current time period input in the file buffer is updated to the recording file recorded in the current time period.
优选地,根据两个或两个以上所述文件缓冲区中存储的录像文件对所述录像文件进行存储包括:获取两个或两个以上所述文件缓冲区中存储的录像文件;对两个或两个以上所述文件缓冲区中的录像文件分别进行分割处理;按时间顺序拼接经过分割处理后的两个或两个以上所述文件缓冲区中的录像文件;存储进行拼接处理后的录像文件。Preferably, storing the video file according to the video file stored in the two or more file buffers comprises: acquiring video files stored in two or more file buffers; Or recording the video files in the two or more file buffers separately; splicing the video files in the two or more file buffers after the segmentation processing in time series; storing the video after the splicing process file.
优选地,对两个或两个以上所述文件缓冲区中的录像文件分别进行分割处理包括:获取两个或两个以上所述文件缓冲区中的录像文件的关键帧信息,其中,所述关键帧信息包括时戳、偏移量;根据所述关键帧信息分割所述录像文件。Preferably, separately performing the segmentation processing on the video files in the two or more file buffers includes: acquiring key frame information of the video files in the two or more file buffers, where The key frame information includes a time stamp and an offset; and the video file is segmented according to the key frame information.
根据本发明的另一方面,提供了一种文件存储装置,包括:建立模块,设置为建立两个或两个以上设置为存储预定时长录像文件的文件缓冲区;输入模块,设置为采用覆盖更新的方式依次在两个或两个以上所述文件缓冲区中分时间段输入录像文件;存储模块,设置为根据两个或两个以上所述文件缓冲区中输入的录像文件对所述录像文件进行存储。According to another aspect of the present invention, a file storage apparatus is provided, comprising: an establishing module configured to establish two or more file buffers configured to store a predetermined duration video file; and an input module configured to use overlay update The method sequentially inputs the video files in two or more of the file buffers in a time period; the storage module is configured to pair the video files according to the video files input in the two or more file buffers. Store.
优选地,所述建立模块包括:确定单元,设置为确定设置为限定录制时长的限时模式;建立单元,设置为根据所述限时模式建立两个或两个以上所述文件缓冲区。Preferably, the establishing module comprises: a determining unit configured to determine a time-limited mode set to limit a recording duration; and an establishing unit configured to establish two or more file buffers according to the time-limited mode.
优选地,所述输入模块包括:判断单元,设置为判断所述文件缓冲区中是否输入有当前时间段之前的录像文件;更新单元,设置为在判断结果为是的情况下,将所述文件缓冲区中输入的当前时间段之前的录像文件更新为当前时间段录制的录像文件。Preferably, the input module includes: a determining unit, configured to determine whether a recording file before the current time period is input in the file buffer; and an updating unit, configured to: if the determination result is yes, the file The video file before the current time period entered in the buffer is updated to the video file recorded in the current time period.
优选地,所述存储模块包括:获取单元,设置为获取两个或两个以上所述文件缓冲区中存储的录像文件;分割单元,设置为对两个或两个以上所述文件缓冲区中的录像文件分别进行分割处理;拼接单元,设置为按时间顺序拼接经过分割处理后的两个或两个以上所述文件缓冲区中的录像文件;存储单元,设置为存储进行拼接处理后的录像文件。 Preferably, the storage module includes: an obtaining unit configured to acquire a video file stored in two or more file buffers; and a dividing unit, configured to pair two or more of the file buffers The video files are respectively divided and processed; the splicing unit is configured to splicing the video files in the two or more file buffers after the segmentation process in time series; the storage unit is set to store the video after the splicing process file.
优选地,所述分割单元包括:获取子单元,设置为获取两个或两个以上所述文件缓冲区中的录像文件的关键帧信息,其中,所述关键帧信息包括时戳、偏移量;分割子单元,设置为根据所述关键帧信息分割所述录像文件。Preferably, the segmentation unit includes: an acquisition subunit configured to acquire key frame information of a video file in two or more file buffers, wherein the key frame information includes a time stamp and an offset And dividing the subunit, configured to divide the video file according to the key frame information.
通过本发明,采用建立两个或两个以上设置为存储预定时长录像文件的文件缓冲区;采用覆盖更新的方式依次在两个或两个以上所述文件缓冲区中分时间段输入所述录像文件;根据两个或两个以上所述文件缓冲区中输入的录像文件对所述录像文件进行存储,解决了相关技术中存在的由于终端存储空间有限,导致用户无法及时保存录像内容的问题,进而达到了可以及时保存用户想要的录像内容,提高用户体验的效果。According to the present invention, two or more file buffers configured to store a predetermined duration video file are created; and the recording is sequentially input in two or more of the file buffers in a time interval by means of overlay update. File; storing the video file according to the video file input in the file buffer of the two or more files, which solves the problem that the user cannot save the video content in time due to limited storage space of the terminal in the related art. In turn, the video content that the user wants can be saved in time to improve the user experience.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明设置为解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的文件存储方法的流程图;1 is a flow chart of a file storage method according to an embodiment of the present invention;
图2是根据本发明实施例的文件存储装置结构框图;2 is a block diagram showing the structure of a file storage device according to an embodiment of the present invention;
图3是根据本发明实施例的文件存储装置中建立模块22的结构框图;FIG. 3 is a structural block diagram of a building module 22 in a file storage device according to an embodiment of the present invention; FIG.
图4是根据本发明实施例的文件存储装置中输入模块24的结构框图;4 is a block diagram showing the structure of an input module 24 in a file storage device according to an embodiment of the present invention;
图5是根据本发明实施例的文件存储装置中存储模块26的结构框图;FIG. 5 is a structural block diagram of a storage module 26 in a file storage device according to an embodiment of the present invention; FIG.
图6是根据本发明实施例的文件存储装置中分割单元54的结构框图;FIG. 6 is a structural block diagram of a dividing unit 54 in a file storage device according to an embodiment of the present invention;
图7是根据本发明实施例的限时录像装置的结构框图;7 is a block diagram showing the structure of a time-limited video recording apparatus according to an embodiment of the present invention;
图8是根据本发明实施例的显示录像方法的流程图;FIG. 8 is a flowchart of a display recording method according to an embodiment of the present invention; FIG.
图9是根据本发明实施例的录像数据存储示意图;FIG. 9 is a schematic diagram of recording data storage according to an embodiment of the present invention; FIG.
图10是根据本发明实施例的录像文件处理流程图。FIG. 10 is a flow chart of processing a video file according to an embodiment of the present invention.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。 The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
在本实施例中提供了一种文件存储方法,图1是根据本发明实施例的文件存储方法的流程图,如图1所示,该流程包括如下步骤:A file storage method is provided in this embodiment. FIG. 1 is a flowchart of a file storage method according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
步骤S102,建立两个或两个以上设置为存储预定时长录像文件的文件缓冲区;Step S102, establishing two or more file buffers configured to store a predetermined duration video file;
步骤S104,采用覆盖更新的方式依次在两个或两个以上文件缓冲区中分时间段输入录像文件;Step S104, sequentially inputting a video file in a time period of two or more file buffers by using an overlay update manner;
步骤S106,根据两个或两个以上文件缓冲区中输入的录像文件对该录像文件进行存储。Step S106: The video file is stored according to the video file input in the two or more file buffers.
通过上述步骤,建立两个或两个以上设置为存储预定时长录像文件的文件缓冲区;采用覆盖更新的方式依次在两个或两个以上文件缓冲区中分时间段输入录像文件;根据两个或两个以上文件缓冲区中输入的录像文件对该录像文件进行存储,实现了在未录制到用户想要的瞬间的时候,让最新录制的内容去替换原先录制的内容,直到录制到用户等待的瞬间,进而突破了终端内存的限制,使得在终端内存较小的情况下也能录制到用户想要的瞬间。解决了相关技术中存在的由于终端存储空间有限,导致用户无法及时保存录像内容的问题,进而达到了可以及时保存用户想要的录像内容,提高用户体验的效果。Through the above steps, two or more file buffers configured to store a predetermined duration video file are created; in the overlay update manner, video files are input in time segments in two or more file buffers; Or the video file input in the two or more file buffers stores the video file, so that when the time is not recorded to the user, the latest recorded content is replaced by the original recorded content until the recording is waited for the user. The moment, and then break through the limit of the terminal memory, so that when the terminal memory is small, it can also record to the moment the user wants. The problem that the user cannot save the recorded content in time due to the limited storage space of the terminal in the related art is solved, thereby achieving the effect that the video content desired by the user can be saved in time and the user experience is improved.
在一个优选的实施例中,建立两个或两个以上设置为存储预定时长录像文件的文件缓冲区包括:确定设置为限定录制时长的限时模式;根据限时模式建立两个或两个以上文件缓冲区。其中,可以设置两个或两个以上文件缓冲区能够缓存的录像文件的时长相互之间相同或不同。当想要得到的录像时长较长时,可以将各个文件缓冲区能够缓存的录像时长设置的较大一些,当想要得到的录像时长较短时,可以将各个文件缓冲区能够缓存的录像时长设置的较小一些。从而可以很好的适应不同的录像环境。In a preferred embodiment, establishing two or more file buffers configured to store the predetermined duration video file includes: determining a time-limited mode set to limit the recording duration; establishing two or more file buffers according to the time-limited mode Area. The length of the video files that can be cached by two or more file buffers can be the same or different from each other. When the length of the video to be obtained is long, the recording duration that can be cached in each file buffer can be set larger. When the length of the desired recording is short, the recording duration of each file buffer can be buffered. The settings are smaller. Therefore, it can be well adapted to different video environments.
在一个优选的实施例中,采用覆盖更新的方式依次在两个或两个以上文件缓冲区中分时间段输入录像文件包括:判断文件缓冲区中是否输入有当前时间段之前的录像文件;在判断结果为是的情况下,将文件缓冲区中输入的当前时间段之前的录像文件更新为当前时间段录制的录像文件。实现了实时删除冗余的录像内容,保证终端有足够的内存存储用户想要的录像内容。In a preferred embodiment, the step of inputting the video file into the two or more file buffers in a time interval by using the overlay update method includes: determining whether the video file before the current time period is input in the file buffer; If the result of the determination is YES, the recording file before the current time period input in the file buffer is updated to the recording file recorded in the current time period. Realize the deletion of redundant recording content in real time, ensuring that the terminal has enough memory to store the video content that the user wants.
在一个优选的实施例中,根据两个或两个以上文件缓冲区中存储的录像文件对录像文件进行存储包括:获取两个或两个以上文件缓冲区中存储的录像文件;对两个或两个以上文件缓冲区中的录像文件分别进行分割处理;按时间顺序拼接经过分割处理后的两个或两个以上文件缓冲区中的录像文件;存储进行拼接处理后的录像文件。在 每个文件缓冲区中均存在有独立的录制的视频内容,对各个录像文件进行单独分割以及整体拼接可以实现去除用户不想要的录像内容,并且保证了录像内容整体的连贯性。In a preferred embodiment, storing the video file according to the video files stored in the two or more file buffers includes: acquiring video files stored in two or more file buffers; The video files in the two or more file buffers are separately divided; the video files in the two or more file buffers after the split processing are spliced in time series; and the video files after the stitching processing are stored. In There are independent recorded video content in each file buffer. Separate and complete splicing of each video file can remove the video content that the user does not want, and ensure the overall consistency of the video content.
在一个优选的实施例中,对两个或两个以上文件缓冲区中的录像文件分别进行分割处理包括:获取两个或两个以上文件缓冲区中的录像文件的关键帧信息,其中,该关键帧信息包括时戳、偏移量;根据该关键帧信息分割录像文件。当然,在进行录像文件分割时,也可以依据其他信息来进行文件分割。In a preferred embodiment, separately performing the segmentation processing on the video files in the two or more file buffers includes: acquiring key frame information of the video files in the two or more file buffers, where The key frame information includes a time stamp and an offset; and the video file is divided according to the key frame information. Of course, when performing video file segmentation, file segmentation can also be performed based on other information.
在本实施例中还提供了一种文件存储装置,该装置设置为实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。A file storage device is also provided in the embodiment, and the device is configured to implement the foregoing embodiments and preferred embodiments, and details are not described herein. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图2是根据本发明实施例的文件存储装置结构框图,如图2所示,该装置包括建立模块22,输入模块24和存储模块26。下面对该装置进行说明。2 is a block diagram showing the structure of a file storage device according to an embodiment of the present invention. As shown in FIG. 2, the device includes an establishing module 22, an input module 24, and a storage module 26. The device will be described below.
建立模块22,设置为建立两个或两个以上设置为存储预定时长录像文件的文件缓冲区;输入模块24,连接至上述建立模块22,设置为采用覆盖更新的方式依次在两个或两个以上文件缓冲区中分时间段输入录像文件;存储模块26,连接至上述输入模块24,设置为根据两个或两个以上文件缓冲区中输入的录像文件对录像文件进行存储。The establishing module 22 is configured to establish two or more file buffers configured to store the recording files of the predetermined duration; the input module 24 is connected to the establishing module 22, and is set to use two or two in the manner of overlay update. The video file is input into the above file buffer in a time period; the storage module 26 is connected to the input module 24, and is configured to store the video file according to the video file input in the two or more file buffers.
图3是根据本发明实施例的文件存储装置中建立模块22的结构框图,如图3所示,该建立模块22包括确定单元32和建立单元34,下面对该建立模块22进行说明。FIG. 3 is a structural block diagram of the establishing module 22 in the file storage device according to the embodiment of the present invention. As shown in FIG. 3, the establishing module 22 includes a determining unit 32 and an establishing unit 34. The building module 22 will be described below.
确定单元32,设置为确定设置为限定录制时长的限时模式;建立单元34,连接至上述确定单元32,设置为根据限时模式建立两个或两个以上文件缓冲区。The determining unit 32 is arranged to determine a time-limited mode set to limit the recording duration; the establishing unit 34 is connected to the determining unit 32, and is configured to establish two or more file buffers according to the time-limited mode.
图4是根据本发明实施例的文件存储装置中输入模块24的结构框图,如图4所示,该输入模块24包括判断单元42和更新单元44,下面对该输入模块24进行说明。4 is a block diagram showing the structure of an input module 24 in a file storage device according to an embodiment of the present invention. As shown in FIG. 4, the input module 24 includes a judging unit 42 and an updating unit 44. The input module 24 will be described below.
判断单元42,设置为判断文件缓冲区中是否输入有当前时间段之前的录像文件;更新单元44,连接至上述判断单元42,设置为在判断结果为是的情况下,将文件缓冲区中输入的当前时间段之前的录像文件更新为当前时间段录制的录像文件。The determining unit 42 is configured to determine whether a recording file before the current time period is input in the file buffer; the updating unit 44 is connected to the determining unit 42 and is set to input the file buffer if the determination result is yes. The video file before the current time period is updated to the video file recorded in the current time period.
图5是根据本发明实施例的文件存储装置中存储模块26的结构框图,如图5所示,该存储模块26包括获取单元52、分割单元54、拼接单元56和存储单元58。下面对该存储模块26进行说明。 FIG. 5 is a structural block diagram of a storage module 26 in a file storage device according to an embodiment of the present invention. As shown in FIG. 5, the storage module 26 includes an obtaining unit 52, a dividing unit 54, a splicing unit 56, and a storage unit 58. The storage module 26 will be described below.
获取单元52,设置为获取两个或两个以上文件缓冲区中存储的录像文件;分割单元54,设置为对两个或两个以上文件缓冲区中的录像文件分别进行分割处理;拼接单元56,设置为按时间顺序拼接经过分割处理后的两个或两个以上文件缓冲区中的录像文件;存储单元58,设置为存储进行拼接处理后的录像文件。The obtaining unit 52 is configured to acquire the video files stored in the two or more file buffers; the dividing unit 54 is configured to separately perform the segmentation processing on the video files in the two or more file buffers; the splicing unit 56 And configured to splicing the video files in the two or more file buffers after the split processing in time series; the storage unit 58 is configured to store the video files after the stitching processing.
图6是根据本发明实施例的文件存储装置中分割单元54的结构框图,如图6所示,该分割单元54包括获取子单元62和分割子单元64。下面对该分割单元54进行说明。6 is a block diagram showing the structure of a dividing unit 54 in a file storage device according to an embodiment of the present invention. As shown in FIG. 6, the dividing unit 54 includes an obtaining sub-unit 62 and a dividing sub-unit 64. The division unit 54 will be described below.
获取子单元62,设置为获取两个或两个以上文件缓冲区中的录像文件的关键帧信息,其中,该关键帧信息包括时戳、偏移量;分割子单元64,连接至上述获取子单元62,设置为根据关键帧信息分割录像文件。The obtaining sub-unit 62 is configured to acquire key frame information of the video file in the two or more file buffers, wherein the key frame information includes a time stamp and an offset; the dividing sub-unit 64 is connected to the above acquiring sub- Unit 62 is arranged to split the video file based on the key frame information.
图7是根据本发明实施例的限时录像装置的结构框图,如图7所示,该装置包括以下模块:录像模块72(同上述输入模块24)、文件池模块74(同上述建立模块22)、文件处理模块76(同上述存储模块26)、录像管理模块78(同上述建立模块22)。其中该录像模块72,设置为采集图像、声音并进行编码;文件池模块74设置为开辟文件缓冲区并提供对多媒体文件的读写功能;文件处理模块76设置为对文件池中的多媒体文件进行拆分、合并;录像管理模块78给用户提供设置限时录像的接口,例如选择录像模式、选择录像的时长。FIG. 7 is a structural block diagram of a time-limited recording apparatus according to an embodiment of the present invention. As shown in FIG. 7, the apparatus includes the following modules: a recording module 72 (same as the above input module 24) and a file pool module 74 (same as the above-mentioned establishing module 22). The file processing module 76 (same as the above storage module 26) and the recording management module 78 (same as the above-described building module 22). The recording module 72 is configured to collect images, sounds, and encodes; the file pool module 74 is configured to open a file buffer and provide a function for reading and writing multimedia files; and the file processing module 76 is configured to perform multimedia files in the file pool. Split and merge; the video management module 78 provides the user with an interface for setting time-limited recording, such as selecting a recording mode and selecting the duration of the recording.
在录像时,用户通过录像管理模块78将录像模式设置为限时模式并选择合适的时长,然后用户启动录像模块72开始录像,录像过程中生成的多媒体数据通过文件池模块74写入某个文件,新的录像文件自动覆盖“过旧”的文件,用户在拍到想要的场景后随即停止录像,文件处理模块76开始对录像文件进行拆分、合并,将最新的内容保存成单独的录像文件并最终提供给用户。During recording, the user sets the recording mode to the time-limited mode through the recording management module 78 and selects an appropriate duration, and then the user starts the recording module 72 to start recording, and the multimedia data generated during the recording process is written into a file through the file pool module 74. The new video file automatically overwrites the "old" file, and the user stops recording after capturing the desired scene. The file processing module 76 starts splitting and merging the video files, and saves the latest content as a separate video file. And ultimately to the user.
在上述实施例中提供了一种新的录像模式——限时模式,在这种模式下,只录最近一段时间的内容,这段时间的长短可以由用户根据需要指定,如1分钟、5分钟,此时间之前的内容在拍摄过程中就会被覆盖,由此保证录像生成的文件只包含刚刚出现的一段场景,从而做到文件大小可控;同时也不会错过想拍摄的精彩内容。In the above embodiment, a new recording mode, a time-limited mode, in which only the most recent content is recorded, the length of the time can be specified by the user as needed, such as 1 minute, 5 minutes. The content before this time will be overwritten during the shooting process, thus ensuring that the file generated by the recording only contains a scene that has just appeared, so that the file size can be controlled; and the wonderful content that you want to shoot is not missed.
图8是根据本发明实施例的显示录像方法的流程图,如图8所示,该方法包括如下步骤:FIG. 8 is a flowchart of a display recording method according to an embodiment of the present invention. As shown in FIG. 8, the method includes the following steps:
步骤S802,打开移动终端的录像功能。 Step S802, the recording function of the mobile terminal is turned on.
步骤S804,用户通过录像管理模块选择限时模式并选择需要的时长,如1分钟、5分钟。In step S804, the user selects the time-limited mode through the recording management module and selects the required duration, such as 1 minute and 5 minutes.
步骤S806,启动录像模块开始录像,录像过程中自动覆盖“过旧”的内容,保存最新的内容。可以通过如下方法实现这个步骤:通过文件池模块开辟2个文件缓冲区A,B,每个缓冲区限制录像的时间为用户选择的时长(如1分钟),录像数据先向A缓冲区输出,当A缓冲区满时,开始向B缓冲区输出,当B缓冲区慢时会再次向A缓冲区输出,覆盖原来A缓冲区的内容,在A满时再换到B,从而交替使用。该数据存储流程如图9所示,图9是根据本发明实施例的录像数据存储示意图。In step S806, the recording module is started to start recording, and the “old” content is automatically overwritten during the recording process, and the latest content is saved. This step can be implemented by the following method: opening two file buffers A and B through the file pool module, each buffer restricts the recording time to the length selected by the user (for example, 1 minute), and the recorded data is first output to the A buffer. When the A buffer is full, it starts to output to the B buffer. When the B buffer is slow, it will output to the A buffer again, overwriting the contents of the original A buffer, and then changing to B when A is full, thus alternately used. The data storage process is shown in FIG. 9. FIG. 9 is a schematic diagram of recording data storage according to an embodiment of the present invention.
步骤S808,用户在拍到想要的场景后随即停止录像,文件处理模块生成相应的录像文件。可以采用如下方法实现该步骤:如果最近一段时间的内容都保存在同一缓冲区,则直接用相应的缓冲区生成文件即可;如果内容分布在两个缓冲区上(即各存了一部分),则需要将两部分数据进行拼接生成文件,这当中过程主要涉及到文件头的生成。假设A缓冲区保存了00’00”-04’59”这段时间内容,B缓冲区保存了05’00”-06’59”这段时间内容,随即用户停止录像,用户需要的是02’00’-06’59”这段时间内容,以常用录像文件格式.mp4为例(.3gp处理方式类似),此过程如图10所示,图10是根据本发明实施例的录像文件处理流程图,其中以录像文件的格式为mp4格式为例进行说明。该过程包括如下步骤。In step S808, the user stops recording after capturing the desired scene, and the file processing module generates a corresponding video file. You can use the following method to achieve this step: if the content of the most recent time is saved in the same buffer, you can directly generate the file with the corresponding buffer; if the content is distributed in two buffers (that is, each part is saved), Then two pieces of data need to be spliced to generate a file, and the process mainly involves the generation of a file header. Suppose the A buffer saves the time of 00'00"-04'59", the B buffer saves the time of 05'00"-06'59", and then the user stops recording. The user needs 02' 00 '-06'59" This time content, taking the common video file format .mp4 as an example (.3gp processing is similar), this process is shown in FIG. 10, FIG. 10 is a video file processing flow according to an embodiment of the present invention. The figure is illustrated by taking the format of the video file as the mp4 format as an example. The process includes the following steps.
步骤S1002,获取到两个文件关键帧列表。In step S1002, two file key frame lists are obtained.
步骤S1004,选择要分割的时间段,A取02’00”-04’59”这段,B取05’00”-06’59”这段,并获取相应时间内的关键帧信息,包括时戳、偏移量,由于多媒体编码非线性特点,关键帧可能与此时间略有偏差,造成实际生成文件时长比要求时长略大一点,由于该点影响极小,对用户体验影响可以忽略。Step S1004, selecting a time period to be divided, A takes 02'00"-04'59", B takes 05'00"-06'59", and obtains key frame information in the corresponding time, including time Poke, offset, due to the nonlinear characteristics of multimedia coding, the key frame may be slightly deviated from this time, resulting in the actual generated file length is slightly larger than the required time, because the impact of this point is minimal, the impact on the user experience can be ignored.
步骤S1006,根据这些关键帧信息重新生成moov box(mp4文件头中最重要信息)以及其它mp4文件头内容。In step S1006, the moov box (the most important information in the mp4 file header) and other mp4 file header contents are regenerated according to the key frame information.
步骤S1008,拷贝两个文件中对应的媒体数据,生成新mp4文件。In step S1008, the corresponding media data in the two files is copied, and a new mp4 file is generated.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将 它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. Perform the steps shown or described, or separate them into individual integrated circuit modules, or Multiple of these modules or steps are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不设置为限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。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 can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性Industrial applicability
通过上述实施例及优选实施方式,解决了相关技术中存在的由于终端存储空间有限,导致用户无法及时保存录像内容的问题,进而达到了可以及时保存用户想要的录像内容,提高用户体验的效果。 Through the foregoing embodiments and the preferred embodiments, the problem that the user cannot save the recorded content in time due to the limited storage space of the terminal in the related art is solved, thereby achieving the effect of timely saving the video content desired by the user and improving the user experience. .

Claims (10)

  1. 一种文件存储方法,包括:A file storage method comprising:
    建立两个或两个以上设置为存储预定时长录像文件的文件缓冲区;Establishing two or more file buffers configured to store a predetermined duration video file;
    采用覆盖更新的方式依次在两个或两个以上所述文件缓冲区中分时间段输入录像文件;Inputting video files in two or more of the file buffers in time intervals by means of overlay update;
    根据两个或两个以上所述文件缓冲区中输入的录像文件对所述录像文件进行存储。The video file is stored according to a video file input in two or more of the file buffers.
  2. 根据权利要求1所述的方法,其中,建立两个或两个以上设置为存储预定时长录像文件的文件缓冲区包括:The method of claim 1 wherein establishing two or more file buffers configured to store the predetermined duration video file comprises:
    确定设置为限定录制时长的限时模式;Determine the time-limited mode set to limit the recording duration;
    根据所述限时模式建立两个或两个以上所述文件缓冲区。Two or more of the file buffers are created according to the time-limited mode.
  3. 根据权利要求1所述的方法,其中,采用覆盖更新的方式依次在两个或两个以上所述文件缓冲区中分时间段输入所述录像文件包括:The method of claim 1, wherein sequentially inputting the video files in two or more of the file buffers in a time interval by means of overlay update comprises:
    判断所述文件缓冲区中是否输入有当前时间段之前的录像文件;Determining whether a video file before the current time period is input in the file buffer;
    在判断结果为是的情况下,将所述文件缓冲区中输入的当前时间段之前的录像文件更新为当前时间段录制的录像文件。If the result of the determination is YES, the recording file before the current time period input in the file buffer is updated to the recording file recorded in the current time period.
  4. 根据权利要求1所述的方法,其中,根据两个或两个以上所述文件缓冲区中存储的录像文件对所述录像文件进行存储包括:The method of claim 1, wherein storing the video file according to the video files stored in the two or more file buffers comprises:
    获取两个或两个以上所述文件缓冲区中存储的录像文件;Obtaining video files stored in two or more of the file buffers;
    对两个或两个以上所述文件缓冲区中的录像文件分别进行分割处理;Separating the video files in the two or more file buffers separately;
    按时间顺序拼接经过分割处理后的两个或两个以上所述文件缓冲区中的录像文件;Sequencing the video files in the two or more of the file buffers after the segmentation process in chronological order;
    存储进行拼接处理后的录像文件。Store the video files after splicing.
  5. 根据权利要求4所述的方法,其中,对两个或两个以上所述文件缓冲区中的录像文件分别进行分割处理包括: The method of claim 4, wherein separately performing the segmentation processing on the video files in the two or more of the file buffers comprises:
    获取两个或两个以上所述文件缓冲区中的录像文件的关键帧信息,其中,所述关键帧信息包括时戳、偏移量;Obtaining key frame information of the video files in the two or more file buffers, where the key frame information includes a time stamp and an offset;
    根据所述关键帧信息分割所述录像文件。The video file is segmented according to the key frame information.
  6. 一种文件存储装置,包括:A file storage device comprising:
    建立模块,设置为建立两个或两个以上设置为存储预定时长录像文件的文件缓冲区;Establishing a module, set to establish two or more file buffers configured to store a predetermined duration video file;
    输入模块,设置为采用覆盖更新的方式依次在两个或两个以上所述文件缓冲区中分时间段输入录像文件;The input module is configured to input a video file in two or more of the file buffers in a time division manner by using an overlay update manner;
    存储模块,设置为根据两个或两个以上所述文件缓冲区中输入的录像文件对所述录像文件进行存储。The storage module is configured to store the video file according to the video file input in the two or more file buffers.
  7. 根据权利要求6所述的装置,其中,所述建立模块包括:The apparatus of claim 6 wherein said establishing module comprises:
    确定单元,设置为确定设置为限定录制时长的限时模式;Determining the unit, setting to determine a time-limited mode set to limit the recording duration;
    建立单元,设置为根据所述限时模式建立两个或两个以上所述文件缓冲区。Establishing a unit, configured to establish two or more of the file buffers according to the time-limited mode.
  8. 根据权利要求6所述的装置,其中,所述输入模块包括:The apparatus of claim 6 wherein said input module comprises:
    判断单元,设置为判断所述文件缓冲区中是否输入有当前时间段之前的录像文件;a determining unit, configured to determine whether a video file before the current time period is input in the file buffer;
    更新单元,设置为在判断结果为是的情况下,将所述文件缓冲区中输入的当前时间段之前的录像文件更新为当前时间段录制的录像文件。The updating unit is configured to update the recording file before the current time period input in the file buffer to the recording file recorded in the current time period if the determination result is YES.
  9. 根据权利要求6所述的装置,其中,所述存储模块包括:The apparatus of claim 6, wherein the storage module comprises:
    获取单元,设置为获取两个或两个以上所述文件缓冲区中存储的录像文件;Obtaining a unit, configured to obtain a video file stored in two or more file buffers;
    分割单元,设置为对两个或两个以上所述文件缓冲区中的录像文件分别进行分割处理;a dividing unit, configured to separately perform segmentation processing on the video files in the two or more file buffers;
    拼接单元,设置为按时间顺序拼接经过分割处理后的两个或两个以上所述文件缓冲区中的录像文件;The splicing unit is configured to splicing the video files in the two or more file buffers after the segmentation process in time series;
    存储单元,设置为存储进行拼接处理后的录像文件。The storage unit is configured to store the video file after the splicing process.
  10. 根据权利要求9所述的装置,其中,所述分割单元包括: The apparatus of claim 9, wherein the dividing unit comprises:
    获取子单元,设置为获取两个或两个以上所述文件缓冲区中的录像文件的关键帧信息,其中,所述关键帧信息包括时戳、偏移量;Obtaining a sub-unit, configured to acquire key frame information of the video file in the two or more file buffers, where the key frame information includes a time stamp and an offset;
    分割子单元,设置为根据所述关键帧信息分割所述录像文件。 The segmentation subunit is configured to segment the video file according to the key frame information.
PCT/CN2015/071449 2014-10-15 2015-01-23 File storage method and device WO2015131700A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410545519.8 2014-10-15
CN201410545519.8A CN105573921A (en) 2014-10-15 2014-10-15 File storage method and device

Publications (1)

Publication Number Publication Date
WO2015131700A1 true WO2015131700A1 (en) 2015-09-11

Family

ID=54054548

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/071449 WO2015131700A1 (en) 2014-10-15 2015-01-23 File storage method and device

Country Status (2)

Country Link
CN (1) CN105573921A (en)
WO (1) WO2015131700A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111125022A (en) * 2019-11-15 2020-05-08 浙江大华技术股份有限公司 Method, device, equipment and storage medium for determining video coverage weight

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111866422B (en) * 2020-06-16 2022-12-09 普联技术有限公司 Video data uploading method, device, equipment and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1812533A (en) * 2006-01-10 2006-08-02 无敌科技(西安)有限公司 Video recording method
CN101409831A (en) * 2008-07-10 2009-04-15 浙江师范大学 Method for processing multimedia video object
CN102413035A (en) * 2011-08-16 2012-04-11 北京首钢自动化信息技术有限公司 Method for realizing rapid data acquisition

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004057865A2 (en) * 2002-12-20 2004-07-08 Koninklijke Philips Electronics N.V. More user friendly time-shift buffer
CN1780383A (en) * 2004-11-24 2006-05-31 上海乐金广电电子有限公司 Continuous data recording method for digit composite video recorder
US8433859B2 (en) * 2008-11-25 2013-04-30 Mediatek Inc. Apparatus and method for buffer management for a memory operating
ATE543324T1 (en) * 2009-05-06 2012-02-15 Alcatel Lucent METHOD FOR OPTIMIZING THE DELIVERY OF CONTENT FROM A CACHE WITH RESPECT TO COSTS
CN103297739B (en) * 2012-02-22 2016-08-31 安凯(广州)微电子技术有限公司 A kind of audio frequency and video method for recording and device
CN103067696A (en) * 2013-01-31 2013-04-24 东方网力科技股份有限公司 Stream media caching method, device, controller and system facing video monitoring
CN103744993A (en) * 2014-01-22 2014-04-23 苏州科达科技股份有限公司 Video file storage-retrieval method and video file storage-retrieval device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1812533A (en) * 2006-01-10 2006-08-02 无敌科技(西安)有限公司 Video recording method
CN101409831A (en) * 2008-07-10 2009-04-15 浙江师范大学 Method for processing multimedia video object
CN102413035A (en) * 2011-08-16 2012-04-11 北京首钢自动化信息技术有限公司 Method for realizing rapid data acquisition

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111125022A (en) * 2019-11-15 2020-05-08 浙江大华技术股份有限公司 Method, device, equipment and storage medium for determining video coverage weight

Also Published As

Publication number Publication date
CN105573921A (en) 2016-05-11

Similar Documents

Publication Publication Date Title
CN112073649B (en) Multimedia data processing method, multimedia data generating method and related equipment
US11670339B2 (en) Video acquisition method and device, terminal and medium
US10992623B2 (en) Digital media messages and files
KR100726258B1 (en) Method for producing digital images using photographic files and phonetic files in a mobile device
CN112866796A (en) Video generation method and device, electronic equipment and storage medium
CN113055709B (en) Video publishing method, device, equipment, storage medium and program product
CN111435600B (en) Method and apparatus for processing audio
CN106095881A (en) Method, system and the mobile terminal of a kind of display photos corresponding information
JP2014030153A (en) Information processor, information processing method, and computer program
CN108881766B (en) Video processing method, device, terminal and storage medium
WO2015131700A1 (en) File storage method and device
JP6869135B2 (en) Reproduction device, control method of reproduction device, and program
AU2021202286A1 (en) Managing data
JP2016063477A (en) Conference system, information processing method and program
CN107193961B (en) Information recording method and apparatus
CN105407282A (en) Photographing method and replay method
WO2017176940A1 (en) Digital media messages and files
JP5233730B2 (en) Information processing apparatus and information processing method
JP2015023317A5 (en) Image management apparatus, image management method, program, and storage medium
CN103093486A (en) Method and device for editing of log
CN111625508A (en) Information processing method and device
US9979787B2 (en) Information processing system, network storage device, and non-transitory recording medium
CN112422808B (en) Photo acquisition method, media object processing device and electronic equipment
CN116506654A (en) Media content publishing method, device, equipment and storage medium
CN117376635A (en) Multimedia data processing method, apparatus, device, storage medium, and program product

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15758655

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15758655

Country of ref document: EP

Kind code of ref document: A1