Embodiment
For solving in existing data acquisition, the problem that collecting efficiency is low, the embodiment of the present invention provides a kind of method and apparatus of data acquisition, data acquisition equipment in this technical scheme, can carry out Data Analysis and filtration for the feature of the end-to-end data acquisition of business, can carry out Long-distance Control by server, utilize the Internet real-time report test data, realize the end-to-end test of carrying out quality of service whenever and wherever possible.
The data that the embodiment of the present invention only gathers signaling plane when analyzing KPI are in the past different, in order to reflect user's true perception, can in gathering signaling plane data, gather the data of user's face, and the data of specific user's signaling plane and user's face can be associated, as the foundation of subsequent analysis.
Below in conjunction with the accompanying drawing in embodiments of the invention, the technical scheme in embodiments of the invention is clearly and completely described.
As shown in Figure 1, be network topological diagram relevant to the end-to-end data acquisition of business in the embodiment of the present invention.Wherein, data acquisition equipment can the each network element of Real-time Collection in the data of each port, as the data of the each equipment in access network equipment, equipment of the core network and business platform.Data acquisition equipment can also communicate with end-to-end analysis platform, sends to this platform to carry out subsequent analysis processing the data that collect.Data acquisition equipment can also with Long-distance Control server communication, accept the control of Long-distance Control server, as, carry out the relevant configuration of data acquisition according to the control of Long-distance Control server, data acquisition is carried out or is stopped in the instruction of receiving remote Control Server, and can further keep clock synchronous with Long-distance Control server.Between data acquisition equipment and Long-distance Control server, can communicate by letter by interconnected network mode.Wherein, Long-distance Control server can be stand-alone network elements, also can be integrated in a network element with end-to-end analysis platform.
Based on above-mentioned network topology structure, Fig. 2 shows a kind of data acquisition flow schematic diagram that the embodiment of the present invention provides.Before starting to carry out data acquisition, data acquisition equipment carries out relevant parameter configuration, these parameters can comprise the information such as the business that will gather, agreement, signaling, test plan, data transfer mode, and data acquisition equipment can be set carry out condition and the rule of data filtering.This configuration operation can carry out according to the control of Long-distance Control server, also can carry out in data acquisition equipment this locality.
In addition, in measure of the quality of service, the time is important index end to end, and user's perception and time are closely related.In order accurately to locate the network element device in existing network, quality of service being impacted, each data acquisition equipment of the embodiment of the present invention also can be synchronizeed with Long-distance Control server, and wherein, Long-distance Control server keeps synchronizeing with GPS, like this, each data acquisition equipment can keep synchronizeing with GPS.
As shown in Figure 2, this data acquisition flow can comprise:
Step 201, data acquisition equipment receives after packet, this packet is successively filtered, and filtering out after PDP (packet data protocol) activation signaling data bag, resolve the IP address of distributing to subscriber equipment of wherein being carried.
Wherein, when packet is successively filtered, can, according to protocol layer order, start upwards to carry out step by step keyword filtration by bottom.Concrete, can filter according to the data link layer MAC address of packet, obtain, after the packet of coupling, filtering according to the network layer IP address of packet; Obtain, after the packet of coupling, filtering according to the transport layer port address of packet; Obtain, after the packet of coupling, filtering according to the application layer content of packet.
In the time that packet is filtered, agreement and the port address of the IP source address of the mac source address of data link layer and destination address, network layer and destination address, transport layer, these filter conditions are fixed substantially in the position of packet, in the time mating, hand over easily and find.But the data of application layer have its particularity, as more in equipment manufacturer in existing network, its consultation adopting is had any different, and in actual agreements, also there are many options, under different condition, the size of application data information is also different, this just causes application data to be difficult to fast and accurately judge the position of occurrence in data message, and causes carrying out data message filtration.For addressing this problem, the embodiment of the present invention, in the time filtering according to the application layer content of packet, adopts the character string matching method based on KMP algorithm to realize.When filtration, only need carry out once rapid scanning from left to right to application layer data, to judge that whether data should abandon, and have improved matching efficiency.
Step 202, data acquisition equipment, according to activating from PDP the IP address that signaling data bag parses, filters the follow-up packet receiving.
In data acquisition, conventionally only can filter out the signaling plane data of designated user communicating number.When this is because carries out business in PS (packet switching) territory, user terminal need to carry out authentication by server, and completes PDP activation, sets up data transmission link, at this moment user terminal just can obtain the dynamic IP addressing that MS distributes, and communicates with this and network side.Only have the data that just can filter out user's face by this IP address.This step parses IP address by activating signaling data bag from PDP, and according to this IP address, the user face data of relative users is filtered, thereby has reached the associated of signaling plane data and user face data.Fig. 6 shows the incidence relation schematic diagram of signaling plane data and user face data.
Step 203, data acquisition equipment is filtering out after user face data bag corresponding to this IP address, by its preservation or report.
In this step, data acquisition equipment can adopt following processing mode to the packet collecting:
Mode one: often obtain a desired data bag, add timestamp in this packet, upload server (as end-to-end analysis platform) when framing is also by network implementation again;
Mode two: by packet in accordance with regulations form remain on this locality, after this service ending, automatically upload onto the server (as end-to-end analysis platform);
Mode three: by packet in accordance with regulations form remain on this locality, send after data transfer instruction until server (as end-to-end analysis platform), be uploaded to this server.
Signaling plane flow chart of data processing shown in Fig. 2 in flow process can as shown in Figure 3, comprise:
As shown in Figure 3, be the signaling plane flow chart of data processing schematic diagram in flow process shown in Fig. 2, the method comprises:
Step 301, data acquisition equipment gathers port data.Data acquisition equipment, according to the concrete configuration of acquisition parameter, can gather the data of the ports such as IuB, IuPS, Gn or Gi.
Step 302, data acquisition equipment judges whether the data that receive are signaling plane data, if so, perform step 303; Otherwise packet discard.
Data acquisition equipment can judge whether the data that receive are signaling plane data by analysis protocol keyword.Concrete, data acquisition equipment can obtain signaling plane data by successively filtering keyword.Mac source address in data link layer to Frame and destination address mate with corresponding keyword (as source MAC and target MAC (Media Access Control) address), filter out and contain the Frame that does not need MAC Address; IP source address in network layer to packet and destination address mate with corresponding keyword (source IP address and object IP address), filter out hash bag; In transport layer, each agreement and port are mated with corresponding keyword, filter out hash bag; In application layer, application data is used depth detection, filters out hash bag, and what finally obtain is exactly to carry out end-to-end QoS to analyze required data.
Step 303, data acquisition equipment adopts KMP algorithm application data to mate.
Although the position of the application layer data of various applied business in packet and the length of application layer data section are not quite similar, and can determine the scope that application layer data may exist in packet by methods such as statistics.In this step, data acquisition equipment can extract the data segment of this setting range from packet, and start to scan this data segment from this data segment left side, if the data in current scanning area and keyword match are determined the packet of this packet for gathering; Otherwise slip scan region proceed keyword match to the right; By that analogy, until determine the packet of packet for gathering, or until this data segment scanned.Wherein, described keyword can be IMSI (International MobileSubscriber Identifier, international mobile subscriber identifier), call out the cell ID (cell ID) occurring or call out the parameter such as LAC ID (Location Area Code, Location Area Code) occurring.
Step 304, data acquisition equipment judges whether data mate, if coupling performs step 305; Otherwise packet discard.
Step 305, data acquisition equipment determines whether that PDP activates signaling, if so, performs step 306; Otherwise, perform step 307.
Step 306, resolves and obtains user's face IP address, and perform step 307.
Step 307, preserves signaling plane data.
The application layer data coupling flow process that employing KMP algorithm shown in Fig. 2 in flow process is realized can as shown in Figure 4, comprise:
Step 401, data acquisition equipment takes out the data segment that needs coupling from packet.
By finding out protocal analysis, although the position of application data in packet is unfixed, but its residing scope is confirmable, in the time scanning, can not need from first to last to scan one time, the scope that only need may occur according to application data is carried out scan matching, can add like this fast scan speed, improves matching efficiency.
Step 402, data acquisition equipment is scan-data segment information from left to right.
Concrete, the process of scanning is exactly that the one section of character string and the keyword strings that take out in data message compare.Wherein, keyword strings is generally the parameters such as IMSI, the cell ID that calls out generation or the LAC ID (Location Area Code, Location Area Code) that calls out generation.
Step 403, data acquisition equipment judges whether the character string scanning mates with keyword strings, if so, shows that this packet is desired data bag, and continues next packet to mate; Otherwise execution step 404.
Step 404, data acquisition equipment judges whether by data segment been scanned; If so, show that this packet is that hash bag should abandon, execution step 406; Otherwise, execution step 405.
Step 405, according to " part coupling " result having obtained, a slip scan region segment distance far away as far as possible, then proceeds to step 402 forward, and the data in scanning area are mated.
Step 406, abandons this packet.
User face data handling process shown in Fig. 2 in flow process can as shown in Figure 5, comprise:
Step 501, data acquisition equipment gathers port data.Data acquisition equipment, according to the concrete configuration of acquisition parameter, can gather the data of the ports such as IuB, IuPS, Gn or Gi.
Step 502, data acquisition equipment judges whether the data that gather are user face data, if so, perform step 503; Otherwise, abandon this packet.
In this step, data acquisition equipment can judge whether the data that collect are user face datas by analysis protocol keyword.
Whether step 503, can obtain user face data IP address, if so, performs step 504; Otherwise, return to step 501, continue to gather other data.
Step 504, data acquisition equipment judges whether to meet IP address filtering condition, if so, performs step 505; Otherwise, abandon this packet.
Step 505, data acquisition equipment is preserved this user face data.
In sum, in the embodiment of the present invention, data acquisition equipment is by the data message (comprise and gather signaling plane data and user face data) of port, successively image data information, use the character string matching method based on KMP algorithm to filter for the data acquisition of application layer, signaling plane data are resolved and carried out associated with filter user face data with user face data, to the desired data finally obtaining, compared with available data acquisition technique, can carry out more targetedly data acquisition, and then improve data acquisition efficiency.In addition, data acquisition equipment can also be controlled by distant place Control Server, has improved the controllability of data acquisition.
Based on identical technical conceive, the embodiment of the present invention also provides a kind of data acquisition equipment that can be applicable to above-mentioned flow process.
Referring to Fig. 7, be the data acquisition equipment structural representation that the embodiment of the present invention provides, this data acquisition equipment can comprise: data acquisition filtering module 701, Data Analysis relating module 702 and transfer of data are preserved module 703, wherein:
Data acquisition filtering module 701, for receiving after packet, successively filters this packet; And, resolve according to Data Analysis relating module 702 the IP address obtaining, the follow-up packet receiving is filtered;
Data Analysis relating module 703, activates after signaling data bag for filter out PDP at data acquisition filtering module 701, resolves the IP address of distributing to subscriber equipment of wherein being carried;
Transfer of data is preserved module 703, for filtering out at data acquisition filtering module 701 after user face data bag corresponding to described IP address, by its preservation or report.
In above-mentioned data acquisition equipment, data acquisition filtering module 701 can filter according to the data link layer MAC address of packet; Obtain, after the packet of coupling, filtering according to the network layer IP address of packet; Obtain, after the packet of coupling, filtering according to the transport layer port address of packet; Obtain, after the packet of coupling, filtering according to the application layer content of packet.
In above-mentioned data acquisition equipment, data acquisition filtering module 701 can extract the data segment of setting range from packet, and start scanning from this data segment left side, if the data in current scanning area and keyword match are determined the packet of described packet for gathering; Otherwise slip scan region is scanned and is carried out keyword match to the right; By that analogy, until determine the packet of described packet for gathering, or until this data segment scanned.
Above-mentioned data acquisition equipment also can comprise configuration with control module 704, for accept Long-distance Control server send for controlling the control command of data acquisition, or/and, Packet Filtering rule.
Above-mentioned data acquisition equipment also can comprise clock synchronization module 705, and for carrying out clock synchronous with the Long-distance Control server of data acquisition equipment, wherein, described Long-distance Control server and GPS keep clock synchronous.
In above-mentioned data acquisition equipment, data acquisition filtering module 701 can be realized by hardware mode, further to improve data acquisition efficiency.
It should be noted that, the embodiment of the present invention, in the filtration to packet and parse operation, can be realized by hardware.
Also it should be noted that, the embodiment of the present invention is not limited to and adopts the mode of server and data acquisition equipment to complete end-to-end data acquisition, also can adopt equipment and the mode of other application the technical program.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add essential general hardware platform by software and realize, and can certainly pass through hardware, but in a lot of situation, the former is better execution mode.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product is stored in a storage medium, comprise that some instructions (can be personal computers in order to make a computer equipment, server, or the network equipment etc.) carry out the method described in each embodiment of the present invention.
It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, the module in accompanying drawing or flow process might not be that enforcement the present invention is necessary.
It will be appreciated by those skilled in the art that the module in the device in embodiment can be distributed in the device of embodiment according to embodiment description, also can carry out respective change and be arranged in the one or more devices that are different from the present embodiment.The module of above-described embodiment can be merged into a module, also can further split into multiple submodules.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
Disclosed is above only several specific embodiment of the present invention, and still, the present invention is not limited thereto, and the changes that any person skilled in the art can think of all should fall into protection scope of the present invention.