CN105847179A - Method and device for concurrently reporting data in DPI system - Google Patents

Method and device for concurrently reporting data in DPI system Download PDF

Info

Publication number
CN105847179A
CN105847179A CN201610167800.1A CN201610167800A CN105847179A CN 105847179 A CN105847179 A CN 105847179A CN 201610167800 A CN201610167800 A CN 201610167800A CN 105847179 A CN105847179 A CN 105847179A
Authority
CN
China
Prior art keywords
descriptor
tcp
report
ipxy
list
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
CN201610167800.1A
Other languages
Chinese (zh)
Other versions
CN105847179B (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.)
Wuhan Greenet Information Service Co Ltd
Original Assignee
Wuhan Greenet Information Service Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Greenet Information Service Co Ltd filed Critical Wuhan Greenet Information Service Co Ltd
Priority to CN201610167800.1A priority Critical patent/CN105847179B/en
Publication of CN105847179A publication Critical patent/CN105847179A/en
Application granted granted Critical
Publication of CN105847179B publication Critical patent/CN105847179B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/26Flow control; Congestion control using explicit feedback to the source, e.g. choke packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method and device for concurrently reporting data in a DPI system and relates to the technical field of DPI. The technical process of the method comprises following steps: the DPI system is started, and report thread number and report queue length are initialized; when a report task is added to the report queue, the report task is allocated to an idle report thread of a report thread pool; a corresponding TCP file connecting descriptor list is selected according to the service type of the report task; a send function is called from effective descriptors in the TCP file connecting descriptor list to perform TCP data transmission; if a returned value is the length of a sent data package, then the TCP data transmission is finished; if the value is less than zero, then TCP data transmission is failed; if the value is larger than zero but less than the length of the sent data package, then the TCP data transmission is unfinished. By means of the method and the device, DPI report performance is increased, efficient concurrent data report is realized, big data analyzing performance is increased, and server load is reduced.

Description

