CN112203031A - Digital video caching system and method - Google Patents

Digital video caching system and method Download PDF

Info

Publication number
CN112203031A
CN112203031A CN202010806248.2A CN202010806248A CN112203031A CN 112203031 A CN112203031 A CN 112203031A CN 202010806248 A CN202010806248 A CN 202010806248A CN 112203031 A CN112203031 A CN 112203031A
Authority
CN
China
Prior art keywords
audio
frame
video
access
video frames
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.)
Granted
Application number
CN202010806248.2A
Other languages
Chinese (zh)
Other versions
CN112203031B (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.)
Shenzhen Longhorn Automotive Electronic Equipment Co Ltd
Original Assignee
Shenzhen Longhorn Automotive Electronic Equipment 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 Shenzhen Longhorn Automotive Electronic Equipment Co Ltd filed Critical Shenzhen Longhorn Automotive Electronic Equipment Co Ltd
Priority to CN202010806248.2A priority Critical patent/CN112203031B/en
Publication of CN112203031A publication Critical patent/CN112203031A/en
Application granted granted Critical
Publication of CN112203031B publication Critical patent/CN112203031B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8455Structuring of content, e.g. decomposing content into time segments involving pointers to the content, e.g. pointers to the I-frames of the video stream
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention provides a digital video caching system and a method, wherein the system comprises: the audio and video acquisition module is used for acquiring audio and video frames in real time; the marking module is used for adding a marking frame header to each acquired audio and video frame; the annular buffer area is used for caching and refreshing the audio and video frames with the marked frame headers within a fixed frame number range; and the access module is used for distinguishing the access information of the access user so as to respectively read the audio and video segments consisting of the audio and video frames in the annular buffer area. The embodiment of the invention caches the audio and video frames by adopting the annular buffer area, and due to the characteristic of synchronous read-write of the annular buffer area, the memory of the annular buffer area is continuous, thereby avoiding data loss, and simultaneously distinguishing the access information of the access user, so that the access user can quickly read the appointed audio and video frames by the access information and the information marking the frame head, thereby avoiding the repetition and the disorder of data and effectively supporting the simultaneous access of multiple users.

Description

