CN102567549A - Leaky token bucket algorithm based self-adaptive data recording/replaying technology and realizing method thereof - Google Patents
Leaky token bucket algorithm based self-adaptive data recording/replaying technology and realizing method thereof Download PDFInfo
- Publication number
- CN102567549A CN102567549A CN2011103671269A CN201110367126A CN102567549A CN 102567549 A CN102567549 A CN 102567549A CN 2011103671269 A CN2011103671269 A CN 2011103671269A CN 201110367126 A CN201110367126 A CN 201110367126A CN 102567549 A CN102567549 A CN 102567549A
- Authority
- CN
- China
- Prior art keywords
- data
- recording
- replaying
- playback
- time
- 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.)
- Pending
Links
Images
Landscapes
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
The invention designs a leaky token bucket algorithm based self-adaptive data recording/replaying technology and a realizing method thereof. The realizing method is mainly applicable to a real-time operation system and realizes inserting real-time data recording and replaying function on the condition without affecting running of normal tasks. The realizing method includes processes of packing, storing and placing to-be-recorded data into a circular array data block according to a certain structure, dispensing tokens according to the running condition of the integral system and data quantity in the data block, and selectively completing recording a batch of data in CPU (central processing unit) idle time adaptively by tasks receiving the tokens. Data replaying includes: dispensing tokens according to the running state of the integral system and the data quantity in the circular array data block, reading data from an external storage unit in batch by tasks receiving the tokens, then inputting the same into the circular array data block and reading data from the circular array data block in real time through the system and replaying the read data. The functions of recording/replaying data in real time can be realized, and the leaky token bucket algorithm based self-adaptive data recording/replaying technology can be widely applied to recording and replaying radar detection data and data of relative equipment and the like in real time.
Description
Technical field
The present invention relates to self-adapting data recording/playback technology and its implementation based on the Token Bucket method; Belong in the high real-time computer system technology that embeds the data recording/reproducing function, adopt in batches pack treatment technology and self-adaptation of Token Bucket method to distribute data recording and playback in the technology realization high real-time system of CPU time sheet.
Background technology
Gather and the real Radar Target Track data of playback (reproduction) functional requirement that has become Radar Technology research and used in real time.But because that radar terminal requires real-time is very high, enterprising line data record can influence radar system and even the whole combat system real-time to target processing at the terminal.Data readback simultaneously also requires near realism, so also very high to the real-time requirement.If adopt special data recording/reproducing equipment, costing dearly of hardware and software not only, and can not playback directly perceived on original equipment.
Because the speed of data recording/reproducing time read-write external memory storage is very slow, need take the plenty of time, and real-time system can not distribute great amount of time and is used for frequent read-write external memory storage.Can make real-time system lose real-time if adopt common method in radar system, to add the data recording/reproducing function, even crash.
More for a long time, because the randomness of its generation, realize the flight path data recording/reproducing at flight path, need take a large amount of cpu resources if adopt one by one the flight path data to read and write external memory.Even take the real time record playback that whole CPU time sheets also can't be realized the flight path data, more can't guarantee the real-time of original system if flight path is more.Propose a kind of leakage bucket method of optimization in the present invention, adaptive recording/playback data can significantly reduce the CPU time sheet that the data recording playback takies, and can adaptive selection cpu idle time execution.
Summary of the invention
The object of the present invention is to provide a kind of self-adapting data recording/playback technology and implementation method based on the Token Bucket method, this invention can realize the data recording/reproducing function under the situation that does not influence the normal operation of real-time system.
Realize that technical solution of the present invention is: occupancies such as CPU, internal memory are added up when at first real-time system normally being moved, and draw the maximum time sheet that system resource rate that record playback module maximum can take and each processing can take.
It is less to compare to the data volume of every flight path, adopts and once reads and writes the data block that a plurality of flight paths form, and operates than flight path of each read-write external memory storage record and can practice thrift great amount of time.The present invention takies the T.T. sheet through a large amount of number of times that read and write data that reduce of the method for packing read-write thereby significantly reduce to read and write data.The maximum that at every turn can read and write data is according to can take the design of maximum duration sheet at every turn.
Provide data recording or playback token according to amount of buffered data in running situation and the current round-robin queue data pool.Receive that record or the playback task of token select cpu idle time to carry out through adaptive task scheduling algorithm.
The present invention adopts the C Plus Plus programming on the software platform based on VxWorks, realized this algorithm and be applied to engineering reality.
The present invention compared with prior art; Its remarkable advantage is: adopt the real-time data record/playback algorithm that merges mutually based on Token Bucket method and self-adapting task scheduling; Can under the situation that does not influence system real time, realize the record and the playback of flight path data; Not only practiced thrift fund and space, and its Project Realization is simple, in existing real-time system, embeds this software module and get final product; Playback effect visual pattern.This method has that real-time is good, with low cost, the outstanding effect characteristics.Its proposition and Project Realization have highly application value on equipment such as radar, charge.
Below in conjunction with accompanying drawing the present invention is described in further detail.
Description of drawings
Fig. 1 is the self-adapting data recording/playback technical work process flow diagram based on the Token Bucket method, is workflow diagram of the present invention.
Fig. 2, Fig. 3, Fig. 4 are the CPU time sheet distribution diagram based on the adaptive data recording playback technology of Token Bucket method, are system CPU timeslice distribution diagrams among the present invention.Wherein: Fig. 2 is a CPU time sheet distribution diagram when not carrying out recording/playback; Fig. 3 is a CPU time sheet distribution diagram when adopting the commonsense method logger task; Fig. 4 is a CPU time sheet distribution diagram when adopting token funnel method self-adaptation recording/playback.
Embodiment
The present invention is based on Token Bucket method and adaptive data recording/reproducing technology and implementation method practical implementation step and be (referring to Fig. 1):
1. draw current real-time system resource occupation chart, the occupancy of statistical system resource, data such as holding time section through WDB;
2. according to statistics token is set and provides frequency, design cycle queuing data pond and structure Token Bucket;
3. according to the pending data of round-robin queue data pool structure packing storage of design, if playback then design and resolve data in the playback round-robin queue data pool.
4. produce token according to pending data volume in running situation and the round-robin queue's data pool in good time;
5. receive the adaptively selected execution of the idle condition opportunity of the task (reading or writing) of token according to current C PU, and according to the quantity of the adaptively selected process data block of pending data volume in the current round-robin queue data pool.
Data in buffer can be stored data volume according to each maximum and carry out record more for a long time in round-robin queue's data pool in data recording process, and corresponding space in the release cycle queuing data pond; If data volume is less than maximum (most of situation) disposable recording total data and release cycle queuing data pond can memory space the time, to reduce the cpu resource amount that takies that reads or writes of data in round-robin queue's data pool.
System discharges token according to CPU idling cycle and round-robin queue's data pool data volume in good time during data recording; Can cause the data recording task to take excess CPU resources if data volume just discharges token very little, lose if opposite data can cause treating record data too much.The adaptive CPU of the being chosen in free time of data recording task of receiving token is record data more for a long time, and the record data task is as much as possible extracts data recording externally in the memory device from round-robin queue's data pool.
In the data readback process, can be used for the data volume decision of playback and whether discharge token according to system's cycle of operation and round-robin queue's data pool; The data of receiving token read reading of data from external memory space more for a long time of the adaptive CPU of being chosen in free time of task, and the task that reads is according to buffer data size reading of data as much as possible in round-robin queue's data pool; The data readback module is carried out real-time playback according to the data structure and the timestamp of round-robin queue's data pool.
This method realizes handling in real time on based on VxWorks 5.5 operating system platforms.The function of total system adopts C Plus Plus to write.The target number of each period treatment of radar terminal that adopts is 100 batches; Hardware environment is Intel (R) Core (TM) Duo 1.66GHz, internal memory: 1024MB, storage medium: electric board 10GB.Through verification experimental verification, this method has realized the real time record/playback function of data under the prerequisite that guarantees original system reliability and real-time.
Based on the self-adapting data of Token Bucket method record playback technology and implementation method successful Application type radar system, this method can be under the situation that not influence the normal operation of original system, maximum 100 batches/2 seconds flight path data of record that can be real-time or playback.
Claims (2)
1. self-adapting data recording/playback technology and implementation method based on a Token Bucket method is characterized in that: adopt round-robin queue's data pool buffer memory to treat the data of recording/playback; Use the method for Token Bucket, provide token according to the data volume of pending data in concrete cpu usage and the current round-robin queue data pool and give the recording/playback task.
2. realize that claim 1 is described and seek the data recording playback technology on that the data recording playback module that adopts the C Plus Plus programming to realize is embedded in the real-time system for one kind based on the VxWorks platform based on fitting certainly of Token Bucket method.It is characterized in that: at first adopt the needs data recorded record of packing in batches, or the data that need playback are carried out the method that piecemeal reads; Then the task of write or read is controlled its operation amount according to the mode of token granting, accomplish reading or writing of data through the method for idle time period of adaptively selected CPU.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011103671269A CN102567549A (en) | 2011-11-18 | 2011-11-18 | Leaky token bucket algorithm based self-adaptive data recording/replaying technology and realizing method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011103671269A CN102567549A (en) | 2011-11-18 | 2011-11-18 | Leaky token bucket algorithm based self-adaptive data recording/replaying technology and realizing method thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102567549A true CN102567549A (en) | 2012-07-11 |
Family
ID=46412947
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011103671269A Pending CN102567549A (en) | 2011-11-18 | 2011-11-18 | Leaky token bucket algorithm based self-adaptive data recording/replaying technology and realizing method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102567549A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104580396A (en) * | 2014-12-19 | 2015-04-29 | 华为技术有限公司 | Task scheduling method, node and system |
CN110275780A (en) * | 2019-06-26 | 2019-09-24 | 北京百度网讯科技有限公司 | Method and apparatus for limiting flow |
CN113435605A (en) * | 2021-06-25 | 2021-09-24 | 烽火通信科技股份有限公司 | Control method and device for AI dynamic injection based on network data pool |
CN113694515A (en) * | 2021-09-23 | 2021-11-26 | 腾讯科技(深圳)有限公司 | Interface display method, device, terminal and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1536815A (en) * | 2003-04-03 | 2004-10-13 | 华为技术有限公司 | Method for making message flow limitation by adopting token leakage cylinder |
CN1925455A (en) * | 2005-08-29 | 2007-03-07 | 中兴通讯股份有限公司 | Message speed limiting method based on token barrel |
CN101005453A (en) * | 2006-12-26 | 2007-07-25 | 华为技术有限公司 | Method and device for refreshing token bucket in flow limiting technology |
WO2007110568A1 (en) * | 2006-03-27 | 2007-10-04 | British Telecommunications Public Limited Company | Method and system for coordination of admission control in transport networks |
CN102582765A (en) * | 2011-01-13 | 2012-07-18 | 张节约 | Solar multi-person driving electric bicycle |
-
2011
- 2011-11-18 CN CN2011103671269A patent/CN102567549A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1536815A (en) * | 2003-04-03 | 2004-10-13 | 华为技术有限公司 | Method for making message flow limitation by adopting token leakage cylinder |
CN1925455A (en) * | 2005-08-29 | 2007-03-07 | 中兴通讯股份有限公司 | Message speed limiting method based on token barrel |
WO2007110568A1 (en) * | 2006-03-27 | 2007-10-04 | British Telecommunications Public Limited Company | Method and system for coordination of admission control in transport networks |
CN101005453A (en) * | 2006-12-26 | 2007-07-25 | 华为技术有限公司 | Method and device for refreshing token bucket in flow limiting technology |
CN102582765A (en) * | 2011-01-13 | 2012-07-18 | 张节约 | Solar multi-person driving electric bicycle |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104580396A (en) * | 2014-12-19 | 2015-04-29 | 华为技术有限公司 | Task scheduling method, node and system |
CN104580396B (en) * | 2014-12-19 | 2018-07-20 | 华为技术有限公司 | A kind of method for scheduling task, node and system |
CN110275780A (en) * | 2019-06-26 | 2019-09-24 | 北京百度网讯科技有限公司 | Method and apparatus for limiting flow |
CN113435605A (en) * | 2021-06-25 | 2021-09-24 | 烽火通信科技股份有限公司 | Control method and device for AI dynamic injection based on network data pool |
CN113435605B (en) * | 2021-06-25 | 2023-06-09 | 烽火通信科技股份有限公司 | AI dynamic injection control method and device based on network data pool |
CN113694515A (en) * | 2021-09-23 | 2021-11-26 | 腾讯科技(深圳)有限公司 | Interface display method, device, terminal and storage medium |
CN113694515B (en) * | 2021-09-23 | 2023-07-25 | 腾讯科技(深圳)有限公司 | Interface display method, device, terminal and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104160384B (en) | For the system and method for dynamic priority control | |
CN106233269A (en) | Fine granulation bandwidth supply in Memory Controller | |
CN105589812B (en) | Disk fragments method for sorting, device and host | |
CN105302478B (en) | A kind of date storage method and electronic equipment | |
US20150006794A1 (en) | Apparatus and method for controlling multi-way nand flashes by using input-output pins | |
CN106354670A (en) | Method and apparatus for transmitting data in virtual environment | |
CN105138469B (en) | A kind of data read-write method and mainboard | |
CN103631624A (en) | Method and device for processing read-write request | |
CN102567549A (en) | Leaky token bucket algorithm based self-adaptive data recording/replaying technology and realizing method thereof | |
CN103229136B (en) | Disk array brush method and disk array brush device | |
CN103678149B (en) | Data processing method and device | |
CN102279712A (en) | Storage control method, system and device applied to network storage system | |
KR20160010491A (en) | Low cost storage for rarely read data | |
CN103577115A (en) | Data configuration processing method and data configuration processing device | |
CN104991737B (en) | A kind of hard disk implementation method based on storage card array architecture | |
CN102541746A (en) | Method and system for array data processing | |
CN103064633A (en) | Data storage method and device | |
CN101706788A (en) | Cross-area access method for embedded file system | |
US20160307619A1 (en) | Smart in-module refresh for dram | |
CN106469119A (en) | A kind of data write buffer method based on NVDIMM and its device | |
CN102236622A (en) | Dynamic memory controller and method for increasing bandwidth utilization rate of dynamic memory | |
CN105868121B (en) | A kind of information processing method and electronic equipment | |
CN103593148B (en) | The method and device that a kind of CDF sides offline bill data are quickly accessed | |
CN109634826A (en) | Controller limits method for analyzing performance, device, computer equipment and storage medium | |
CN109491925A (en) | Store equipment and its method for writing data, storage device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20120711 |