The method and device that in a kind of DPI system, Data Concurrent reports
Technical field
The present invention relates to DPI (Deep Packet Inspection, deep-packet detection) technology neck Territory, is specifically related to the method and device that in a kind of DPI system, Data Concurrent reports.
Background technology
DPI technology is a kind of flow detection based on application layer and control technology, when IP data Bag, TCP (Transmission Control Protocol, transmission control protocol) or UDP (User Datagram Protocol, UDP) data stream is by band based on DPI technology During wide management system, this system is come OSI seven layers by the content of deep reading IP payload package Application layer message in agreement is recombinated, thus obtains the content of whole application program, then According to the management strategy of system definition, flow carried out shaping operation, and by multiple detection skill Art, carries out data extraction, data traffic analysis, user behavior analysis and visitor to bag and stream information Family customized information collection etc..
Be in similar with anti-virus software system of bandwidth management system based on DPI technology In: the application type that can identify is necessary for known to system;With the BT (Bit known to user Torrent, bit stream) as a example by, the protocol characteristic word of its Handshake is " BitTorrent Protocol”.In order to ensure application type known to system identification, Anti-Virus backstage needs One huge anti-virus signature database, bandwidth management system based on DPI technology also to be safeguarded One application property data base.When flow is through bandwidth management system, and bandwidth management system will Application message after unpacking and backstage property data base are compared to determine application type.
But, when there being new application to occur, the application property data base on backstage needs novel Application possesses identification and control ability.Existing bandwidth management system based on DPI technology reports During data, using the mode of " reported data successively ", it is inefficient that data send, and Total duration that data send is longer, and then makes the hydraulic performance decline of bandwidth management system, server Load bigger.
Summary of the invention
For defect present in prior art, present invention solves the technical problem that into: provide one Planting the method and device that in DPI system, Data Concurrent reports, the present invention not only increases DPI Report performance, it is achieved data efficient concurrently reports, and improves the performance of big data parsing, Reduce the load of server.
For reaching object above, the side that in the DPI system that the present invention provides, Data Concurrent reports Method, the method comprises the following steps:
A:DPI system start-up, initializes and reports reporting number of threads and reporting team of thread pool Row length, forwards step B to;
B: report in thread pool all reports thread to enter waiting state, when reporting task When adding Excelsior queue, idle in task distribution Excelsior thread pool report line by reporting Journey, forwards step C to;
C: according to reporting the type of service of task, selects corresponding TCP file to connect descriptor List, forwards step D to;
D: judge TCP file to connect in descriptor list and there is effective descriptor, select institute State effective descriptor, forward step E to;
E: call send function from effective descriptor, carries out tcp data transmission;Look into See return value value of send function: if value is the length sending packet, then TCP Data are transmitted, and forward step B to and wait that other tasks trigger;If value is less than 0, then Tcp data bust this, forwards step F to after adding 1 by transmission fail count count_fail, If value is more than 0 and is less than the length sending packet, then tcp data transmission is not fully complete, Forward step G to;
F: judge that count_fail, whether less than server number of units, if so, effectively retouches described State after the conventional mark of symbol is set to down state-1 and forward step C to, otherwise forward step B to;
G: judge that value whether less than single DPI maximum transmitted byte number, the most then sends out Send obstruction, transmission is blocked after counting count_block adds 1 and forward step H to, otherwise continue Perform step E;
H: judge that count_block, whether less than positive integer N, if so, re-executes step E; Step C is forwarded to after otherwise the conventional mark of described effective descriptor being set to blocked state 2.
On the basis of technique scheme, if TCP file connects descriptor row in step D Table do not exists effective descriptor, then sends state according to history, select suitable descriptor, And be set to its conventional mark after 1 preserve to corresponding TCP file connection descriptor list, Re-execute step C.
On the basis of technique scheme, described in step D, send state according to history, Preserve to correspondence after selecting suitable descriptor and its conventional mark being set to upstate 1 The idiographic flow that TCP file connects in descriptor list is:
D01: in definition DPI system, the ip of server is x, and the port y used by server is Ipxy, y select according to the type of service of reporting service, every kind of corresponding different clothes of type of service Business device port, each ipxy unique correspondence one respectively records what front 2 report cycles sent Total duration ipxy.duration [2], each report cycle is 5min;Ipxy.duration [0] is corresponding In first 10 minutes report cycles of current time, TCP sends shared total duration, In the corresponding first 5 minutes report cycles of current time of ipxy.duration [1], TCP sends shared total Duration;The initial value of ipxy.duration [0] and ipxy.duration [1] is 0;
D02: respectively each ipxy carried in current reporting service is created TCP and connect, Socket is stored in the descriptor that each ipxy connects;
D03: calculating the transmission scoring ipxyscore of each ipxy, computing formula is: Ipxyscore=ipxy.duration [0] α+ipxy.duration [1] β;Alpha+beta in above-mentioned formula =1;
D04: judge that all of ipxyscore is the most identical, if so, selects ipxy.duration [1] The server ip of minima, otherwise selects minima ipxyscore_min in all of ipxyscore Server ip;
D05: determine that the server ipx and port y of selection are this destination address sent, The descriptor that the ipxy of selection connects is set to 1, at the beginning of the descriptor that other ipxy connect is set to After beginning state 0, preserve to corresponding TCP file connection descriptor list.
On the basis of technique scheme, after step E carries out tcp data transmission, need Ipxy.duration [0] and ipxy.duration [1] is updated according to the report cycle of transmission.
On the basis of technique scheme, D selects the concrete stream of described effective descriptor Cheng Wei: judge that TCP file connects in descriptor list whether to exist and conventional be masked as 1 retouch State symbol:
If so, select TCP file connect in descriptor first conventional be masked as 1 description Symbol;Otherwise judge whether the connection descriptor list of TCP file exists to commonly use to be masked as 0 Descriptor:
If so, select TCP file connect in descriptor first conventional be masked as 0 description Its conventional mark is also set to 1 by symbol, forwards step E to;Otherwise judge that TCP file connects to retouch State whether symbol list exists and commonly use the descriptor being masked as 2:
If so, select TCP file connect in descriptor first conventional be masked as 2 description Its conventional mark is also set to 1 by symbol, forwards step E to;Otherwise determine that TCP file connects to retouch State in symbol list and there is not effective descriptor.
On the basis of technique scheme, step B determines and reports task to add Excelsior The flow process of queue is: judges that whether the queue that reports reporting thread is empty, does not goes up Report task joins and reports queue, now continues executing with step B, otherwise reports task to add To reporting queue.
On the basis of technique scheme, judge described in step D that TCP file connects and retouch State and symbol list exists the flow process of effective descriptor be: judge TCP file connection descriptor Whether list is empty and TCP file connects the conventional of descriptor list All Files descriptor Mark is not the most 1, the most then do not exist in TCP file connection descriptor list and effectively retouch Stating symbol, otherwise there is effective descriptor in connecting descriptor list in TCP file.
The device that in the DPI system based on said method that the present invention provides, Data Concurrent reports, This device includes DPI system initialization module, reports task allocating module, descriptor list choosing Select module, effective descriptor determination module, tcp data transport module, fail count judgement mould Block, obstruction determination module and obstruction counting determination module;
DPI system initialization module is used for: control DPI system start-up, initializes and reports thread Reporting number of threads and reporting queue length of pond, reports to reporting task allocating module to send and appoints Business distribution signal;
Report task allocating module for: receive report task distribution signal after, control report line The all of Cheng Chizhong report thread to enter waiting state, add Excelsior queue when reporting task Time, idle in task distribution Excelsior thread pool report thread, to descriptor list by reporting Select module to send descriptor list and select signal;
Descriptor list selection module is used for: after receiving descriptor list selection signal, according to upper The type of service of report task, selects corresponding TCP file to connect descriptor list, to effectively Descriptor determination module sends effective descriptor and judges signal;
Effectively descriptor determination module is used for: after receiving effective descriptor judgement signal, it is judged that TCP file connects in descriptor list and there is effective descriptor, if so, to tcp data Transport module sends tcp data transmission signal;Otherwise send state according to history, select to close Its conventional mark is also set to after 1 the TCP file connection preserved to corresponding by suitable descriptor In descriptor list, again send descriptor list to descriptor list selection module and select letter Number;
Tcp data transport module is used for: after receiving tcp data transmission signal, from effectively Descriptor calls send function, carries out tcp data transmission;Check the return of send function Value value: if value is the length sending packet, then tcp data is transmitted, to Reporting task allocating module to send reports task to distribute signal;If value is less than 0, then TCP Data transmission fails, judges mould to fail count after adding 1 by transmission fail count count_fail Block sends fail count and judges signal, if value more than 0 and is less than the length sending packet, Then tcp data transmission is not fully complete, and sends obstruction judgement signal to blocking determination module;
Fail count determination module is used for: judge whether count_fail is less than server number of units, If so, the conventional mark of described effective descriptor is set to after down state-1 to descriptor List selection module sends descriptor list and selects signal, otherwise to reporting task allocating module to send out Serve report task distribution signal;
Block determination module to be used for: after receiving obstruction judgement signal, it is judged that whether value is less than Single DPI maximum transmitted byte number, the most then send obstruction, and transmission is blocked counting Count_block sends obstruction counting judgement signal to obstruction counting determination module after adding 1, no Then continue to send tcp data transmission signal to tcp data transport module;
Block counting determination module to be used for: judge whether count_block is less than positive integer N, The most again tcp data transmission signal is sent to tcp data transport module;Otherwise by institute State after the conventional mark of effective descriptor is set to blocked state 2 and select mould to descriptor list Block sends descriptor list and selects signal.
Compared with prior art, it is an advantage of the current invention that:
With the mode of employing " reported data successively " in prior art, present invention incorporates DPI Process big data, multiple services demand, it is provided that one Data Concurrent in DPI system reports Method and device.The method employing multi-service classification reports, multi-thread concurrent reports, file Descriptor transmission state mechanism and balanced multi-server load design, not only increase DPI Report performance, it is achieved data efficient concurrently reports, and improves the performance of big data parsing, Reduce the load of server.
Accompanying drawing explanation
Fig. 1 is the flow process of the method that Data Concurrent reports in the DPI system in the embodiment of the present invention Figure;
Fig. 2 is the signal of the device that Data Concurrent reports in the DPI system in the embodiment of the present invention Flow to schematic diagram.
Detailed description of the invention
Below in conjunction with drawings and Examples, the present invention is described in further detail.
Side shown in Figure 1, that in the DPI system in the embodiment of the present invention, Data Concurrent reports Method, comprises the following steps:
S101:DPI system boot, in system, each initiation of services, completes according to business configuration (completing the Policy receipt storage work such as reporting policy, business entrance etc. is pending for initial work Data mode);Initialize according to configuration (business reports scale and physical equipment disposal ability) Report reporting number of threads and reporting queue length etc. of thread pool, forward S102 to.
S102: report in thread pool all reports thread to enter waiting state, it is judged that report line Whether the queue that reports of journey is empty, does not the most report task to add Excelsior queue, continues Continuous execution S102, otherwise reports task to add Excelsior queue, and task will be reported to distribute extremely Report in thread pool and idle to report thread, forward S103 to.
S103: according to reporting the type of service of task, select corresponding TCP (Transmission Control Protocol, transmission control protocol) file connection descriptor list, forward S104 to.
S104: judge TCP file connects in descriptor list whether there is effective descriptor, If so, forward S106 to, otherwise forward S105 to.
S104 judging, TCP file connects in descriptor list whether there is effective descriptor Idiographic flow be: whether judge that TCP file connects descriptor list is empty and TCP literary composition It is not the most 1 (upstate) that part connects the conventional mark of descriptor list All Files descriptor, The most then there is not effective descriptor, otherwise TCP in connecting descriptor list in TCP file File connects in descriptor list and there is effective descriptor.
S105: send state according to history, select suitable descriptor and commonly used mark It is set to after 1 preserve and connects in descriptor list to corresponding TCP file, re-execute S103.
S106: select TCP file to connect effective descriptor in descriptor list, forward to S107。
Whether the idiographic flow of S106 is: judge that TCP file connects in descriptor list and exist Conventional be masked as 1 descriptor:
If so, select TCP file connect in descriptor first conventional be masked as 1 description Symbol;Otherwise judge whether the connection descriptor list of TCP file exists to commonly use to be masked as 0 (just Beginning state) descriptor:
If so, select TCP file connect in descriptor first conventional be masked as 0 description Its conventional mark is also set to 1 by symbol, forwards S107 to;Otherwise judge that TCP file connects to retouch State and whether symbol list exist the conventional descriptor being masked as 2 (blocked states):
If so, select TCP file connect in descriptor first conventional be masked as 2 description Its conventional mark is also set to 1 by symbol, forwards S107 to;Otherwise forward S105 to.
S107: take out socket from effective descriptor and call send function, carry out TCP Data are transmitted, and forward S108 to.
S108: check return value value of send function: if value is to send packet Length, then tcp data is transmitted, and forwards S102 to and waits that other tasks trigger;If value Less than 0 (such as-1 ,-2 etc.), then tcp data bust this, fail count will be sent Count_fail forwards S109 to after adding 1, if value is more than 0 and less than the length sending packet Degree, then tcp data transmission is not fully complete, and forwards S110 to.
S109: judge that count_fail is whether less than server number of units (server in the present embodiment Number of units is 3), if so, the conventional mark of descriptor effective in S107 being set to-1 (can not By state) after forward S103 to, otherwise forward S102 to.
S110: judge that whether value is less than single DPI maximum transmitted byte number (such as 4 1024 Byte), the most then send obstruction, transmission is blocked after counting count_block adds 1 and forward to S111, otherwise shows data volume the to be sent transmitting capacity more than DPI, needs to send out several times Send, continue executing with S107.
S111: judge whether (N is positive integer to count_block, its concrete numerical value less than N Empirically determined according to test, in the present embodiment, N is defined as 3, shows what tcp data transmitted Server load is heavier, needs load balancing), if so, re-execute S107;Otherwise by S107 In the conventional mark of effective descriptor be set to 2 after forward S103 to.
The idiographic flow of S105 is:
S105a: in definition DPI system, the ip of server is x, the port y used by server For ipxy, (y selects according to the type of service of reporting service, and every kind of type of service is corresponding different Service-Port), it is (false that each ipxy unique correspondence one respectively records front 2 report cycles If each report cycle is 5min) total duration ipxy.duration [2] of sending, In the corresponding first 10 minutes report cycles of current time of ipxy.duration [0], TCP sends shared Total duration, in the corresponding first 5 minutes report cycles of current time of ipxy.duration [1], TCP sends Shared total duration.The initial value of ipxy.duration [0] and ipxy.duration [1] is 0.
S105b: respectively each ipxy carried in current reporting service is created TCP and connect, Socket is stored in the descriptor that each ipxy connects.
S105c: calculating the transmission scoring ipxyscore of each ipxy, computing formula is: Ipxyscore=ipxy.duration [0] α+ipxy.duration [1] β;α in above-mentioned formula+ β=1, the ratio for different user α and β there may be difference, converges by saving certain Platform test, obtaining best practices value α convergence is 0.3, and β convergence is 0.7.
S105d: judge that all of ipxyscore is the most identical, if so, selects ipxy.duration [1] The server ip of minima, otherwise selects minima ipxyscore_min in all of ipxyscore Server ip.
S105e: determine that the server ipx and port y of selection are this destination address sent, The descriptor that the ipxy of selection connects is set to 1, and the descriptor that other ipxy connect is set to 0 After, preserve to corresponding TCP file connection descriptor list.
The present embodiment reporting service includes that general class reports TASK1 and flux and flow direction class to report TASK2, TASK1 corresponding ports 1, TASK2 corresponding ports 2, number of servers is 3, Ip is respectively ip1, ip2 and ip3.Ip1 and port 1, ip2 and port 1 and ip3 and end The ipxyscore, respectively ip11score, ip21score and ip31score of mouth 1.This enforcement When example implements S105, when reporting service is TASK1 and TASK1, ip11score is Minima, therefore, the server ip selected in s105d is 1.
On this basis, after S107 carries out tcp data transmission, need upper according to transmit The report cycle updates ipxy.duration [0] and ipxy.duration [1].
Shown in Figure 2, number in the DPI system based on said method in the embodiment of the present invention According to the device concurrently reported, this device includes DPI system initialization module, reports task to distribute Module, descriptor list selection module, effective descriptor determination module, tcp data transmission mould Block, fail count determination module, obstruction determination module and obstruction counting determination module;
DPI system initialization module is used for: control DPI system start-up, initializes and reports thread Reporting number of threads and reporting queue length of pond, reports to reporting task allocating module to send and appoints Business distribution signal;
Report task allocating module for: receive report task distribution signal after, control report line The all of Cheng Chizhong report thread to enter waiting state, add Excelsior queue when reporting task Time, idle in task distribution Excelsior thread pool report thread, to descriptor list by reporting Select module to send descriptor list and select signal;
Descriptor list selection module is used for: after receiving descriptor list selection signal, according to upper The type of service of report task, selects corresponding TCP file to connect descriptor list, to effectively Descriptor determination module sends effective descriptor and judges signal;
Effectively descriptor determination module is used for: after receiving effective descriptor judgement signal, it is judged that TCP file connects in descriptor list and there is effective descriptor, if so, to tcp data Transport module sends tcp data transmission signal;Otherwise send state according to history, select to close Its conventional mark is also set to after 1 the TCP file connection preserved to corresponding by suitable descriptor In descriptor list, again send descriptor list to descriptor list selection module and select letter Number;
Tcp data transport module is used for: after receiving tcp data transmission signal, from effectively Descriptor calls send function, carries out tcp data transmission;Check the return of send function Value value: if value is the length sending packet, then tcp data is transmitted, to Reporting task allocating module to send reports task to distribute signal;If value is less than 0, then TCP Data transmission fails, judges mould to fail count after adding 1 by transmission fail count count_fail Block sends fail count and judges signal, if value more than 0 and is less than the length sending packet, Then tcp data transmission is not fully complete, and sends obstruction judgement signal to blocking determination module;
Fail count determination module is used for: judge whether count_fail is less than server number of units, If so, the conventional mark of described effective descriptor is set to after down state-1 to descriptor List selection module sends descriptor list and selects signal, otherwise to reporting task allocating module to send out Serve report task distribution signal;
Block determination module to be used for: after receiving obstruction judgement signal, it is judged that whether value is less than Single DPI maximum transmitted byte number, the most then send obstruction, and transmission is blocked counting Count_block sends obstruction counting judgement signal to obstruction counting determination module after adding 1, no Then continue to send tcp data transmission signal to tcp data transport module;
Block counting determination module to be used for: judge whether count_block is less than positive integer N, The most again tcp data transmission signal is sent to tcp data transport module;Otherwise by institute State after the conventional mark of effective descriptor is set to blocked state 2 and select mould to descriptor list Block sends descriptor list and selects signal.
The present invention is not limited to above-mentioned embodiment, for those skilled in the art For, under the premise without departing from the principles of the invention, it is also possible to make some improvements and modifications, Within these improvements and modifications are also considered as protection scope of the present invention.This specification is not made in detail The content described belongs to prior art known to professional and technical personnel in the field.

