CN104869026B - Method, access device and gateway for the detection of local area network background traffic - Google Patents

Method, access device and gateway for the detection of local area network background traffic Download PDF

Info

Publication number
CN104869026B
CN104869026B CN201410063081.XA CN201410063081A CN104869026B CN 104869026 B CN104869026 B CN 104869026B CN 201410063081 A CN201410063081 A CN 201410063081A CN 104869026 B CN104869026 B CN 104869026B
Authority
CN
China
Prior art keywords
soap
request message
gateway
access device
message
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.)
Expired - Fee Related
Application number
CN201410063081.XA
Other languages
Chinese (zh)
Other versions
CN104869026A (en
Inventor
吴进武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Datang Software Technologies Co Ltd
Original Assignee
Datang Software Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Datang Software Technologies Co Ltd filed Critical Datang Software Technologies Co Ltd
Priority to CN201410063081.XA priority Critical patent/CN104869026B/en
Publication of CN104869026A publication Critical patent/CN104869026A/en
Application granted granted Critical
Publication of CN104869026B publication Critical patent/CN104869026B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of method, access device and gateways for the detection of local area network background traffic, it include access device and gateway in the local area network, which comprises access device is to LAN broadcast's universal plug and play UPNP agreement request message;When the access device receives the UPNP protocol responses message that gateway is returned for the UPNP agreement request message, the service description information of the gateway is extracted from the UPNP protocol responses message;Simple object access protocol request message is generated using the service description information;The SOAP request message is sent to the gateway, and, it receives the gateway and is directed to the SOAP response message that the SOAP request message returns;The network flow on current local area network backstage is calculated according to the SOAP response message.The present invention can be with precise measurement local area network background traffic, to guarantee that broadband is tested the speed the accuracy of result, and the reusability of detection method is improved.

Description

Method, access device and gateway for the detection of local area network background traffic
Technical field
The present invention relates to Internet technical fields, and in particular to a method of it is detected for local area network background traffic, one Access device and a kind of gateway for local area network background traffic detection of the kind for the detection of local area network background traffic.
Background technique
With access internet number of electronic devices explosive growth and broadband inserting service provider increase, In LAN environment, in home network environment and business network environment, there are the electronic equipment of various access network, examples Such as: desktop computer, laptop, mobile phone, plate, these electronic equipments need to use network by gateway Address conversion (Network Address Translation, NAT) technology accesses internet.
Other electricity when progress broadband is tested the speed in the LAN environment using gateway composition, under same gateway Sub- equipment may generate network flow communicate with gateway simultaneously, or the background program generation network flow for the PC that tests the speed Amount and equipment normal communication generate network flow, these network flows are referred to as background traffic, will lead to the knot that broadband is tested the speed Fruit inaccuracy, deviates actual bandwidth value, thus needs to detect the actual numerical value of background traffic in current local area network environment.
In order to detect the background traffic in current local area network environment, the prior art carries out net using in the PC that currently tests the speed The method of network detecting host.Specifically, it is in a part of range that any network Detection task, which is exactly one group of IP range shorter, Movable host, detects it.Since network host finds to realize frequently by ping utility, normally referred to as Ping scanning.Ping scanning purpose be obtain response with show some IP address be it is movable, i.e., used by certain host, It may be considered that host corresponding with the IP is in local area network.
However, ping utility is echo echo request and response based on Internet control message ICMP agreement, user All ICMP echo requests can be ignored by configuring icmp_echo_ignore_all option, cause to scan using ping and examine When surveying the online host number of local area network, source host can not receive the ICMP echo response of target network, can not obtain correctly online Number of host;Secondly, when the firewall immaculated in defence is located between the source host and target network for carrying out network discovery, fire prevention When wall captures and abandons ICMP detection packet or response bag, some hosts cannot be detected, and also can not just be obtained correctly Online number of host;It is also only merely to determine that the host of corresponding IP is worked as finally, allowing to obtain correctly online number of host Before joined local area network, can not determine whether online host generates background traffic, also can not to be possible to generate backstage flow Amount is accurately quantified.
Therefore, a technical problem that needs to be urgently solved by technical personnel in the field at present is exactly: providing a kind of for office Method, access device and the gateway of domain net background traffic detection, to precise measurement local area network background traffic, to protect Test the speed the accuracy of result in card broadband.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind State problem it is a kind of for local area network background traffic detection access device and it is a kind of for local area network background traffic detection Gateway and a kind of corresponding method for the detection of local area network background traffic.
To solve the above-mentioned problems, the invention discloses a kind of method for the detection of local area network background traffic, the offices It include access device and gateway in the net of domain, which comprises
Access device is to LAN broadcast's universal plug and play UPNP agreement request message;
It is rung when the access device receives gateway for the UPNP agreement that the UPNP agreement request message returns When answering message, the service description information of the gateway is extracted from the UPNP protocol responses message;
Simple object access protocol request message is generated using the service description information;
The SOAP request message is sent to the gateway, and, the gateway is received for described The SOAP response message that SOAP request message returns;
The network flow on current local area network backstage is calculated according to the SOAP response message.
Preferably, the step of access device is to LAN broadcast's universal plug and play UPNP agreement request message Before further include:
When access device access to LAN, the IP address of the access device is obtained.
Preferably, the UPNP agreement request message be meet UPNP agreement TCP data grouping, the access device to The step of LAN broadcast's universal plug and play UPNP agreement request message includes:
After obtaining the IP address of the access device, the access device generates the TCP data point for meeting UPNP agreement Group;
Obtain the IP address and subnet mask of the gateway;
Using the IP address and subnet mask account broadcast address of the gateway;
The TCP data grouping is broadcasted in the local area network using the broadcast address.
Preferably, described when the access device receives what gateway was returned for the UPNP agreement request message When UPNP protocol responses message, the step of the service description information of the gateway is extracted from the UPNP protocol responses message Suddenly include:
The access device receives one or more equipment for supporting UPNP agreement in the local area network and is directed to the UPNP One or more UPNP protocol responses messages that agreement request message returns;
From one or more of UPNP protocol responses messages, choose matched with the IP address of the gateway UPNP protocol responses message;
Service describing URL is extracted from the matched UPNP protocol responses message;
The service describing URL is accessed, corresponding service describing XML file is obtained;
The service describing XML file is parsed, service description information is obtained.
Preferably, the service description information includes total transmission byte number GetTotalBytesSent, and/or, it is total to receive Byte number GetTotalBytesReceived, and/or, total transmission packet count GetTotalPacketsSent, and/or, always connect Receive packet count GetTotalPacketsReceived.
Preferably, the parsing service describing XML file, the sub-step for obtaining service description information are further wrapped It includes:
Create DOM parser;
The service describing XML file is loaded into the DOM parser;
SAXReader object is created in the DOM parser;
SAXReader.read (File) function for calling the SAXReader object, by the service describing XML file Be converted to Document object;
The Document.getRootElement () function for calling the Document object, obtains the service describing The root node of XML file;
According to the root node, the actionList node in the service describing XML is obtained;
The action information that the current gateway equipment for including under the actionList node is supported is extracted, as service Description information.
Preferably, the SOAP request message includes the first SOAP request message and the second SOAP request message, described SOAP response message includes the first SOAP response message and the 2nd SOAP response message, described to send the SOAP request message To the gateway, and, receive the SOAP response message that the gateway is returned for the SOAP request message Step includes:
The access device sends the first SOAP request message to the gateway;
It receives the gateway and is directed to the first SOAP response message that the first SOAP request message returns, described the The first reception total bytes in one SOAP response message including current time;
After prefixed time interval, the access device sends the second SOAP request message to the gateway;
It receives the gateway and is directed to the 2nd SOAP response message that the second SOAP request message returns, described the Second including the time behind the interval in two SOAP response messages receives total bytes;
It is described according to the SOAP response message calculate current local area network backstage network flow the step of include:
The described second difference for receiving total bytes and the first reception total bytes is calculated, takes the difference as and works as The network flow on preceding local area network backstage.
Preferably, it is described according to the SOAP response message calculate current local area network backstage network flow the step of it Afterwards, the method further include:
Judge whether the network flow on the current local area network backstage is greater than pre-set bandwidths detection threshold value, if so, determining The network bandwidth that current access device can occupy and actual bandwidth are inconsistent;
If it is not, the network bandwidth for then determining that current access device can occupy is consistent with actual bandwidth.
To solve the above-mentioned problems, described the invention also discloses a kind of method for the detection of local area network background traffic It include access device and gateway in local area network, which comprises
Gateway receives the universal plug and play UPNP agreement request message that access device is sent;
Gateway returns to the corresponding UPNP protocol responses message of the UPNP agreement request message to the access device;
Gateway receives the simple object access protocol request message that access device is sent, and the SOAP request disappears Breath is access device after the service description information for extracting gateway in the UPNP protocol responses message, using the service Description information generates, and, gateway returns to the corresponding SOAP response of the SOAP request message to the access device and disappears Breath.
To solve the above-mentioned problems, the invention also discloses it is a kind of for local area network background traffic detection access device, Include:
Broadcast module is used for LAN broadcast's universal plug and play UPNP agreement request message;
Service description information extraction module, for receiving gateway for the UPNP agreement in the access device When the UPNP protocol responses message that request message returns, the clothes of the gateway are extracted from the UPNP protocol responses message Business description information;
Request message generation module, for generating simple object access protocol request using the service description information Message;
Module is sent and received, for the SOAP request message to be sent to the gateway, and, described in reception Gateway is directed to the SOAP response message that the SOAP request message returns;
Background traffic computing module, for calculating the network flow on current local area network backstage according to the SOAP response message Amount.
Preferably, the system also includes:
IP address obtains module, for obtaining the IP address of the access device in access device access to LAN.
Preferably, the broadcast module includes:
TCP data grouping generates submodule, for after the IP address for obtaining the access device, the access device to be raw It is grouped at the TCP data for meeting UPNP agreement;
Gateway ip address acquisition submodule, for obtaining the IP address and subnet mask of the gateway;
Broadcast address computational submodule, for the IP address and subnet mask account broadcast ground using the gateway Location;
TCP data multicasting submodule, for broadcasting the TCP number in the local area network using the broadcast address According to grouping.
Preferably, the service description information extraction module includes:
Response message receiving submodule receives one or more support UPNP in the local area network for the access device The equipment of agreement is directed to one or more UPNP protocol responses messages that the UPNP agreement request message returns;
The response message of gateway chooses submodule, is used for from one or more of UPNP protocol responses messages, Choose the matched UPNP protocol responses message of IP address with the gateway;
Service describing URL extracting sub-module, for extracting service describing from the matched UPNP protocol responses message URL;
Service describing XML file obtains submodule and obtains corresponding service describing for accessing the service describing URL XML file;
Service describing XML file analyzing sub-module obtains service describing letter for parsing the service describing XML file Breath;
Preferably, the service description information includes total transmission byte number GetTotalBytesSent, and/or, it is total to receive Byte number GetTotalBytesReceived, and/or, total transmission packet count GetTotalPacketsSent, and/or, always connect Receive packet count GetTotalPacketsReceived.
Preferably, the service describing XML file analyzing sub-module includes:
Resolver creates submodule, for creating DOM parser;
File loads submodule, for loading the service describing XML file into the DOM parser;
SAXReader Object Creation submodule, for creating SAXReader object in the DOM parser;
Document object transform subblock, for calling the SAXReader.read of the SAXReader object (File) the service describing XML file is Document object by function;
Root node acquisition submodule, for calling the Document.getRootElement () of the Document object Function obtains the root node of the service describing XML file;
ActionList node acquisition submodule, for obtaining in the service describing XML according to the root node ActionList node;
Action information extraction submodule, for extracting the current gateway equipment institute for including under the actionList node The action information of support, as service description information.
Preferably, the SOAP request message includes the first SOAP request message and the second SOAP request message, described SOAP response message includes the first SOAP response message and the 2nd SOAP response message, and the module that sends and receives includes:
First SOAP request message sending submodule sends the first SOAP request message to described for the access device Gateway;
First SOAP response message receiving submodule disappears for receiving the gateway for first SOAP request The first SOAP response message returned is ceased, the first SOAP response message includes the first reception total bytes of current time;
Second SOAP request message sending submodule, for after prefixed time interval, the access device to send second SOAP request message is to the gateway;
2nd SOAP response message receiving submodule disappears for receiving the gateway for second SOAP request The 2nd SOAP response message returned is ceased, the second reception including the time behind the interval is total in the 2nd SOAP response message Byte number.
Preferably, the SOAP response message includes that the first reception total bytes and second receive total bytes, after described Platform flow rate calculation module includes:
Network flow computational submodule receives total bytes and the first reception total bytes for calculating described second Difference, take the difference as the network flow on current local area network backstage.
Preferably, the system also includes:
First decision sub-module is greater than pre-set bandwidths detection threshold value for the network flow on the current local area network backstage When, then determine that network bandwidth that current access device can occupy and actual bandwidth are inconsistent;
Second decision sub-module is examined for the network flow on the current local area network backstage less than or equal to pre-set bandwidths When surveying threshold value, then the network bandwidth for determining that current access device can occupy is consistent with actual bandwidth.
To solve the above-mentioned problems, the invention also discloses it is a kind of for local area network background traffic detection gateway, Include:
Request message receiving module, for receiving the universal plug and play UPNP agreement request message of access device transmission;
Response message return module, for returning to the corresponding UPNP of the UPNP agreement request message to the access device Protocol responses message;
Reception and return module, for receiving the simple object access protocol request message of access device transmission, institute Stating SOAP request message is access device after the service description information for extracting gateway in the UPNP protocol responses message, It is generated using the service description information, and, it is corresponding for returning to the SOAP request message to the access device SOAP response message.
Preferably, the UPNP agreement request message is the TCP data grouping for meeting UPNP agreement.
Preferably, the SOAP request message includes the first SOAP request message and the second SOAP request message, described to connect Receiving with return module includes following submodule:
First SOAP request message sink submodule, for receiving the first SOAP request message of access device transmission;
First SOAP response message returns to submodule, is directed to first SOAP request for returning to the access device The corresponding first SOAP response message of message includes the first of current time receiving total byte in the first SOAP response message Number;
Second SOAP request message sink submodule, for after prefixed time interval, gateway to receive access device The the second SOAP request message sent;
2nd SOAP response message returns to submodule, is directed to second SOAP request for returning to the access device The corresponding 2nd SOAP response message of message includes second of the time behind the interval receiving in the 2nd SOAP response message Total bytes.
Compared with the background art, the present invention includes the following advantages:
The present invention, which passes through, sends simple object access protocol request message to the gateway, and, according to institute The network flow that gateway calculates current local area network backstage for the SOAP response message that the SOAP request message returns is stated, Precise measurement local area network background traffic, to guarantee that broadband is tested the speed the accuracy of result.
The present invention describes XML file by parsing the equipment, and gateway can accurately be extracted by obtaining action node Service description information, so as to need to select different interfaces according to different, also, assisted by the UPNP of International standardization View, can ignore the difference of different gateway devices, for the gateway of different manufacturers production, realize detection local area network backstage The cross-platform characteristic of network data, improves the reusability of detection method.
The present invention is compared by using the network flow and pre-set bandwidths detection threshold value on the current local area network backstage, can be with Whether consistent with actual bandwidth the network bandwidth that current access device occupies is detected, to guarantee that broadband is tested the speed the accurate of result Property.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of embodiment of the method for the detection of local area network background traffic according to an embodiment of the invention 1 step flow chart;
Fig. 2 shows a kind of embodiments of the method for the detection of local area network background traffic according to an embodiment of the invention 2 step flow chart;
It is real that Fig. 3 shows a kind of access device for the detection of local area network background traffic according to an embodiment of the invention Apply the structural block diagram of example;
It is real that Fig. 4 shows a kind of gateway for the detection of local area network background traffic according to an embodiment of the invention Apply the structural block diagram of example.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
In order to enable those skilled in the art to better understand the present invention, letter is carried out to the relevant technologies according to the present invention below Unitary declaration.
Local area network background traffic refers to the network generated when the electronic equipment in local area network actively carries out upload downloading task The network flow that flow and normal communication generate, such as the network flow of the electronic equipment other than the PC that tests the speed, alternatively, the PC that tests the speed The network flow of background program etc..The network flow that normal communication generates refers to that electronic equipment is not being uploaded actively The necessary network flow generated when downloading task, can generally float within the scope of normality threshold.
The broadband tool of testing the speed of mainstream merely provides the PC that tests the speed to the uplink of internet at present, and/or, downlink traffic inspection It surveys, it is right in the case where indefinite local area network background traffic for accessing the LAN subscriber of network by gateway The measurement that network bandwidth carries out, has ignored local area network background traffic, and obtained measurement result is frequently not true bandwidth rates, It is compared to Internet Service Provider ISP(Internet Service Provider) provide actual broadband rate want It is relatively low or even much relatively low.The reason of such case occur is likely to be service quality QoS (the Quality of of ISP Service) the problem of, it is also possible to it is the presence that user has ignored local area network background traffic, and user is in indefinite locating office Domain net in each electronic equipment network bandwidth practical occupancy situation and background traffic service condition when, often will be considered that There is the service quality QoS that the reason of measurement result is lower than bandwidth application rate is ISP to go wrong, therefore, is unfavorable for ISP's QoS user experience carries out data statistics, and then brings inconvenience to the O&M and update of ISP own network infrastructure.
Exactly inventor herein's seriousness for finding this problem creatively proposes the core structure of the embodiment of the present invention One of think of is, provides a kind of testing mechanism of local area network background traffic, may be implemented to ring under LAN environment by SOAP Message is answered to accurately calculate the network flow on current local area network backstage, to guarantee that broadband is tested the speed the accuracy of result.
Referring to Fig.1, a kind of method for the detection of local area network background traffic according to an embodiment of the invention is shown The step flow chart of embodiment 1 includes access device and gateway in the local area network, can specifically include following steps:
Step 101, access device is to LAN broadcast's universal plug and play UPNP agreement request message;
In practical applications, universal plug and play UPNP agreement is to each other communicated based on ICP/IP protocol and for equipment And the new Internet protocol worked out;Broadcast is the communication mould that every other host of the host on network sends frame Formula, network are all unconditionally replicated and are forwarded to the signal that wherein each host issues, and All hosts can receive All signals, no matter whether host needs;Access device is usually the PC that tests the speed, can be logical from the PC that tests the speed to LAN broadcast's broadcast With plug and play UPNP agreement request message.
In one preferred embodiment of the invention, before the step 101, the embodiment of the present invention can also include such as Lower step:
When access device access to LAN, the IP address of the access device is obtained.
In a particular application, the IP address for obtaining access device can use the following two kinds mode:
1) pass through dynamic host configuration DHCP agreement, the automatic IP address distributed in local area network;
2) pass through the IP address of static state setting local area network gateway equipment, the IP address in designated local area network.
Specifically, mode 1) in, by DHCP protocol, any access device can be made to obtain IP address automatically, when connecing When entering the other positions that equipment is moved in network, new IP address can be equally received automatically.DHCP protocol has used lease Concept, or the validity period for Computer IP address.Rental period be it is indefinite, depend primarily on user somewhere couple How long is Internet needs, and it is very practical that this, which changes the user of environment for education sector and frequently,.By the shorter rental period, DHCP protocol can dynamically reconfigure network in environment of the number of computers more than IP available address number.DHCP Agreement supports to be that computer distributes static address, such as needs the Web server of permanent IP address.
Mode 2) in, pass through static state setting IP address, it can be ensured that manually control the IP address of access device, but be short of Fault-tolerance needs to reset the IP address of access device when access device is moved to other positions.
In embodiments of the present invention, those skilled in the art can according to need the suitable mode of selection and obtain the access The IP address of equipment, the embodiments of the present invention are not limited thereto.
In one preferred embodiment of the invention, the UPNP agreement request message is the TCP number for meeting UPNP agreement According to grouping, the step 101 can specifically include following sub-step:
Sub-step S11, after obtaining the IP address of the access device, the access device generation meets UPNP agreement TCP data grouping;
Sub-step S12 obtains the IP address and subnet mask of the gateway;
Sub-step S13, using the IP address and subnet mask account broadcast address of the gateway;
Sub-step S14 broadcasts the TCP data grouping using the broadcast address in the local area network.
Specifically, the TCP data grouping for meeting UPNP agreement can be generated in access device, according to the access device The IP address and subnet mask of current gateway equipment can be confirmed out in IP address, so as to be easy to calculate TCP data TCP data is sent packets to the host in local area network according to broadcast address by the broadcast address of grouping.
Certainly, the broadcasting method of above-mentioned TCP data grouping is intended only as example, in implementing the embodiments of the present invention, can be with The broadcasting method of other TCP datas grouping is set according to the actual situation, and the embodiments of the present invention are not limited thereto.In addition, removing Outside the broadcasting method of above-mentioned TCP data grouping, those skilled in the art can also use other TCP datas according to actual needs The broadcasting method of grouping, the embodiment of the present invention are also without restriction to this.
Step 102, when the access device receives what gateway was returned for the UPNP agreement request message When UPNP protocol responses message, the service description information of the gateway is extracted from the UPNP protocol responses message;
In the concrete realization, support the equipment of UPNP agreement for the UPNP agreement request if access device can not obtain The UPNP protocol responses message that message returns, it was demonstrated that the gateway does not support UPNP agreement or UPNP agreement is disabled, Call back function when then executing unsuccessfully exits the detection of current local area network background traffic.When the access device receives gateway When the UPNP protocol responses message that equipment is returned for the UPNP agreement request message, from the UPNP protocol responses message Extract the service description information of the gateway.
In one preferred embodiment of the invention, the step 102 can specifically include following sub-step:
Sub-step S201, the access device receive one or more equipment needles for supporting UPNP agreement in the local area network One or more UPNP protocol responses messages that the UPNP agreement request message is returned;
Sub-step S202 chooses the IP with the gateway from one or more of UPNP protocol responses messages The UPNP protocol responses message of address matching;
Sub-step S203 extracts service describing URL from the matched UPNP protocol responses message;
Sub-step S204 accesses the service describing URL, obtains corresponding service describing XML file;
Sub-step S205 parses the service describing XML file, obtains service description information.
In one preferred embodiment of the invention, the service description information may include total transmission byte number GetTotalBytesSent, and/or, total reception byte number GetTotalBytesReceived, and/or, always send packet count GetTotalPacketsSent, and/or, it is total to receive packet count GetTotalPacketsReceived etc..
In specific implementation, after broadcasting UPNP agreement request message into local area network, all devices can all be received in local area network To the copy of the request message, each interior equipment for supporting UPNP agreement of local area network can return to a message as sound Message is answered, when there is one or more equipment for supporting UPNP agreement in local area network, from one or more UPNP protocol responses Found in message with the matched UPNP protocol responses message of the IP address of gateway, extract service describing wherein included URL, accessing service describing URL by Hyper text transfer http protocol can be obtained the gateway of support UPNP agreement Service describing XML file parses the service describing XML file, obtains service description information, wherein service description information can wrap It includes: total transmission byte number GetTotalBytesSent, and/or, total reception byte number GetTotalBytesReceived, and/ Or, packet count GetTotalPacketsSent is always sent, and/or, it is total to receive packet count GetTotalPacketsReceived.
It should be noted that the interface that the gateway of different manufacturer's productions externally provides is different, the present invention passes through solution It analyses the equipment and describes XML file, the service description information of gateway can accurately be extracted by obtaining action node, so as to To need to select different interfaces according to different, also, pass through the UPNP agreement of International standardization, different gateways can be ignored and set Standby difference realizes the cross-platform characteristic of detection local area network background network data for the gateway of different manufacturers production, Improve the reusability of detection method.
In one preferred embodiment of the invention, the sub-step S205 can specifically include following sub-step:
Sub-step A101 creates DOM parser;
Sub-step A102 loads the service describing XML file into the DOM parser;
Sub-step A103 creates SAXReader object in the DOM parser;
Sub-step A104 calls SAXReader.read (File) function of the SAXReader object, by the service Description XML file is converted to Document object;
Sub-step A105 calls Document.getRootElement () function of the Document object, obtains institute State the root node of service describing XML file;
Sub-step A106 obtains the actionList node in the service describing XML according to the root node;
Sub-step A107 extracts the action letter that the current gateway equipment for including under the actionList node is supported Breath, as service description information.
In a particular application, after reading the service describing XML file of gateway, DOM parser, load service are created XML file is described, is created that SAXReader object first, calls SAXReader.read (File) function that can retouch service It states XML file and is converted to Document object, and call the available service of Document.getRootElement () function The root node of XML file is described, reading service as needed describes the actionList node in the root node of XML file, should It may include the action information that the gateway is supported under node, i.e. the interface that externally provides of the gateway, as service Description information.That is the interface that externally provides of the gateway can be held by sending the SOAP request message request gateway The corresponding action of row.
Certainly, the above-mentioned parsing service describing XML file, the processing method for obtaining service description information are intended only as showing Other can be arranged according to the actual situation and parse the service describing XML file, obtain in implementing the embodiments of the present invention for example The processing method of service description information, the embodiments of the present invention are not limited thereto.In addition, obtaining the parsing service in addition to above-mentioned XML file is described, is obtained outside the processing method of service description information, those skilled in the art can also use according to actual needs Other parsing service describing XML files, obtain the processing method of service description information, this is also not added in the embodiment of the present invention With limitation.
Step 103, simple object access protocol request message is generated using the service description information;
In embodiments of the present invention, Simple Object Access Protocol is a kind of light weight, the simple, agreement based on XML, is used To transmit the format of information.According to the service describing XML file of service description information, corresponding simple object access can be generated Agreement SOAP request message.
Specifically, after the service describing XML file for obtaining gateway, the service that gateway is supported can be obtained List serviceList can initialize SOAP request message according to service list serviceList.
Step 104, the SOAP request message is sent to the gateway, and, receive the gateway needle The SOAP response message that the SOAP request message is returned;
In a particular application, the interface that access device can externally be provided according to gateway sends SOAP request message To gateway, after gateway receives SOAP request message, the requested corresponding operating of SOAP request message is executed, is called The network of gateway itself services Web Service, later equally uses response message SOAP response message to return to access Equipment.
In one preferred embodiment of the invention, the SOAP request message includes the first SOAP request message and second SOAP request message, the SOAP response message include the first SOAP response message and the 2nd SOAP response message, the step 104 can specifically include following sub-step:
Sub-step S301, the access device send the first SOAP request message to the gateway;
Sub-step S302 receives the first SOAP response that the gateway is returned for the first SOAP request message Message includes the first of current time receiving total bytes in the first SOAP response message;
Sub-step S303, after prefixed time interval, the access device sends the second SOAP request message to the net Close equipment;
Sub-step S304 receives the 2nd SOAP response that the gateway is returned for the second SOAP request message Message includes second of the time behind the interval receiving total bytes in the 2nd SOAP response message.
In practical applications, it after SOAP request message generates, needs to send the first SOAP request message to gateway, obtains Gateway is taken to be directed to the first SOAP response message that the first SOAP request message returns, the first SOAP response message Total bytes are received including first, indicate the received total bytes of current time, after prefixed time interval, are implemented in the present invention In a kind of preferable example of example, prefixed time interval is preferably 30 seconds, sends the second SOAP request message again and sets to gateway It is standby, it obtains gateway and is directed to the 2nd SOAP response message that the second SOAP request message returns, the 2nd SOAP is rung Answering message includes the second reception total bytes, indicates received total bytes after prefixed time interval.
Certainly, above-mentioned transmission SOAP request message and the processing method of reception SOAP response message are intended only as example, When implementing the embodiment of the present invention, other can be set according to the actual situation and send SOAP request message and receive SOAP response message Processing method, the embodiments of the present invention are not limited thereto.In addition, in addition to above-mentioned transmission SOAP request message and receiving SOAP Outside the processing method of response message, those skilled in the art can also use other transmission SOAP request message according to actual needs With the processing method for receiving SOAP response message, the embodiment of the present invention is also without restriction to this.
Step 105, the network flow on current local area network backstage is calculated according to the SOAP response message.
In specific implementation, SOAP response message has characterized the total network flow of current local area network, access device by pair SOAP response message carries out parsing extraction, calculates respective value, obtains the calculated result of algorithm.
In one preferred embodiment of the invention, the SOAP response message includes the first reception total bytes and second Total bytes are received, the step 105 can specifically include following sub-step:
Sub-step S401 calculates the described second difference for receiving total bytes and the first reception total bytes, by institute State network flow of the difference as current local area network backstage.
For the network flow on current local area network backstage, total bytes and described first can be received using second and received always Byte number carries out asking poor, gained difference be in current local area network all electronic equipments flow through produced by the WAN mouth of gateway Background traffic.
Certainly, the calculation method of the network flow on above-mentioned current local area network backstage is intended only as example, is implementing the present invention When embodiment, the calculation method of the network flow on other current local area network backstages can be set according to the actual situation, the present invention is real It is without restriction to this to apply example.In addition, other than the calculation method of the network flow on above-mentioned current local area network backstage, this field skill Art personnel can also use the calculation method of the network flow on other current local area network backstages according to actual needs, and the present invention is implemented Example is also without restriction to this.
The present invention, which passes through, sends simple object access protocol request message to the gateway, and, according to institute The network flow that gateway calculates current local area network backstage for the SOAP response message that the SOAP request message returns is stated, Precise measurement local area network background traffic, to guarantee that broadband is tested the speed the accuracy of result.
Furthermore, it is possible to the equipment of the gateway is described URL, and with equipment the corresponding service describing of URL is described XML file is stored in access device by the file system interface persistence of operating system, remains to carry out repeating in the future making With.
The embodiment of the present invention is applied in broadband is tested the speed, can accurately learn current local area network background traffic numerical value, is carried out Result that broadband was tested the speed test the speed indicates the network bandwidth that current access device can occupy, and is in current local area network background traffic The result that can guarantee to test the speed when within the scope of pre-set bandwidths detection threshold value is consistent with actual bandwidth, if in current local area network background traffic It carries out broadband when more than pre-set bandwidths detection threshold value range to test the speed, then the result that tests the speed does not represent actual bandwidth, and actual bandwidth is also used In local area network background traffic, then can also include: after the step 105
Judge whether the network flow on the current local area network backstage is greater than pre-set bandwidths detection threshold value, if so, determining The network bandwidth that current access device can occupy and actual bandwidth are inconsistent;
If it is not, the network bandwidth for then determining that current access device can occupy is consistent with actual bandwidth.
By judging whether the network flow on the current local area network backstage is greater than pre-set bandwidths detection threshold value, can define The network bandwidth amount that background traffic uses, therefore, it is determined that the network bandwidth that can occupy of current access device whether with actual bandwidth one It causes, improves the accuracy for the result that tests the speed, if the network flow on current local area network backstage is less than or equal to pre-set bandwidths detection threshold value When, carry out testing the speed of testing the speed of broadband as a result, namely actual bandwidth, be still below the broadband rate that ISP should be provided, then can sentence Disconnected ISP needs to safeguard own network infrastructure and updated;If the network flow on current local area network backstage is less than or waits When pre-set bandwidths detection threshold value, carry out testing the speed of testing the speed of broadband as a result, namely actual bandwidth, answered more than or equal to ISP The broadband rate of offer then may determine that current network bandwidth is good, and ISP does not need to safeguard own network infrastructure And it updates;Therefore the QoS user experience for being conducive to ISP carries out data statistics, convenient for ISP to own network infrastructure O&M and It updates.
In a particular application, if can be gone out within the scope of normal home local area network by acquiring large batch of data statistics without it His electronic equipment actively carries out local area network background traffic normality threshold when upload downloading task, preferably shows in one kind of the invention In example, since the service quality of each ISP has differences, local area network background traffic normality threshold preferred scope in an idle state For 0-64KB/S, whether the network bandwidth that can clearly judge that current access device can occupy is consistent with actual bandwidth, if The network flow on current local area network backstage is more than even significantly more than the pre-set bandwidths detection threshold value, i.e. current access device can The network bandwidth of occupancy and actual bandwidth are inconsistent, and background traffic will affect this and test the speed as a result, be reported to access device, And exit the detection of current local area network background traffic;Otherwise prompt test passes through, the network bandwidth that current access device can occupy It is consistent with actual bandwidth, broadband can be carried out and tested the speed, the detection of current local area network background traffic is completed.
The present invention is compared by using the network flow and pre-set bandwidths detection threshold value on the current local area network backstage, can be with Whether consistent with actual bandwidth the network bandwidth that current access device occupies is detected, to guarantee that broadband is tested the speed the accurate of result Property.
Referring to Fig. 2, a kind of method for the detection of local area network background traffic according to an embodiment of the invention is shown The step flow chart of embodiment 2 includes access device and gateway in the local area network, can specifically include following steps:
Step 201, gateway receives the universal plug and play UPNP agreement request message that access device is sent;
Step 202, gateway returns to the corresponding UPNP agreement of the UPNP agreement request message to the access device Response message;
Step 203, gateway receives the simple object access protocol request message that access device is sent, described SOAP request message is access device after the service description information for extracting gateway in the UPNP protocol responses message, is adopted It is generated with the service description information, and, gateway is corresponding to the access device return SOAP request message SOAP response message.
In one preferred embodiment of the invention, the UPNP agreement request message is the TCP number for meeting UPNP agreement According to grouping.
In one preferred embodiment of the invention, the SOAP request message includes the first SOAP request message and second SOAP request message, the step 203 can specifically include following sub-step:
Gateway receives the first SOAP request message that access device is sent;
The first SOAP response message that the gateway is returned for the first SOAP request message, described first The first reception total bytes in SOAP response message including current time;
After prefixed time interval, gateway receives the second SOAP request message that access device is sent;
The 2nd SOAP response message that the gateway is returned for the second SOAP request message, described second Second including the time behind the interval in SOAP response message receives total bytes.
In embodiments of the present invention, by the UPNP agreement of International standardization, the difference of different gateway devices can be ignored, For the gateway of different manufacturers production, the cross-platform characteristic of detection local area network background network data is realized, improve detection The reusability of method.
For embodiment of the method, for simple description, therefore, it is stated as a series of action combinations, but this field Technical staff should be aware of, and embodiment of that present invention are not limited by the describe sequence of actions, because implementing according to the present invention Example, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know that, specification Described in embodiment belong to preferred embodiment, the actions involved are not necessarily necessary for embodiments of the present invention.
Referring to Fig. 3, a kind of access for the detection of local area network background traffic according to an embodiment of the invention is shown The structural block diagram of apparatus embodiments, can specifically include following module:
Broadcast module 301 is used for LAN broadcast's universal plug and play UPNP agreement request message;
Service description information extraction module 302, for receiving gateway for the UPNP in the access device When the UPNP protocol responses message that agreement request message returns, the gateway is extracted from the UPNP protocol responses message Service description information;
Request message generation module 303, for generating simple object access protocol using the service description information Request message;
Module 304 is sent and received, for the SOAP request message to be sent to the gateway, and, it receives The gateway is directed to the SOAP response message that the SOAP request message returns;
Background traffic computing module 305, for calculating the network on current local area network backstage according to the SOAP response message Flow.
In one preferred embodiment of the invention, the system can also include:
IP address obtains module, for obtaining the IP address of the access device in access device access to LAN.
In one preferred embodiment of the invention, the broadcast module 301 may include:
TCP data grouping generates submodule, for after the IP address for obtaining the access device, the access device to be raw It is grouped at the TCP data for meeting UPNP agreement;
Gateway ip address acquisition submodule, for obtaining the IP address and subnet mask of the gateway;
Broadcast address computational submodule, for the IP address and subnet mask account broadcast ground using the gateway Location;
TCP data multicasting submodule, for broadcasting the TCP number in the local area network using the broadcast address According to grouping.
In one preferred embodiment of the invention, the service description information extraction module 302 may include:
Response message receiving submodule receives one or more support UPNP in the local area network for the access device The equipment of agreement is directed to one or more UPNP protocol responses messages that the UPNP agreement request message returns;
The response message of gateway chooses submodule, is used for from one or more of UPNP protocol responses messages, Choose the matched UPNP protocol responses message of IP address with the gateway;
Service describing URL extracting sub-module, for extracting service describing from the matched UPNP protocol responses message URL;
Service describing XML file obtains submodule and obtains corresponding service describing for accessing the service describing URL XML file;
Service describing XML file analyzing sub-module obtains service describing letter for parsing the service describing XML file Breath;
In one preferred embodiment of the invention, the service description information includes total transmission byte number GetTotalBytesSent, and/or, total reception byte number GetTotalBytesReceived, and/or, always send packet count GetTotalPacketsSent, and/or, it is total to receive packet count GetTotalPacketsReceived.
In one preferred embodiment of the invention, the service describing XML file analyzing sub-module may include:
Resolver creates submodule, for creating DOM parser;
File loads submodule, for loading the service describing XML file into the DOM parser;
SAXReader Object Creation submodule, for creating SAXReader object in the DOM parser;
Document object transform subblock, for calling the SAXReader.read of the SAXReader object (File) the service describing XML file is Document object by function;
Root node acquisition submodule, for calling the Document.getRootElement () of the Document object Function obtains the root node of the service describing XML file;
ActionList node acquisition submodule, for obtaining in the service describing XML according to the root node ActionList node;
Action information extraction submodule, for extracting the current gateway equipment institute for including under the actionList node The action information of support, as service description information.
In one preferred embodiment of the invention, the SOAP request message includes the first SOAP request message and second SOAP request message, the SOAP response message include the first SOAP response message and the 2nd SOAP response message, the transmission May include: with receiving module 304
First SOAP request message sending submodule sends the first SOAP request message to described for the access device Gateway;
First SOAP response message receiving submodule disappears for receiving the gateway for first SOAP request The first SOAP response message returned is ceased, the first SOAP response message includes the first reception total bytes of current time;
Second SOAP request message sending submodule, for after prefixed time interval, the access device to send second SOAP request message is to the gateway;
2nd SOAP response message receiving submodule disappears for receiving the gateway for second SOAP request The 2nd SOAP response message returned is ceased, the second reception including the time behind the interval is total in the 2nd SOAP response message Byte number.
In one preferred embodiment of the invention, the SOAP response message includes the first reception total bytes and second Total bytes are received, the background traffic computing module 305 may include:
Network flow computational submodule receives total bytes and the first reception total bytes for calculating described second Difference, take the difference as the network flow on current local area network backstage.
In one preferred embodiment of the invention, the system can also include:
First decision sub-module is greater than pre-set bandwidths detection threshold value for the network flow on the current local area network backstage When, then determine that network bandwidth that current access device can occupy and actual bandwidth are inconsistent;
Second decision sub-module is examined for the network flow on the current local area network backstage less than or equal to pre-set bandwidths When surveying threshold value, then the network bandwidth for determining that current access device can occupy is consistent with actual bandwidth.
For system embodiment shown in Fig. 3, since it is substantially similar to embodiment of the method shown in FIG. 1, so It is described relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
Referring to Fig. 4, a kind of gateway for the detection of local area network background traffic according to an embodiment of the invention is shown The structural block diagram of apparatus embodiments, can specifically include following module:
Request message receiving module 401, for receiving the universal plug and play UPNP agreement request report of access device transmission Text;
Response message return module 402, it is corresponding for returning to the UPNP agreement request message to the access device UPNP protocol responses message;
It receives with return module 403, the simple object access protocol request message sent for receiving access device, The SOAP request message is the service description information that access device extracts gateway from the UPNP protocol responses message Afterwards, it is generated using the service description information, and, it is corresponding for returning to the SOAP request message to the access device SOAP response message.
In one preferred embodiment of the invention, the UPNP agreement request message is the TCP number for meeting UPNP agreement According to grouping.
In one preferred embodiment of the invention, the SOAP request message includes the first SOAP request message and second SOAP request message, the reception can specifically include following submodule with return module 403:
First SOAP request message sink submodule, for receiving the first SOAP request message of access device transmission;
First SOAP response message returns to submodule, is directed to first SOAP request for returning to the access device The corresponding first SOAP response message of message includes the first of current time receiving total byte in the first SOAP response message Number;
Second SOAP request message sink submodule, for after prefixed time interval, gateway to receive access device The the second SOAP request message sent;
2nd SOAP response message returns to submodule, is directed to second SOAP request for returning to the access device The corresponding 2nd SOAP response message of message includes second of the time behind the interval receiving in the 2nd SOAP response message Total bytes.
For system embodiment shown in Fig. 4, since it is substantially similar to embodiment of the method shown in Fig. 2, so It is described relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein. Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects, Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed Meaning one of can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice Microprocessor or digital signal processor (DSP) realize the inspection according to an embodiment of the present invention for local area network background traffic The some or all functions of some or all components in survey method, access device and gateway.The present invention may be used also To be embodied as some or all device or device programs for executing method as described herein (for example, calculating Machine program and computer program product).It is such to realize that program of the invention can store on a computer-readable medium, or It may be in the form of one or more signals.Such signal can be downloaded from an internet website to obtain, or carry It provides, or is provided in any other form on body signal.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame Claim.

