CN105743728A - Method and apparatus for guaranteeing sequence of data blocks - Google Patents
Method and apparatus for guaranteeing sequence of data blocks Download PDFInfo
- Publication number
- CN105743728A CN105743728A CN201410763842.2A CN201410763842A CN105743728A CN 105743728 A CN105743728 A CN 105743728A CN 201410763842 A CN201410763842 A CN 201410763842A CN 105743728 A CN105743728 A CN 105743728A
- Authority
- CN
- China
- Prior art keywords
- data block
- numbering
- chained list
- order
- expectation
- 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
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a method and apparatus for guaranteeing a sequence of data blocks, and is applied to network intermediate equipment establishing transmission control protocol (TCP) connection with a terminal device. The method comprises the following steps: receiving data blocks with numbers, divided by an internet protocol (IP) message, wherein the data blocks are provided with the numbers according to a sequence according to which the IP message is formed; comparing the numbers of the data blocks with preset expected numbers; according to a comparison result, adding the data blocks to a preset good-sequence link list or a bad-sequence link list; according to a preset strategy, adding the data blocks in the bad-sequence link list to the good-sequence link list; and sequentially sending the data blocks in the good-sequence link list to an audit process one by one so as to facilitate content audit.
Description
Technical field
The present invention relates to technical field of network security, particularly relate to a kind of method ensureing data block order and device.
Background technology
Along with the development of science and technology, various network applications, enrich the Internet life of people greatly, but add difficulty also to the information monitoring work of the Internet.In the prior art, the message that terminal unit sends, often it is broken down into several data blocks and is transmitted, the network intermediary device carrying out internet information monitoring can be passed through in centre.But, uncertainty due to transmitting procedure, order when each data block arrives network intermediary device is usually chaotic, namely occur out of order, and Audit Module can carry out content auditing according to the data block that the order received is chaotic, thus causing the inaccurate of auditing result, and then affect the network information security.
Summary of the invention
In view of this, the present invention provides a kind of method ensureing data block order, is applied on network intermediary device, and described network intermediary device is set up transmission control protocol TCP with terminal unit and is connected, it is characterised in that described method includes:
Receiving and set numbered data block by what procotol IP message was divided into, described data block is sequentially with numbering according to the described IP message of composition;
The numbering of described data block is contrasted with the expectation numbering preset;
According to comparing result, described data block is added in default good sequence chained list or out of order chained list;
According to preset strategy, the data block in described out of order chained list is added in described good sequence chained list;
In order the data block on described good sequence chained list is sent into audit process one by one, in order to carry out content auditing.
The present invention also provides for a kind of device ensureing data block order, is applied on network intermediary device, and described network intermediary device is set up transmission control protocol TCP with terminal unit and is connected, and described device includes:
Receiver module, is set numbered data block for receiving by what procotol IP message was divided into, and described data block is sequentially with numbering according to the described IP message of composition;
Contrast module, for contrasting the numbering of described data block with the expectation numbering preset;
First adds module, according to comparing result, described data block is added in default good sequence chained list or out of order chained list;
Second adds module, according to preset strategy, the data block in described out of order chained list is added in described good sequence chained list;
Sending module, sends the data block on described good sequence chained list into audit process, in order to carry out content auditing in order one by one.
Technical scheme provided by the invention, by rearranging the order of data block, makes Audit Module that the data block of order to carry out content auditing, and then ensures the accuracy of auditing result.
Accompanying drawing explanation
Fig. 1 is the operating position logical schematic ensureing data block order device being applied on network intermediary device provided by the invention.
Fig. 2 is a kind of method flow diagram that embodiment 1 provides.
Fig. 3 is that a kind of IP message that embodiment 1 provides divides schematic diagram.
Fig. 4 is a kind of schematic flow sheet adding data block that embodiment 1 provides.
Fig. 5 is a kind of method flow schematic diagram traveling through out of order chained list and updating expectation numbering that embodiment 1 provides.
Fig. 6-1 to Fig. 6-5 is a kind of schematic diagram ensureing data block order method that embodiment 1 provides.
Fig. 7-1 and Fig. 7-2 is common networking structure schematic diagram.
Fig. 8 is a kind of method flow diagram that embodiment 2 provides.
Fig. 9 is that a kind of IP message that embodiment 2 provides divides schematic diagram.
Figure 10 is a kind of schematic flow sheet adding data block that embodiment 2 provides.
Figure 11 is a kind of method flow schematic diagram traveling through out of order chained list and updating expectation numbering that embodiment 2 provides.
Figure 12 is a kind of schematic diagram processing data block approach that embodiment 2 provides.
Figure 13 is a kind of method flow schematic diagram traveling through out of order chained list and updating expectation numbering that embodiment 2 provides.
Figure 14-1 and Figure 14-2 is a kind of message data block schematic diagram that embodiment 2 provides.
Figure 15-1 to Figure 15-5 is a kind of schematic diagram ensureing data block order method that embodiment 2 provides.
Figure 16 is the hardware structure figure of plant running provided by the invention.
Detailed description of the invention
For making the purpose of the present invention, technical scheme and advantage clearly understand, develop simultaneously embodiment referring to accompanying drawing, scheme of the present invention is described in further detail.
Refer to Fig. 1 and Figure 16, by figure it can be seen that, application layer content starts with protocol stack from terminal system and transmits in a network, and technical scheme provided by the invention is then the third layer Internet being applied in protocol stack, also referred to as IP layer.Specifically, terminal unit is by IP layer transmission application layer content, namely transmission IP message.In order to effectively utilize the network bandwidth, terminal unit, before sending the IP message to transmit, can be divided into several data blocks, and be numbered.In the process achieving the goal terminal unit, these data blocks divided by IP message through intermediate equipment, and can be processed by the device being applied in intermediate equipment, finally according to number order by the Audit Module for carrying out content auditing work.
The path experienced in a network due to the data block divided by IP message is likely different, so described data block arrives order usually confusion during intermediate equipment.But in the prior art, intermediate equipment, after receiving described data block, directly sends it to audit device and carries out content auditing so that out of order data block is audited by audit device, and then cause that auditing result is inaccurate.Technical scheme provided by the invention is then first be ranked up processing to the data block received so that it is arranges according to number order, then retransmits to Audit Module.Thus avoiding due to the audit device out of order data block of audit to the inaccurate problem of the auditing result caused.
Owing to terminal unit is before sending IP message, it will usually the data block divided is numbered in order, arranges main two kinds of the mode of numbering: one is overall numbering, and another kind is the independent numbering of each byte.Separately below for both numberings, technical scheme provided by the invention is described in detail.
Embodiment 1: overall numbering
Refer to Fig. 2, data block can be carried out order-preserving according to following flow process by device provided by the invention.
Step 101, receiver module receives and is set numbered data block by what procotol IP message was divided into.
Data block described in this step arranges numbering according to the order forming described IP message, and it arranges the mode of numbering specifically, first the IP message needing transmission is divided into several data blocks, then arranges a numbering for each data block.Such as, as it is shown on figure 3, terminal unit need to send the IP message that content is " tonight has a meal together ", described IP message content can be divided into 4 data blocks by this terminal unit, and arranges a numbering for each data block.
Step 102, the numbering of described data block is contrasted by contrast module with the expectation numbering preset.
For the data block adopting overall numbering to be numbered, contrast module can will expect that the numbering numbering with received data block contrasts.
Expect that numbering is when using first it addition, described, be generally and pre-set, generally, expect that the numbering of numbering and described data block is suitable for mutually.Such as, data block is numbered 1,2,3 ..., then the expectation used first numbering can be set to 1;If data block is numbered A, B, C ..., then the expectation used first numbering can be set to A, etc..
Step 103, first adds module according to comparing result, described data block is added in default good sequence chained list or out of order chained list.
Refer to Fig. 4, for the data block adopting overall numbering to be numbered, first in the first interpolation module judges that submodule can perform as steps described below.
Step 111, if the numbering of described data block is equal to expecting numbering, first judges that described data block is then added in described good sequence chained list by submodule;
Step 112, if the numbering of described data block is not equal to expectation numbering, first judges that described data block is then added in described out of order chained list by submodule.
Such as, assume current to expect to be numbered 1, if described device received data block be numbered 1, then this data block is added in described good sequence chained list, if the numbering of described device received data block is not 1, then this data block is added in described out of order chained list.
Step 104, second adds module according to preset strategy, the data block in described out of order chained list is added in described good sequence chained list.
For different numberings, second adds module according to different preset strategy, can add to data block in sequence chained list.Refer to Fig. 5, for the data block being numbered according to overall numbering, the second the first renewal submodule and first added in module travels through submodule and can perform following steps.
Step 121, after adding described data block extremely described good sequence chained list, first updates submodule updates described expectation numbering;
Step 122, first traversal submodule travels through described out of order chained list, first data block all being taken out from described out of order chained list, be added in described good sequence chained list and again update described expectation numbering, described first data block is number to number consistent data block with expecting after renewal.
After performing step 111, number the data block identical with expecting numbering and can be added in sequence chained list, then the first renewal submodule can update this expectation numbering.Such as, assume that expectation is numbered 1, when described device receives the data block being numbered 1, owing to the numbering of this data block is identical with expectation numbering, according to step 111, this data block has been added in sequence chained list, then original expectation numbering 1 can be updated to 2 by the first renewal submodule, it is to say, current expectation is numbered 2.
After having updated expectation numbering, the first traversal submodule can travel through out of order chained list, by the first data block in out of order chained list, namely numbering with update after expect that the data block that numbering is consistent is taken out, added in sequence chained list, and again updated and described expect to number.Such as, the expectation after renewal is numbered 2, then the first traversal submodule can travel through out of order chained list, the data block being numbered 2 is chosen, has been added in sequence chained list, expectation numbering 2 has been updated to 3 simultaneously, say, that current expectation is numbered 3.Owing to currently expecting that numbering there occurs change, so the first traversal submodule will travel through out of order chained list again, the data block being numbered 3 is chosen, it is added in sequence chained list, and again expectation numbering is updated to 4, by that analogy, all take out until numbering in out of order chained list is numbered consistent data block with expecting after renewal, add in most intimate friend's sequence chained list.
In order to make it easy to understand, below for message " tonight has a meal together ", illustrate technical scheme provided by the invention is how the out of order data block received to be resequenced.It is assumed that message " tonight has a meal together " is divided into 4 data blocks as shown in Figure 3, these 4 data blocks are after transmitting procedure, and the order with 2,1,3,4 reaches intermediate equipment successively.Refer to Fig. 6-1, described receiver module is initially received the data block being numbered 2, from the foregoing, it can be understood that the expectation now preset is numbered 1.Contrast module, by the numbering (2) of this data block and expectation numbering (1) preset, contrasts, and can obtain comparing result is, the numbering of this data block is not equal to expectation numbering.Then, first judges that this data block is added in out of order chained list by submodule.Refer to Fig. 6-2, receiver module receives the data block being numbered 1, the numbering (1) of this data block is contrasted by contrast module with expectation numbering (1) preset, obtain comparing result, the numbering of this data block is equal to expecting numbering, and then first judges that this data block is added in most intimate friend's sequence chained list by submodule.Refer to Fig. 6-3, after this data block has been added to sequence chained list, first updates submodule is updated to 2 by expectation numbering 1, then the first traversal submodule travels through out of order chained list, the data block being numbered 2 in out of order chained list is chosen, add in most intimate friend's sequence chained list, and renewal expectation is numbered 3 again, then the first traversal submodule travels through out of order chained list again, and out of order chained list is now absent from the data block that numbering is identical with expecting numbering, say, that out of order chained list is numbered the data block identical with expectation numbering and has all added in sequence chained list.Refer to Fig. 6-4, receiver module receives the data block being numbered 3, the numbering (3) of this data block is contrasted by contrast module with expectation numbering (3), comparing result is, the numbering of this data block is equal to expecting numbering, and then first judges that this data block is added in most intimate friend's sequence chained list by submodule.After this data block has been added to sequence chained list, first updates submodule is updated to 4 by expectation numbering 3, then the first traversal submodule travels through out of order chained list, is now absent from out of order chained list numbering the data block identical with expecting numbering, then the first traversal submodule stops traversal.Refer to Fig. 6-5, receiver module receives the data block being numbered 4, the numbering (4) of this data block is contrasted by contrast module with expectation numbering (4), comparing result is, the numbering of this data block is equal to expecting numbering, and then first judges that this data block is added in most intimate friend's sequence chained list by submodule.After this data block has been added to sequence chained list, first updates submodule is updated to 5 by expectation numbering 4, then the first traversal submodule travels through out of order chained list, is now absent from out of order chained list numbering the data block identical with expecting numbering, then the first traversal submodule stops traversal.Consequently, it is possible to all data blocks of this message have been arranged in sequence chained list in order.
Need exist for illustrate be; owing to whole message only has 4 data blocks; and send the terminal unit of data block when dividing message; relevant information would generally be added in each data block; illustrate that this message one has 4 data blocks; therefore according to this information, device provided by the present invention can know which bar message is received data block belong to; this message has how many data blocks; after expectation numbering is updated to 5 by described device; it may determine that go out; described message receives, and namely can stop updating and expect numbering.
Step 105, the data block on described good sequence chained list is sent into audit process by sending module in order one by one, in order to carry out content auditing.
As shown in the above, data block in good sequence chained list is to arrange in order, therefore the data block in the good sequence chained list that sending module sends one by one is also arrange in order, so, audit device for carrying out content auditing can receive the data block that sending module is sent in order, so that the accuracy of audit is higher.
Needing exist for illustrating, owing to common audit device has two kinds: a kind of is the Audit Module being set directly in intermediate equipment, as shown in Fig. 7-1, the data block in good sequence chained list is sent to this Audit Module by sending module one by one, in order to it carries out content auditing;Another kind is provided in the audit device beyond intermediate equipment, and as shown in Fig. 7-2, sending module, by being that data block sends one by one to this audit device in good sequence chained list, is carried out content auditing by it.
Embodiment 2: the independent numbering of each byte
Refer to Fig. 8, data block can be carried out order-preserving according to following flow process by device provided by the invention.
Step 201, receiver module receives and is set numbered data block by what procotol IP message was divided into, and described data block is sequentially with numbering according to the described IP message of composition.
Another kind is the independent numbering of each byte, specifically, first the IP message needing transmission is divided into several data blocks, is then numbered in order for each byte in each data block.Such as, as shown in Figure 9, terminal unit need to send the IP message that content is " tonight has a meal together ", and described IP message content can be divided into 4 data blocks by this terminal unit, and each byte for each data block arranges a numbering in order.
Step 202, the numbering of described data block is contrasted by contrast module with the expectation numbering preset;
For the data block adopting the independent numbering of each byte to be numbered, the first character of described data block can be saved by the first contrast submodule in contrast module and the numbering of last byte contrasts with expectation numbering respectively.
Step 203, first adds module according to comparing result, described data block is added in default good sequence chained list or out of order chained list.
For the data block adopting the independent numbering of each byte to be numbered, first adds module then can perform as steps described below.
Step 211, when comparing result belongs to the first predetermined condition, second judges that described data block is added in most intimate friend's sequence chained list by submodule.
First predetermined condition mentioned here can be divided into following two.
The first character joint numbering that the first first predetermined condition is data block expects numbering less than described, and last byte numbering expects numbering more than described.Refer to Figure 11, when this happens, second judges that deletion unit in submodule and processing unit can perform following steps.
Step 221, expects numbering when the first character of described data block saves numbering less than described, and when last byte is numbered more than described expectation numbering, deletes the whole bytes before the byte that in data block described in element deletion, numbering is identical with expecting numbering;
Step 222, processing unit adds the good sequence chained list that the described data block through deleting extremely is preset.
Refer to Figure 12, it is assumed that with the addition of in described good sequence chained list and be numbered " 1,2,3,4 " and " 5,6 " two data blocks, expect to be numbered 7, device provided by the invention have received the data block being numbered " 5,6,7,8 ".Owing to this data block first character joint numbering (5) is less than expecting numbering (7), and last byte numbering (8) is more than expecting numbering (7), then delete unit and expect that the whole bytes before the byte that numbering is identical are deleted by this data block is numbered in, that is, expect to be numbered 7, be then numbered " 5 " and " 6 " two bytes deletions by changing in data block before 7.Finally obtain data block " 7,8 ".Data block " 7,8 " is then added into default good sequence chained list by processing unit.
The first character joint numbering that the second the first predetermined condition is data block expects numbering equal to described, and now this data block is directly added in most intimate friend's sequence chained list by the second adding device judged in submodule.
Step 212, when comparing result is not belonging to the first predetermined condition, the 3rd judges that described data block is added in out of order chained list by submodule.
When comparing result is not belonging to any one in above-mentioned two situations, the 3rd judges that this data block can be added in out of order chained list by submodule.
Step 204, second adds module according to preset strategy, the data block in described out of order chained list is added in described good sequence chained list.
To the mode not adopting each byte individually to number, the second the second renewal submodule and second added in module travels through submodule and can perform following steps.
Step 231, after adding described data block extremely described good sequence chained list, second updates submodule will expect that numbering the next bit being updated to the described first last byte numbering stating data block numbers;
Step 232, the out of order chained list that second traversal submodule traversal is preset, first data block all being taken out from described out of order chained list, add in described good sequence chained list and update expectation numbering, described first data block is expect, after first character saves numbering and updates, the data block that numbering is consistent.
Performing after step 211, the data block processed through judgement can be added in sequence chained list, then second updates submodule and can update this and will expect that numbering is updated to the next bit numbering of the described first last byte numbering stating data block.For example, it is assumed that expect to be numbered 1, when described device receives data block as shown in Figure 14-1, owing to this data block first character joint is numbered 1, in expecting that numbering is identical, according to step 211, this data block is added in most intimate friend's sequence chained list.Be numbered 4 due to this last byte of data block, then second updates submodule and original expectation numbering can be updated to 4, say, that current expect to be numbered 5.
After having updated expectation numbering, second travels through submodule can travel through out of order chained list, and by the first data block in out of order chained list, namely first character saves in expecting that the data block that numbering is consistent is taken out, and adds in most intimate friend's sequence chained list, and again updates described expectation numbering.Such as, expectation after renewal is numbered 5, so the second traversal submodule can travel through out of order chained list, the data block (as shown in Figure 14-2) that first character joint is numbered 5 is taken out, it is added in sequence chained list, owing to last byte of this data block is numbered 6, therefore expectation numbering has been updated to 7, expect to be numbered 7 it is to say, current.Owing to currently expecting that numbering there occurs change, so the second traversal submodule can travel through out of order chained list again, the data block that first character joint is 7 is taken out, add in sequence chained list, and update expectation numbering, by that analogy, until expecting after first character joint in out of order chained list is numbered in renewal is numbered consistent data block and all added in most intimate friend's sequence chained list.
In order to make it easy to understand, below for message " tonight has a meal together ", to illustrate technical scheme provided by the invention is how the out of order data block received to be resequenced.It is assumed that message " tonight has a meal together " is divided into 4 data blocks as shown in Figure 9, these 4 data blocks are after transmitting procedure, and the order with 2,1,3,4 reaches intermediate equipment successively.Refer to Figure 15-1, described receiver module is initially received the data block being numbered " 5,6 ", from the foregoing, it can be understood that the expectation now preset is numbered 1.The first character of this data block is saved numbering (5) and expectation numbering (1) preset by contrast module, contrasts, and can obtain comparing result is, the numbering of this data block is not equal to expectation numbering.Then, the 3rd judges that this data block is added in out of order chained list by submodule.Refer to Figure 15-2, receiver module receives the data block being numbered " 1,2,3,4 ", the first character of this data block is saved numbering (1) by contrast module and expectation numbering (1) preset contrasts, obtain comparing result, the numbering of this data block is equal to expecting numbering, and then second judges that this data block is added in most intimate friend's sequence chained list by submodule.Refer to Figure 15-3, after this data block has been added to sequence chained list, second updates submodule is updated to 5 by expectation numbering 1, then the second traversal submodule travels through out of order chained list, out of order chained list will be numbered " 5, 6 " data block is taken out, add in most intimate friend's sequence chained list, and renewal expectation is numbered 7 again, then the first traversal submodule travels through out of order chained list again, and out of order chained list is now absent from the data block that first character joint numbering is identical with expectation numbering, that is, the data block that in out of order chained list, numbering is identical with expecting numbering has all been added in sequence chained list.Refer to Figure 15-4, receiver module receives the data block being numbered " 7,8 ", the first character of this data block is saved numbering (7) and expects that numbering (7) contrasts by contrast module, comparing result is, the first character joint numbering of this data block is equal to expecting numbering, and then second judges that this data block is added in most intimate friend's sequence chained list by submodule.After this data block has been added to sequence chained list, first updates submodule is updated to 9 by expectation numbering 7, then the second traversal submodule travels through out of order chained list, is now absent from the data block that first character joint numbering is identical with expecting numbering in out of order chained list, then the second traversal submodule stops traversal.Refer to Figure 15-5, receiver module receives the data block being numbered " 9 ", the first character of this data block is saved numbering (9) and expects that numbering (9) contrasts by contrast module, comparing result is, the numbering of this data block is equal to expecting numbering, and then first judges that this data block is added in most intimate friend's sequence chained list by submodule.After this data block has been added to sequence chained list, second updates submodule is updated to 10 by expectation numbering 9, then the second traversal submodule travels through out of order chained list, is now absent from out of order chained list numbering the data block identical with expecting numbering, then the second traversal submodule stops traversal.Consequently, it is possible to all data blocks of this message have been arranged in sequence chained list in order.
Need exist for illustrate be; owing to whole message only has 9 bytes; and send the terminal unit of data block when dividing message; relevant information would generally be added in each data block; illustrate that this message one has 9 bytes; therefore according to this information, device provided by the present invention can know which bar message is received data block belong to; this message has how many bytes; after expectation numbering is updated to 10 by described device; it may determine that go out; described message receives, and namely can stop updating and expect numbering.
Step 205, the data block on described good sequence chained list is sent into audit process by sending module in order one by one, in order to carry out content auditing.
Additionally, in actual application, unstability due to network and equipment, what cause data block repeats transmission, therefore device provided by the invention also includes discard module, when the numbering that the first character of described data block saves numbering and last byte is both less than set expectation numbering, illustrate that this data block is the data block repeating to send, then described data block can be abandoned by described discard module.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all within the spirit and principles in the present invention, any amendment of making, equivalent replacement, improvement etc., should be included within the scope of protection of the invention.
Claims (16)
1. the method ensureing data block order, is applied on network intermediary device, and described network intermediary device is set up transmission control protocol TCP with terminal unit and is connected, it is characterised in that described method includes:
Receiving and set numbered data block by what procotol IP message was divided into, described data block is sequentially with numbering according to the described IP message of composition;
The numbering of described data block is contrasted with the expectation numbering preset;
According to comparing result, described data block is added in default good sequence chained list or out of order chained list;
According to preset strategy, the data block in described out of order chained list is added in described good sequence chained list;
In order the data block on described good sequence chained list is sent into audit process one by one, in order to carry out content auditing.
2. method according to claim 1, it is characterised in that each described data block is provided with a numbering;
Described according to comparing result, described data block is added in default good sequence chained list or out of order chained list particularly as follows:
If the numbering of described data block is equal to expecting numbering, then described data block is added in described good sequence chained list;
If the numbering of described data block is not equal to expectation numbering, then described data block is added in described out of order chained list.
3. method according to claim 2, it is characterised in that described according to preset strategy, the data block in described out of order chained list is added in described good sequence chained list particularly as follows:
After adding described data block extremely described good sequence chained list, update described expectation numbering;
Traveling through described out of order chained list, the first data block all taken out from described out of order chained list, be added in described good sequence chained list and again update described expectation numbering, described first data block is number the data block consistent with expecting numbering.
4. method according to claim 1, it is characterised in that each byte of each described data block is provided with a numbering;
The described expectation numbered and preset of described data block numbering carries out contrasting specifically, the first character joint of described data block and the numbering of last byte are contrasted with expectation numbering respectively;
Described according to comparing result, described data block is added in default good sequence chained list or out of order chained list particularly as follows:
When comparing result belongs to the first predetermined condition, described data block is added in most intimate friend's sequence chained list;
When comparing result is not belonging to the first predetermined condition, described data block is added in out of order chained list.
5. method according to claim 4, it is characterised in that described when comparing result belongs to the first predetermined condition, described data block is added in most intimate friend's sequence chained list particularly as follows:
Expect numbering when the first character of described data block saves numbering less than described, and when last byte is numbered more than described expectation numbering, delete the whole bytes before the byte that numbering is identical with expecting numbering;
Add the good sequence chained list that the described data block through deleting extremely is preset.
6. method according to claim 4, it is characterised in that described when comparing result belongs to the first predetermined condition, described data block is added in most intimate friend's sequence chained list particularly as follows:
When the first character of described data block saves numbering equal to described expectation numbering, add the good sequence chained list that described data block is extremely preset.
7. method according to claim 4, it is characterised in that described according to preset strategy, the data block in described out of order chained list is added in described good sequence chained list particularly as follows:
After adding described data block extremely described good sequence chained list, will expect that numbering is updated to the next bit numbering of the described first last byte numbering stating data block;
The out of order chained list that traversal is preset, all taking-ups from described out of order chained list by the first data block, to add in described good sequence chained list and update expectation numbering, described first data block is that first character joint numbering expects, with after renewal, the data block that numbering is consistent.
8. method according to claim 4, it is characterised in that described method also includes:
When the numbering that the first character of described data block saves numbering and last byte is both less than set expectation numbering, described data block is abandoned.
9. ensureing a device for data block order, be applied on network intermediary device, described network intermediary device is set up transmission control protocol TCP with terminal unit and is connected, it is characterised in that described device includes:
Receiver module, is set numbered data block for receiving by what procotol IP message was divided into, and described data block is sequentially with numbering according to the described IP message of composition;
Contrast module, for contrasting the numbering of described data block with the expectation numbering preset;
First adds module, according to comparing result, described data block is added in default good sequence chained list or out of order chained list;
Second adds module, according to preset strategy, the data block in described out of order chained list is added in described good sequence chained list;
Sending module, sends the data block on described good sequence chained list into audit process, in order to carry out content auditing in order one by one.
10. device according to claim 9, it is characterised in that each described data block is provided with a numbering;
Described first adds module includes:
First judges submodule, if the numbering for described data block is numbered equal to expectation, then described data block is added in described good sequence chained list;If the numbering of described data block is not equal to expectation numbering, then described data block is added in described out of order chained list.
11. device according to claim 10, it is characterised in that described second adds module includes:
First updates submodule, for, after adding described data block extremely described good sequence chained list, updating described expectation numbering;
First traversal submodule, is used for traveling through described out of order chained list, the first data block is all taken out from described out of order chained list, is added in described good sequence chained list and again updates described expectation numbering, and described first data block is number the data block consistent with expecting numbering.
12. device according to claim 9, it is characterised in that each byte of each described data block is provided with a numbering;
Described contrast module includes the first contrast submodule, contrasts with expectation numbering respectively for the numbering saved by the first character of described data block with last byte;
Described first adds module includes:
Second judges submodule, for when comparing result belongs to the first predetermined condition, described data block being added in most intimate friend's sequence chained list;
3rd judges submodule, for when comparing result is not belonging to the first predetermined condition, described data block being added in out of order chained list.
13. device according to claim 12, it is characterised in that described second judges that submodule includes:
Delete unit, be used for expecting numbering when the first character of described data block saves numbering less than described, and when last byte is numbered more than described expectation numbering, delete the whole bytes before the byte that numbering is identical with expecting numbering;
Processing unit, for adding the good sequence chained list that the described data block through deleting extremely is preset.
14. device according to claim 12, it is characterised in that described second judges that submodule includes:
Adding device, is used for, when the first character of described data block saves numbering equal to described expectation numbering, adding the good sequence chained list that described data block is extremely preset.
15. device according to claim 12, it is characterised in that described second adds module includes:
Second updates submodule, for, after adding described data block extremely described good sequence chained list, expecting that numbering is updated to the next bit numbering of the described first last byte numbering stating data block;
Second traversal submodule, for traveling through default out of order chained list, first data block all being taken out from described out of order chained list, add in described good sequence chained list and update expectation numbering, described first data block is expect, after first character saves numbering and updates, the data block that numbering is consistent.
16. device according to claim 12, it is characterised in that described device also includes:
Discard module, when the numbering that the first character of described data block saves numbering and last byte is both less than set expectation numbering, abandons described data block.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410763842.2A CN105743728A (en) | 2014-12-11 | 2014-12-11 | Method and apparatus for guaranteeing sequence of data blocks |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410763842.2A CN105743728A (en) | 2014-12-11 | 2014-12-11 | Method and apparatus for guaranteeing sequence of data blocks |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105743728A true CN105743728A (en) | 2016-07-06 |
Family
ID=56240550
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410763842.2A Pending CN105743728A (en) | 2014-12-11 | 2014-12-11 | Method and apparatus for guaranteeing sequence of data blocks |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105743728A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112165457A (en) * | 2020-09-04 | 2021-01-01 | 苏州浪潮智能科技有限公司 | Method, system and device for file rearrangement and readable storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090143029A1 (en) * | 2007-12-04 | 2009-06-04 | Norihisa Matsumoto | Press-Talk Server, Transcoder, and Communication System |
CN101841545A (en) * | 2010-05-14 | 2010-09-22 | 中国科学院计算技术研究所 | TCP stream restructuring and/or packetizing method and device |
CN102882703A (en) * | 2012-08-31 | 2013-01-16 | 赛尔网络有限公司 | Hyper text transfer protocol (HTTP)-analysis-based uniform resource locator (URL) automatically classifying and grading system and method |
CN103117948A (en) * | 2013-02-22 | 2013-05-22 | 桂林电子科技大学 | Hierarchical parallel high-speed network transmission control protocol (TCP) flow recombination method based on field programmable gate array (FPGA) |
CN103236940A (en) * | 2013-03-29 | 2013-08-07 | 北京星网锐捷网络技术有限公司 | Method and device for content processing and network equipment |
CN103888449A (en) * | 2014-03-05 | 2014-06-25 | 亿赞普(北京)科技有限公司 | Method and device for packet reassembly |
-
2014
- 2014-12-11 CN CN201410763842.2A patent/CN105743728A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090143029A1 (en) * | 2007-12-04 | 2009-06-04 | Norihisa Matsumoto | Press-Talk Server, Transcoder, and Communication System |
CN101841545A (en) * | 2010-05-14 | 2010-09-22 | 中国科学院计算技术研究所 | TCP stream restructuring and/or packetizing method and device |
CN102882703A (en) * | 2012-08-31 | 2013-01-16 | 赛尔网络有限公司 | Hyper text transfer protocol (HTTP)-analysis-based uniform resource locator (URL) automatically classifying and grading system and method |
CN103117948A (en) * | 2013-02-22 | 2013-05-22 | 桂林电子科技大学 | Hierarchical parallel high-speed network transmission control protocol (TCP) flow recombination method based on field programmable gate array (FPGA) |
CN103236940A (en) * | 2013-03-29 | 2013-08-07 | 北京星网锐捷网络技术有限公司 | Method and device for content processing and network equipment |
CN103888449A (en) * | 2014-03-05 | 2014-06-25 | 亿赞普(北京)科技有限公司 | Method and device for packet reassembly |
Non-Patent Citations (1)
Title |
---|
闫肃: "《基于特征的入侵检测系统》", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112165457A (en) * | 2020-09-04 | 2021-01-01 | 苏州浪潮智能科技有限公司 | Method, system and device for file rearrangement and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6636895B1 (en) | System, device, and method for distributing multicast routing information in a protocol independent multicast network | |
EP3618358A1 (en) | A method and system for deep packet inspection in software defined networks | |
JP2019129408A (en) | Failure detection method, node device, and communication system | |
CN104301141B (en) | A kind of method, apparatus and system for preserving configuration information | |
US10171351B2 (en) | Method for updating flow table | |
US20160277289A1 (en) | Federation of controllers management using packet context | |
CN108076066B (en) | Method and device for protecting GRE (generic routing encapsulation) message | |
CN106899419B (en) | Method, device and request terminal for realizing exception handling | |
CN101226700A (en) | Teaching Experiment Method of Fragmentation and Reassembly Process of IP Datagram | |
JP2018093358A (en) | Route search system, route search method, and route search program | |
JP2016140058A (en) | System and method for determining routing information | |
CN107896141B (en) | FC-AE-ASM network data redundancy method | |
WO2019187204A1 (en) | Control device, in-vehicle communication system, communication control method, and program | |
CN107222403A (en) | A kind of data transmission method, system and electronic equipment | |
JP2005064722A5 (en) | ||
CN105743728A (en) | Method and apparatus for guaranteeing sequence of data blocks | |
EP1430634B1 (en) | Forwarding of data messages with double-node data replacement | |
US7453812B1 (en) | Method for detecting and correcting publish-subscribe looping in a messaging network | |
CN112532358B (en) | Method and device for changing data transmission content according to feedback waiting time | |
JP4677501B2 (en) | Relay device and relay method | |
CN105791458B (en) | Address configuration method and device | |
JP5110306B2 (en) | COMMUNICATION LIMIT SYSTEM, COMMUNICATION LIMIT DEVICE, COMMUNICATION LIMIT METHOD, AND COMMUNICATION LIMIT PROGRAM | |
JP6497142B2 (en) | Communication monitoring device, communication monitoring program, and communication monitoring method | |
CN102143009B (en) | Message processing method, device and system | |
CN115442284B (en) | System and method for testing equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: Binjiang District and Hangzhou city in Zhejiang Province Road 310051 No. 68 in the 6 storey building Applicant after: Hangzhou Dipu Polytron Technologies Inc Address before: Binjiang District and Hangzhou city in Zhejiang Province Road 310051 No. 68 in the 6 storey building Applicant before: Hangzhou Dipu Technology Co., Ltd. |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160706 |