Claims (8)

1. the method that in a DPI system, Data Concurrent reports, it is characterised in that the method Comprise the following steps:
A:DPI system start-up, initializes and reports reporting number of threads and reporting team of thread pool Row length, forwards step B to;
B: report in thread pool all reports thread to enter waiting state, when reporting task When adding Excelsior queue, idle in task distribution Excelsior thread pool report thread by reporting, Forward step C to;
C: according to reporting the type of service of task, selects corresponding TCP file to connect descriptor List, forwards step D to;
D: judge TCP file to connect in descriptor list and there is effective descriptor, select institute State effective descriptor, forward step E to;
E: call send function from effective descriptor, carries out tcp data transmission;Look into See return value value of send function: if value is the length sending packet, then TCP Data are transmitted, and forward step B to and wait that other tasks trigger;If value is less than 0, then Tcp data bust this, forwards step F to after adding 1 by transmission fail count count_fail, If value is more than 0 and is less than the length sending packet, then tcp data transmission is not fully complete, Forward step G to;
F: judge that count_fail, whether less than server number of units, if so, effectively retouches described State after the conventional mark of symbol is set to down state-1 and forward step C to, otherwise forward step B to;
G: judge that value whether less than single DPI maximum transmitted byte number, the most then sends out Send obstruction, transmission is blocked after counting count_block adds 1 and forward step H to, otherwise continue Perform step E;
H: judge that count_block, whether less than positive integer N, if so, re-executes step E; Step C is forwarded to after otherwise the conventional mark of described effective descriptor being set to blocked state 2.
2. the method that in DPI system as claimed in claim 1, Data Concurrent reports, it is special Levy and be: if TCP file does not exist effective description in step D in connecting descriptor list Symbol, then send state according to history, select suitable descriptor and be set to by its conventional mark Preserve after 1 and connect in descriptor list to corresponding TCP file, re-execute step C.
3. the method that in DPI system as claimed in claim 2, Data Concurrent reports, it is special Levy and be: described in step D according to history send state, select suitable descriptor and Preserve after its conventional mark is set to upstate 1 to corresponding TCP file connection descriptor Idiographic flow in list is:
D01: in definition DPI system, the ip of server is x, and the port y used by server is Ipxy, y select according to the type of service of reporting service, every kind of corresponding different clothes of type of service Business device port, each ipxy unique correspondence one respectively records what front 2 report cycles sent Total duration ipxy.duration [2], each report cycle is 5min;Ipxy.duration [0] is corresponding In first 10 minutes report cycles of current time, TCP sends shared total duration, In the corresponding first 5 minutes report cycles of current time of ipxy.duration [1], TCP sends shared total Duration;The initial value of ipxy.duration [0] and ipxy.duration [1] is 0;
D02: respectively each ipxy carried in current reporting service is created TCP and connect, Socket is stored in the descriptor that each ipxy connects;
D03: calculating the transmission scoring ipxyscore of each ipxy, computing formula is: Ipxyscore=ipxy.duration [0] α+ipxy.duration [1] β;α in above-mentioned formula+ β=1;
D04: judge that all of ipxyscore is the most identical, if so, selects ipxy.duration [1] The server ip of minima, otherwise selects minima ipxyscore_min in all of ipxyscore Server ip;
D05: determine that the server ipx and port y of selection are this destination address sent, The descriptor that the ipxy of selection connects is set to 1, at the beginning of the descriptor that other ipxy connect is set to After beginning state 0, preserve to corresponding TCP file connection descriptor list.
4. the method that in DPI system as claimed in claim 3, Data Concurrent reports, it is special Levy and be: after step E carries out tcp data transmission, need the report cycle according to transmission Update ipxy.duration [0] and ipxy.duration [1].
5. the method that in DPI system as claimed in claim 2, Data Concurrent reports, it is special Levy and be: the idiographic flow selecting described effective descriptor in D is: judge TCP file Connect whether descriptor list exists and commonly use the descriptor being masked as 1:
If so, select TCP file connect in descriptor first conventional be masked as 1 description Symbol;Otherwise judge whether the connection descriptor list of TCP file exists to commonly use to be masked as 0 Descriptor:
If so, select TCP file connect in descriptor first conventional be masked as 0 description Its conventional mark is also set to 1 by symbol, forwards step E to;Otherwise judge that TCP file connects to retouch State whether symbol list exists and commonly use the descriptor being masked as 2:
If so, select TCP file connect in descriptor first conventional be masked as 2 description Its conventional mark is also set to 1 by symbol, forwards step E to;Otherwise determine that TCP file connects to retouch State in symbol list and there is not effective descriptor.
6. Data Concurrent reports in the DPI system as described in any one of claim 1 to 5 Method, it is characterised in that: step B determines the flow process reporting task to add Excelsior queue For: judge that whether the queue that reports reporting thread is empty, the most do not report task to add To reporting queue, now continue executing with step B, otherwise report task to join and report queue.
7. Data Concurrent reports in the DPI system as described in any one of claim 1 to 5 Method, it is characterised in that: judge described in step D that TCP file connects in descriptor list The flow process that there is effective descriptor is: judge that TCP file connects descriptor list and is whether It is not the most 1 that empty and TCP file connects the conventional mark of descriptor list All Files descriptor, The most then there is not effective descriptor, otherwise TCP in connecting descriptor list in TCP file File connects in descriptor list and there is effective descriptor.
8. data in a DPI system based on method described in any one of claim 1 to 7 The device concurrently reported, it is characterised in that: this device include DPI system initialization module, on Report task allocating module, descriptor list selection module, effective descriptor determination module, TCP Data transmission module, fail count determination module, obstruction determination module and obstruction counting judge mould Block;
DPI system initialization module is used for: control DPI system start-up, initializes and reports thread Reporting number of threads and reporting queue length of pond, reports to reporting task allocating module to send and appoints Business distribution signal;
Report task allocating module for: receive report task distribution signal after, control report line The all of Cheng Chizhong report thread to enter waiting state, add Excelsior queue when reporting task Time, idle in task distribution Excelsior thread pool report thread, to descriptor list by reporting Select module to send descriptor list and select signal;
Descriptor list selection module is used for: after receiving descriptor list selection signal, according to upper The type of service of report task, selects corresponding TCP file to connect descriptor list, to effectively Descriptor determination module sends effective descriptor and judges signal;
Effectively descriptor determination module is used for: after receiving effective descriptor judgement signal, it is judged that TCP file connects in descriptor list and there is effective descriptor, if so, to tcp data Transport module sends tcp data transmission signal;Otherwise send state according to history, select to close Its conventional mark is also set to after 1 the TCP file connection preserved to corresponding by suitable descriptor In descriptor list, again send descriptor list to descriptor list selection module and select signal;
Tcp data transport module is used for: after receiving tcp data transmission signal, from effectively Descriptor calls send function, carries out tcp data transmission;Check the return of send function Value value: if value is the length sending packet, then tcp data is transmitted, to Reporting task allocating module to send reports task to distribute signal;If value is less than 0, then TCP Data transmission fails, judges mould to fail count after adding 1 by transmission fail count count_fail Block sends fail count and judges signal, if value more than 0 and is less than the length sending packet, Then tcp data transmission is not fully complete, and sends obstruction judgement signal to blocking determination module;
Fail count determination module is used for: judge whether count_fail is less than server number of units, If so, the conventional mark of described effective descriptor is set to after down state-1 to descriptor List selection module sends descriptor list and selects signal, otherwise to reporting task allocating module to send out Serve report task distribution signal;
Block determination module to be used for: after receiving obstruction judgement signal, it is judged that whether value is less than Single DPI maximum transmitted byte number, the most then send obstruction, and transmission is blocked counting Count_block sends obstruction counting judgement signal to obstruction counting determination module after adding 1, no Then continue to send tcp data transmission signal to tcp data transport module;
Block counting determination module to be used for: judge whether count_block is less than positive integer N, The most again tcp data transmission signal is sent to tcp data transport module;Otherwise by institute State after the conventional mark of effective descriptor is set to blocked state 2 and select mould to descriptor list Block sends descriptor list and selects signal.
CN201610167800.1A 2016-03-23 2016-03-23 The method and device that Data Concurrent reports in a kind of DPI system Active CN105847179B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610167800.1A CN105847179B (en) 2016-03-23 2016-03-23 The method and device that Data Concurrent reports in a kind of DPI system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610167800.1A CN105847179B (en) 2016-03-23 2016-03-23 The method and device that Data Concurrent reports in a kind of DPI system

