CN104133782A - Adaptive management method and device of digital monitoring platform memory - Google Patents

Adaptive management method and device of digital monitoring platform memory Download PDF

Info

Publication number
CN104133782A
CN104133782A CN201410318274.5A CN201410318274A CN104133782A CN 104133782 A CN104133782 A CN 104133782A CN 201410318274 A CN201410318274 A CN 201410318274A CN 104133782 A CN104133782 A CN 104133782A
Authority
CN
China
Prior art keywords
memory
buffer memory
video channel
cache
application
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
CN201410318274.5A
Other languages
Chinese (zh)
Other versions
CN104133782B (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 Infinova Ltd
Original Assignee
Shenzhen Infinova 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 Infinova Ltd filed Critical Shenzhen Infinova Ltd
Priority to CN201410318274.5A priority Critical patent/CN104133782B/en
Publication of CN104133782A publication Critical patent/CN104133782A/en
Application granted granted Critical
Publication of CN104133782B publication Critical patent/CN104133782B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses an adaptive management method and device of a digital monitoring platform memory. The adaptive management method of the digital monitoring platform memory comprises the following steps: setting a memory pool, and configuring a minimum cache with a preset volume for each video channel; according to volume of a frame which needs to be written in at present, calculating the cache required for each video channel, and applying for the cache for each video channel according to the calculated cache; monitoring the code rate change of each video channel; when the code rate becomes big, continuing to apply for the cache; and when the code rate becomes small, releasing residual cache space to the memory pool. The use efficiency of the memory can be improved, and the storage performance of a NVR (Network Video Recorder) is improved.

Description

A kind of digital supervision platform internal memory adaptive management method and device
Technical field
The present invention relates to memory management field, particularly relate to a kind of digital supervision platform internal memory adaptive management method and device.
Background technology
Video storage server (NVR), NVR is the abbreviation of (Network-Video-Recorder is network hard disk video recorder).The topmost function of video storage server is by network, to receive the digital video bit stream of IPC (web camera) device transmission, and stores, manages, thereby realizes the distributed structure/architecture advantage that networking brings.In simple terms, by video storage server, can watch simultaneously, browse, playback, management, a plurality of web cameras of storage.
Along with the development of security protection industry high-definition video technology and informationization technology, in the urgent need to what improve, be the properties of Internet video storage server (NVR), and memory property is one of performance most crucial in NVR properties.
What server performance was paid close attention to most is CPU usage and internal memory, and NVR server does not exist a large amount of calculating, so CPU usage is generally lower, but because code check changes greatly, the read-write duration is long, need to consume many internal memories.And general EMS memory management process is to give in advance the certain space of each passage fixed allocation according to maximum code stream, or adopt the method in a plurality of passage common memory pond.The mode of memory pool is better than first kind of way, can use by shared drive.But the internal memory of NVR is used local more, as video recording, Video Pre-recording, playback, downloads etc.These internal memories are used difference larger, as warning Video Pre-recording need to reach 20 seconds, and common Video Pre-recording 3 seconds.Even while only having video recording, it is also sizable that the code check of each front-end equipment changes, as code check may be low to moderate 256Kbps, and may be up to 8Mbps.In many Practical Projects, server configuration, video process, warning Video Pre-recording all may change, if adopt fixed memory pond mode, will cause waste in various degree to server resource so, or according to server hardware resource and different application, arrange, need to compile out like this NVR of different editions or revise configuration file.Along with the increasing NVR of platform deploy, while there is NVR cluster, former mode is more and more difficult to meet the demands.
Summary of the invention
Technical matters to be solved by this invention is: a kind of digital supervision platform internal memory management method is provided, and this EMS memory management process can effectively improve the utilization ratio of internal memory, improves the memory property of NVR.
In order to solve the problems of the technologies described above, the technical solution used in the present invention is:
A digital supervision platform internal memory adaptive management method, comprises step:
S1, a memory pool being set, is the default big or small minimal cache of each video channel configuration;
S2, the frame sign writing according to current needs calculate the cache size that each video channel needs, and are each video channel application buffer memory according to calculated cache size;
S3, monitor each video channel code check and change, when code check becomes large, continuation application buffer memory; When code check diminishes, discharge unnecessary spatial cache to memory pool.
For solving the problems of the technologies described above, another technical scheme of the present invention is:
A digital supervision platform internal memory adaptive management device, comprises dispensing unit, buffer memory application unit and channel monitoring unit;
Described dispensing unit is used for arranging a memory pool, is the default big or small minimal cache of each video channel configuration;
Described buffer memory application unit calculates for the frame sign writing according to current needs the cache size that each video channel needs, and is each video channel application buffer memory according to calculated cache size;
Described channel monitoring unit is used for monitoring each video channel code check to be changed, when code check becomes large, and continuation application buffer memory; When code check diminishes, discharge unnecessary spatial cache to memory pool.
Beneficial effect of the present invention is: by memory pool is set, for each video channel configuration minimal cache, and the application buffer memory of the frame sign writing according to each video channel, thereby realize each video channel self-adaptation application according to actual needs buffer memory, effectively solve the internal memory waste that fixed memory pond mode is brought, improved the utilization factor of internal memory, and, the present invention changes by monitoring each video channel code check, adjusts the buffer memory of each passage, thereby further improves the utilization ratio of internal memory.
Accompanying drawing explanation
Fig. 1 is the method flow diagram of digital supervision platform internal memory management method in an embodiment of the present invention;
Fig. 2 is the functional block diagram of digital supervision platform internal memory management devices in an embodiment of the present invention;
Main label declaration:
10-dispensing unit; 20-buffer memory application unit; 30-channel monitoring unit.
Embodiment
By describing technology contents of the present invention, structural attitude in detail, being realized object and effect, below in conjunction with embodiment and coordinate accompanying drawing to be explained in detail.
The design of most critical of the present invention is: on the basis of the minimal cache of having distributed, according to video channel, write frame sign application buffer memory, and the Mobile state adjustment of going forward side by side, thus effectively improve the utilization ratio of internal memory.
Refer to Fig. 1, a kind of digital supervision platform internal memory adaptive management method, comprises step:
S1, a memory pool being set, is the default big or small minimal cache of each video channel configuration;
S2, the frame sign writing according to current needs calculate the cache size that each video channel needs, and are each video channel application buffer memory according to calculated cache size;
S3, monitor each video channel code check and change, when code check becomes large, continuation application buffer memory; When code check diminishes, discharge unnecessary spatial cache to memory pool.
From foregoing description, beneficial effect of the present invention is: the present invention is by arranging a memory pool, make each video channel can common memory, the present invention is the default big or small minimal cache of each video channel configuration, make every passage capable of being meet the requirement of basic operation, and on the basis of minimal cache, according to video channel, write frame sign application buffer memory, thereby realize each video channel self-adaptation application according to actual needs buffer memory, effectively solve the internal memory waste that fixed memory pond mode is brought, improved the utilization factor of internal memory, and, the present invention changes by monitoring each video channel code check, adjust the buffer memory of each passage, therefore, can be the internal memory that each passage application is enough timely, can prevent that again each passage from taking free memory simultaneously, thereby further improve the utilization ratio of internal memory.
Further, in the above-described embodiment, for reducing memory fragmentation, when described application buffer memory, the cache size of applying for is the multiple of minimal cache piece.Because of in video storage server (NVR) internal memory, the size of minimal cache piece is 256KB, so in the above-described embodiment, and the multiple that the cache size of applying for is 256KB.
Further, after described step S3, also comprise step S4, S4, judge in memory pool whether to surpass untapped memory headroom of the schedule time, if having, described untapped memory headroom is discharged to computer system.
By step S4, can realize the size of dynamic adjustment memory pool, make monitor supervision platform need to adjust the size of memory pool according to actual conditions, make the internal memory of digital supervision platform obtain rationally effectively using.
Further, for the buffer memory waste that prevents that video channel abnormal cause from causing, do not affect the normal work of other video channels, increased in the present embodiment video channel exception monitoring, when continuing application, video channel buffer memory becomes large, and while being greater than video channel maximal rate over Preset Time threshold values, judge that this video channel is abnormal, this video channel will be carried out packet loss processing.Wherein, maximal rate and time threshold values are determined according to actual conditions.
For example, in one embodiment, in the situation that buffering continues to apply for becoming large, the time that is greater than maximal rate 8Mbps when video channel code check surpasses 10 seconds, during buffer memory 10MB size, judges this channel abnormal, and packet loss is processed.
Further, for preventing applying for that the passage of buffer memory is too many, and cause application cache failure, in the above-described embodiment, when described application buffer memory, also comprise the maximum application of overall situation buffer memory quantitative value is set, when all video channels that need to apply for again buffer memory are applied for buffer memory quantitative value over described maximum, overage will not processed, and therefore, can prevent from normally recording a video because application buffer memory passage affects other passages too much.
When the video channel number of application buffer memory surpasses described maximum application buffer memory quantitative value, also generate daily record and warning.
Another embodiment of the present invention is:
A digital supervision platform internal memory adaptive management device, comprises dispensing unit 10, buffer memory application unit 20 and channel monitoring unit 30;
Described dispensing unit 10, for a memory pool is set, is the default big or small minimal cache of each video channel configuration;
Described buffer memory application unit 20 calculates for the frame sign writing according to current needs the cache size that each video channel needs, and is each video channel application buffer memory according to calculated cache size;
Described channel monitoring unit 30 changes for monitoring each video channel code check, when code check becomes large, and continuation application buffer memory; When code check diminishes, discharge unnecessary spatial cache to memory pool.
The present invention is by arranging a memory pool, make each video channel can common memory, the present invention is the default big or small minimal cache of each video channel configuration, make every passage capable of being meet the requirement of basic operation, and on the basis of minimal cache, according to video channel, write frame sign application buffer memory, thereby realize each video channel self-adaptation application according to actual needs buffer memory, effectively solve the internal memory waste that fixed memory pond mode is brought, improved the utilization factor of internal memory, and, the present invention changes by monitoring each video channel code check, adjust the buffer memory of each passage, therefore, can be the internal memory that each passage application is enough timely, can prevent that again each passage from taking free memory simultaneously, thereby further improve the utilization ratio of internal memory.
Further, the cache size that described buffer memory request slip is applied for is the multiple of minimal cache piece.Because of in video storage server (NVR) internal memory, the size of minimal cache piece is 256KB, so in the above-described embodiment, and the multiple that the cache size of applying for is 256KB.
Further, also comprise buffer memory releasing unit, described buffer memory releasing unit is used for judging in memory pool whether surpass untapped memory headroom of the schedule time, if having, described untapped memory headroom is discharged to computer system.
Further, also comprise abnormal deciding means;
Described abnormal deciding means becomes large for continue application when video channel buffer memory, and when being greater than video channel maximal rate and surpassing Preset Time threshold values, judges that this video channel is abnormal, and this video channel will be carried out packet loss processing.
Further, described buffer memory application unit 20 arranges an overall maximum application buffer memory quantitative value, and when all video channels that need to apply for again buffer memory are applied for buffer memory quantitative value over described maximum, overage will not processed.
In embodiments of the present invention, NVR can accomplish internal memory adaptive control from the following aspects:
One, video process rate adjust.
When code check becomes large in video process, by current, need to write caching frame size and this passage remaining space comparison, according to comparative result application buffer memory, the buffer memory of applying for is the multiple of minimal cache piece (256KB).For example, if the remaining space 50KB of certain passage need to write 300KB sized frames, can apply for again so the cache size (being the twice of minimal cache piece) of 512KB.If before current application, the buffer memory of distribution is 1MB, this passage takies 1.5MB size so.While again writing buffering, if space is still inadequate, application will circulate.
If passage code check remains unchanged, buffer memory meets the demands, and does not change again, and the total size of internal memory remains unchanged within a certain period of time so.
When if video channel code check diminishes, Memory adjustments need to lag behind a period of time, and concrete retardation time can be according to actual conditions setting, as defines 5 seconds.In program detects the time that reaches 5 seconds, some internal memory is always idle, and this part idle internal memory will be released.The memory size discharging is necessary for the multiple of cache blocks 256KB, and to reduce fragment, program internal memory unification, by internal memory pool managing, can facilitate use next time.
Two, between Video Pre-recording and video recording, switch
Video Pre-recording is usually used in reporting to the police, therefore be often called warning Video Pre-recording.The special effect because report to the police, in theory the Video Pre-recording time better more for a long time, the information that can catch is just more.Generally, warning Video Pre-recording code stream is 2Mbps, maximum 30 seconds of duration, and internal memory needs 7.5MB (2*30/8) like this.And code check 2Mbps is under common video recording pattern, only need the 1Mb just can the buffer memory data of 5 seconds, enough read and write thread writing in files far away.So when starting from Video Pre-recording, be switched to video recording, can use self-adaptation Memory Allocation equally.
Meanwhile, along with popularizing of HD video, the warning Video Pre-recording of code check 2Mbps can not meet the demands.So need to improve the code stream Video Pre-recording of reporting to the police, if warning Video Pre-recording code stream is set, be 4Mbps, duration is similarly 30 seconds, needs so the buffer memory of 15MB.So the buffer memory consumption of warning Video Pre-recording, by increasing, if do not adopt internal memory adaptive control, will be wasted memory source greatly, more cannot improve memory property.
So internal memory self-adaptation allocation scheme, seems even more important at Video Pre-recording and video recording in switch application, advantage is more obvious, has fully shown the making full use of of memory source, and guarantees and promote the memory property of NVR.
In sum, digital supervision platform internal memory management method provided by the invention and device can distribute spatial cache according to write incoming frame and the code check self-adaptation of each video channel, and the present invention can reduce memory fragmentation, has greatly improved the utilization factor of internal memory; The present invention is by monitoring video channel state, prevents the Memory Allocation waste that extremely causes because of video channel, and the present invention also need to adjust the size of memory pool according to actual conditions, make the internal memory of digital supervision platform obtain rationally effectively use.
The foregoing is only embodiments of the invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes instructions of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.

Claims (10)

1. a digital supervision platform internal memory adaptive management method, is characterized in that, comprises step:
One memory pool is set, and is the default big or small minimal cache of each video channel configuration;
The frame sign writing according to current needs calculates the cache size that each video channel needs, and is each video channel application buffer memory according to calculated cache size;
Monitor each video channel code check and change, when code check becomes large, continuation application buffer memory; When code check diminishes, discharge unnecessary spatial cache to memory pool.
2. digital supervision platform internal memory adaptive management method according to claim 1, is characterized in that, when described application buffer memory, the cache size of applying for is the multiple of minimal cache piece.
3. digital supervision platform internal memory adaptive management method according to claim 1, it is characterized in that, also comprise, whether judge in memory pool over untapped memory headroom of the schedule time, if have, described untapped memory headroom is discharged to computer system.
4. according to the arbitrary described digital supervision platform internal memory adaptive management method of claims 1 to 3, it is characterized in that, when continuing application, video channel buffer memory becomes large, and while being greater than video channel maximal rate over Preset Time threshold values, judge that this video channel is abnormal, this video channel will be carried out packet loss processing.
5. according to the arbitrary described digital supervision platform internal memory adaptive management method of claims 1 to 3, it is characterized in that, when described application buffer memory, also comprise the maximum application of overall situation buffer memory quantitative value is set, when all video channels that need to apply for again buffer memory are applied for buffer memory quantitative value over described maximum, overage will not processed.
6. a digital supervision platform internal memory adaptive management device, is characterized in that, comprises dispensing unit, buffer memory application unit and channel monitoring unit;
Described dispensing unit is used for arranging a memory pool, is the default big or small minimal cache of each video channel configuration;
Described buffer memory application unit calculates for the frame sign writing according to current needs the cache size that each video channel needs, and is each video channel application buffer memory according to calculated cache size;
Described channel monitoring unit is used for monitoring each video channel code check to be changed, when code check becomes large, and continuation application buffer memory; When code check diminishes, discharge unnecessary spatial cache to memory pool.
7. digital supervision platform internal memory adaptive management device according to claim 6, is characterized in that, the cache size that described buffer memory request slip is applied for is the multiple of minimal cache piece.
8. digital supervision platform internal memory adaptive management device according to claim 6, is characterized in that, also comprises buffer memory releasing unit;
Described buffer memory releasing unit is used for judging in memory pool whether surpass untapped memory headroom of the schedule time, if having, described untapped memory headroom is discharged to computer system.
9. according to the arbitrary described digital supervision platform internal memory adaptive management device of claim 6 to 8, it is characterized in that, also comprise abnormal deciding means;
Described abnormal deciding means becomes large for continue application when video channel buffer memory, and when being greater than video channel maximal rate and surpassing Preset Time threshold values, judges that this video channel is abnormal, and this video channel will be carried out packet loss processing.
10. according to the arbitrary described digital supervision platform internal memory adaptive management device of claim 6 to 8, it is characterized in that, described buffer memory application unit arranges the maximum application of overall situation buffer memory quantitative value, when all video channels that need to apply for again buffer memory are applied for buffer memory quantitative value over described maximum, overage will not processed.
CN201410318274.5A 2014-07-04 2014-07-04 A kind of digital supervision platform internal memory adaptive management method and device Active CN104133782B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410318274.5A CN104133782B (en) 2014-07-04 2014-07-04 A kind of digital supervision platform internal memory adaptive management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410318274.5A CN104133782B (en) 2014-07-04 2014-07-04 A kind of digital supervision platform internal memory adaptive management method and device

Publications (2)

Publication Number Publication Date
CN104133782A true CN104133782A (en) 2014-11-05
CN104133782B CN104133782B (en) 2017-08-22

Family

ID=51806465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410318274.5A Active CN104133782B (en) 2014-07-04 2014-07-04 A kind of digital supervision platform internal memory adaptive management method and device

Country Status (1)

Country Link
CN (1) CN104133782B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250061A (en) * 2016-08-12 2016-12-21 乐视控股(北京)有限公司 File download processing method and processing device
CN107333169A (en) * 2017-06-30 2017-11-07 郑州云海信息技术有限公司 A kind of client-cache method of adjustment and device
CN110134650A (en) * 2019-04-28 2019-08-16 深圳市腾讯网域计算机网络有限公司 A kind of file loading method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102279804A (en) * 2011-08-16 2011-12-14 天津市天祥世联网络科技有限公司 Memory pool structure of video monitoring platform system and method for implementing memory pool structure
CN102868908A (en) * 2011-07-04 2013-01-09 哈尔滨融智达网络科技有限公司 High-efficiency streaming media playing method and device
CN102883143A (en) * 2012-09-21 2013-01-16 浙江宇视科技有限公司 Method for regulating RAID (Redundant Array Of Independent Disks) array cache
CN103136105A (en) * 2011-11-28 2013-06-05 广东新岸线计算机系统芯片有限公司 Memory management method, embedded type system and video data processing system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102868908A (en) * 2011-07-04 2013-01-09 哈尔滨融智达网络科技有限公司 High-efficiency streaming media playing method and device
CN102279804A (en) * 2011-08-16 2011-12-14 天津市天祥世联网络科技有限公司 Memory pool structure of video monitoring platform system and method for implementing memory pool structure
CN103136105A (en) * 2011-11-28 2013-06-05 广东新岸线计算机系统芯片有限公司 Memory management method, embedded type system and video data processing system
CN102883143A (en) * 2012-09-21 2013-01-16 浙江宇视科技有限公司 Method for regulating RAID (Redundant Array Of Independent Disks) array cache

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250061A (en) * 2016-08-12 2016-12-21 乐视控股(北京)有限公司 File download processing method and processing device
CN107333169A (en) * 2017-06-30 2017-11-07 郑州云海信息技术有限公司 A kind of client-cache method of adjustment and device
CN107333169B (en) * 2017-06-30 2020-03-06 郑州云海信息技术有限公司 Client cache adjusting method and device
CN110134650A (en) * 2019-04-28 2019-08-16 深圳市腾讯网域计算机网络有限公司 A kind of file loading method, device, equipment and storage medium
CN110134650B (en) * 2019-04-28 2022-03-25 深圳市腾讯网域计算机网络有限公司 File loading method, device, equipment and storage medium
US11907164B2 (en) 2019-04-28 2024-02-20 Tencent Technology (Shenzhen) Company Limited File loading method and apparatus, electronic device, and storage medium

Also Published As

Publication number Publication date
CN104133782B (en) 2017-08-22

Similar Documents

Publication Publication Date Title
US7971074B2 (en) Method, system, and apparatus for a core activity detector to facilitate dynamic power management in a distributed system
US20120198254A1 (en) Capping power consumption in a data storage system
CN107888428A (en) A kind of bandwidth adjusting method, device, equipment and readable storage medium storing program for executing
US8745158B2 (en) Application-guided bandwidth-managed caching
CA2155353C (en) Digital media data stream network management system
US10862992B2 (en) Resource cache management method and system and apparatus
US10606510B2 (en) Memory input/output management
CN103218307B (en) Internal storage management system and EMS memory management process
US8924760B2 (en) Scheduler with voltage management
CN103684916A (en) Method and system for intelligent monitoring and analyzing under cloud computing
CN104396215A (en) Method and apparatus for bandwidth allocation and estimation
US20120324000A1 (en) System and method for flow control in a messaging subsystem based on message-in/out rates
EP2750042B1 (en) Method and apparatus for managing memory
WO2016127291A1 (en) Memory management device and method
US20160285943A1 (en) Cloud operation resource dynamic allocation system and method thereof
CN104133782A (en) Adaptive management method and device of digital monitoring platform memory
US10140219B2 (en) Multi-port shared cache apparatus
US8930436B2 (en) Apparatus and method of dynamically distributing load in multiple cores
US11249817B2 (en) Autoscaling of data processing computing systems based on predictive queue length
WO2021036784A1 (en) Media data processing method and apparatus, media server and computer-readable storage medium
US8930416B2 (en) Job dispatcher of transcoding jobs for media programs
CN102143206A (en) Storage pool regulation method, device and system for cluster storage system
CN104144188A (en) Service dispatching method and system and local service dispatching server
KR20160018204A (en) Electronic device, On-Chip memory and operating method of the on-chip memory
CN110312157B (en) Multithreading streaming media cache control system based on embedded equipment

Legal Events

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