Digital video caching system and method
Technical Field
The embodiment of the invention relates to the technical field of digital video monitoring, in particular to a digital video caching system and a digital video caching method.
Background
The existing digital video cache system needs to support the functions of video recording and real-time video recording at the same time, the video recording system stores the audio and video frames recorded in real time into the cache module, when the system needs to look up the audio and video after a certain time point, the cache system needs to arrange the section of audio and video, arrange the audio and video frames in the cache module into an audio and video section, and facilitate the access and reading of an access user to the cache system. However, since the buffer module generally adopts queue buffer, when the audio/video frames in the buffer space are full, buffer cannot be continued, the audio/video frames with a certain size need to be deleted to be stored into new audio/video frames, and the data writing and reading are asynchronous, which easily causes data loss.
Disclosure of Invention
The technical problem to be solved in the embodiments of the present invention is to provide a digital video caching system, which can improve the memory usage rate and support simultaneous access by multiple users.
A further technical problem to be solved in the embodiments of the present invention is to provide a digital video caching method, which can improve the memory usage rate and support simultaneous access by multiple users.
In order to solve the technical problem, the embodiment of the invention adopts the following technical scheme: a digital video caching system, comprising:
the audio and video acquisition module is used for acquiring audio and video frames in real time;
the marking module is used for adding a marking frame header to each acquired audio and video frame;
the annular buffer area is used for caching and refreshing the audio and video frames with the marked frame headers within a fixed frame number range; and
and the access module is used for distinguishing access users so as to respectively read audio and video segments consisting of audio and video frames in the annular buffer area.
Further, the marking frame header comprises the following information: frame marker, frame header length, frame type, channel, frame rate, frame number, length, and time.
Further, the ring buffer includes:
the checking unit is used for checking whether a vacant frame number memory exists in the annular buffer area;
the writing unit is used for writing the audio and video frames with the marked frame headers into the annular buffer zone when the frame number memory in the annular buffer zone has a spare; and
and the deleting unit is used for deleting the audio and video frame with the earliest writing time when the frame number memory in the ring buffer is checked to be full.
Further, the access module includes:
the distinguishing unit is used for distinguishing the access information of the access users so that the access users can respectively access the ring buffer area;
the reading unit is used for reading the audio and video frames with the specified writing time period when the audio and video frames with the marked frame headers are cached in the checking annular buffer area; and
and the sorting unit is used for sorting the read audio and video frames into continuous audio and video segments and sending the continuous audio and video segments to the access user.
Further, the access information of the access user includes a frame mark in the mark frame header and time.
On the other hand, to further solve the above technical problem, an embodiment of the present invention employs a digital video caching method, which includes the following steps:
acquiring audio and video frames in real time;
adding a marking frame header to each acquired audio and video frame;
buffering and refreshing the audio and video frames with the marked frame headers within a fixed frame number range; and
and distinguishing the access users to respectively read the audio and video segments consisting of the audio and video frames in the annular buffer area.
Further, the marking frame header comprises the following information: frame marker, frame header length, frame type, channel, frame rate, frame number, length, and time.
Further, the buffering and refreshing the audio/video frame with the marked frame header within the fixed frame number range includes:
checking whether a vacant frame number memory exists in the annular buffer area;
writing the audio and video frames with the marked frame headers into the ring buffer when the frame number memory in the ring buffer has a vacancy; and
and deleting the audio/video frame with the earliest writing time when the frame number memory in the ring buffer is checked to be full.
Further, the distinguishing the access users to respectively read the audio and video segments composed of the audio and video frames in the ring buffer comprises:
distinguishing the access information of the access users so that the access users can respectively access the ring buffer area;
reading the audio and video frames in the appointed writing time period when the audio and video frames with the marked frame headers are cached in the checking annular buffer area; and
and the read audio and video frames are arranged into continuous audio and video segments and are sent to the access user.
Further, the access information of the access user includes a frame mark in the mark frame header and time.
By adopting the technical scheme, the embodiment of the invention at least has the following beneficial effects: the embodiment of the invention adds the marking frame header containing the specific information on the acquired audio and video and caches the audio and video frames by adopting the annular buffer area, and due to the characteristic of synchronous read-write of the annular buffer area, the memory of the annular buffer area is continuous, thereby avoiding data loss, and simultaneously distinguishing the access information of the access user, so that the access user can rapidly read the appointed audio and video frames by the access information and the information of the marking frame header, avoiding the repetition and the disorder of data and effectively supporting the simultaneous access of multiple users.
Drawings
Fig. 1 is a schematic block diagram of an alternative embodiment of the digital video caching system of the present invention.
Fig. 2 is a schematic diagram of an audio/video frame with a tagged frame header added in an alternative embodiment of the digital video caching system according to the present invention.
Fig. 3 is a schematic block diagram of an alternate embodiment ring buffer 50 of the digital video caching system of the present invention.
Fig. 4 is a schematic block diagram of an access module 70 according to an alternative embodiment of the digital video caching system of the present invention.
Fig. 5 is a flow chart of steps of an alternative embodiment of the digital video caching method of the present invention.
Fig. 6 is a schematic flow chart of step S3 of an alternative embodiment of the digital video caching method of the present invention.
Fig. 7 is a schematic flow chart of step S4 of an alternative embodiment of the digital video caching method of the present invention.
Detailed Description
The invention is described in further detail below with reference to the figures and specific examples. It is to be understood that the following illustrative embodiments and description are only intended to illustrate the present invention, and are not intended to limit the present invention, and features of the embodiments and examples of the present invention may be combined with each other without conflict.
An alternative embodiment of the present invention provides a digital video caching system 1, as shown in fig. 1, including:
the audio and video acquisition module 10 is used for acquiring audio and video frames in real time;
the marking module 30 is configured to add a marking frame header 90 to each acquired audio/video frame;
the ring buffer 50 is used for buffering and refreshing the audio and video frames with the marked frame headers 90 in a fixed frame number range; and
and the access module 70 is used for distinguishing access users to respectively read audio and video segments consisting of audio and video frames in the ring buffer.
According to the embodiment of the invention, the marking frame header 90 containing specific information is added on the acquired audio and video, the annular buffer 50 is adopted to cache the audio and video frames, due to the characteristic of synchronous read-write of the annular buffer 50, the memory of the annular buffer 50 is continuous, the data loss is avoided, meanwhile, the access information of an access user is distinguished, so that the access user can quickly read the specified audio and video frames through the access information and the information of the marking frame header 90, the repetition and the disorder of the data are avoided, and the simultaneous access of multiple users is effectively supported.
In yet another alternative embodiment of the present invention, as shown in fig. 2, the mark-up frame header 90 includes the following information: frame marker, frame header length, frame type, channel, frame rate, frame number, length, and time. In the embodiment, by setting the marking frame header 90, a certain frame can be quickly positioned according to specific information contained in the marking frame header 90, so that the reading efficiency is improved, and meanwhile, no confusion is generated when an access user reads each frame of audio and video added with the marking frame header 90.
In yet another alternative embodiment of the present invention, as shown in fig. 3, the ring buffer 50 includes:
a checking unit 501, configured to check whether there is a vacant frame number memory in the ring buffer 50;
a writing unit 503, configured to write the audio/video frame with the marked frame header 90 into the ring buffer 50 when there is a space in the frame number memory in the ring buffer 50; and
and the deleting unit 505 is configured to delete the audio/video frame with the earliest write time when the frame number memory in the ring buffer 50 is checked to be full.
In this embodiment, the checking unit 501 is arranged to check the memory space of the ring buffer 50, when the ring buffer 50 has spare memory, the writing unit 503 writes a new audio/video frame, and when the ring buffer 50 is full of memory, the deleting unit 505 deletes the audio/video frame with the earliest writing time in the ring buffer 50, and the writing and reading of the ring buffer 50 are synchronized, so that the writing of new data and the reading of data in the ring buffer 50 can be effectively ensured.
In yet another alternative embodiment of the present invention, as shown in fig. 4, the access module 70 includes:
a distinguishing unit 701, configured to distinguish access information of the access users so that the access users respectively access the ring buffer 50;
the reading unit 703 is configured to read an audio/video frame in a specified write time period when the audio/video frame with the tagged frame header 90 is cached in the inspection ring buffer 50; and
and the sorting unit 705 is configured to sort the read audio/video frames into continuous audio/video segments and send the continuous audio/video segments to the access user.
In the embodiment, the access information of each access user is distinguished by the distinguishing unit 701, and the access rights obtained by each access user are consistent but the access records are distinguished by distinguishing, so that the access operations among the access users are mutually exclusive, and no disorder among data is generated, the reading unit 703 reads the audio/video frame specified by the access user according to the access information of the access user, and then the audio/video frame is sorted into continuous audio/video segments by the sorting unit 705 and then sent to the access user, so that the access user can call the pre-recorded audio/video segments more conveniently.
In yet another alternative embodiment of the present invention, the access information of the accessing subscriber includes a frame mark and time in the mark frame header 90. In the embodiment, the access information including the frame mark and the time is set, so that the specified audio/video frame can be effectively and quickly positioned, the specified certain audio/video frame is difficult to find due to the inconsistency and irregularity of the information included in the original data frame, the frame positioning can be quickly and accurately performed through the frame mark and the time, the efficiency is ensured, and the accuracy is improved.
On the other hand, as shown in fig. 5, an embodiment of the present invention employs a digital video caching method, which includes the following steps:
s1: acquiring audio and video frames in real time;
s2: adding a marking frame header 90 to each acquired audio and video frame;
s3: buffering and refreshing the audio and video frames with the marked frame headers 90 in a fixed frame number range; and
s4: and distinguishing the access users to respectively read the audio and video segments consisting of the audio and video frames in the annular buffer area.
By adopting the method, the embodiment can continuously cache and refresh the audio and video frames, improve the utilization rate of the memory, and simultaneously can quickly read the audio and video frames and distinguish access users to realize simultaneous access of multiple users
In yet another alternative embodiment of the present invention, the marking frame header 90 includes the following information: frame marker, frame header length, frame type, channel, frame rate, frame number, length, and time. In this embodiment, the marking frame headers 90 are set to include the above information, so that the marking frame headers 90 can be distinguished from each other, and meanwhile, the searching is easy, and the reading efficiency of the cache system is improved.
In yet another alternative embodiment of the present invention, as shown in fig. 6, the step S3 includes:
s31: checking whether a vacant frame number memory exists in the ring buffer 50;
s32: when the frame number memory in the ring buffer 50 has a spare, writing the audio/video frame with the marked frame header 90 into the ring buffer 50; and
s33: when the frame number memory in the ring buffer 50 is checked to be full, the audio/video frame with the earliest writing time is deleted.
By adopting the method, the memory space in the ring buffer 50 is checked before the audio/video frames are written and deleted, so that the normal operation of reading and writing in the ring buffer 50 is ensured, and the system reliability is improved.
In yet another alternative embodiment of the present invention, as shown in fig. 7, the step S4 includes:
s41: distinguishing access information of the access users for the access users to respectively access the ring buffer 50;
s42: reading the audio/video frame with the specified write-in time period when the audio/video frame with the marked frame header 90 is cached in the checking annular buffer 50; and
s43: and the read audio and video frames are arranged into continuous audio and video segments and are sent to the access user.
By adopting the method, the access information of the access users is distinguished, so that the access information of each access user is independently opened, then the access information is accessed corresponding to a specific audio/video frame, the audio/video frame is read and sorted into the audio/video segment for the access users to download and watch, and the access to the cache system by multiple users can be supported.
In yet another alternative embodiment of the present invention, the access information of the accessing subscriber includes a frame mark and time in the mark frame header 90. In the embodiment, the marking frame header 90 is set to include the frame mark and the time, and the specified audio/video frame can be conveniently and quickly positioned through the frame mark and the time, so that the reading efficiency and the reading accuracy are improved.
The functions described in the embodiments of the present invention may be stored in a storage medium readable by a computing device if they are implemented in the form of software functional modules or units and sold or used as independent products. Based on such understanding, part of the contribution of the embodiments of the present invention to the prior art or part of the technical solution may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computing device (which may be a personal computer, a server, a mobile computing device, a network device, or the like) to execute all or part of the steps of the method described in the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk. 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.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and many modifications may be made by one skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A digital video caching system, said system comprising:
the audio and video acquisition module is used for acquiring audio and video frames in real time;
the marking module is used for adding a marking frame header to each acquired audio and video frame;
the annular buffer area is used for caching and refreshing the audio and video frames with the marked frame headers within a fixed frame number range; and
and the access module is used for distinguishing the access information of the access user so as to respectively read the audio and video segments consisting of the audio and video frames in the annular buffer area.
2. The digital video caching system of claim 1, wherein the tagged frame header comprises the following information:
frame marker, frame header length, frame type, channel, frame rate, frame number, length, and time.
3. The digital video caching system of claim 1, wherein the ring buffer comprises:
the checking unit is used for checking whether a vacant frame number memory exists in the annular buffer area;
the writing unit is used for writing the audio and video frames with the marked frame headers into the annular buffer zone when the frame number memory in the annular buffer zone has a spare; and
and the deleting unit is used for deleting the audio and video frame with the earliest writing time when the frame number memory in the ring buffer is checked to be full.
4. The digital video caching system of claim 1, wherein the access module comprises:
the distinguishing unit is used for distinguishing the access information of the access users so that the access users can respectively access the ring buffer area;
the reading unit is used for reading the audio and video frames with the specified writing time period when the audio and video frames with the marked frame headers are cached in the checking annular buffer area; and
and the sorting unit is used for sorting the read audio and video frames into continuous audio and video segments and sending the continuous audio and video segments to the access user.
5. The digital video caching system of claim 4, wherein the access information of the accessing user comprises a frame tag in a tag frame header and a time.
6. A digital video caching method, comprising the steps of:
acquiring audio and video frames in real time;
adding a marking frame header to each acquired audio and video frame;
buffering and refreshing the audio and video frames with the marked frame headers within a fixed frame number range; and
and distinguishing the access users to respectively read the audio and video segments consisting of the audio and video frames in the annular buffer area.
7. The digital video buffering method according to claim 6, wherein the tagged frame header comprises the following information:
frame marker, frame header length, frame type, channel, frame rate, frame number, length, and time.
8. The method of claim 6, wherein buffering and refreshing audio/video frames with marked frame headers within a fixed frame number range comprises:
checking whether a vacant frame number memory exists in the annular buffer area;
writing the audio and video frames with the marked frame headers into the ring buffer when the frame number memory in the ring buffer has a vacancy; and
and deleting the audio/video frame with the earliest writing time when the frame number memory in the ring buffer is checked to be full.
9. The digital video caching method of claim 6, wherein the distinguishing of the access users to read audio and video segments comprised of audio and video frames in the ring buffer, respectively, comprises:
distinguishing the access information of the access users so that the access users can respectively access the ring buffer area;
reading the audio and video frames in the appointed writing time period when the audio and video frames with the marked frame headers are cached in the checking annular buffer area; and
and the read audio and video frames are arranged into continuous audio and video segments and are sent to the access user.
10. The digital video buffering method of claim 9, wherein the access information of the accessing user comprises a frame mark in a mark frame header and a time.
CN202010806248.2A 2020-08-12 2020-08-12 Digital video caching system and method Active CN112203031B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010806248.2A CN112203031B (en) 2020-08-12 2020-08-12 Digital video caching system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010806248.2A CN112203031B (en) 2020-08-12 2020-08-12 Digital video caching system and method