Publications (2)

Publication Number Publication Date
CN105847179A true CN105847179A (en) 2016-08-10
CN105847179B CN105847179B (en) 2019-07-26

Family

ID=56583059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610167800.1A Active CN105847179B (en) 2016-03-23 2016-03-23 The method and device that Data Concurrent reports in a kind of DPI system

Country Status (1)

Country Link
CN (1) CN105847179B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885590A (en) * 2017-11-30 2018-04-06 百度在线网络技术(北京)有限公司 Task processing method and device for smart machine
CN109412893A (en) * 2018-10-23 2019-03-01 新华三信息安全技术有限公司 A kind of message back method and device
CN111131243A (en) * 2019-12-24 2020-05-08 北京拓明科技有限公司 DPI system strategy processing method and device
CN112367265A (en) * 2020-10-27 2021-02-12 中国电子科技集团公司第二十八研究所 Reliable data transmission method and device suitable for narrow-band weak connection network
CN116614449A (en) * 2023-07-19 2023-08-18 中国电子科技集团公司第二十九研究所 Application layer-oriented self-adaptive flow control device and method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120159109A1 (en) * 2010-12-15 2012-06-21 Alexandre Gerber Method and apparatus for improving non-uniform memory access
CN104348677A (en) * 2013-08-05 2015-02-11 华为技术有限公司 Deep packet inspection method and equipment and coprocessor
CN104780080A (en) * 2015-04-13 2015-07-15 苏州迈科网络安全技术股份有限公司 DPI (deep packet inspection) method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120159109A1 (en) * 2010-12-15 2012-06-21 Alexandre Gerber Method and apparatus for improving non-uniform memory access
CN104348677A (en) * 2013-08-05 2015-02-11 华为技术有限公司 Deep packet inspection method and equipment and coprocessor
CN104780080A (en) * 2015-04-13 2015-07-15 苏州迈科网络安全技术股份有限公司 DPI (deep packet inspection) method and system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885590A (en) * 2017-11-30 2018-04-06 百度在线网络技术(北京)有限公司 Task processing method and device for smart machine
US11188380B2 (en) 2017-11-30 2021-11-30 Baidu Online Network Technology (Beijing) Co., Ltd. Method and apparatus for processing task in smart device
CN109412893A (en) * 2018-10-23 2019-03-01 新华三信息安全技术有限公司 A kind of message back method and device
CN111131243A (en) * 2019-12-24 2020-05-08 北京拓明科技有限公司 DPI system strategy processing method and device
CN111131243B (en) * 2019-12-24 2022-05-27 北京拓明科技有限公司 DPI system strategy processing method and device
CN112367265A (en) * 2020-10-27 2021-02-12 中国电子科技集团公司第二十八研究所 Reliable data transmission method and device suitable for narrow-band weak connection network
CN116614449A (en) * 2023-07-19 2023-08-18 中国电子科技集团公司第二十九研究所 Application layer-oriented self-adaptive flow control device and method
CN116614449B (en) * 2023-07-19 2023-10-31 中国电子科技集团公司第二十九研究所 Application layer-oriented self-adaptive flow control device and method

