Summary of the invention
The embodiment of the present invention provides a kind of method of Data Stream Processing, can improve the speed of Data Stream Processing.The embodiment of the present invention also provides corresponding equipment.
First aspect present invention provides a kind of method of Data Stream Processing, comprising:
The first processing module receives business data flow, and is described business data flow distribute data traffic identifier;
Described the first processing module sends the business data flow with described stream identification to the second processing module;
Described the second processing module receives after the described business data flow with described stream identification, according to described stream identification, determine the head compression ROHC entity of the robustness that described stream identification is corresponding, and the described business data flow with described stream identification is pushed in described ROHC entity and carries out ROHC compression.
In conjunction with first aspect, in the possible implementation of the first, described the first processing module is described business data flow distribute data traffic identifier, specifically comprises:
Described the first processing module compares the parameter of the header in described business data flow and packet filter PF;
Described the first processing module compare with described business data flow in header match PF time, stream identification corresponding to described PF distributed to described business data flow;
Described the first processing module do not compare with described business data flow in header match PF time, by the reference record in the header of described business data flow, it is new PF parameter, and corresponding described new PF parameter, create a new PF, and be that described business data flow distributes an original business datum traffic identifier.
In conjunction with first aspect or the possible implementation of first aspect the first, in the possible implementation of the second, described the second processing module is determined the head compression ROHC entity of robustness that described stream identification is corresponding according to described stream identification, and the described business data flow with described stream identification is pushed to and in described ROHC entity, carries out ROHC compression and specifically comprise:
Described the second processing module, according to described stream identification, is searched the ROHC entity that described CID is corresponding from the stream identification of pre-stored and the corresponding relation of gap marker CID;
When described the second processing module finds the ROHC entity of corresponding described stream identification, the described business data flow with described stream identification is pushed in described ROHC entity and carries out ROHC compression.
In conjunction with first aspect or the possible implementation of first aspect the first, in the third possible implementation, described the second processing module is determined the head compression ROHC entity of robustness that described stream identification is corresponding according to described stream identification, and the described business data flow with described stream identification is pushed to and in described ROHC entity, carries out ROHC compression and specifically comprise:
Described the second processing module, according to described stream identification, is searched the ROHC entity that described CID is corresponding from the stream identification of pre-stored and the corresponding relation of CID;
When described the second processing module does not find the ROHC entity of corresponding described stream identification, create a new ROHC entity, and the described business data flow with described stream identification is pushed in the ROHC entity of described new establishment and carries out ROHC compression.
In conjunction with the third possible implementation of first aspect, in the 4th kind of possible implementation, also comprise:
Gap marker CID of ROHC entity partitioning that described the second processing module is described new establishment, and stream identification and described CID described in corresponding stored.
Second aspect present invention provides a kind of Data Stream Processing equipment, comprising: the first processing module and the second processing module;
Described the first processing module, for receiving business data flow, and is described business data flow distribute data traffic identifier, and sends the business data flow with described stream identification to the second processing module;
Described the second processing module, for receiving after the described business data flow with described stream identification, according to described stream identification, determine the head compression ROHC entity of the robustness that described stream identification is corresponding, and the described business data flow with described stream identification is pushed in described ROHC entity and carries out ROHC compression.
In conjunction with second aspect, in the possible implementation of the first, described the first processing module comprises:
Comparing unit, for comparing the parameter of the header of described business data flow and packet filter PF;
The first allocation units, during the PF matching for the header comparing at described comparing unit with described business data flow, distribute to described business data flow by stream identification corresponding to described PF;
The first creating unit, when not comparing the PF that the header with described business data flow matches at described comparing unit, by the reference record in the header of described business data flow, be new PF parameter, and corresponding described new PF parameter, a new PF created;
Described the first allocation units, also for creating after new PF in described the first creating unit, for described business data flow distributes an original business datum traffic identifier.
In conjunction with the possible implementation of the first of second aspect or second aspect, in the possible implementation of the second, described the second processing module comprises:
First searches unit, for according to described stream identification, from the stream identification of pre-stored and the corresponding relation of gap marker CID, searches the ROHC entity that described CID is corresponding;
First pushes compression unit, for when described first searches unit and find the ROHC entity of corresponding described stream identification, the described business data flow with described stream identification is pushed in described ROHC entity and carries out ROHC compression.
In conjunction with the possible implementation of the first of second aspect or second aspect, in the third possible implementation, described the second processing module comprises:
Second searches unit, for according to described stream identification, from the stream identification of pre-stored and the corresponding relation of gap marker CID, searches the ROHC entity that described CID is corresponding;
The second creating unit, for when described second searches unit and do not find the ROHC entity of corresponding described stream identification, creates a new ROHC entity;
Second pushes compression unit, for the described business data flow with described stream identification being pushed to the new ROHC entity creating of described the second creating unit, carries out ROHC compression.
In conjunction with the third possible implementation of second aspect, in the 4th kind of possible implementation, described the second processing module also comprises:
The second allocation units, are used to the new gap marker CID of ROHC entity partitioning creating of described the second creating unit;
Association store unit, for the CID of stream identification described in corresponding stored and described the second allocation units distribution.
The embodiment of the present invention adopts the first processing module to receive business data flow, and is described business data flow distribute data traffic identifier; Described the first processing module sends the business data flow with described stream identification to the second processing module; Described the second processing module receives after the described business data flow with described stream identification, according to described stream identification, determine the head compression ROHC entity of the robustness that described stream identification is corresponding, and the described business data flow with described stream identification is pushed in described ROHC entity and carries out ROHC compression.To carry out relatively comparing of a plurality of bytes with each handling process in prior art, the embodiment of the present invention is by after carrying out a business data flow identification marking, in other modules, directly adopt stream identification to distinguish different business data flows, thereby improved the efficiency of Data Stream Processing.
Embodiment
The embodiment of the present invention provides a kind of method of Data Stream Processing, can improve the speed of Data Stream Processing.The embodiment of the present invention also provides corresponding equipment.Below be elaborated respectively.
Consult Fig. 1, an embodiment of the method for the Data Stream Processing that the embodiment of the present invention provides comprises:
101, the first processing module receives business data flow, and is described business data flow distribute data traffic identifier.
102, described the first processing module sends the business data flow with described stream identification to the second processing module;
103, described the second processing module receives after the described business data flow with described stream identification, according to described stream identification, determine the head compression ROHC entity of the robustness that described stream identification is corresponding, and the described business data flow with described stream identification is pushed in described ROHC entity and carries out ROHC compression.
The embodiment of the present invention adopts the first processing module to receive business data flow, and is described business data flow distribute data traffic identifier; Described the first processing module sends the business data flow with described stream identification to the second processing module; Described the second processing module receives after the described business data flow with described stream identification, according to described stream identification, determine the head compression ROHC entity of the robustness that described stream identification is corresponding, and the described business data flow with described stream identification is pushed in described ROHC entity and carries out ROHC compression.To carry out relatively comparing of a plurality of bytes with each handling process in prior art, the embodiment of the present invention is by after carrying out a business data flow identification marking, in other modules, directly adopt stream identification to distinguish different business data flows, thereby improved the efficiency of Data Stream Processing.
Alternatively, on the basis of embodiment corresponding to above-mentioned Fig. 1, another embodiment of the method for the Data Stream Processing that the embodiment of the present invention provides comprises:
Described the first processing module is described business data flow distribute data traffic identifier, specifically comprises: described the first processing module compares the parameter of the header in described business data flow and packet filter PF; Described the first processing module compare with described business data flow in header match PF time, stream identification corresponding to described PF distributed to described business data flow; Described the first processing module do not compare with described business data flow in header match PF time, by the reference record in the header of described business data flow, it is new PF parameter, and corresponding described new PF parameter, create a new PF, and be that described business data flow distributes an original business datum traffic identifier.
Alternatively, on the basis of above-mentioned Fig. 1 and optional embodiment corresponding to Fig. 1, described the second processing module is determined the head compression ROHC entity of the robustness that described stream identification is corresponding according to described stream identification, and the described business data flow with described stream identification is pushed to and in described ROHC entity, carries out ROHC compression and specifically comprise: described the second processing module, according to described stream identification, is searched the ROHC entity that described CID is corresponding from the stream identification of pre-stored and the corresponding relation of gap marker CID; When described the second processing module finds the ROHC entity of corresponding described stream identification, the described business data flow with described stream identification is pushed in described ROHC entity and carries out ROHC compression.
Alternatively, on the basis of above-mentioned Fig. 1 and optional embodiment corresponding to Fig. 1, described the second processing module is determined the head compression ROHC entity of the robustness that described stream identification is corresponding according to described stream identification, and the described business data flow with described stream identification is pushed to and in described ROHC entity, carries out ROHC compression and specifically comprise: described the second processing module, according to described stream identification, is searched the ROHC entity that described CID is corresponding from the stream identification of pre-stored and the corresponding relation of CID; When described the second processing module does not find the ROHC entity of corresponding described stream identification, create a new ROHC entity, and the described business data flow with described stream identification is pushed in the ROHC entity of described new establishment and carries out ROHC compression.
Gap marker CID of ROHC entity partitioning that described the second processing module is described new establishment, and stream identification and described CID described in corresponding stored.
For the ease of understanding, the concrete application scenarios of take is below example, describes the process of Data Stream Processing in the embodiment of the present invention in detail:
In the embodiment of the present invention, it is the processing procedure of traffic flow template TFT that the first processing module can be understood as the processing of data flow, consults Fig. 2 below and is elaborated:
201, the first processing module receives business data flow.
This business data flow can be IP traffic, can comprise some or all of in destination address and subnet mask, protocol number (IPv4)/next stem (IPv6), source port, destination interface, ipsec security parameter reference (SPI), COS (IPv4)/type of service (IPv6) and mask, stream label (IPv6) in the header of this business data flow.
202, according to the packet filter of network configuration (PF, packet filter) parameter, mate.
PF parameter comprises destination address and subnet mask, protocol number (IPv4)/next stem (IPv6), source port, destination interface, ipsec security parameter reference (SPI), COS (IPv4)/type of service (IPv6) and mask, stream label (IPv6).
In same packet filter, in above 7 kinds of parameters, some parameters can coexist, and it is incompatible also having some parameters.Table 1 has provided effective combination of packet filter parameter, and the parameter with " X " mark in same row can coexist in same packet filter.
Table 1: effective combination table of packet filter parameter
203, whether there is matched packet filter to exist.
PF parameter in parameter in business data flow and table 1 can be compared, for instance, first compare destination address and subnet mask, then compare protocol number (IPv4)/next stem (IPv6), if this content not in header packet information, type of data packet III form, according to the more remaining TOS of type of data packet III (IPv4)/type of service (IPv6) and mask and stream label (IPv6); If there is protocol number (IPv4)/next stem (IPv6), the content of reference source range of port number, if this content not, it is type of data packet II form, type of data packet II form, continues relatively IPSec SPI and TOS (IPv4)/type of service (IPv6) and mask; If the content of source port number scope, can only be type of data packet I, continue relatively destination slogan scope and TOS (IPv4)/type of service (IPv6) and mask.Whether the header of relatively confirming successively business data flow has corresponding PF.
204, when having corresponding PF to exist, by the identification record of data flow corresponding to this PF in this business data flow.
In TFT processing procedure, first define a stream identification dataflowId variable, by each independently PF distribute a business datum traffic identifier dataflowId value, according to the matching principle of TFT, if business data flow finds corresponding PF in TFT, this business data flow sends in corresponding private radio carrying so, otherwise sends on acquiescence radio bearer.Business datum flow structure (servicePacketDataStruct) is defined as table 2 form.
Table 2: the structural table of business data flow
Content |
Remarks |
?dataflowId |
The sign of business data flow |
?servicePacketData |
Business data flow |
Business data flow can be used array representation, also can adopt pointer mode to represent.
205, this business data flow is sent on the radio bearer that this PF is corresponding.
206, when there is no corresponding PF, by the reference record in the header of this data flow, be PF parameter, form the PF that first processing module oneself creates, and be an original stream identification of this business data flow distribution.
207,, because there is no corresponding PF, so described business data flow is sent in the carrying of acquiescence, transmit.
In the embodiment of the present invention, the second processing module can be understood as the process of the head compression (ROHC, Robust Header Compression) that is robustness to the processing of data flow, consult Fig. 3 below and be elaborated:
301, the second processing module receives the business data flow with stream identification.
302, judge whether described stream identification and gap marker (CID, Channel identification) exist mapping relations.
The corresponding ROHC entity of each CID.
303, when stream identification and gap marker exist mapping relations, the described business data flow with stream identification is pushed to the ROHC entity that described CID is corresponding and compresses.
304, when stream identification and gap marker do not exist mapping relations, create a new ROHC entity, and be new CID of ROHC entity partitioning of this new establishment.
305, association store stream identification and this newly assigned CID.
306, the described business data flow with stream identification is pushed in the ROHC entity of this new establishment and compresses.
From above application scenarios embodiment, can clearly draw, after carrying out a business data flow identification marking, in other modules, directly adopt stream identification to distinguish different business data flows, thereby improved the efficiency of Data Stream Processing.
In order to clearly demonstrate the application of this invention in the actual communications field, the use of this invention at mobile device will be illustrated below.
The embodiment of the present invention is with at Long Term Evolution (LTE, Long Term Evolution) use in the mobile device of system describes for example, in fact technical scheme of the present invention is equally applicable to Wideband Code Division Multiple Access (WCDMA) (WCDMA, Wideband Code Division Multiple Access) system, global system for mobile communications (GSM, Global System of Mobile communication) and time demal divide synchronous multiple access (TD-SCDMA, Time Division-Synchronous Code Division Multiple Access) system.
Consult Fig. 4, hardware using USB between mobile device 20 and application apparatus 10 (USB, Universal Serial BUS) interface,
TFT matching feature is realized in data flow con-trol module 210, the interface communication that data flow con-trol module 210 is responsible between data path and protocol stack and protocol application, realizing TFT searches the coupling of business datum and corresponding EBI value, specific implementation function is as follows: data flow con-trol module 210 receives the uplink business data message that USB interface sends, coupling by TFT module 2101 finds corresponding external bus interface (EBI, External Bus Interface), send uplink business data message to RAB management (RABM, Radio Acess Bearer Mangement) module 220, RABM module 220 receives from the business datum message after the match is successful through TFT module 2101 in data flow con-trol module 210, and the EBI value of distributing according to business datum message finds its corresponding Data Radio Bearer (DRB, Data Radio Bearer).
For the processing procedure with 2101 pairs of business data flows of TFT module, network configuration a PF list, each PF reference record is s_PF_param structure.While definition of T FT parameter list a_TFT_list in the TFT of mobile device module, a_TFT_list is by s_PF_param and an array that dataflowId parameter forms.
The give an example realization flow of this invention in LTE mobile device is as follows:
First step: from the business data flow of application apparatus 10, pass through USB interface, send to data flow con-trol module 210, the structure pointer that the stream identification of self-application equipment 10 is p_servicePacketData in the future in data flow con-trol module 210, this pointer is the pointer of servicePacketDataStruct type.
Second step: in data flow con-trol module 210, first call TFT functions of modules, data flow head in the servicePacketData business datum of in TFT module, p_servicePacketData being pointed to and the s_PF_param in a_TFT_list array compare, if in comparison procedure, find that servicePacketData data flow head has corresponding s_PF_param at a_TFT_list, TFT module directly by the dataflowId assignment in a_TFT_list to the dataflowId in p_servicePacketData.
Further, at the data flow header of servicePacketData business datum and the s_PF_param in a_TFT_list array, compare in process, first compare destination address and subnet mask, then compare protocol number (IPv4)/next stem (IPv6), if this content not in packet header, type of data packet III form, according to the more remaining TOS of type of data packet III (IPv4)/type of service (IPv6) and mask and stream label (IPv6); If there is protocol number (IPv4)/next stem (IPv6), the content of reference source range of port number, if this content not, it is type of data packet II form, type of data packet II form, continues relatively IPSec SPI and TOS (IPv4)/type of service (IPv6) and mask; If the content of source port number scope, can only be type of data packet I, continue relatively destination slogan scope and TOS (IPv4)/type of service (IPv6) and mask.Relatively confirm successively whether the servicePacketData in p_servicePacketData exists corresponding record at a_TFT_list.
In the comparison procedure of this step, servicePacketData in p_servicePacketData does not have corresponding record at a_TFT_list, according to the data flow header in servicePacketData, increase record of a_TFT_list, in s_PF_param, record this traffic flow information, and distribute an original dataflowId value.
In this step, data flow con-trol module 210 sends to RABM module 220 by forming a complete p_servicePacketData data flow, by RABM module 220, be again forwarded in corresponding packet data convergence (PDCP, Packet Data Convergence Protocol) module 230.
Third step: in PDCP module 230, preserved a structure that records dataflowId and ROHC CID in ROHC module 2301, this structure is defined as: a_TFTandRohcStreamId.The corresponding ROHC entity of each ROHC CID wherein.
PDCP module 230 is received from after RABM module 220 data flow, first according to the dataflowId in p_servicePacketData, in a_TFTandRohcStreamId array, search for, check and whether exist for this business data flow has created corresponding ROHC entity.
If in search procedure, ROHC module 2301 has found the ROHC entity that p_servicePacketData is corresponding, and ROHC module 2301 directly sends to p_servicePacketData in corresponding ROHC entity.
If in search procedure, ROHC module 2301 does not find the ROHC entity that p_servicePacketData is corresponding, at a_TFTandRohcStreamId, increase a new record so, dataflowId in this record is from the dataflowId of p_servicePacketData, ROHC module 2301 will be distributed a untapped CID value according to ROHC agreement in addition, and create the ROHC entity of a new data stream, finally p_servicePacketData data are sent in the new ROHC entity creating.
In ROHC entity, ROHC module need to be in the identifying of carrying out a data flow, and other processing are identical with ROHC protocol processes.
Technical scheme provided by the invention can be in any communication entity that need to support TFT and ROHC function, and this communication entity can be the network equipment, can be also mobile communication terminal, can be also a device in equipment.
Consult Fig. 5, an embodiment of the Data Stream Processing equipment that the embodiment of the present invention provides comprises: the first processing module 400 and the second processing module 410;
Described the first processing module 400, for receiving business data flow, and is described business data flow distribute data traffic identifier, and sends the business data flow with described stream identification to the second processing module;
Described the second processing module 410, for receiving after the described business data flow with described stream identification, according to described stream identification, determine the head compression ROHC entity of the robustness that described stream identification is corresponding, and the described business data flow with described stream identification is pushed in described ROHC entity and carries out ROHC compression.
In the embodiment of the present invention, described the first processing module 400 receives business data flow, and is described business data flow distribute data traffic identifier, and sends the business data flow with described stream identification to the second processing module;
Described the second processing module 410 receives after the described business data flow with described stream identification, according to described stream identification, determine the head compression ROHC entity of the robustness that described stream identification is corresponding, and the described business data flow with described stream identification is pushed in described ROHC entity and carries out ROHC compression.To carry out relatively comparing of a plurality of bytes with each handling process in prior art, the equipment that the embodiment of the present invention provides is by after carrying out a business data flow identification marking, in other modules, directly adopt stream identification to distinguish different business data flows, thereby improved the efficiency of Data Stream Processing.
On the basis of embodiment corresponding to above-mentioned Fig. 5, consult Fig. 6, in another embodiment of the equipment that the embodiment of the present invention provides, described the first processing module 400 comprises:
Comparing unit 4001, for comparing the parameter of the header of described business data flow and packet filter PF;
The first allocation units 4002, during the PF matching for the header comparing at described comparing unit 4001 with described business data flow, distribute to described business data flow by stream identification corresponding to described PF;
The first creating unit 4003, when not comparing the PF that the header with described business data flow matches at described comparing unit, by the reference record in the header of described business data flow, be new PF parameter, and corresponding described new PF parameter, a new PF created;
Described the first allocation units 4002, also for creating after described new PF in described the first creating unit 4003, for described business data flow distributes an original business datum traffic identifier.
On the basis of above-mentioned Fig. 5 or embodiment corresponding to Fig. 6, consult Fig. 7, in another embodiment of the equipment that the embodiment of the present invention provides, described the second processing module 410 comprises:
First searches unit 4101, for according to described stream identification, from the stream identification of pre-stored and the corresponding relation of gap marker CID, searches the ROHC entity that described CID is corresponding;
First pushes compression unit 4102, for when described first searches unit 4101 and find the ROHC entity of corresponding described stream identification, the described business data flow with described stream identification is pushed in described ROHC entity and carries out ROHC compression.
On the basis of above-mentioned Fig. 5 or embodiment corresponding to Fig. 6, consult Fig. 8, in another embodiment of the equipment that the embodiment of the present invention provides, described the second processing module 410 comprises:
Second searches unit 4103, for according to described stream identification, from the stream identification of pre-stored and the corresponding relation of gap marker CID, searches the ROHC entity that described CID is corresponding;
The second creating unit 4104, for when described second searches unit 4103 and do not find the ROHC entity of corresponding described stream identification, creates a new ROHC entity;
Second pushes compression unit 4105, for the described business data flow with described stream identification being pushed to the new ROHC entity creating of described the second creating unit 4104, carries out ROHC compression.
On the basis of embodiment corresponding to above-mentioned Fig. 8, consult Fig. 9, in another embodiment of the equipment that the embodiment of the present invention provides, described the second processing module 410 also comprises:
The second allocation units 4106, are used to the new gap marker CID of ROHC entity partitioning creating of described the second creating unit 4104;
Association store unit 4107, for the CID of stream identification described in corresponding stored and described the second allocation units 4106 distribution.
The Data Stream Processing equipment that a plurality of embodiment of the present invention provide after can carrying out a business data flow identification marking, directly adopts stream identification to distinguish different business data flows, thereby has improved the efficiency of Data Stream Processing in other modules.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of above-described embodiment is to come the hardware that instruction is relevant to complete by program, this program can be stored in a computer-readable recording medium, and storage medium can comprise: ROM, RAM, disk or CD etc.
Method and the equipment of the Data Stream Processing above embodiment of the present invention being provided are described in detail, applied specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment is just for helping to understand method of the present invention and core concept thereof; , for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention meanwhile.