Claims (10)

1. it is a kind of for local area network background traffic detection method, which is characterized in that in the local area network include access device and Gateway, which comprises
Access device is to LAN broadcast's universal plug and play UPNP agreement request message;
The UPNP protocol responses report that the UPNP agreement request message returns is directed to when the access device receives gateway Wen Shi extracts the service description information of the gateway from the UPNP protocol responses message;
Simple object access protocol request message is generated using the service description information;
The SOAP request message is sent to the gateway, and, it receives the gateway and is asked for the SOAP The SOAP response message for asking message to return;
The network flow on current local area network backstage is calculated according to the SOAP response message;
Wherein, the SOAP request message includes the first SOAP request message and the second SOAP request message, the SOAP response Message includes the first SOAP response message and the 2nd SOAP response message, described that the SOAP request message is sent to the net Equipment is closed, and, receiving the step of gateway is directed to the SOAP response message that the SOAP request message returns includes:
The access device sends the first SOAP request message to the gateway;
Receive the gateway be directed to the first SOAP request message return the first SOAP response message, described first The first reception total bytes in SOAP response message including current time;
After prefixed time interval, the access device sends the second SOAP request message to the gateway;
Receive the gateway be directed to the second SOAP request message return the 2nd SOAP response message, described second Second including the time behind the interval in SOAP response message receives total bytes;
It is described according to the SOAP response message calculate current local area network backstage network flow the step of include:
The described second difference for receiving total bytes and the first reception total bytes is calculated, current office is taked the difference as The network flow on domain net backstage.
2. the method as described in claim 1, which is characterized in that the access device is inserted i.e. to the LAN broadcast is general Before the step of UPNP agreement request message further include:
When access device access to LAN, the IP address of the access device is obtained.
3. method according to claim 2, which is characterized in that the UPNP agreement request message is to meet UPNP agreement TCP data grouping, the access device were wrapped to the step of LAN broadcast's universal plug and play UPNP agreement request message It includes:
After obtaining the IP address of the access device, the access device generates the TCP data grouping for meeting UPNP agreement;
Obtain the IP address and subnet mask of the gateway;
Using the IP address and subnet mask account broadcast address of the gateway;
The TCP data grouping is broadcasted in the local area network using the broadcast address.
4. method as claimed in claim 3, which is characterized in that described when the access device receives gateway for institute When stating the UPNP protocol responses message of UPNP agreement request message return, the net is extracted from the UPNP protocol responses message Close equipment service description information the step of include:
The access device receives one or more equipment for supporting UPNP agreement in the local area network and is directed to the UPNP agreement One or more UPNP protocol responses messages that request message returns;
From one or more of UPNP protocol responses messages, chooses and assisted with the matched UPNP of the IP address of the gateway Discuss response message;
Service describing URL is extracted from the matched UPNP protocol responses message;
The service describing URL is accessed, corresponding service describing XML file is obtained;
The service describing XML file is parsed, service description information is obtained.
5. method as claimed in claim 4, which is characterized in that the service description information includes total transmission byte number GetTotalBytesSent, and/or, total reception byte number GetTotalBytesReceived, and/or, always send packet count GetTotalPacketsSent, and/or, it is total to receive packet count GetTotalPacketsReceived.
6. method as described in claim 4 or 5, which is characterized in that the parsing service describing XML file is taken The sub-step of business description information further comprises:
Create DOM parser;
The service describing XML file is loaded into the DOM parser;
SAXReader object is created in the DOM parser;
SAXReader.read (File) function for calling the SAXReader object converts the service describing XML file For Document object;
The Document.getRootElement () function for calling the Document object obtains the service describing XML text The root node of part;
According to the root node, the actionList node in the service describing XML is obtained;
The action information that the current gateway equipment for including under the actionList node is supported is extracted, as service describing Information.
7. the method as described in claim 1, which is characterized in that calculate current local according to the SOAP response message described After the step of netting the network flow on backstage, the method further include:
Judge whether the network flow on the current local area network backstage is greater than pre-set bandwidths detection threshold value, if so, determining current The network bandwidth that access device can occupy and actual bandwidth are inconsistent;
If it is not, the network bandwidth for then determining that current access device can occupy is consistent with actual bandwidth.
8. it is a kind of for local area network background traffic detection method, which is characterized in that in the local area network include access device and Gateway, which comprises
Gateway receives the universal plug and play UPNP agreement request message that access device is sent;
Gateway returns to the corresponding UPNP protocol responses message of the UPNP agreement request message to the access device;
Gateway receives the simple object access protocol request message that access device is sent, and the SOAP request message is Access device is after the service description information for extracting gateway in the UPNP protocol responses message, using the service describing Information generates, and, gateway returns to the corresponding SOAP response message of the SOAP request message to the access device, with The access device is set to calculate the network flow on current local area network backstage according to the SOAP response message;
Wherein, the SOAP request message includes the first SOAP request message and the second SOAP request message, the SOAP response Message includes the first SOAP response message and the 2nd SOAP response message, and the gateway receives the simple of access device transmission Object Accessing Protocol SOAP request message, the SOAP request message are that access device is mentioned from the UPNP protocol responses message After taking the service description information of gateway, generated using the service description information, and, gateway is set to the access Standby the step of returning to the SOAP request message corresponding SOAP response message includes:
The gateway receives the first SOAP request message that the access device is sent;
The first SOAP response message returned for the first SOAP request message is sent to the access device;Described first The first reception total bytes in SOAP response message including current time;
After prefixed time interval, the gateway receives the second SOAP request message that the access device is sent;
The 2nd SOAP response message returned to access device transmission for the second SOAP request message, described second Second including the time behind the interval in SOAP response message receives total bytes;
Wherein, the access device calculates the network flow on current local area network backstage according to the SOAP response message, comprising:
The described second difference for receiving total bytes and the first reception total bytes is calculated, current office is taked the difference as The network flow on domain net backstage.
9. a kind of access device for the detection of local area network background traffic characterized by comprising
Broadcast module is used for LAN broadcast's universal plug and play UPNP agreement request message;
Service description information extraction module, for receiving gateway for the UPNP agreement request in the access device When the UPNP protocol responses message that message returns, the service that the gateway is extracted from the UPNP protocol responses message is retouched State information;
Request message generation module disappears for generating simple object access protocol request using the service description information Breath;
Module is sent and received, for the SOAP request message to be sent to the gateway, and, receive the gateway Equipment is directed to the SOAP response message that the SOAP request message returns;
Background traffic computing module, for calculating the network flow on current local area network backstage according to the SOAP response message;
Wherein, the SOAP request message includes the first SOAP request message and the second SOAP request message, the SOAP response Message includes the first SOAP response message and the 2nd SOAP response message, described that the SOAP request message is sent to the net Equipment is closed, and, receiving the step of gateway is directed to the SOAP response message that the SOAP request message returns includes:
The access device sends the first SOAP request message to the gateway;
Receive the gateway be directed to the first SOAP request message return the first SOAP response message, described first The first reception total bytes in SOAP response message including current time;
After prefixed time interval, the access device sends the second SOAP request message to the gateway;
Receive the gateway be directed to the second SOAP request message return the 2nd SOAP response message, described second Second including the time behind the interval in SOAP response message receives total bytes;
It is described according to the SOAP response message calculate current local area network backstage network flow the step of include:
The described second difference for receiving total bytes and the first reception total bytes is calculated, current office is taked the difference as The network flow on domain net backstage.
10. a kind of gateway for the detection of local area network background traffic characterized by comprising
Request message receiving module, for receiving the universal plug and play UPNP agreement request message of access device transmission;
Response message return module, for returning to the corresponding UPNP agreement of the UPNP agreement request message to the access device Response message;
It receives and return module, the simple object access protocol request message sent for receiving access device is described SOAP request message is access device after the service description information for extracting gateway in the UPNP protocol responses message, is adopted It is generated with the service description information, and, for returning to the corresponding SOAP of the SOAP request message to the access device Response message, so that the access device calculates the network flow on current local area network backstage according to the SOAP response message;
Wherein, the SOAP request message includes the first SOAP request message and the second SOAP request message, the SOAP response Message includes the first SOAP response message and the 2nd SOAP response message, and the gateway receives the simple of access device transmission Object Accessing Protocol SOAP request message, the SOAP request message are that access device is mentioned from the UPNP protocol responses message After taking the service description information of gateway, generated using the service description information, and, gateway is set to the access Standby the step of returning to the SOAP request message corresponding SOAP response message includes:
The gateway receives the first SOAP request message that the access device is sent;
The first SOAP response message returned for the first SOAP request message is sent to the access device;Described first The first reception total bytes in SOAP response message including current time;
After prefixed time interval, the gateway receives the second SOAP request message that the access device is sent;
The 2nd SOAP response message returned to access device transmission for the second SOAP request message, described second Second including the time behind the interval in SOAP response message receives total bytes;
Wherein, the access device calculates the network flow on current local area network backstage according to the SOAP response message, comprising:
The described second difference for receiving total bytes and the first reception total bytes is calculated, current office is taked the difference as The network flow on domain net backstage.
CN201410063081.XA 2014-02-24 2014-02-24 Method, access device and gateway for the detection of local area network background traffic Expired - Fee Related CN104869026B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410063081.XA CN104869026B (en) 2014-02-24 2014-02-24 Method, access device and gateway for the detection of local area network background traffic

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410063081.XA CN104869026B (en) 2014-02-24 2014-02-24 Method, access device and gateway for the detection of local area network background traffic

