CN104133782B - A kind of digital supervision platform internal memory adaptive management method and device - Google Patents
A kind of digital supervision platform internal memory adaptive management method and device Download PDFInfo
- Publication number
- CN104133782B CN104133782B CN201410318274.5A CN201410318274A CN104133782B CN 104133782 B CN104133782 B CN 104133782B CN 201410318274 A CN201410318274 A CN 201410318274A CN 104133782 B CN104133782 B CN 104133782B
- Authority
- CN
- China
- Prior art keywords
- caching
- video channel
- internal memory
- application
- memory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The present invention discloses a kind of digital supervision platform internal memory adaptive management method and device, and the digital supervision platform internal memory adaptive management method includes step:One memory pool is set, is the minimal cache of each default size of video channel configuration;Frame sign according to write-in is currently needed for calculates the cache size that each video channel needs, and is cached according to the cache size calculated for each video channel application;Each video channel code check change is monitored, when code check change is big, continuation application caching;When code check change is small, unnecessary spatial cache is discharged to memory pool.EMS memory management process and device of the present invention can effectively improve the utilization ratio of internal memory, improve NVR storage performance.
Description
Technical field
The present invention relates to memory management field, more particularly to a kind of digital supervision platform internal memory adaptive management method and
Device.
Background technology
Video storage server (NVR), NVR is the contracting of (Network-Video-Recorder i.e. network hard disk video recorder)
Write.The topmost function of video storage server is to receive the digital video that IPC (web camera) equipment is transmitted by network
Code stream, and stored, managed, so as to realize the distributed structure/architecture advantage that networking is brought.In simple terms, stored by video
Server, can simultaneously watch, browse, playing back, managing, storing multiple web cameras.
With the development of security protection industry high-definition video technology and informationization technology, what it is in the urgent need to raising is that Internet video is deposited
The properties of server (NVR) are stored up, and storage performance is one of most crucial performance in NVR properties.
Server performance the most concern is CPU usage and internal memory, and NVR servers be not present it is substantial amounts of calculate, so
CPU usage is typically relatively low, but because code check is changed greatly, read-write duration length is, it is necessary to consume many internal memories.And it is general
EMS memory management process be to give each passage fixed allocation certain space in advance according to maximum code stream, or use multiple passages
The method in common memory pond.The mode of memory pool is better than first way, can be used with shared drive.But NVR internal memory makes
It is more with place, such as record a video, Video Pre-recording, playback, download etc..These internal memories are larger using difference, and such as alarm Video Pre-recording needs
Up to 20 seconds, common Video Pre-recording 3 seconds.Even if only record a video, each headend equipment code check change be also it is sizable,
As code check may as little as 256Kbps, 8Mbps may be up to.In many Practical Projects, server configuration, video process, alarm
Video Pre-recording may all change, if using fixed memory pond mode, then server resource will be caused in various degree
Waste, or set according to server hardware resource and different application, so need to compile out the NVR of different editions or
Change configuration file.As platform upper affixes one's name to increasing NVR, when there are NVR clusters, former mode is increasingly difficult to full
Foot is required.
The content of the invention
The technical problems to be solved by the invention are:A kind of digital supervision platform internal memory management method is provided, the internal memory pipe
Reason method can effectively improve the utilization ratio of internal memory, improve NVR storage performance.
In order to solve the above-mentioned technical problem, the technical solution adopted by the present invention is:
A kind of digital supervision platform internal memory adaptive management method, including step:
S1, one memory pool of setting, are the minimal cache of each default size of video channel configuration;
S2, calculate the cache size that each video channel needs according to the frame sign for being currently needed for write-in, and according to being calculated
Cache size be each video channel application caching;
S3, each video channel code check change of monitoring, when code check change is big, continuation application caching;When code check change is small, release
Unnecessary spatial cache is to memory pool.
In order to solve the above technical problems, another technical scheme of the present invention is:
A kind of digital supervision platform internal memory adaptive management device, including dispensing unit, caching application unit and passage prison
Survey unit;
The dispensing unit is used to set a memory pool, is the minimal cache of each default size of video channel configuration;
The caching application unit is used to calculate the caching that each video channel needs according to the frame sign for being currently needed for write-in
Size, and cached according to the cache size calculated for each video channel application;
The channel monitoring unit is used to monitor each video channel code check change, when code check change is big, continuation application caching;
When code check change is small, unnecessary spatial cache is discharged to memory pool.
The beneficial effects of the present invention are:It is each video channel configuration minimal cache by setting memory pool, and according to each
The application caching of the frame sign of video channel write-in, so that realize that adaptively application is cached each video channel according to actual needs,
The internal memory waste that fixed memory pond mode is brought effectively is solved, the utilization rate of internal memory is improved, also, the present invention passes through monitoring
Each video channel code check change, to adjust the caching of each passage, so as to further improve the utilization ratio of internal memory.
Brief description of the drawings
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 managing device in an embodiment of the present invention;
Major Symbol explanation:
10- dispensing units;20- caches application unit;30- channel monitoring units.
Embodiment
To describe the technology contents of the present invention in detail, feature, the objects and the effects being constructed, 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 allocated minimal cache, frame is write according to video channel
Size application is cached, Mobile state of going forward side by side adjustment, so as to effectively improve the utilization ratio of internal memory.
Referring to Fig. 1, a kind of digital supervision platform internal memory adaptive management method, including step:
S1, one memory pool of setting, are the minimal cache of each default size of video channel configuration;
S2, calculate the cache size that each video channel needs according to the frame sign for being currently needed for write-in, and according to being calculated
Cache size be each video channel application caching;
S3, each video channel code check change of monitoring, when code check change is big, continuation application caching;When code check change is small, release
Unnecessary spatial cache is to memory pool.
It was found from foregoing description, the beneficial effects of the present invention are:The present invention leads to each video by setting a memory pool
Road can common memory, the present invention configures the minimal cache of default size for each video channel, every passage is met substantially
The requirement of operation, and on the basis of minimal cache, frame sign application is write according to video channel and cached, so as to realize each video
Passage adaptively application caching, the internal memory waste that effectively solution fixed memory pond mode is brought according to actual needs, is improved
The utilization rate of internal memory, also, the present invention is by monitoring each video channel code check change, to adjust the caching of each passage, accordingly, it is capable to
Enough is timely the enough internal memories of each passage application, while can prevent each passage from taking free memory again, so as to further improve
The utilization ratio of internal memory.
Further, in the above-described embodiment, it is apllied slow when the application caching to reduce memory fragmentation
Deposit the multiple that size is minimal cache block.Because in video storage server (NVR) internal memory, the size of minimal cache block is
256KB, so in the above-described embodiment, apllied cache size is 256KB multiple.
Further, step S4, S4 are also included after the step S3, judges that whether exceeding the scheduled time in memory pool does not make
Memory headroom, if so, the untapped memory headroom then is released into computer system.
The size of dynamic adjustment memory pool can be realized by step S4, allows monitor supervision platform to be needed to adjust according to actual conditions
The size of whole memory pool, makes the internal memory of digital supervision platform obtain rationally effectively using.
Further, in order to which the caching for preventing video channel abnormal cause from causing is wasted, other video channels are not influenceed
Normal work, adds video channel exception monitoring in the present embodiment, when the lasting application of video channel caching becomes greatly, and greatly
When video channel maximal rate exceedes preset time threshold values, judge that the video channel is abnormal, then this video channel will be lost
Bag processing.Wherein, depending on maximal rate and time threshold values are according to actual conditions.
For example, in one embodiment, in the case where buffer duration application becomes big, when video channel code check is more than maximum
Code check 8Mbps time, more than 10 seconds, during caching 10MB sizes, judges the channel abnormal, packet loss is handled.
Further, to prevent the passage that application is cached too many, and cause to apply for cache failure, in above-mentioned embodiment
In, in the application caching, in addition to a global maximum application caching quantitative value is set, applies for what is cached again when institute is in need
When video channel exceedes the maximum application caching quantitative value, overage will not be handled, accordingly it is possible to prevent because of application
Caching passage is too many and influences other passages normally to record a video.
When the video channel number of application caching exceedes the maximum application caching quantitative value, daily record and alarm are also generated.
Another embodiment of the present invention is:
A kind of digital supervision platform internal memory adaptive management device, including dispensing unit 10, caching application unit 20 and logical
Road monitoring unit 30;
The dispensing unit 10 is used to set a memory pool, is the minimal cache of each default size of video channel configuration;
The caching application unit 20 is for delaying for being needed according to each video channel of frame sign calculating for being currently needed for write-in
Size is deposited, and is cached according to the cache size calculated for each video channel application;
The channel monitoring unit 30 is used to monitor each video channel code check change, and when code check change is big, continuation application is delayed
Deposit;When code check change is small, unnecessary spatial cache is discharged to memory pool.
The present invention enables each video channel common memory by setting a memory pool, and the present invention is each video channel
The minimal cache of the default size of configuration, enables every passage to meet the requirement of basic operation, and on the basis of minimal cache, according to
Video channel write-in frame sign application caching, so as to realize that adaptively application is cached each video channel according to actual needs, effectively
The internal memory waste that fixed memory pond mode is brought is solved, the utilization rate of internal memory is improved, also, the present invention is respectively regarded by monitoring
Frequency passage code check changes, to adjust the caching of each passage, therefore, it is possible to be timely the enough internal memories of each passage application, simultaneously
It can prevent each passage from taking free memory again, so as to further improve the utilization ratio of internal memory.
Further, the apllied cache size of the caching request slip is the multiple of minimal cache block.Because being deposited in video
Store up in server (NVR) internal memory, the size of minimal cache block is 256KB, so in the above-described embodiment, apllied caching
Size is 256KB multiple.
Further, in addition to caching releasing unit, the caching releasing unit be used for judge whether exceed in memory pool
The scheduled time untapped memory headroom, if so, the untapped memory headroom then is released into computer system.
Further, in addition to abnormal deciding means;
The abnormal deciding means is used to become big when video channel caches lasting application, and is more than video channel maximal rate
During more than preset time threshold values, judge that the video channel is abnormal, then this video channel will carry out packet loss processing.
Further, the caching application unit 20 sets a global maximum application caching quantitative value, when institute is in need again
When the video channel of application caching exceedes the maximum application caching quantitative value, overage will not be handled.
In embodiments of the present invention, NVR can accomplish internal memory Self Adaptive Control from the following aspects:
First, video process code check is adjusted.
When code check becomes big in video process, write-in caching frame sign will be currently needed for and compared with the passage remaining space, root
Cached according to comparative result application, apllied caching is the multiple of minimal cache block (256KB).If for example, certain passage is surplus
Complementary space 50KB is, it is necessary to write 300KB sized frames, then can apply for 512KB cache size (i.e. the two of minimal cache block again
Times).If before current application, the caching of distribution is 1MB, then the passage takes 1.5MB sizes.Again during Write post, such as
Fruit space is still inadequate, and circulation is applied.
If passage code check keeps constant, caching, which is met, to be required, is not changed again, then internal memory total size is in certain time
It is interior to keep constant.
If video channel code check becomes hour, Memory adjustments need delayed a period of time, and specific lag time can basis
Actual conditions are set, and are such as defined 5 seconds.When Programmable detection is to up in time of 5 seconds, some internal memory is idle always, then this
The idle internal memory in part will be released.The memory size of release is necessary for cache blocks 256KB multiple, to reduce fragment, journey
Sequence internal memory is unified by internal memory pool managing, can facilitate use next time.
2nd, switch between Video Pre-recording and video recording
Video Pre-recording is usually used in alarm, therefore is frequently referred to alarm Video Pre-recording.Because the special effect of alarm, in theory during Video Pre-recording
Between it is more long better, the information that can be caught is more.Generally, alarm Video Pre-recording code stream is 2Mbps, and duration is maximum 30 seconds,
So internal memory needs 7.5MB (2*30/8).And code check 2Mbps is under common RECORD mode, it is only necessary to which 1Mb can just be cached 5 seconds
Data, much enough read-write thread write-in file.So starting when from Video Pre-recording, video recording is switched to, can equally be used certainly
Adapt to Memory Allocation.
Meanwhile, with the popularization of HD video, code check 2Mbps alarm Video Pre-recording can not meet requirement.So needing
Improve code stream and carry out alarm Video Pre-recording, if setting alarm Video Pre-recording code stream to be 4Mbps, duration is similarly 30 seconds, then needed
Want 15MB caching.So the caching consumption of alarm Video Pre-recording will be increasing, if not using internal memory Self Adaptive Control, by pole
Big waste memory source, can not more improve storage performance.
So internal memory self-adjusted block mode, seems even more important, advantage is more in Video Pre-recording and video recording switching application
Substantially, fully show and memory source is made full use of, it is ensured that and lifting NVR storage performance.
In summary, the digital supervision platform internal memory management method and device that the present invention is provided can be according to each video channels
Write-in frame and code check self-adjusted block spatial cache, also, the present invention can reduce memory fragmentation, substantially increase internal memory
Utilization rate;The present invention is prevented because Memory Allocation is wasted caused by video channel exception, this hair by monitoring video channel state
It is bright to need to adjust the size of memory pool always according to actual conditions, make the internal memory of digital supervision platform obtain rationally effectively using.
Embodiments of the invention are the foregoing is only, are not intended to limit the scope of the invention, it is every to utilize this hair
Equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills
Art field, is included within the scope of the present invention.
Claims (8)
1. a kind of digital supervision platform internal memory adaptive management method, it is characterised in that including step:
One memory pool is set, is the minimal cache of each default size of video channel configuration;
Frame sign according to write-in is currently needed for calculates the cache size that each video channel needs, and big according to the caching calculated
It is small to be cached for each video channel application;
Each video channel code check change is monitored, when code check change is big, continuation application caching;When code check change is small, discharge unnecessary slow
Space is deposited to memory pool;
Judge the scheduled time untapped memory headroom whether is had more than in memory pool, if so, then by the untapped internal memory
Space is released to computer system.
2. digital supervision platform internal memory adaptive management method according to claim 1, it is characterised in that when the application
During caching, apllied cache size is the multiple of minimal cache block.
3. digital supervision platform internal memory adaptive management method according to claim 1 or 2, it is characterised in that work as video
The lasting application of passage caching becomes big, and when exceeding preset time threshold values more than video channel maximal rate, judges the video channel
Abnormal, then this video channel will carry out packet loss processing.
4. digital supervision platform internal memory adaptive management method according to claim 1 or 2, it is characterised in that described
During application caching, in addition to a global maximum application caching quantitative value is set, when institute's video channel in need for applying caching again
During more than the maximum application caching quantitative value, overage will not be handled.
5. a kind of digital supervision platform internal memory adaptive management device, it is characterised in that including dispensing unit, caching application unit
With channel monitoring unit;
The dispensing unit is used to set a memory pool, is the minimal cache of each default size of video channel configuration;
The caching application unit is used to calculate the cache size that each video channel needs according to the frame sign for being currently needed for write-in,
And cached according to the cache size calculated for each video channel application;
The channel monitoring unit is used to monitor each video channel code check change, when code check change is big, continuation application caching;Work as code
Rate becomes hour, discharges unnecessary spatial cache to memory pool;
Also include caching releasing unit;
The caching releasing unit is used to judge whether have more than the scheduled time untapped memory headroom in memory pool, if so,
The untapped memory headroom is then released to computer system.
6. digital supervision platform internal memory adaptive management device according to claim 5, it is characterised in that the caching Shen
Please the apllied cache size of unit be minimal cache block multiple.
7. the digital supervision platform internal memory adaptive management device according to claim 5 or 6, it is characterised in that also include
Abnormal deciding means;
The abnormal deciding means is used to apply becoming big when video channel caching is lasting, and exceedes more than video channel maximal rate
During preset time threshold values, judge that the video channel is abnormal, then this video channel will carry out packet loss processing.
8. the digital supervision platform internal memory adaptive management device according to claim 5 or 6, it is characterised in that described slow
Deposit application unit and one global maximum application caching quantitative value is set, described in the video channel for applying for caching again when institute is in need exceedes
During maximum application caching quantitative value, overage will not be handled.
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 CN104133782A (en) | 2014-11-05 |
CN104133782B true 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) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106250061A (en) * | 2016-08-12 | 2016-12-21 | 乐视控股(北京)有限公司 | File download processing method and processing device |
CN107333169B (en) * | 2017-06-30 | 2020-03-06 | 郑州云海信息技术有限公司 | Client cache adjusting method and device |
CN110134650B (en) * | 2019-04-28 | 2022-03-25 | 深圳市腾讯网域计算机网络有限公司 | File loading method, device, equipment and storage medium |
Citations (4)
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 |
-
2014
- 2014-07-04 CN CN201410318274.5A patent/CN104133782B/en active Active
Patent Citations (4)
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 |
Also Published As
Publication number | Publication date |
---|---|
CN104133782A (en) | 2014-11-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP4220400A1 (en) | Memory management method and apparatus, and electronic device and computer-readable storage medium | |
EP2359536B1 (en) | Adaptive network content delivery system | |
US20120198254A1 (en) | Capping power consumption in a data storage system | |
US7971074B2 (en) | Method, system, and apparatus for a core activity detector to facilitate dynamic power management in a distributed system | |
US10606510B2 (en) | Memory input/output management | |
US9946467B2 (en) | Data storage method and electronic device | |
US20050267948A1 (en) | Method and system for resource management in a video on-demand server | |
CN107888428A (en) | A kind of bandwidth adjusting method, device, equipment and readable storage medium storing program for executing | |
US10496550B2 (en) | Multi-port shared cache apparatus | |
US10862992B2 (en) | Resource cache management method and system and apparatus | |
US9351024B2 (en) | Managing the bandwidth of a communication session | |
WO2017181893A1 (en) | Code stream transport method and device, and web camera | |
CN104133782B (en) | A kind of digital supervision platform internal memory adaptive management method and device | |
WO2017124800A1 (en) | Pre-event video recording method and device | |
US9699103B2 (en) | Method and system for flow controlling | |
US11789645B2 (en) | Methods and systems for memory bandwidth control | |
US10038652B2 (en) | Self tuning buffer allocation in a shared-memory switch | |
CN113254834A (en) | Page content loading method and device, electronic equipment and readable storage medium | |
KR20160018204A (en) | Electronic device, On-Chip memory and operating method of the on-chip memory | |
WO2017049488A1 (en) | Cache management method and apparatus | |
US20130176851A1 (en) | Dynamic flow control in multicast systems | |
CA2832223C (en) | Multi-port shared cache apparatus | |
US10715624B2 (en) | Optimized N-stream sequential media playback caching method and system | |
US9060192B2 (en) | Method of and a system for providing buffer management mechanism | |
WO2007085978A2 (en) | A method of controlling a page cache memory in real time stream and best effort applications |
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 |