Publications (2)

Publication Number Publication Date
CN112203031A true CN112203031A (en) 2021-01-08
CN112203031B CN112203031B (en) 2023-06-02

Family

ID=74005556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010806248.2A Active CN112203031B (en) 2020-08-12 2020-08-12 Digital video caching system and method

Country Status (1)

Country Link
CN (1) CN112203031B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6748508B1 (en) * 2000-10-17 2004-06-08 Sun Microsystems, Inc. Method and apparatus for buffering in multi-node, data distribution architectures
CN103686312A (en) * 2013-12-05 2014-03-26 中国航空无线电电子研究所 DVR multipath audio and video recording method
CN104604240A (en) * 2012-07-18 2015-05-06 欧朋软件爱尔兰有限责任公司 Just-in-time distributed video cache
CN105376218A (en) * 2015-10-21 2016-03-02 上海思华科技股份有限公司 Stream media system and method for fast responding to user request
CN111405358A (en) * 2020-03-24 2020-07-10 上海依图网络科技有限公司 Cache-based video frame extraction method, apparatus, medium, and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6748508B1 (en) * 2000-10-17 2004-06-08 Sun Microsystems, Inc. Method and apparatus for buffering in multi-node, data distribution architectures
CN104604240A (en) * 2012-07-18 2015-05-06 欧朋软件爱尔兰有限责任公司 Just-in-time distributed video cache
CN103686312A (en) * 2013-12-05 2014-03-26 中国航空无线电电子研究所 DVR multipath audio and video recording method
CN105376218A (en) * 2015-10-21 2016-03-02 上海思华科技股份有限公司 Stream media system and method for fast responding to user request
CN111405358A (en) * 2020-03-24 2020-07-10 上海依图网络科技有限公司 Cache-based video frame extraction method, apparatus, medium, and system