Publications (2)

Publication Number Publication Date
CN104869026A CN104869026A (en) 2015-08-26
CN104869026B true CN104869026B (en) 2019-08-23

Family

ID=53914567

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410063081.XA Expired - Fee Related CN104869026B (en) 2014-02-24 2014-02-24 Method, access device and gateway for the detection of local area network background traffic

Country Status (1)

Country Link
CN (1) CN104869026B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108712513B (en) * 2018-03-27 2021-09-17 Oppo广东移动通信有限公司 Network address setting method and device, terminal equipment and storage medium
CN115277477B (en) * 2022-07-24 2024-03-01 杭州迪普科技股份有限公司 Flow detection method and device based on simple object access protocol

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136839A (en) * 2006-08-31 2008-03-05 中兴通讯股份有限公司 Method and equipment for discovering and controlling terminal-to-terminal equity network user flux
CN102404237A (en) * 2011-12-31 2012-04-04 网宿科技股份有限公司 Method and system for adjusting physical bandwidth based on traffic
CN102970378A (en) * 2012-12-13 2013-03-13 中国电子科技集团公司第十五研究所 Binary data optimized transmission system
CN103546343A (en) * 2013-10-18 2014-01-29 中国南方电网有限责任公司 Network flow display method and system for network flow analyzing systems

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7881251B2 (en) * 2006-08-18 2011-02-01 General Motors Llc Lightweight protocol for use in a TCP/IP communications network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136839A (en) * 2006-08-31 2008-03-05 中兴通讯股份有限公司 Method and equipment for discovering and controlling terminal-to-terminal equity network user flux
CN102404237A (en) * 2011-12-31 2012-04-04 网宿科技股份有限公司 Method and system for adjusting physical bandwidth based on traffic
CN102970378A (en) * 2012-12-13 2013-03-13 中国电子科技集团公司第十五研究所 Binary data optimized transmission system
CN103546343A (en) * 2013-10-18 2014-01-29 中国南方电网有限责任公司 Network flow display method and system for network flow analyzing systems