Also Published As

Publication number Publication date
CN105847179B (en) 2019-07-26

Similar Documents

Publication Publication Date Title
CN105847179A (en) Method and device for concurrently reporting data in DPI system
CN105207873B (en) A kind of message processing method and device
KR101583325B1 (en) Network interface apparatus and method for processing virtual packets
CN1206600C (en) Full distribution type aggregation network servicer system
US20160164836A1 (en) Security device implementing network flow prediction
CN109547341B (en) Load sharing method and system for link aggregation
CN103297347B (en) A kind of load balance process method and device
CN101151851A (en) Host and network adapter for networking offload in server environment
CN101135980A (en) Device and method for realizing zero copy based on Linux operating system
CN102770852A (en) Information and communication processing system, method, and network node
CN1875585A (en) Dynamic unknown L2 flooding control with MAC limits
CN110324245A (en) A kind of method and device to be E-Packeted based on integrated flow table
CN101789949B (en) Method and router equipment for realizing load sharing
CN108322467A (en) Virtual firewall configuration method, electronic equipment and storage medium based on OVS
CN108471383A (en) Message forwarding method, device and system
CN103049336A (en) Hash-based network card soft interrupt and load balancing method
CN105282128A (en) Bidirectional calling method and system based on long connection
WO2018223825A1 (en) Data flow processing method and device
KR101841026B1 (en) Service function chaining network system for path optimization
CN101272338B (en) Method for port band width configuration on non-line speed interface plate and non-line speed interface plate
CN101645778B (en) Network service flow identification system and identification method thereof
CN103179044B (en) The implementation method of traffic management, equipment and system
CN102158406A (en) Intelligent routing method for computer network links
US9491098B1 (en) Transparent network multipath utilization through encapsulation
US20040148417A1 (en) Method and system for distinguishing higher layer protocols of the internet traffic

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information

Inventor after: Huang Nian

Inventor after: Shi Wei

Inventor after: Feng Wei

Inventor after: Chen Lei

Inventor before: Cheng Bo

Inventor before: Hou Heming

COR Change of bibliographic data
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A method and device for data concurrent reporting in dpi system

Effective date of registration: 20220307

Granted publication date: 20190726

Pledgee: Industrial Bank Limited by Share Ltd. Wuhan branch

Pledgor: WUHAN GREENET INFORMATION SERVICE Co.,Ltd.

Registration number: Y2022420000052

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20230717

Granted publication date: 20190726

Pledgee: Industrial Bank Limited by Share Ltd. Wuhan branch

Pledgor: WUHAN GREENET INFORMATION SERVICE Co.,Ltd.

Registration number: Y2022420000052

PC01 Cancellation of the registration of the contract for pledge of patent right