A kind of test method of flow alerting delay, apparatus and system
Technical field
The present invention relates to telecommunication service testing field, due to be related to the test method of flow alerting delay a kind of, device and
System.
Background technique
As (the 4th Generation mobile communication, forth generation are mobile logical by mobile terminal and 4G
Letter technology) high speed network it is universal, the ability reminded operator's real time billing, real-time traffic proposes requirements at the higher level.On mobile phone
The delay that net residual flow is reminded, it would be possible to lead to the set meal external flux expense of great number, cause customer complaint even dispute.In order to
User is helped to have a clear understanding of the flow of reasonable employment, user's set meal surplus is insufficient, surplus is used up, important beyond set meal flow etc.
Time point, operator can send reminding short message to user.But due to " real-time traffic calculates-triggering flow to remind-issue remind it is short
The process of letter-customer mobile terminal " is longer, is roaming if encountering user, process is more complicated.It is easy to cause prompting in this way
When short message reaches customer mobile terminal, user's actual flow usage amount is more than that the flow received in reminding short message uses already
Amount.Therefore in order to preferably promote user experience, operator needs to mention using flow alerting delay test method to obtain flow
Awake time delay, wherein the flow alerting delay is the customer flow practical time difference for reminding moment and customer flow that should remind the moment
Value.
The business support department that can be operator for the test method of flow alerting delay in the prior art passes through day
The association analysis of will and ticket, statistics outflow remind the time-consuming of each link, and the time-consuming that the time-consuming of each link is determined is total
With as flow alerting delay, wherein the time-consuming of each link is including prompting trigger delay, (user reaches prompting threshold using flow
Be worth the time-consuming of charging alarm triggered), short message package delay (charge system generate alarm is installed to account management system short message group
At time-consuming), short message sends delay (account management system short message is completed the consumption that short message is sent to short message sms center
When).
And in the test process of actual flow alerting delay, the business support system of operator can not cover alerting delay
All links, the time delay counted, which is only user, to be reached using flow threshold value to reminding short message is reminded to be sent to sms center
Time-consuming, reminding short message by sms center be sent to customer mobile terminal time-consuming do not count on, so there are when flow prompting
The lower situation of the test result accuracy prolonged.
Summary of the invention
The present invention provides a kind of test method of flow alerting delay, apparatus and system, deposits in the prior art to solve
In the lower problem of the test result accuracy of flow alerting delay.
To solve the above-mentioned problems, the present invention provides a kind of tests of flow alerting delay, are applied to mobile terminal, should
Method includes:
According to carried in the test script received test instruction, consume the first present flow rate, and update consumption after
The value of first present flow rate, wherein the test script is sent by server;
If detecting flow threshold of the value no more than setting of first present flow rate, it is corresponding to record current time
First time;
The first reminding short message is received, and records the second time for receiving first reminding short message, wherein described first
Reminding short message is flow threshold of the value no more than setting for the first present flow rate that short message server detects the mobile terminal
When send;
According to the first time and second time, flow alerting delay is determined.
Further, carried in the test script that the basis receives test instruction, consumption the first present flow rate it
Before, the method also includes:
It is operated according to the long-range acquisition for receiving the server, to short message server transmitted traffic inquiry request;
According to the information that the short message server received returns, the first residual flow of the mobile terminal is determined;
According to the value of first residual flow and preset flooded traffic and determining first present flow rate, first is judged
Whether the value of present flow rate is greater than the flow threshold of setting;
If so, carrying out subsequent step.
Further, if the value of first present flow rate is no more than the flow threshold set, the basis is received
Test script in carry test instruction, consume the first present flow rate before, the method also includes:
If the value of first residual flow is not 0, first residual flow is consumed;
Detect that send when the value of first residual flow is 0 second reminds if receiving short message server and being directed to
Short message sends subscription request to server, and the teleordering according to the server received for the subscription request operates, to
Short message server, which is sent, orders the flow order short message for presetting first-class magnitude;
It receives short message server and orders the order successful information that short message returns for the flow;
To short message server transmitted traffic inquiry request, judge whether receive short message service in the time span of setting
Device is directed to the information that the flow inquiry request returns;
If so, the second residual flow of the mobile terminal is determined, according to described second according to the information of the return
Residual flow and preset flooded traffic and determining second present flow rate, using second present flow rate as the first current stream
Amount carries out subsequent step.
Further, if the value of first present flow rate is no more than the flow threshold set, the basis is received
Test script in carry test instruction, consume the first present flow rate before, the method also includes:
If the value of first residual flow is 0, subscription request is sent to server, according to the server needle received
Teleordering operation to the subscription request, the flow for presetting first-class magnitude to short message server transmission order are ordered short
Letter;
It receives short message server and orders the order successful information that short message returns for the flow;
To short message server transmitted traffic inquiry request, judge whether receive short message service in the time span of setting
Device is directed to the information that the flow inquiry request returns;
If so, the third residual flow of the mobile terminal is determined, according to the third according to the information of the return
Residual flow and preset flooded traffic and determining third present flow rate, using the third present flow rate as the first current stream
Amount carries out subsequent step.
Further, after the determining flow alerting delay, the method also includes:
The test result for carrying the flow alerting delay is sent to server.
The present invention provides a kind of test devices of flow alerting delay, are applied to mobile terminal, which includes:
Update module is consumed, for according to the test instruction carried in the test script received, the current stream of consumption first
Amount, and the value of the first present flow rate after consumption is updated, wherein the test script is sent by server;
Logging modle is detected, if for detecting flow threshold of the value no more than setting of first present flow rate,
Then record corresponding first time at current time;
Logging modle is received, for receiving the first reminding short message, and records and receives the second of first reminding short message
Time, wherein first reminding short message is that short message server detects that the value of the first present flow rate of the mobile terminal is little
It is sent when the flow threshold of setting;
Time delay determining module, for determining flow alerting delay according to the first time and second time.
Further, described device further include:
Inquiry judging module, for being sent to short message server according to the long-range acquisition operation for receiving the server
Flow inquiry request;According to the information that the short message server received returns, the first residual flow of the mobile terminal is determined;
According to the value of first residual flow and preset flooded traffic and determining first present flow rate, judge that described first is current
Whether the value of flow is greater than the flow threshold of setting;If so, triggering consumption update module.
Further, described device further include:
Module is ordered in consumption, for judging flow threshold of the first present flow rate value no more than setting, if described
The value of first residual flow is not 0, consumes first residual flow;If receiving short message server for detecting described the
The second reminding short message that the value of one residual flow is sent when being 0 sends subscription request to server, according to the server received
For the teleordering operation of the subscription request, the flow for presetting first-class magnitude to short message server transmission order is ordered short
Letter;It receives short message server and orders the order successful information that short message returns for the flow;To short message server transmitted traffic
Inquiry request judges whether receive what short message server was returned for the flow inquiry request in the time span of setting
Information;If so, the second residual flow of the mobile terminal is determined according to the information of the return, it is surplus according to described second
Residual current amount and preset flooded traffic and determining second present flow rate, using second present flow rate as the first current stream
Amount, triggering consumption update module.
Further, described device further include:
Judgment module is ordered, for judging flow threshold of the present flow rate value no more than setting, if described first
The value of residual flow is 0, subscription request is sent to server, according to the server received for the long-range of the subscription request
SUBSCRIBE Operation sends to short message server and orders the flow order short message for presetting first-class magnitude;Short message server is received to be directed to
The flow orders the order successful information that short message returns;To short message server transmitted traffic inquiry request, judge in setting
Short message server whether is received in time span is directed to the information that the flow inquiry request returns;If so, according to described
The information of return determines the third residual flow of the mobile terminal, according to the third residual flow and preset overflow stream
Amount and determining third present flow rate, using the third present flow rate as the first present flow rate, triggering consumption update module.
Further, described device further include:
As a result sending module, for the test result for carrying the flow alerting delay to be sent to server.
The present invention provides a kind of test macro of flow alerting delay, the test macro includes:
Server, for sending the test script for carrying test instruction to mobile terminal;
Mobile terminal, for consuming the first present flow rate according to the test instruction carried in the test script received, and
The value of the first present flow rate after updating consumption;If detecting flow threshold of the value no more than setting of first present flow rate
Value, then record corresponding first time at current time;The first reminding short message is received, and records and receives first reminding short message
The second time;According to the first time and second time, flow alerting delay is determined;
Short message server, if the value of the first present flow rate for detecting the mobile terminal is no more than the stream of setting
Threshold value is measured, sends the first reminding short message to the mobile terminal.
Further, the server is also used to using general packet radio service GPRS wireless dispatching technology, to described
Mobile terminal carries out long-range obtain and operates;
The mobile terminal is also used to be sent out according to the long-range acquisition operation for receiving the server to short message server
Send flow inquiry request;According to the information that the short message server received returns, the first residual stream of the mobile terminal is determined
Amount;According to the value of first residual flow and preset flooded traffic and determining first present flow rate, described first is judged
Whether the value of present flow rate is greater than the flow threshold of setting, if so, being referred to according to the test carried in the test script received
It enables, consumes the first present flow rate;
The short message server is also used to receive the flow inquiry request that the mobile terminal is sent, for the flow
Inquiry request return information.
Further, the mobile terminal, if being also used to flow of the value no more than setting of first present flow rate
Threshold value, and the value of first residual flow is not 0, consumes first residual flow;If receiving the second reminding short message,
Subscription request is sent to server, the teleordering according to the server received for the subscription request operates, to short message
Server, which is sent, orders the flow order short message for presetting first-class magnitude;Receive the order successful information that short message server returns;
To short message server transmitted traffic inquiry request, judge whether to receive short message server in the time span of setting for institute
State the information of flow inquiry request return;If so, determining that the second of the mobile terminal is remaining according to the information of the return
Flow, it is current by described second according to second residual flow and preset flooded traffic and determining second present flow rate
Flow is instructed as the first present flow rate according to the test carried in the test script received, consumes the first present flow rate;
The server is also used to receive the subscription request that the mobile terminal is sent, using GPRS wireless dispatching technology,
Teleordering operation is carried out to the mobile terminal;
The short message server, if hair when the value for being also used to detect the first residual flow of the mobile terminal is 0
The second reminding short message sent;The flow order short message that the order that the mobile terminal is sent presets first-class magnitude is received, for institute
The flow that mobile terminal orders the first-class magnitude is stated, and is returned to the mobile terminal and orders successful information;Described in reception
The flow inquiry request that mobile terminal is sent returns to the information of the second residual flow to the mobile terminal.
Further, the mobile terminal, if being also used to flow of the value no more than setting of first present flow rate
Threshold value, and the value of first residual flow is 0, sends subscription request to server, is directed to institute according to the server received
The teleordering operation for stating subscription request sends to short message server and orders the flow order short message for presetting first-class magnitude;It connects
It receives short message server and orders the order successful information that short message returns for the flow;It is asked to the inquiry of short message server transmitted traffic
It asks, judges that whether receiving short message server in the time span of setting is directed to the information that the flow inquiry request returns;
If so, the third residual flow of the mobile terminal is determined according to the information of the return, according to the third residual flow
With preset flooded traffic and determine third present flow rate, using the third present flow rate as the first present flow rate, according to
The test instruction carried in the test script received, consumes the first present flow rate.
Further, the mobile terminal is also used to for the test result for carrying the flow alerting delay being sent to
Server;
The server is also used to receive the test knot for carrying the flow alerting delay that the mobile terminal is sent
Fruit.
The present invention provides a kind of test methods of flow alerting delay, apparatus and system, this method comprises: mobile terminal
According to the test instruction carried in the test script received, the first present flow rate is consumed, and is updated first current after consumption
The value of flow, wherein the test script is sent by server;If detecting that the value of first present flow rate is little
In the flow threshold of setting, then corresponding first time at current time is recorded;It receives the first reminding short message, and records and receive the
Second time of one reminding short message, wherein first reminding short message is that short message server detects the first of the mobile terminal
It is sent when the value of present flow rate is no more than the flow threshold set;According to the first time and second time, determine
Flow alerting delay.Since mobile terminal detects flow of the value of the first present flow rate no more than setting in the embodiment of the present invention
When threshold value, corresponding first time at record current time, and receive short message server and detect the value of the first present flow rate not
Greater than the reminding short message that the flow threshold of setting is sent, corresponding second time is recorded, and the first time is user's stream
Amount is theoretical to remind the moment, and second time is the customer flow practical prompting moment, by determining at the first time with the second time
Flow alerting delay, covers all links of flow alerting delay, therefore the test result for improving flow alerting delay is quasi-
Exactness.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is a kind of schematic diagram of the test process for flow alerting delay that the embodiment of the present invention 1 provides;
Fig. 2A is the schematic diagram of the test process for another flow alerting delay that the embodiment of the present invention 4 provides;
Fig. 2 B is a kind of structural schematic diagram of the test macro for flow alerting delay that the embodiment of the present invention 5 provides;
Fig. 3 is a kind of test process schematic diagram for flow alerting delay that the embodiment of the present invention 6 provides;
Fig. 4 is a kind of test device schematic diagram of flow alerting delay provided in an embodiment of the present invention.
Specific embodiment
In order to improve flow alerting delay test result accuracy, the embodiment of the invention provides a kind of promptings of flow
The test method of time delay, apparatus and system.
To make the objectives, technical solutions, and advantages of the present invention clearer, make below in conjunction with the attached drawing present invention into one
Step ground detailed description, it is clear that described embodiment is only a part of the embodiments of the present invention, rather than whole implementation
Example.Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative efforts
Every other embodiment, shall fall within the protection scope of the present invention.
Embodiment 1:
Fig. 1 is a kind of schematic diagram of the test process of flow alerting delay provided in an embodiment of the present invention, which includes
Following steps:
S101: instructing according to the test carried in the test script received, consumes the first present flow rate, and update consumption
The value of the first present flow rate afterwards, wherein the test script is sent by server.
The test method of flow alerting delay provided in an embodiment of the present invention is applied to mobile terminal, and the mobile terminal is main
Refer to mobile phone, but be not excluded for other equipment, for example tablet computer, personal digital assistant (PDA) etc. are capable of the equipment of consumed flow,
For core of the invention design, mobile phone can give full play to advantage of the invention, but the movement of mobile phone and non-present invention
Unique form of expression of terminal.
The mobile terminal can be used to receive the test script of server transmission, and carry according in the test script
Test instruction, consume the first present flow rate, and update consumption after the first present flow rate value.
The mobile terminal consume the first present flow rate can by downloading file, play video or audio on network etc.
Mode consumes, which kind of mode consumed flow the mobile terminal takes can be instructed according to the test carried in the test script
It carries out.The prior art is specifically belonged to by the process of different mode consumed flows, in embodiments of the present invention to the process
Without repeating.
The test script can be the script generating algorithm that server is saved according to tester, pre-generates and saves
In local, it is also possible to server after the task execution inquiry request for receiving mobile terminal transmission, for the task
Execute what inquiry request generated, wherein carrying the identification information of the mobile terminal in the task execution inquiry request.
The identification information of the mobile terminal can be the device number of the mobile terminal, or be mounted on the mobile terminal
SIM (Subscriber Identification Module, client identification module) blocks one in corresponding phone number etc.
Or it is multiple, the corresponding GPS (Global of the mobile terminal furthermore can also be carried in the identification information of the mobile terminal
Positioning System, global positioning system) coordinate information.Because be in the embodiment of the present invention test be flow remind
Time delay, so preferably, the identification information of the mobile terminal can be the corresponding hand of SIM card being mounted on the mobile terminal
Machine number, or the group of the corresponding phone number of SIM card GPS coordinate corresponding with the mobile terminal being mounted on the mobile terminal
Close information.
If the identification information of the mobile terminal be the corresponding phone number of SIM card that is mounted on the mobile terminal with
The combined information of the corresponding GPS coordinate of the mobile terminal, server can judge institute after receiving task execution inquiry request
The ownership place whether GPS coordinate is located at the phone number is stated, carries test instruction if it is, sending to mobile terminal
Test script.
Server can save identical test script for all mobile terminals, can also be directed to different mobile ends
End saves different test script, such as different mobile terminals, and server is returned according to the phone number of mobile terminal
Possession generates using the phone number on same home ground as one group and saves corresponding test script.
In order to avoid same test assignment repeats to distribute repeatedly, server marks the task status of the test script of generation
To be unscheduled, after test script is sent to mobile terminal by server, the task shape directly by corresponding test script can be
State is also possible to start timer labeled as scheduled, judge the mobile end whether is received in the time span of setting
The reception confirmation message returned is held, if so, by the task status of corresponding test script labeled as scheduled.
S102: if detecting that the magnitude that described first currently flows is not more than the flow threshold set, when recording current
Carve corresponding first time.
The method that mobile terminal detects the value of the first present flow rate can be using the third being mounted on the mobile terminal
What square monitoring software was realized, it is also possible to directly execute the flow rate testing methods reality that the corresponding operating system of the mobile terminal provides
It is existing, such as when being Android system for the corresponding operating system of the mobile terminal, which executes Android by circulation
The network flow method that system provides realizes the detection of the value to the first current present flow rate.
When the mobile terminal detects the value of first present flow rate no more than the flow threshold set, it can pass through
Call clock application to obtain corresponding first time at current time, and record and save the first time, the mobile terminal this
The first time of Shi Jilu is that customer flow theory is reminded the moment, preserves the flow threshold in the mobile terminal.
In order to further increase the test result accuracy of flow alerting delay, the mobile terminal detects described first
When present flow rate value is no more than the flow threshold set, the operation for consuming the first present flow rate can be stopped.
The flow threshold can be some specific numerical value, such as 0MB (Mega Byte, Mbytes), 80MB or 100MB
Deng, be also possible to the other values for characterizing flow value, such as total flow 50%, the 80% of total flow or total flow 0.2,
Wherein the value of total flow is stored in the mobile terminal.During actual test flow alerting delay, the flow threshold
Value can be one, can be to be multiple, and the test process of a flow alerting delay is carried out for a flow threshold.
S103: the first reminding short message is received, and records the second time for receiving the first reminding short message, wherein described first
Reminding short message is flow threshold of the value no more than setting for the first present flow rate that short message server detects the mobile terminal
When send.
When short message server detects the value of the first present flow rate of the mobile terminal no more than the flow threshold set,
The first reminding short message is sent to the mobile terminal, the short message server belongs to the corresponding institute of operator of the mobile terminal
Have, the flow threshold, i.e., the flow threshold and mobile terminal saved in short message server are preserved in the short message server
The flow threshold of middle preservation correspond to it is identical, every time test when which flow threshold be directed to, both sides make an appointment.
During actual test flow alerting delay, the flow threshold can be one, can be to be multiple, once
The test process of flow alerting delay is carried out for a flow threshold, and the short message server is reminded in a flow
The first reminding short message that the test process of time delay is sent, and for the flow threshold for this time recording first time with mobile terminal
What identical flow threshold was sent.
The process that the short message server detects the value of the first present flow rate of the mobile terminal belongs to the prior art,
The process is not repeated them here in the embodiment of the present invention.
It, can be by calling clock application when the mobile terminal receives the first reminding short message of short message server transmission
Acquisition receives corresponding second time when the first reminding short message, and records and save second time, the mobile terminal this
Second time of Shi Jilu is the customer flow practical prompting moment, that is, the user of prompting mobile terminal of operator works as
The reminding short message that preceding flow reaches flow threshold is actually reached the time of mobile terminal.
S104: according to the first time and second time, flow alerting delay is determined.
The mobile terminal calculates the first time and described second according to the first time and second time
The difference of time, using the difference as flow alerting delay.
The first time and second time are all by mobile terminal records, and the flow alerting delay is by institute
State what mobile terminal was determined according to the first time and second time, to realize the automation of flow alerting delay
Test.
Since mobile terminal detects flow threshold of the value of the first present flow rate no more than setting in the embodiment of the present invention
When, corresponding first time at record current time, and receive short message server and detect that the value of the first present flow rate is not more than
The reminding short message that the flow threshold of setting is sent records corresponding second time, and the first time is customer flow reason
By reminding the moment, second time is the customer flow practical prompting moment, by determining flow with the second time at the first time
Alerting delay, covers all links of flow alerting delay, therefore improves the test result accuracy of flow alerting delay.
Embodiment 2:
In order to further increase the test result accuracy of flow alerting delay, on the basis of the above embodiments, this hair
In bright embodiment, the test instruction carried in the test script that the basis receives, before consuming present flow rate, the method
Further include:
It is operated according to the long-range acquisition for receiving the server, to short message server transmitted traffic inquiry request;
According to the information that the short message server received returns, the first residual flow of the mobile terminal is determined;
According to first residual flow and preset flooded traffic and the first present flow rate of determination value, described in judgement
Whether the value of the first present flow rate is greater than the flow threshold of setting;
If so, carrying out subsequent step.
Since mobile terminal itself detects the method and short message server detection described the of the value of first present flow rate
The method of the value of one present flow rate is different, so when mobile terminal consumes first present flow rate, mobile terminal inspection
The value that the value and short message server detection for surveying the first present flow rate after updating consumption update the first present flow rate after consumption can
There can be a difference, and the flow threshold that the flow threshold that locally saves of mobile terminal and short message server locally save is identical,
When this may have mobile terminal and detects the value of first present flow rate no more than flow threshold, short message server is detected
The value of first present flow rate be greater than flow threshold, be mentioned so that short message server will not send first to mobile terminal
Awake short message, this is just unable to complete the test process of the flow alerting delay for the flow threshold of the setting, affects flow and mention
The accuracy of the test result for time delay of waking up.
So in order to further increase the accuracy of the test result of flow alerting delay, it is when testing, general to survey
Examination personnel can be arranged in the terminal and save flooded traffic, make mobile terminal according to the first residual flow and flooded traffic
The value for determining the first present flow rate, when the value for consuming first present flow rate to first present flow rate is not more than flow threshold
When value, short message server can be triggered to mobile terminal and send the first reminding short message.
For the test process for being able to carry out flow alerting delay, server can remotely operate the mobile terminal to complete
The operation such as residual flow inquiry and flow order, in addition, mobile terminal described in remote operation of server, can also realize a variety of fields
The test of flow alerting delay under scape, normal state and mobile terminal institute including being located at its ownership place where mobile terminal
Be located at different from its ownership place roaming state etc., in order to further improve flow alerting delay test result it is accurate
Property, the mobile terminal can also be allowed to be in multiple and different positions and tested.
When strange land travels, goes on business, it is different from its ownership place due to being located at where mobile terminal, so in overflowing
Free state, user consume mobile terminal present flow rate reach the flow threshold of setting to present flow rate value when, operator
Short message server detects that the present flow rate value of mobile terminal reaches the flow threshold set and sends the first prompting to mobile terminal
The process undergone among short message can be more complicated, such as same operator, different mobile terminals, where region and
The ownership place of its phone number is different, where region short message server corresponding port and its ownership place short message service
The corresponding port of device may be different, when carrying out flow prompting, it may be necessary to the short message server pair of the ownership place of mobile terminal
First reminding short message is forwarded to the port of the short message server in the mobile terminal affiliated region, then sent out again by the port answered
Give mobile terminal.So in order to further improve the test result accuracy of flow alerting delay, it is necessary to tester
Manually tested mobile terminal is carried to different regions or tested mobile terminal is posted into different regions.By tested shifting
Dynamic terminal posts to different regions, and mobile terminal described in remote operation of server completes the test of flow alerting delay, into one
Testing cost has been saved to step, has improved testing efficiency.
Mobile terminal described in the remote operation of server can be using GPRS (General Packet Radio
Service, general packet radio service) wireless dispatching technology completes to remotely operate.
The server to mobile terminal carry out it is long-range obtain operation and can be mobile terminal according to the directive script, to
Server, which is sent, obtains operation requests, and server is directed to the acquisition operation requests, carries out remotely obtaining operation to mobile terminal.
The long-range acquisition operation that mobile terminal receives, to short message server transmitted traffic inquiry request, wherein the stream
The identification information that mobile terminal is carried in amount inquiry request, for the short message server of different operators, mobile terminal is sent
Flow inquiry request it is different, may identical possibility for the corresponding port of short message server of the different zones of same operator
Difference, the flow inquiry request that mobile terminal is sent may be identical possible different.
Short message server is directed to the flow inquiry request that the mobile terminal received is sent, and returns and carries to the mobile terminal
There is the information of residual flow, mobile terminal receives the information that short message server returns, determines the first residual flow.It is described mobile whole
The information that end is returned according to the short message server that receives, determines that the process of the first residual flow can be, mobile terminal according to
The information that the short message server received returns obtains the first residual flow by the method for front and back Keywords matching.
The information that the mobile terminal is returned according to the short message server received, passes through the method for front and back Keywords matching
The process for obtaining the first residual flow belongs to the prior art, does not repeat them here in embodiments of the present invention to the process.
Mobile terminal according to the first residual flow and preset flooded traffic and the first present flow rate of determination value, if
Judge that the value of first present flow rate is greater than the flow threshold of setting, then consumes the first present flow rate.
The value for the flow that mobile terminal should consume are as follows: the value=residual flow value-flow threshold for the flow that should be consumed
Value+flooded traffic value, wherein flow threshold is specific numerical value, if flow threshold is the expressions sides such as percentage or decimal
Formula, the then value=residual flow value-total flow value * flow threshold+flooded traffic value for the flow that should be consumed, wherein institute
The value for stating total flow pre-saves in the terminal.For example, the value of the total flow saved in mobile terminal is 100M, stream
10% that threshold value is total flow is measured, the value of flooded traffic is 3M, and mobile terminal detects that the value of residual flow is 80M, according to upper
Calculating process is stated, the value=80-100*10%+3=73M for the flow that should be consumed.
Due to being tested for several scenes in the embodiment of the present invention, positioned at the mobile terminal of different zones, server
By the way of remote operation, long-range acquisition operation is carried out to mobile terminal to complete the test of flow alerting delay, to survey
Flow alerting delay of the mobile terminal under its corresponding ownership place and roaming state is tried, flow prompting is further improved
The test result accuracy of time delay.
Embodiment 3:
In order to further increase the test result accuracy of flow alerting delay, on the basis of the various embodiments described above, this
In inventive embodiments, if the first present flow rate value is not more than the flow threshold of setting, the test that the basis receives
The test instruction carried in script, before consuming the first present flow rate, the method also includes:
If the value of first residual flow is not 0, first residual flow is consumed;
Detect that the second prompting sent when the value of first residual flow is 0 is short if receiving short message server and being directed to
Letter sends subscription request to server, and the teleordering according to the server received for the subscription request operates, to short
Telecommunications services device, which is sent, orders the flow order short message for presetting first-class magnitude;
It receives short message server and orders the order successful information that short message returns for the flow;
To short message server transmitted traffic inquiry request, judge whether receive short message service in the time span of setting
Device is directed to the information that the flow inquiry request returns;
If so, the second residual flow of the mobile terminal is determined, according to described second according to the information of the return
Residual flow and preset flooded traffic and determining second present flow rate, using second present flow rate as the first current stream
Amount carries out subsequent step.
It is not more than the flow threshold of setting for the value of first present flow rate, and the value of the first residual flow is not 0
When, in order to ensure the test of flow alerting delay is able to carry out, mobile terminal needs to carry out flow order, is greater than present flow rate
The flow threshold of setting, further increases the test result accuracy of flow alerting delay, and mobile terminal needs first to run out of
One residual flow makes the value 0 of the first residual flow carry out SUBSCRIBE Operation again.
Mobile terminal judges that the value of first residual flow is not 0, consumes the first residual flow, and the mobile terminal disappears
Consume the first residual flow can by downloading file, play video on network or the modes such as audio consume, the mobile terminal
Take which kind of mode consumed flow that can be carried out according to the test instruction carried in the test script.Specifically by different
The process of mode consumed flow belongs to the prior art, in embodiments of the present invention to the process without repeating.
In order to further increase the test result accuracy of flow alerting delay, the mobile terminal detects described first
When the value of residual flow is 0, the operation for consuming the first residual flow can be stopped.
Mobile terminal, can be according to the directive script, every setting after the operation for stopping the first residual flow of consumption
Time interval to short message server transmitted traffic inquiry request, until according to the short message server received for flow inquiry
The information returned is requested, the value of the first residual flow determined is 0, subscription request is sent to server, wherein the order is asked
It include the identification information of the mobile terminal in asking, wherein the time interval of the setting can be 5 seconds, 1 minute or 5 minutes
Deng, in the case where test scene is roaming state, since the corresponding ownership place of the mobile terminal is different from the region where it, so
The time interval of the setting can be arranged longer.
Server receives the subscription request that mobile terminal is sent, and according to the subscription request, carries out to the mobile terminal
Teleordering operation.Mobile terminal described in the remote operation of server, which can be using GPRS wireless dispatching technology, to be completed far
Journey operation.
Mobile terminal receives teleordering operation, and the flow for presetting first-class magnitude to short message server transmission order is ordered
Purchase short message, it is described preset first-class magnitude can be preservation in the terminal, can be stored in the test script,
It can be stored in server.Wherein the flow orders the identification information that mobile terminal is carried in short message, for difference
The short message server of operator, the flow that mobile terminal is sent order that short message is different, for the different zones of same operator
The corresponding port of short message server may be identical possible different, the flow that mobile terminal is sent order short message may it is identical may not
Together.
Short message server orders short message for the flow that mobile terminal is sent, and returns to mobile terminal and orders successful information,
After mobile terminal receives the order successful information, asked according to the directive script to the inquiry of short message server transmitted traffic
It asks, starts timer, judge that whether receive short message server in the time span of setting returns for flow inquiry request
Information, if received, then it is assumed that the flow for presetting first-class magnitude of order to account, carry out subsequent step;If no
It receives, then it is assumed that task time-out, mobile terminal pressure terminate the test assignment, carry out flow for next flow threshold and mention
The test for time delay of waking up, wherein the time span set can be 5 minutes, 20 minutes or 1 hour etc., it is roaming shape in test scene
Under state, since the corresponding ownership place of the mobile terminal is different from the region where it, so can be by the time span of the setting
What is be arranged is longer.
If mobile terminal receives the information of short message server return in the time span of setting, returned according to
The information returned, determines the second residual flow of the mobile terminal, according to the second residual flow and flooded traffic and determination the
Two present flow rates carry out subsequent step using second present flow rate as the first present flow rate.
Due in the embodiment of the present invention, for first present flow rate value no more than setting flow threshold, and the
When the value of one residual flow is not 0, in order to ensure the test of flow alerting delay is able to carry out, mobile terminal needs to carry out flow
It orders, present flow rate is made to be greater than the flow threshold of setting, mobile terminal first runs out of present flow rate, makes the value 0 of present flow rate
SUBSCRIBE Operation is carried out again, further increases the test result accuracy of flow alerting delay.
Embodiment 4:
In order to further increase the test result accuracy of flow alerting delay, on the basis of the various embodiments described above, this
In inventive embodiments, if the value of first present flow rate is not more than the flow threshold of setting, the survey that the basis receives
The test instruction carried in training sheet, before consuming the first present flow rate, the method also includes:
If the value of first residual flow is 0, subscription request is sent to server, according to the server needle received
Teleordering operation to the subscription request, the flow for presetting first-class magnitude to short message server transmission order are ordered short
Letter;
It receives short message server and orders the order successful information that short message returns for the flow;
To short message server transmitted traffic inquiry request, judge whether receive short message service in the time span of setting
Device is directed to the information that the flow inquiry request returns;
If so, the third residual flow of the mobile terminal is determined, according to the third according to the information of the return
Residual flow and preset flooded traffic and determining third present flow rate, using the third present flow rate as the first current stream
Amount carries out subsequent step.
For first present flow rate value no more than setting flow threshold, and the value of the first residual flow be 0 when,
In order to ensure the test of flow alerting delay is able to carry out, mobile terminal needs to carry out flow order, keeps the first present flow rate big
In the flow threshold of setting, to further improve the test result accuracy of flow alerting delay.
Mobile terminal can send subscription request to server, wherein in the subscription request according to the directive script
Identification information including the mobile terminal.
Server receives the subscription request that mobile terminal is sent, and according to the subscription request, carries out to the mobile terminal
Teleordering operates, and mobile terminal described in the remote operation of server, which can be using GPRS wireless dispatching technology, to be completed far
Journey operation.
Mobile terminal receives teleordering operation, and the flow for presetting first-class magnitude to short message server transmission order is ordered
Purchase short message, it is described preset first-class magnitude can be preservation in the terminal, can be stored in the test script,
It can be stored in server.Wherein the flow orders the identification information that mobile terminal is carried in short message, for difference
The short message server of operator, the flow that mobile terminal is sent order that short message is different, for the different zones of same operator
The corresponding port of short message server may be identical possible different, the flow that mobile terminal is sent order short message may it is identical may not
Together.
Short message server orders short message for the flow that mobile terminal is sent, and returns to mobile terminal and orders successful information,
After mobile terminal receives the order successful information, asked according to the directive script to the inquiry of short message server transmitted traffic
It asks, starts timer, judge that whether receive short message server in the time span of setting returns for flow inquiry request
Information, if received, then it is assumed that the flow for presetting first-class magnitude of order to account, carry out subsequent step;If no
It receives, then it is assumed that task time-out, mobile terminal pressure terminate the test assignment, carry out flow for next flow threshold and mention
The test for time delay of waking up, wherein the time span set can be 5 minutes, 20 minutes or 1 hour etc., it is roaming shape in test scene
Under state, since the corresponding ownership place of the mobile terminal is different from the region where it, so can be by the time span of the setting
What is be arranged is longer.
If mobile terminal receives the information of short message server return in the time span of setting, returned according to
The information returned, determines the third residual flow of the mobile terminal, according to third residual flow and flooded traffic and determination the
Three present flow rates carry out subsequent step using the third present flow rate as the first present flow rate.
In order to which flow reminds the test result of threshold value to be analyzed, after the determining flow alerting delay, the method
Further include:
The test result for carrying the flow alerting delay is sent to server.
If there are the operations of forced termination task for mobile terminal, then to clothes in the test process of flow alerting delay
Business device sends a warning message, furthermore during actual test, it may occur however that mobile terminal due to electric power deficiency forced shutdown or
Situations such as suspension, server start timer, judge the length of testing speech in setting after test script is sent to mobile terminal
The test result of mobile terminal transmission inside whether is received, if it is not, generating warning information or existing for the mobile terminal
Local mark mission failure, wherein the length of testing speech set can be 5 minutes, 20 minutes or 1 hour etc., it is unrestrained in test scene
Under free state, since the corresponding ownership place of the mobile terminal is different from the region where it, so can be by the test of the setting
Duration is arranged longer.
Above-described embodiment is illustrated with a specific embodiment below, Fig. 2A is provided in an embodiment of the present invention another
A kind of schematic diagram of the test process of flow alerting delay, the process the following steps are included:
S201: it is operated according to the long-range acquisition for receiving the server, to short message server transmitted traffic inquiry request;
According to the information that the short message server received returns, the first residual flow of the mobile terminal is determined;According to described first
The value of residual flow and preset flooded traffic and determining first present flow rate, judges whether the value of the first present flow rate is greater than
The flow threshold of setting;If so, carrying out S208;If not, carrying out S202.
S202: whether the value for judging first residual flow is 0;If so, carrying out S204;If not, carrying out S203.
S203: consumption first residual flow, reception short message server, which is directed to, detects first residual flow
The second reminding short message that value is sent when being 0.
S204: sending subscription request to server, according to the server received remotely ordering for the subscription request
Purchase operation sends to short message server and orders the flow order short message for presetting first-class magnitude.
S205: short message server is received for the flow and orders the order successful information that short message returns.
S206: to short message server transmitted traffic inquiry request, judge whether to receive in the time span of setting short
Telecommunications services device is directed to the information that the flow inquiry request returns;If so, carrying out S207.
Certainly, it is returned if being not received by short message server in the time span of setting for the flow inquiry request
The information returned, mobile terminal can be to continue with to short message server transmitted traffic inquiry request, be also possible to forced termination this
The test process etc. of flow alerting delay.
S207: according to the information of the return, determining the residual flow of the mobile terminal, according to the residual flow with
Preset flooded traffic and determining present flow rate, using the present flow rate as the first present flow rate.
S208: instructing according to the test carried in the test script received, consumes the first present flow rate, and update consumption
The value of the first present flow rate afterwards;If detecting that the value of first present flow rate no more than the flow threshold of setting, is remembered
Record corresponding first time at current time;The first reminding short message is received, and records and receives the second of first reminding short message
Time determines flow alerting delay according to the first time and second time.
Due in the embodiment of the present invention.Flow threshold for the first present flow rate value no more than setting, and first
When the value of residual flow is not 0, in order to ensure the test of flow alerting delay is able to carry out, mobile terminal, which needs to carry out flow, to be ordered
Purchase makes the first present flow rate be greater than the flow threshold of setting, further increases the test result accuracy of flow alerting delay.
Embodiment 5:
Fig. 2 B is a kind of structural schematic diagram of the test macro of flow alerting delay provided in an embodiment of the present invention, such as Fig. 2 B
Shown, the test macro of the flow alerting delay includes: server 21, mobile terminal 22 and short message server 23;Wherein,
The server 21, for sending the test script for carrying test instruction to mobile terminal 22;
The mobile terminal 22, for according to the test instruction carried in the test script received, consumption first to be current
Flow, and update the value of the first present flow rate after consumption;If detecting the value of first present flow rate no more than setting
Flow threshold, then record corresponding first time at current time;The first reminding short message is received, and records and receives described first
Second time of reminding short message;According to the first time and second time, flow alerting delay is determined;
The short message server 23, if the value of the first present flow rate for detecting the mobile terminal 22 is not more than
The flow threshold of setting sends the first reminding short message to the mobile terminal 22.
In order to improve the test result accuracy of flow alerting delay, server, mobile terminal are deployed within the system
And short message server, the mobile terminal is primarily referred to as mobile phone, but is not excluded for other equipment, such as tablet computer, individual digital
The equipment that assistant (PDA) etc. is capable of consumed flow, for core of the invention design, mobile phone can give full play to the present invention
Advantage, but unique form of expression of the mobile terminal of mobile phone and non-present invention.The short message server belongs to described mobile whole
Hold corresponding operator all.
The server 21 is also used to using general packet radio service GPRS wireless dispatching technology, to described mobile whole
End 22 carries out long-range obtain and operates;
The mobile terminal 22 is also used to according to the long-range acquisition operation for receiving the server 21, to short message service
23 transmitted traffic inquiry request of device;According to the information that the short message server 23 received returns, the mobile terminal 22 is determined
First residual flow;According to the value of first residual flow and preset flooded traffic and determining first present flow rate, sentence
Whether the value for first present flow rate of breaking is greater than the flow threshold of setting, if so, taking according in the test script received
The test of band instructs, and consumes the first present flow rate;
The short message server 23 is also used to receive the flow inquiry request that the mobile terminal 22 is sent, for described
Flow inquiry request return information.
The mobile terminal 22 consumes first residual stream if the value for being also used to first residual flow is not 0
Amount;If receiving short message server 23 is directed to the second reminding short message for detecting and sending when the value of the residual flow is 0, to clothes
Business device 21 sends subscription request, and the teleordering according to the server 21 received for the subscription request operates, to short message
Server 23, which is sent, orders the flow order short message for presetting first-class magnitude;Short message server 23 is received to order for the flow
The order successful information that short message returns;To 23 transmitted traffic inquiry request of short message server, judge in the time span of setting
Whether receive short message server 23 and is directed to the information that the flow inquiry request returns;If so, according to the letter of the return
Breath, determines the second residual flow of the mobile terminal 22, according to second residual flow and preset flooded traffic and
It determines the second present flow rate, using second present flow rate as the first present flow rate, is taken according in the test script received
The test of band instructs, and consumes the first present flow rate;
The server 21 is also used to receive the subscription request that the mobile terminal 22 is sent, using GPRS wireless dispatching
Technology carries out teleordering operation to the mobile terminal 22;
The short message server 23, if being also used to detect that the value of the first residual flow of the mobile terminal 22 is 0
When the second reminding short message for sending;Receive orders that the mobile terminal 22 is sent preset first-class magnitude flow order it is short
Letter orders the flow of the first-class magnitude for the mobile terminal 22, and orders to the mobile terminal 22 return and successfully believe
Breath;The flow inquiry request that the mobile terminal 22 is sent is received, the letter of the second residual flow is returned to the mobile terminal 22
Breath.
The mobile terminal 22 sends to order to server 21 and ask if the value for being also used to first residual flow is 0
It asks, the teleordering according to the server 21 received for the subscription request operates, and sends and orders to short message server 23
The flow for presetting first-class magnitude orders short message;Receive short message server 23 for the flow order short message return order at
Function information;To 23 transmitted traffic inquiry request of short message server, judge short message clothes whether are received in the time span of setting
Business device 23 is directed to the information that the flow inquiry request returns;If so, being determined described mobile whole according to the information of the return
The third residual flow at end 22, according to the third residual flow and preset flooded traffic and determination third present flow rate,
It using the third present flow rate as the first present flow rate, is instructed according to the test carried in the test script received, consumption
First present flow rate.
The mobile terminal 22 is also used to the test result for carrying the flow alerting delay being sent to server
21;
The server 21 is also used to receive the survey for carrying the flow alerting delay that the mobile terminal 22 is sent
Test result.
Due to recording when mobile terminal detects flow threshold of the present flow rate value no more than setting in the embodiment of the present invention
Corresponding first time at current time, and receive short message server and detect flow threshold of the present flow rate value no more than setting
The reminding short message of transmission records corresponding second time, and the first time is that customer flow theory is reminded the moment, described
Second time was the customer flow practical prompting moment, by determining flow alerting delay with the second time at the first time, was covered
All links of flow alerting delay, therefore improve the test result accuracy of flow alerting delay.
Embodiment 6:
On the basis of the various embodiments described above, with a specific embodiment to the various embodiments described above in the embodiment of the present invention
It is illustrated, Fig. 3 is a kind of test process schematic diagram of flow alerting delay provided in an embodiment of the present invention, as shown in figure 3, should
Process the following steps are included:
S301: test assignment scheduling phase.
Tester preserves script generating algorithm in the server in advance, and the script generating algorithm specifically includes test
Task scheduling strategy, server generate the stream for being directed to different mobile terminal according to the scheduling strategy in the script generating algorithm
The test assignment of alerting delay is measured, includes that different mobile terminal executes test assignment in the test assignment of the flow alerting delay
Priority and test assignment periodically etc..Test assignment of the server in the flow alerting delay for different mobile terminal
After generation, by the task status of the test assignment of the flow alerting delay labeled as unscheduled.Further, it is surveyed to reduce
Number is tried, is economized on resources, the test assignment for the flow alerting delay that server generates can be according to the phone number of mobile terminal
Ownership place, using the phone number on same home ground as one group of generation.
Such as server, according to scheduling strategy, the test assignment for the flow alerting delay that first movement terminal generates is
10 points of morning execution on March 23rd, 2017, priority is highest, periodically for only once, and marks the task of the test assignment
State be it is unscheduled, for the second mobile terminal generate flow alerting delay test assignment be the morning on March 23rd, 2017
11 points execution, priority be it is common, periodically be only once, and mark the test assignment task status be it is unscheduled.
It can be one for the flow threshold of different mobile terminal, or it is multiple, if mobile terminal
Flow threshold be it is multiple, the server for the mobile terminal generate flow alerting delay test assignment can be one
It is a, it can be multiple.
S302: test assignment distributes the stage.
In the embodiment of the present invention, the test client software tested is installed in mobile terminal to be tested, moves
Data interaction between dynamic terminal and server can be completed by the test client software.
Mobile terminal sends task execution inquiry request to server, wherein carrying in the task execution inquiry request
The identification information of mobile terminal, the identification information of the mobile terminal are the corresponding hand of SIM card being mounted on the mobile terminal
The combined information of machine number GPS coordinate corresponding with the mobile terminal, server are sentenced after receiving task execution inquiry request
Whether the GPS coordinate that breaks is located at the ownership place of the phone number.
If so, local whether preserve for the ownership place judged according to the ownership place of the phone number for server
Test assignment to be distributed, if it is not, returning to the information that task terminates to the mobile terminal.If so, being looked into locally
Find the test assignment for the mobile terminal, by the test assignment be encapsulated as task response bag to be distributed be sent to it is described
Mobile terminal.
In order to avoid same test assignment repeats to distribute repeatedly, task response bag to be distributed is sent to movement eventually by server
It behind end, can be directly by the task status of corresponding test assignment labeled as scheduled, be also possible to start timer, judgement
The reception confirmation message that the mobile terminal returns whether is received in the time span of setting, if so, by corresponding survey
The task status of trial business is labeled as scheduled;If it is not, generating warning information or for the mobile terminal in this terrestrial reference
Know mission failure.
S303: test assignment executes the stage.
Mobile terminal receives after distributing task response bag, and test client software is answered in the task to be distributed received
Answer the test script that test assignment is parsed in packet.
Mobile terminal is instructed according to the test in test script, sends operation requests to server, server is obtained for this
Extract operation request carries out long-range obtain to mobile terminal and operates, and mobile terminal is remotely obtained according to the server received
Extract operation, to the designated port transmitted traffic inquiry request of short message server, the letter returned according to the short message server received
Breath, the residual flow of the mobile terminal is determined by the method for front and back Keywords matching.
After mobile terminal determines residual flow, it can be and residual flow is determined as the first present flow rate, directly judge
Whether one present flow rate value is greater than the flow threshold of setting, is also possible to according to residual flow and flooded traffic and determines first
The value of present flow rate, judges whether the value of the first present flow rate is greater than the flow threshold of setting.
If so, the first present flow rate is consumed by way of downloading file, the first present flow rate after updating consumption
Value executes the network flow method that operating system provides by circulation to detect the value of the first present flow rate, if detecting institute
The flow threshold of the value of the first present flow rate no more than setting is stated, then by calling clock application record current time corresponding the
One time, and save the first time.The flow value that mobile terminal should consume are as follows: the value=residue for the flow that should be consumed
Value-total flow value * flow threshold+flooded traffic value of flow, wherein flow threshold is the expressions sides such as percentage or decimal
The value of formula, the total flow pre-saves in the terminal.
When short message server detects the value of the first present flow rate of the mobile terminal no more than the flow threshold set,
The first reminding short message is sent to the mobile terminal, mobile terminal receives the first reminding short message, by calling clock application to obtain
Corresponding second time when the first reminding short message is received, and saves second time, calculates first time and described
The difference of second time, using the difference as flow alerting delay.
If the mobile terminal judges flow threshold of the first present flow rate value no more than setting, the first residual stream is judged
Whether the value of amount is 0, if not being 0, consumes the first residual flow, is sent out according to the first time interval of setting to short message service
Flow inquiry request is sent, is sent when receiving short message server and being directed to and detect that the value of first residual flow is 0
Second reminding short message sends subscription request to server, wherein the first time interval can be 10 seconds, 5 minutes or 1 hour
Deng, in the case where test scene is roaming state, since the corresponding ownership place of the mobile terminal is different from the region where it, so
The time interval of the setting can be arranged longer.
Server receives the subscription request that mobile terminal is sent, and according to the subscription request, carries out to the mobile terminal
Teleordering operation, teleordering of the mobile terminal according to the server received for the subscription request operates, to short message
Server, which is sent, orders the flow order short message for presetting first-class magnitude, receives short message server for the flow and orders short message
The order successful information of return, mobile terminal are asked according to the second time interval of setting to the inquiry of short message server transmitted traffic
Ask, wherein second time interval and the first time interval can with it is identical can be different, second time interval can
Think 20 seconds, 5 minutes or 1 hour etc..
Mobile terminal judges that short message server whether is received in the time span of setting is asked for flow inquiry
The information of return is sought, if received, then it is assumed that the flow for presetting first-class magnitude of order has arrived account, then according to return
Information determines the second residual flow of the mobile terminal, according to second residual flow and preset flooded traffic and
Determine the second present flow rate, using second present flow rate as the first present flow rate, and mobile terminal is according to receiving
The test instruction carried in test script, consumes the first present flow rate, specific mobile terminal disappears by way of downloading file
Consume the first present flow rate.
If mobile terminal judges flow threshold of the first present flow rate value no more than setting, and the value of the first residual flow
It is 0, sends subscription request to server, wherein the first time interval can be 10 seconds, 5 minutes or 1 hour etc., is testing
Scene is under roaming state, since the corresponding ownership place of the mobile terminal is different from the region where it, so can by this
One time is spaced longer.
Server receives the subscription request that mobile terminal is sent, and according to the subscription request, carries out to the mobile terminal
Teleordering operation, teleordering of the mobile terminal according to the server received for the subscription request operates, to short message
Server, which is sent, orders the flow order short message for presetting first-class magnitude, receives short message server for the flow and orders short message
The order successful information of return, mobile terminal are asked according to the second time interval of setting to the inquiry of short message server transmitted traffic
Ask, wherein second time interval and the first time interval can with it is identical can be different, second time interval can
Think 20 seconds, 5 minutes or 1 hour etc., test scene be roaming state under, due to the corresponding ownership place of the mobile terminal with
Region where it is different, so second time interval can be arranged longer.
Mobile terminal judges that short message server whether is received in the time span of setting is asked for flow inquiry
The information of return is sought, if received, then it is assumed that the flow for presetting first-class magnitude of order has arrived account, then according to return
Information determines the third residual flow of the mobile terminal, according to the third residual flow and preset flooded traffic and
Determine third present flow rate, using the third present flow rate as the first present flow rate, and mobile terminal is according to receiving
The test instruction carried in test script, consumes the first present flow rate, specific mobile terminal disappears by way of downloading file
Consume the first present flow rate.
If mobile terminal is not received by short message server within the waiting time of setting and detects the mobile terminal
Present flow rate value is no more than the first reminding short message of the flow threshold of setting, then mobile terminal thinks test assignment time-out, by force
System terminates the test assignment, sends a warning message to server.
If there are multiple flow thresholds in the test assignment, carried out for each flow threshold as described above
Operation.After mobile terminal has carried out operation as above for each flow threshold, the test result of each flow threshold is sealed
Server is sent to after dress.
S304: test assignment ending phase.
Server judges the test result that mobile terminal transmission whether is received in the length of testing speech of setting, if so,
Test result is then saved, if it is not, generating warning information or locally identifying mission failure for the mobile terminal.
Since mobile terminal detects flow threshold of the value of the first present flow rate no more than setting in the embodiment of the present invention
When, corresponding first time at record current time, and receive short message server and detect that the value of the first present flow rate is not more than
The reminding short message that the flow threshold of setting is sent records corresponding second time, and the first time is customer flow reason
By reminding the moment, second time is the customer flow practical prompting moment, by determining flow with the second time at the first time
Alerting delay, covers all links of flow alerting delay, therefore improves the test result accuracy of flow alerting delay.
Fig. 4 is a kind of test device schematic diagram of flow alerting delay provided in an embodiment of the present invention, is applied to mobile whole
End, the device include:
Update module 41 is consumed, for according to the test instruction carried in the test script received, consumption first to be current
Flow, and the value of the first present flow rate after consumption is updated, wherein the test script is sent by server;
Logging modle 42 is detected, if for detecting flow threshold of the value no more than setting of first present flow rate
Value, then record corresponding first time at current time;
Logging modle 43 is received, for receiving the first reminding short message, and records and receives the of first reminding short message
Two times, wherein first reminding short message be short message server detect the mobile terminal the first present flow rate value not
Greater than setting flow threshold when send;
Time delay determining module 44, for determining flow alerting delay according to the first time and second time.
Described device further include:
Inquiry judging module 45, for being sent out to short message server according to the long-range acquisition operation for receiving the server
Send flow inquiry request;According to the information that the short message server received returns, the first residual stream of the mobile terminal is determined
Amount;According to the value of first residual flow and preset flooded traffic and determining first present flow rate, described first is judged
Whether the value of present flow rate is greater than the flow threshold of setting;If so, triggering consumption update module 41.
Described device further include:
Module 46 is ordered in consumption, for judging flow threshold of the first present flow rate value no more than setting, if institute
The value for stating the first residual flow is not 0, consumes first residual flow;If it is described for detecting to receive short message server
The second reminding short message that the value of first residual flow is sent when being 0 sends subscription request to server, according to the service received
Device is operated for the teleordering of the subscription request, is sent to short message server and is ordered the flow order for presetting first-class magnitude
Short message;It receives short message server and orders the order successful information that short message returns for the flow;It sends and flows to short message server
Inquiry request is measured, judges that whether receive short message server in the time span of setting returns for the flow inquiry request
Information;If so, the second residual flow of the mobile terminal is determined, according to described second according to the information of the return
Residual flow and preset flooded traffic and determining second present flow rate, using second present flow rate as the first current stream
Amount, triggering consumption update module 41.
Described device further include:
Judgment module 47 is ordered, for judging flow threshold of the present flow rate value no more than setting, if described the
The value of one residual flow is 0, subscription request is sent to server, according to the server received for the remote of the subscription request
Journey SUBSCRIBE Operation sends to short message server and orders the flow order short message for presetting first-class magnitude;Receive short message server needle
The order successful information that short message returns is ordered to the flow;To short message server transmitted traffic inquiry request, judge setting
Time span in whether receive short message server be directed to the flow inquiry request return information;If so, according to institute
The information for stating return determines the third residual flow of the mobile terminal, according to the third residual flow and preset spilling
Flow and determining third present flow rate, using the third present flow rate as the first present flow rate, triggering consumption update module
41。
Described device further include:
As a result sending module 48, for the test result for carrying the flow alerting delay to be sent to server.
The embodiment of the invention provides a kind of test methods of flow alerting delay, apparatus and system, this method comprises: moving
Dynamic terminal consumes the first present flow rate according to the test instruction carried in the test script received, and update after consuming the
The value of one present flow rate, wherein the test script is sent by server;If detecting first present flow rate
Value then records corresponding first time at current time no more than the flow threshold of setting;The first reminding short message is received, and records and connects
The second time of the first reminding short message is received, wherein first reminding short message is that short message server detects the mobile terminal
First present flow rate value no more than setting flow threshold when send;According to the first time and it is described second when
Between, determine flow alerting delay.Since mobile terminal detects the value of the first present flow rate no more than setting in the embodiment of the present invention
When fixed flow threshold, corresponding first time at record current time, and receive short message server and detect the first current stream
The value of amount records corresponding second time, and the first time no more than the reminding short message that the flow threshold of setting is sent
It should be reminded the moment for customer flow, second time is the customer flow practical prompting moment, when by first time and second
Between determine flow alerting delay, cover all links of flow alerting delay, therefore improve the test of flow alerting delay
Result precision.
For systems/devices embodiment, since it is substantially similar to the method embodiment, so the comparison of description is simple
Single, the relevent part can refer to the partial explaination of embodiments of method.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although the preferred embodiment of the application has been described, it is created once a person skilled in the art knows basic
Property concept, then additional changes and modifications can be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as
It selects embodiment and falls into all change and modification of the application range.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.