Also Published As

Publication number Publication date
CN104869026A (en) 2015-08-26

Similar Documents

Publication Publication Date Title
CN105099811B (en) Interface testing method and device
US7788383B2 (en) Communicating a selection of a potential configuration
CN103605689B (en) It is a kind of to obtain the method and device for accessing the residence time
CN103716398B (en) The monitoring method and monitoring system of CDN server
CN109375888A (en) A kind of throwing screen method and device
CN108809890B (en) Vulnerability detection method, test server and client
US10958616B2 (en) Methods, systems, and computer readable media for network test configuration using virtual local area network (VLAN) scanning
CN103167044A (en) Intelligent analysis method of domain name system (DNS) and poking measurement device and system
CN106412975B (en) A kind of test method and device of content charging loophole
US20150358225A1 (en) Method and System For Testing a Broadband Internet Bandwidth
CN106533803B (en) CPE configuration method and device based on TR069 agreement
CN103677956B (en) A kind of method and apparatus of the application operation of simulation mobile device on the computing device
CN104869026B (en) Method, access device and gateway for the detection of local area network background traffic
CN111106983A (en) Method and device for detecting network connectivity
CN107360036B (en) Network fault positioning method, terminal and server
CN105991679B (en) A kind of implementation method and device of network sharing
US9654334B2 (en) System and method for fast compatibility verification of REST API based on REST Chart
CN109922484B (en) Test method and test device
US20160292245A1 (en) Method and Device for Implementing Matching Between Acquisition System and Analysis System
EP2630750B1 (en) Quality of service monitoring device and method of monitoring quality of service
WO2018164618A1 (en) Prediction of a performance indicator
CN109495319B (en) Method, device and equipment for determining fault information of CDN node
US10666604B2 (en) Application access method and application access system via a split domain name system
CN105721231B (en) A kind of quality of service perception detection method and device
CN106603348B (en) A kind of method and system that simulation DHCP Offer floods

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190823

CF01 Termination of patent right due to non-payment of annual fee