Also Published As

Publication number Publication date
CN112203031B (en) 2023-06-02

Similar Documents

Publication Publication Date Title
US10303596B2 (en) Read-write control method for memory, and corresponding memory and server
CN107870973B (en) File storage system capable of accelerating simultaneous playback of multiple paths of monitoring
US8225029B2 (en) Data storage processing method, data searching method and devices thereof
RU2014145359A (en) METHOD FOR SENDING DATA, METHOD FOR RECEIVING DATA AND DATA STORAGE DEVICE
CA2442188A1 (en) Methods and mechanisms for proactive memory management
CN102393854B (en) Method and device obtaining audio/video data
CN102479250A (en) Disk caching method for embedded browser
CN103226965B (en) Based on the audio/video data access method of time bitmap
CN107391544B (en) Processing method, device and equipment of column type storage data and computer storage medium
CN112558873B (en) Embedded audio and video data storage, retrieval and deletion method and device and memory
CN107168651B (en) Small file aggregation storage processing method
KR101743411B1 (en) Method and apparatus for data access
US11372568B2 (en) System and method for storing and accessing blockchain data
CN102385610B (en) Digital hard disc video recorder video file is preserved method and the system thereof recovered with data
CN103116542A (en) Test method of equipment expansion stability
CN115048053A (en) Data storage method and device and electronic equipment
CN111163297A (en) Method for realizing high concurrency and quick playback of video monitoring cloud storage
CN104702874A (en) Storing method for file monitored by video
JP2013528823A5 (en)
CN112203031B (en) Digital video caching system and method
CN108833817A (en) A kind of video data storage method and device
CN101169956A (en) Disc device
CN102270483A (en) Methods for reserving index memory space in avi recording apparatus
CN101853278A (en) Application method of data storage system
CN112954445B (en) Streaming media file playing method and device, computer equipment and storage medium

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