CN104243341B - Data processing method and device - Google Patents
Data processing method and device Download PDFInfo
- Publication number
- CN104243341B CN104243341B CN201410487149.7A CN201410487149A CN104243341B CN 104243341 B CN104243341 B CN 104243341B CN 201410487149 A CN201410487149 A CN 201410487149A CN 104243341 B CN104243341 B CN 104243341B
- Authority
- CN
- China
- Prior art keywords
- value
- register
- data flow
- current message
- clearing
- 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
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a kind of data processing method and device, the data processing method includes:The clearing mark stored in reseting register is read, wherein, reseting register is, for one in running order in two registers of ping-pong operation, to reset the clearing situation that mark is used to represent the accumulated value of data flow;In the case where clearing is designated and do not reset, the accumulated value of the data flow corresponding to current message is zeroed out, and the corresponding mark that resets of data flow is revised as having reset.The clearing mark that the present invention is stored by reading in reseting register, and decide whether to be zeroed out processing to the accumulated value of the data flow corresponding to current message according to the display result for resetting mark, asynchronous resetting can be carried out by realizing the accumulated value of each data flow, so as to solve traditional clear mode can only a plurality of data flow accumulated value and meanwhile reset limitation, and then make the method for control of network flow quantity more flexible, substantially increase the efficiency of control of network flow quantity.
Description
Technical field
The present invention relates to data processing field, it particularly relates to a kind of data processing method and device.
Background technology
With the extensive use of developing rapidly for computer network, particularly P2P technologies, network traffics increase in explosion type
It is long.The network traffics of sharp increase easily cause network congestion, considerably increase the burden of network infrastructure, the O&M cost of network
Increase.The simple mode by increase bandwidth meets user's request, and cost is too big, therefore, and more rational way is pair
Network traffics carry out effective management and control.By being controlled to the non-key service traffics for occupying most of bandwidth
System, so as to ensure the bandwidth demand and service quality of key business, improves overall performance of network.
FPGA has the advantages that high-performance, may be programmed, and many advanced networks flow processing systems are all based on FPGA realizations
's.Flow control system based on FPGA, it is possible to achieve the Accurate Data Flow Control of nanosecond, its basic procedure is broadly divided into report
Text classification, flow control and output three phases.Message classification refers to the key (such as five-tuple) according to message, by accurate
Rule match or mask rule match, obtain the corresponding strategy number of message.Flow control refers to carry out different strategies number
Speed limit, simplest to be achieved in that as each data stream two registers of maintenance respectively:One cumulative value register, one
Tactful value register, wherein, strategy value is technical staff's threshold value set in advance according to demand.Corresponding to current message
Data flow accumulated value be more than strategy value when, then current message is abandoned.It is per at regular intervals, cumulative value register is clear
Zero.
Although the above method realizes the control to network traffics to a certain extent, cumulative value register is clear
Zero this period, flow control system can not continue to provide work, the reason is that being carried out to cumulative value register
When clear operation, the accumulated value of all data flows stored in register is required for resetting simultaneously, could continue after clearing
Flow-control operation, while resetting not only time-consuming but also causing flow control to become dumb.
The problem of in correlation technique, effective solution is not yet proposed at present.
The content of the invention
The problem of in correlation technique, the present invention proposes a kind of data processing method, can realize the asynchronous of accumulated value
Clearing is handled.
The technical proposal of the invention is realized in this way:
According to an aspect of the invention, there is provided a kind of data processing method.
The data processing method includes:
The clearing mark stored in reseting register is read, wherein, reseting register is to be posted for two of ping-pong operation
In running order one in storage, the clearing situation that mark is used to represent the accumulated value of data flow is reset;
In the case where clearing is designated and do not reset, the accumulated value of the data flow corresponding to current message is zeroed out,
And be revised as having reset by the corresponding mark that resets of data flow.
Wherein, when the clearing mark stored in reading reseting register, while reading cumulative value register and plan
The data slightly stored in value register, wherein, cumulative value register is used for the accumulated value for storing every data stream, strategy value deposit
Device is used to store the strategy value set in advance per data stream, and strategy value is threshold parameter set in advance.
In addition, reset be designated reset and current message corresponding to data flow accumulated value be less than strategy value feelings
Under condition, the accumulated value of the data flow corresponding to current message be accumulated as the size of former accumulated value and current message and.
In addition, in strategy of the accumulated value more than the data flow corresponding to current message of the data flow corresponding to current message
In the case of value, current message is abandoned.
Wherein, when reaching in the preset count cycle, the clearing stored in the reseting register of current operating state is identified
It is revised as not resetting, and is switched to the work of another reseting register.
Wherein, the space size of reseting register is less than or equal to 1/3rd of the space size of cumulative value register.
According to another aspect of the present invention there is provided a kind of data processing equipment, the device includes:
Read module, the clearing mark stored for reading in reseting register, wherein, reseting register is for rattling
In running order one in two registers of operation, the clearing shape that mark is used to represent the accumulated value of data flow is reset
Condition;
Dump block, in the case of being designated and not resetting in clearing, to the tired of the data flow corresponding to current message
It is value added to be zeroed out;
Modified module, for being modified to resetting mark.
Wherein, read module is further used for, while reading cumulative value register, tactful value register, being currently at work
The data stored in the reseting register for making state, wherein, cumulative value register is used for the accumulated value for storing every data stream, plan
Slightly value register is used to store the strategy value set in advance per data stream, and strategy value is threshold parameter set in advance.
Wherein, the device also includes:
Accumulator module, for reset be designated reset and current message corresponding to data flow accumulated value be less than plan
In the case of being slightly worth, the accumulated value of the data flow corresponding to current message is accumulated as to the size of former accumulated value and current message
With;
Discard module, for being more than the data corresponding to current message in the accumulated value of the data flow corresponding to current message
In the case of the strategy value of stream, current message is abandoned.
Wherein, the device can also include:
Handover module, for when reaching in the preset count cycle, being switched to the work of another reseting register.
Wherein, the space size of the reseting register in said apparatus is less than or equal to the space size of cumulative value register
1/3rd.
The clearing mark that the present invention is stored by reading in reseting register, and determined according to the display result for resetting mark
Whether processing is zeroed out to the accumulated value of the data flow corresponding to current message, the accumulated value for realizing each data flow can be with
Carry out asynchronous resetting so that solve traditional clear mode can only a plurality of data flow accumulated value and meanwhile reset limitation, and then
The method for making control of network flow quantity is more flexible, substantially increases the efficiency of control of network flow quantity.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to institute in embodiment
The accompanying drawing needed to use is briefly described, it should be apparent that, drawings in the following description are only some implementations of the present invention
Example, for those of ordinary skill in the art, on the premise of not paying creative work, can also be obtained according to these accompanying drawings
Obtain other accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of flow control method of prior art according to embodiments of the present invention;
Fig. 2 is the flow chart of data processing method according to embodiments of the present invention;
Fig. 3 is the schematic flow sheet of the data processing method according to a specific embodiment of the invention;
Fig. 4 is the block diagram of data processing equipment according to embodiments of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, the every other embodiment that those of ordinary skill in the art are obtained belongs to what the present invention was protected
Scope.
Inventor has found during the present invention is realized, a kind of existing method for controlling network flow is by based on table tennis
Pang operation is controlled to network traffics, as shown in figure 1, being added up value register (length with two capacity identicals
Ram) take turns to operate, at the time of integer second is reached, by the accumulated value stored in the cumulative value register worked simultaneously by
Bar is reset, and switches to another accumulated value registers simultaneously, is being switched back when waiting next integer second.But this side
Method is not also very perfect, and it needs an extra cumulative value register, and is equally needed when processing is zeroed out
To reset one by one simultaneously so that for flow control and dumb.
There is provided a kind of data processing method for embodiments in accordance with the present invention, it is possible to achieve at the asynchronous resetting of accumulated value
Reason.
As shown in Fig. 2 data processing method according to embodiments of the present invention, including:
Step S201, reads the clearing mark stored in reseting register, wherein, reseting register is for ping-pong operation
Two registers in running order one, reset the clearing situation that mark is used to represent the accumulated value of data flow;
Step S203, in the case where clearing is designated and do not reset, to the accumulated value of the data flow corresponding to current message
It is zeroed out, and the corresponding mark that resets of data flow is revised as having reset.
Wherein, when the clearing mark stored in reading reseting register, while reading cumulative value register and plan
The data slightly stored in value register, wherein, cumulative value register is used for the accumulated value for storing every data stream, strategy value deposit
Device is used to store the strategy value set in advance per data stream, and strategy value is threshold parameter set in advance.
In addition, reset be designated reset and current message corresponding to data flow accumulated value be less than strategy value feelings
Under condition, the accumulated value of the data flow corresponding to current message be accumulated as the size of former accumulated value and current message and.
In addition, in strategy of the accumulated value more than the data flow corresponding to current message of the data flow corresponding to current message
In the case of value, current message is abandoned.
Wherein, when reaching in the preset count cycle, the clearing stored in the reseting register of current operating state is identified
It is revised as not resetting, and is switched to the work of another reseting register.
It is preferred that, the space size of reseting register is less than or equal to 1/3rd of the space size of cumulative value register.
In a specific embodiment, as shown in figure 3, when a message is sended over, deposit is resetted while reading
Device (Reset Ram), cumulative value register (Length Ram) and tactful value register (Strategy Ram), the reset of reading
Register is for one in running order in two registers of ping-pong operation, in addition, the corresponding data flow of the message
Clearing mark, accumulated value, strategy value is corresponding respectively is stored in reseting register, cumulative value register, tactful value register
In.
Now decide whether that the clearing message is corresponding according to the clearing of the corresponding data flow of the message of reading mark
The accumulated value of data flow, if the clearing mark read is shown as non-cleared condition, accumulated value is reset, and the clearing is marked
Knowledge is revised as cleared condition.So when the message for subsequently belonging to the data stream is sended over, then the clearing mark read
For cleared condition, therefore operation will not be zeroed out to accumulated value, but current accumulated value can increase, such as current is tired
Value added is 10M, and the clearing of the corresponding data flow of current message, which is designated, to have reset, and the size of current message is 4M, then cumulative
Value is accomplished by increase 4M and is changed into 14M, it should be noted that the size of accumulated value is less than strategy value before cumulative;If
Accumulated value is more than strategy value, then abandons current message.
When new integer second start time, the clearing mark in running order reseting register is all modified to
Non- cleared condition, and switch to another reseting register to be operated, when next integer second is switched back again.So do just
It can realize, after the integer second starts, when first message for belonging to a certain data flow is reached, it resets mark and always not reset
State, i.e., after the new integer second starts, when first message for belonging to a certain data flow is reached, reset the cumulative of the data flow
Value.The clearing mark of the data flow is revised as having reset after clearing, the message subsequently reached then tires out the size of current message
It is added on accumulated value, until accumulated value is more than strategy value, when accumulated value is more than strategy value, abandons current message.
It is preferred that, clearing is designated 1 bit identification, and the size of two reseting registers for being used for ping-pong operation is much small
In the size of accumulator register, it is preferred that the size of a reseting register can be 1/3rd of accumulator register size.
During the present invention is realized, inventor has found, if accumulated value and strategy value are all deposited using the RAM of 32 bit wides
Storage, then carry out the flow control method of ping-pong operation than the cumulative value register of use two as shown in Figure 1, save 1/3rd
RAM resources, and in the case of RAM resource identicals are taken, the stream interface driver quantity that the present invention is supported is more than scheme before
45.5%, and the present invention can simply and easily be based on realizing in FPGA.
Embodiments in accordance with the present invention, additionally provide a kind of data processing equipment.
As shown in figure 4, data processing equipment according to embodiments of the present invention includes:
Read module 41, the clearing mark stored for reading in reseting register, wherein, reseting register is for table tennis
In running order one in two registers of pang operation, the clearing shape that mark is used to represent the accumulated value of data flow is reset
Condition;
Dump block 42, in the case of being designated and not resetting in clearing, to the data flow corresponding to current message
Accumulated value is zeroed out;
Modified module 43, for being modified to resetting mark.
Wherein, read module is further used for, while reading cumulative value register, tactful value register, being currently at work
The data stored in the reseting register for making state, wherein, cumulative value register is used for the accumulated value for storing every data stream, plan
Slightly value register is used to store the strategy value set in advance per data stream, and strategy value is threshold parameter set in advance.
Wherein, the device also includes:
Accumulator module, for reset be designated reset and current message corresponding to data flow accumulated value be less than plan
In the case of being slightly worth, the accumulated value of the data flow corresponding to current message is accumulated as to the size of former accumulated value and current message
With;
Discard module, for being more than the data corresponding to current message in the accumulated value of the data flow corresponding to current message
In the case of the strategy value of stream, current message is abandoned.
Wherein, the device can also include:
Handover module, for when reaching in the preset count cycle, being switched to the work of another reseting register.
Wherein, the space size of the reseting register in said apparatus is less than or equal to the space size of cumulative value register
1/3rd.
In summary, by means of the above-mentioned technical proposal of the present invention, pass through what is stored in the reseting register according to reading
Reset mark to decide whether the accumulated value of the data flow corresponding to clearing current message, realize the accumulated value of each data flow
Asynchronous resetting can be carried out, solve traditional clear mode can only a plurality of data flow accumulated value and meanwhile reset limitation, and
The memory headroom that reseting register takes greatly reduces compared to the resource that cumulative value register takes, therefore makes network traffics control
System is more flexible, and substantially increases the efficiency of control of network flow quantity.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
God is with principle, and any modification, equivalent substitution and improvements made etc. should be included in the scope of the protection.
Claims (8)
1. a kind of data processing method, it is characterised in that including:
The clearing mark stored in reseting register is read, wherein, the reseting register is to be posted for two of ping-pong operation
It is described to reset the clearing situation that mark is used to represent the accumulated value of data flow in running order one in storage;
In the case where the clearing is designated and do not reset, the accumulated value of the data flow corresponding to current message is zeroed out,
And be revised as having reset by the corresponding mark that resets of the data flow;
Wherein, while reading cumulative value register, tactful value register, being currently at storage in the reseting register of working condition
Data, wherein, cumulative value register is used for the accumulated value for storing every data stream, and tactful value register is used to store to set in advance
The strategy value of fixed every data stream, the strategy value is threshold parameter set in advance.
2. methods described according to claim 1, it is characterised in that be designated and reset and current message institute is right in the clearing
In the case that the accumulated value for the data flow answered is less than strategy value, the accumulated value of the data flow corresponding to current message is accumulated as original and tired out
Value added size with current message and;
It is more than the strategy value of the data flow corresponding to the current message in the accumulated value of the data flow corresponding to current message
In the case of, abandon the current message.
3. methods described according to claim 1, it is characterised in that when reaching in the preset count cycle, by current operating state
Reseting register in store clearing mark be revised as not resetting, and be switched to another reseting register work.
4. methods described according to claim 1, it is characterised in that the space size of the reseting register is less than or equal to cumulative
/ 3rd of the space size of value register.
5. a kind of data processing equipment, it is characterised in that including:
Read module, the clearing mark stored for reading in reseting register, wherein, the reseting register is for rattling
It is described to reset the clearing that mark is used to represent the accumulated value of data flow in running order one in two registers of operation
Situation;
Dump block, in the case of being designated and not resetting in the clearing, to the tired of the data flow corresponding to current message
It is value added to be zeroed out;
Modified module, for being modified to the clearing mark;
Wherein, read module is further used for, while reading cumulative value register, tactful value register, being currently at work shape
The data stored in the reseting register of state, wherein, cumulative value register is used for the accumulated value for storing every data stream, strategy value
Register is used to store the strategy value set in advance per data stream, and the strategy value is threshold parameter set in advance.
6. described device according to claim 5, it is characterised in that including:
Accumulator module, for it is described clearing be designated reset and current message corresponding to data flow accumulated value be less than plan
In the case of being slightly worth, the accumulated value of the data flow corresponding to current message is accumulated as to the size of former accumulated value and current message
With;
Discard module, for being more than the data corresponding to the current message in the accumulated value of the data flow corresponding to current message
In the case of the strategy value of stream, the current message is abandoned.
7. described device according to claim 5, it is characterised in that including:
Handover module, for when reaching in the preset count cycle, being switched to the work of another reseting register.
8. described device according to claim 5, it is characterised in that the space size of the reseting register is less than or equal to cumulative
/ 3rd of the space size of value register.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410487149.7A CN104243341B (en) | 2014-09-22 | 2014-09-22 | Data processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410487149.7A CN104243341B (en) | 2014-09-22 | 2014-09-22 | Data processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104243341A CN104243341A (en) | 2014-12-24 |
CN104243341B true CN104243341B (en) | 2017-09-08 |
Family
ID=52230719
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410487149.7A Active CN104243341B (en) | 2014-09-22 | 2014-09-22 | Data processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104243341B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112817028B (en) * | 2020-12-29 | 2024-02-13 | 上海工物高技术产业发展有限公司 | Multichannel analyzer resetting method, multichannel analyzer resetting device, multichannel analyzer resetting system and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1585373A (en) * | 2004-05-28 | 2005-02-23 | 中兴通讯股份有限公司 | Ping pong buffer device |
CN1885821A (en) * | 2005-06-24 | 2006-12-27 | 中国长城计算机深圳股份有限公司 | Realization method for carrying out buffer control on internet user bandwidth |
CN101866318A (en) * | 2010-06-13 | 2010-10-20 | 北京北大众志微***科技有限责任公司 | Management system and method for cache replacement strategy |
CN103441892A (en) * | 2013-08-16 | 2013-12-11 | 大连梯耐德网络技术有限公司 | Multi-user flow statistical system based on broadcast television network |
-
2014
- 2014-09-22 CN CN201410487149.7A patent/CN104243341B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1585373A (en) * | 2004-05-28 | 2005-02-23 | 中兴通讯股份有限公司 | Ping pong buffer device |
CN1885821A (en) * | 2005-06-24 | 2006-12-27 | 中国长城计算机深圳股份有限公司 | Realization method for carrying out buffer control on internet user bandwidth |
CN101866318A (en) * | 2010-06-13 | 2010-10-20 | 北京北大众志微***科技有限责任公司 | Management system and method for cache replacement strategy |
CN103441892A (en) * | 2013-08-16 | 2013-12-11 | 大连梯耐德网络技术有限公司 | Multi-user flow statistical system based on broadcast television network |
Also Published As
Publication number | Publication date |
---|---|
CN104243341A (en) | 2014-12-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103716208B (en) | Support network management, system, interchanger and the network of elephant stream | |
CN101572667B (en) | Method for realizing equal cost multipath of IP route and device | |
CN103078709B (en) | Data redundancy recognition methods | |
CN103888317B (en) | A kind of unrelated network redundancy flow removing method of agreement | |
CN106656801A (en) | Method and device for redirection of forwarding path of business flow and business flow forwarding system | |
JP2007249810A (en) | Reduction method for parallel computer, and parallel computer | |
CN105590321A (en) | Block-based subgraph construction and distributed graph processing method | |
CN106161270B (en) | A kind of network deployment method | |
CN105376157A (en) | Method and device for routing path selection | |
DE112017003324T5 (en) | Adaptive routing technologies using aggregated congestion information | |
CN103825838A (en) | Method for flow dispatch for removing bandwidth fragmentization from data center | |
EP3534577A1 (en) | Method of forwarding multicast data packet | |
CN104618231B (en) | Deep packet identification method, device and system in the Wi-fi systems of high in the clouds | |
CN105763457B (en) | Multicast message processing method and the network equipment | |
WO2016197458A1 (en) | Traffic control method and apparatus | |
CN103078754B (en) | A kind of network data flow statistical method based on attribute bloom filter | |
CN108809752A (en) | A kind of adaptive process monitoring method, apparatus of network flow, NPB equipment and medium | |
CN104243341B (en) | Data processing method and device | |
CN105337866B (en) | A kind of flow switching method and device | |
CN103441943B (en) | A kind of traffic messages control method and device | |
KR20150080183A (en) | Method and Apparatus for dynamic traffic engineering in Data Center Network | |
CN109286584A (en) | Fragmentation and reassembly method, device and equipment in a kind of multiple nucleus system | |
JP6494471B2 (en) | Network system, communication quality determination method, and analyzer | |
WO2017174019A1 (en) | Route information processing method, packet switching equipment, and storage medium | |
US8687634B2 (en) | Method for diverting packet multiple times, apparatus and system |
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 | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220726 Address after: 100089 building 36, courtyard 8, Dongbeiwang West Road, Haidian District, Beijing Patentee after: Dawning Information Industry (Beijing) Co.,Ltd. Patentee after: DAWNING INFORMATION INDUSTRY Co.,Ltd. Address before: 100193 No. 36 Building, No. 8 Hospital, Wangxi Road, Haidian District, Beijing Patentee before: Dawning Information Industry (Beijing) Co.,Ltd. |
|
TR01 | Transfer of patent right |