[go: up one dir, main page]

CN108989140A - A kind of test method of flow alerting delay, apparatus and system - Google Patents

A kind of test method of flow alerting delay, apparatus and system Download PDF

Info

Publication number
CN108989140A
CN108989140A CN201710411864.6A CN201710411864A CN108989140A CN 108989140 A CN108989140 A CN 108989140A CN 201710411864 A CN201710411864 A CN 201710411864A CN 108989140 A CN108989140 A CN 108989140A
Authority
CN
China
Prior art keywords
traffic
flow
server
mobile terminal
value
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.)
Granted
Application number
CN201710411864.6A
Other languages
Chinese (zh)
Other versions
CN108989140B (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.)
China Mobile Communications Group Co Ltd
China Mobile Information Technology Co Ltd
Original Assignee
Medium Shift Information Technology Co Ltd
China Mobile Communications Group 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 Medium Shift Information Technology Co Ltd, China Mobile Communications Group Co Ltd filed Critical Medium Shift Information Technology Co Ltd
Priority to CN201710411864.6A priority Critical patent/CN108989140B/en
Publication of CN108989140A publication Critical patent/CN108989140A/en
Application granted granted Critical
Publication of CN108989140B publication Critical patent/CN108989140B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/10Flow control between communication endpoints
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本发明公开了一种流量提醒时延的测试方法、装置及系统,该方法应用于移动终端包括:根据接收到的测试脚本中携带的测试指令,消耗第一当前流量,并更新消耗后的第一当前流量的值;如果检测到所述第一当前流量的值不大于设定的流量阈值,则记录当前时刻对应的第一时间;接收第一提醒短信,并记录接收到第一提醒短信的第二时间;根据所述第一时间及所述第二时间,确定流量提醒时延。由于本发明实施例中所述第一时间和所述第二时间都是由移动终端记录的,并且所述第一时间为用户流量应提醒时刻,所述第二时间为用户流量实际提醒时刻,覆盖了流量提醒时延的所有环节,因此提高了流量提醒时延的测试结果准确度。

The invention discloses a method, device and system for testing traffic reminder time delay. The method applied to a mobile terminal includes: consuming the first current traffic according to the test instruction carried in the received test script, and updating the consumed second traffic. A value of the current flow; if it is detected that the value of the first current flow is not greater than the set flow threshold, record the first time corresponding to the current moment; receive the first reminder message, and record the time of receiving the first reminder message The second time: according to the first time and the second time, determine the flow reminder time delay. Since the first time and the second time in the embodiment of the present invention are both recorded by the mobile terminal, and the first time is the time when the user traffic should be reminded, and the second time is the actual reminder time for the user traffic, All aspects of the traffic alert delay are covered, so the accuracy of the test result of the traffic alert delay is improved.

Description

一种流量提醒时延的测试方法、装置及系统A test method, device and system for flow reminder delay

技术领域technical field

本发明涉及电信业务测试领域,由于涉及一种流量提醒时延的测试方法、装置及系统。The invention relates to the field of telecommunication service testing, in that it relates to a testing method, device and system for flow reminder time delay.

背景技术Background technique

随着移动终端和4G(the 4th Generation mobile communication,第四代移动通信技术)高速网络的普及,对运营商实时计费、实时流量提醒的能力提出更高要求。手机上网剩余流量提醒的延迟,将可能导致高额的套餐外流量费用,引发用户投诉甚至纠纷。为了帮助用户清楚了解合理使用的流量,在用户套餐余量不足、余量用尽、超出套餐流量等重要时点,运营商会向用户发送提醒短信。但是由于“实时流量计算–触发流量提醒–下发提醒短信–用户移动终端”的流程较长,如果遇到用户在漫游,则流程更加复杂。这样容易造成提醒短信到达用户移动终端时,用户实际流量使用量早已超过接收到提醒短信中的流量使用量。因此为了更好地提升用户体验,运营商需要采用流量提醒时延测试方法来获取流量提醒时延,其中所述流量提醒时延为用户流量实际提醒时刻与用户流量应提醒时刻的时间差值。With the popularization of mobile terminals and 4G (the 4th Generation mobile communication, fourth-generation mobile communication technology) high-speed networks, higher requirements are placed on operators' capabilities in real-time billing and real-time traffic reminders. The delay in the reminder of the remaining mobile Internet traffic may lead to high traffic charges outside the package, causing user complaints and even disputes. In order to help users clearly understand the reasonable use of traffic, the operator will send reminder text messages to users at important points such as insufficient balance in the user package, exhaustion, or exceeding the package traffic. However, due to the long process of "real-time traffic calculation-triggering traffic reminder-delivering reminder SMS-user mobile terminal", if the user is roaming, the process will be more complicated. It is easy to cause that when the reminder message arrives at the user's mobile terminal, the user's actual traffic usage has already exceeded the traffic usage in the reminder message received. Therefore, in order to better improve the user experience, the operator needs to use the traffic reminder delay test method to obtain the traffic reminder delay, wherein the traffic reminder delay is the time difference between the actual reminder time of the user traffic and the time when the user traffic should be reminded.

现有技术中针对流量提醒时延的测试方法可以是运营商的业务支撑部门通过日志及话单的关联分析,统计出流量提醒每个环节的耗时,将每个环节的耗时确定的耗时总和作为流量提醒时延,其中每个环节的耗时包括提醒触发延迟(用户使用流量达到提醒阈值到计费告警触发的耗时)、短信组装延迟(计费系统生成告警到账户管理系统短信组装完成的耗时)、短信发送延迟(账户管理系统短信组装完成短信到短信发送给短信中心的耗时)。In the prior art, the test method for the traffic reminder delay can be that the business support department of the operator can calculate the time consumption of each link of the traffic reminder through the correlation analysis of the log and the bill, and determine the time consumption of each link. The sum of time is used as the traffic reminder delay, and the time consumption of each link includes the reminder trigger delay (the time from when the user’s traffic reaches the reminder threshold to the triggering of the billing alarm), SMS assembly delay (the billing system generates an alarm to the account management system SMS Time-consuming to complete the assembly), delay in sending SMS (the time-consuming from the account management system text message assembly to the text message sent to the text message center).

而在实际流量提醒时延的测试过程中,运营商的业务支撑系统无法覆盖提醒时延的所有环节,统计得到的时延仅为用户使用流量达到提醒阈值至提醒短信发送给短信中心的耗时,提醒短信由短信中心发送给用户移动终端的耗时未统计到,所以存在流量提醒时延的测试结果准确度较低的情况。During the actual traffic reminder delay test, the operator’s business support system cannot cover all aspects of the reminder delay, and the statistically obtained delay is only the time from when the user’s traffic reaches the reminder threshold to when the reminder message is sent to the SMS center. , the time spent in sending the reminder message from the SMS center to the user's mobile terminal has not been counted, so there is a situation that the accuracy of the test result of the traffic reminder delay is low.

发明内容Contents of the invention

本发明提供一种流量提醒时延的测试方法、装置及系统,用以解决现有技术中存在流量提醒时延的测试结果准确度较低的问题。The invention provides a method, device and system for testing traffic reminder time delay, which are used to solve the problem in the prior art that the accuracy of test results of traffic reminder time delay is low.

为了解决上述问题,本发明提供了一种流量提醒时延的测试,应用于移动终端,该方法包括:In order to solve the above problems, the present invention provides a traffic reminder delay test, which is applied to a mobile terminal, and the method includes:

根据接收到的测试脚本中携带的测试指令,消耗第一当前流量,并更新消耗后的第一当前流量的值,其中所述测试脚本是由服务器发送的;Consuming the first current flow according to the test instruction carried in the received test script, and updating the value of the consumed first current flow, wherein the test script is sent by the server;

如果检测到所述第一当前流量的值不大于设定的流量阈值,则记录当前时刻对应的第一时间;If it is detected that the value of the first current flow is not greater than the set flow threshold, record the first time corresponding to the current moment;

接收第一提醒短信,并记录接收到所述第一提醒短信的第二时间,其中所述第一提醒短信为短信服务器检测到所述移动终端的第一当前流量的值不大于设定的流量阈值时发送的;Receive the first reminder message, and record the second time when the first reminder message is received, wherein the first reminder message is that the SMS server detects that the value of the first current flow of the mobile terminal is not greater than the set flow Sent when the threshold is reached;

根据所述第一时间及所述第二时间,确定流量提醒时延。According to the first time and the second time, a flow reminder time delay is determined.

进一步地,所述根据接收到的测试脚本中携带的测试指令,消耗第一当前流量之前,所述方法还包括:Further, before consuming the first current traffic according to the test instruction carried in the received test script, the method further includes:

根据接收到所述服务器的远程获取操作,向短信服务器发送流量查询请求;Sending a traffic query request to the SMS server according to receiving the remote acquisition operation of the server;

根据接收到的短信服务器返回的信息,确定所述移动终端的第一剩余流量;determining the first remaining traffic of the mobile terminal according to the received information returned by the short message server;

根据所述第一剩余流量与预设的溢出流量的和确定第一当前流量的值,判断第一当前流量的值是否大于设定的流量阈值;determining the value of the first current flow according to the sum of the first remaining flow and the preset overflow flow, and judging whether the value of the first current flow is greater than a set flow threshold;

如果是,进行后续步骤。If yes, proceed to next steps.

进一步地,如果所述第一当前流量的值不大于设定的流量阈值,所述根据接收到的测试脚本中携带的测试指令,消耗第一当前流量之前,所述方法还包括:Further, if the value of the first current flow is not greater than the set flow threshold, before consuming the first current flow according to the test instruction carried in the received test script, the method further includes:

如果所述第一剩余流量的值不为0,消耗所述第一剩余流量;If the value of the first remaining flow is not 0, consume the first remaining flow;

如果接收到短信服务器针对检测到所述第一剩余流量的值为0时发送的第二提醒短信,向服务器发送订购请求,根据接收到的服务器针对所述订购请求的远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信;If the second reminder message sent by the SMS server for detecting that the value of the first remaining traffic is 0 is received, an order request is sent to the server, and the remote order operation of the order request is sent to the SMS server according to the received server's remote order operation for the order request. Send a traffic order text message for ordering the preset first traffic value;

接收短信服务器针对所述流量订购短信返回的订购成功信息;Receiving the order success information returned by the SMS server for the traffic order SMS;

向短信服务器发送流量查询请求,判断在设定的时间长度内是否接收到短信服务器针对所述流量查询请求返回的信息;Send a traffic query request to the SMS server, and judge whether the information returned by the SMS server for the traffic query request is received within the set time length;

如果是,根据所述返回的信息,确定所述移动终端的第二剩余流量,根据所述第二剩余流量与预设的溢出流量的和确定第二当前流量,将所述第二当前流量作为第一当前流量,进行后续步骤。If so, determine the second remaining flow of the mobile terminal according to the returned information, determine the second current flow according to the sum of the second remaining flow and the preset overflow flow, and use the second current flow as The first current flow, proceed to the subsequent steps.

进一步地,如果所述第一当前流量的值不大于设定的流量阈值,所述根据接收到的测试脚本中携带的测试指令,消耗第一当前流量之前,所述方法还包括:Further, if the value of the first current flow is not greater than the set flow threshold, before consuming the first current flow according to the test instruction carried in the received test script, the method further includes:

如果所述第一剩余流量的值为0,向服务器发送订购请求,根据接收到的服务器针对所述订购请求的远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信;If the value of the first remaining traffic is 0, an order request is sent to the server, and according to the received remote order operation of the server for the order request, a traffic order text message for ordering a preset first traffic value is sent to the SMS server;

接收短信服务器针对所述流量订购短信返回的订购成功信息;Receiving the order success information returned by the SMS server for the traffic order SMS;

向短信服务器发送流量查询请求,判断在设定的时间长度内是否接收到短信服务器针对所述流量查询请求返回的信息;Send a traffic query request to the SMS server, and judge whether the information returned by the SMS server for the traffic query request is received within the set time length;

如果是,根据所述返回的信息,确定所述移动终端的第三剩余流量,根据所述第三剩余流量与预设的溢出流量的和确定第三当前流量,将所述第三当前流量作为第一当前流量,进行后续步骤。If so, determine the third remaining flow of the mobile terminal according to the returned information, determine the third current flow according to the sum of the third remaining flow and the preset overflow flow, and use the third current flow as The first current flow, proceed to the subsequent steps.

进一步地,在所述确定流量提醒时延后,所述方法还包括:Further, after the delay in determining the flow reminder, the method further includes:

将携带有所述流量提醒时延的测试结果发送给服务器。Send the test result carrying the traffic alert time delay to the server.

本发明提供了一种流量提醒时延的测试装置,应用于移动终端,该装置包括:The present invention provides a flow reminder delay test device, which is applied to a mobile terminal, and the device includes:

消耗更新模块,用于根据接收到的测试脚本中携带的测试指令,消耗第一当前流量,并更新消耗后的第一当前流量的值,其中所述测试脚本是由服务器发送的;A consumption update module, configured to consume the first current flow according to the test instruction carried in the received test script, and update the value of the consumed first current flow, wherein the test script is sent by the server;

检测记录模块,用于如果检测到所述第一当前流量的值不大于设定的流量阈值,则记录当前时刻对应的第一时间;A detection and recording module, configured to record the first time corresponding to the current moment if it is detected that the value of the first current flow is not greater than the set flow threshold;

接收记录模块,用于接收第一提醒短信,并记录接收到所述第一提醒短信的第二时间,其中所述第一提醒短信为短信服务器检测到所述移动终端的第一当前流量的值不大于设定的流量阈值时发送的;The receiving and recording module is used to receive the first reminder message, and record the second time when the first reminder message is received, wherein the first reminder message is the first current flow value of the mobile terminal detected by the SMS server Sent when it is not greater than the set traffic threshold;

时延确定模块,用于根据所述第一时间及所述第二时间,确定流量提醒时延。A time delay determining module, configured to determine a flow reminder time delay according to the first time and the second time.

进一步地,所述装置还包括:Further, the device also includes:

查询判断模块,用于根据接收到所述服务器的远程获取操作,向短信服务器发送流量查询请求;根据接收到的短信服务器返回的信息,确定所述移动终端的第一剩余流量;根据所述第一剩余流量与预设的溢出流量的和确定第一当前流量的值,判断所述第一当前流量的值是否大于设定的流量阈值;如果是,触发消耗更新模块。The query judgment module is used to send a traffic query request to the short message server according to the remote acquisition operation received from the server; determine the first remaining traffic of the mobile terminal according to the received information returned by the short message server; according to the second The sum of the remaining flow and the preset overflow flow determines the value of the first current flow, and judges whether the value of the first current flow is greater than the set flow threshold; if so, triggers the consumption updating module.

进一步地,所述装置还包括:Further, the device also includes:

消耗订购模块,用于判断所述第一当前流量值不大于设定的流量阈值,如果所述第一剩余流量的值不为0,消耗所述第一剩余流量;如果接收短信服务器针对检测到所述第一剩余流量的值为0时发送的第二提醒短信,向服务器发送订购请求,根据接收到的服务器针对所述订购请求的远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信;接收短信服务器针对所述流量订购短信返回的订购成功信息;向短信服务器发送流量查询请求,判断在设定的时间长度内是否接收到短信服务器针对所述流量查询请求返回的信息;如果是,根据所述返回的信息,确定所述移动终端的第二剩余流量,根据所述第二剩余流量与预设的溢出流量的和确定第二当前流量,将所述第二当前流量作为第一当前流量,触发消耗更新模块。Consumption ordering module, for judging that the first current flow value is not greater than the set flow threshold, if the value of the first remaining flow is not 0, consume the first remaining flow; if the receiving SMS server detects The second reminder text message sent when the value of the first remaining traffic is 0, sends an order request to the server, and sends an order preset first traffic value to the SMS server according to the received remote order operation of the server for the order request receive the order success information returned by the SMS server for the traffic order SMS; send a traffic query request to the SMS server, and determine whether the information returned by the SMS server for the traffic query request is received within the set time length ; if yes, determine the second remaining flow of the mobile terminal according to the returned information, determine the second current flow according to the sum of the second remaining flow and the preset overflow flow, and convert the second current flow As the first current flow, the consumption update module is triggered.

进一步地,所述装置还包括:Further, the device also includes:

订购判断模块,用于判断所述当前流量值不大于设定的流量阈值,如果所述第一剩余流量的值为0,向服务器发送订购请求,根据接收到的服务器针对所述订购请求的远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信;接收短信服务器针对所述流量订购短信返回的订购成功信息;向短信服务器发送流量查询请求,判断在设定的时间长度内是否接收到短信服务器针对所述流量查询请求返回的信息;如果是,根据所述返回的信息,确定所述移动终端的第三剩余流量,根据所述第三剩余流量与预设的溢出流量的和确定第三当前流量,将所述第三当前流量作为第一当前流量,触发消耗更新模块。An order judging module, configured to judge that the current flow value is not greater than the set flow threshold, if the value of the first remaining flow is 0, send an order request to the server, and send an order request to the server according to the received remote The ordering operation is to send to the SMS server a traffic order text message for ordering the preset first traffic value; receive the order success information returned by the SMS server for the traffic order text message; send a traffic query request to the SMS server, and judge that within the set time length Whether the information returned by the short message server for the traffic query request is received; if so, according to the returned information, determine the third remaining traffic of the mobile terminal, and determine the third remaining traffic of the mobile terminal according to the difference between the third remaining traffic and the preset overflow traffic And determine the third current flow, use the third current flow as the first current flow, and trigger the consumption update module.

进一步地,所述装置还包括:Further, the device also includes:

结果发送模块,用于将携带有所述流量提醒时延的测试结果发送给服务器。The result sending module is used to send the test result carrying the traffic reminder delay to the server.

本发明提供了一种流量提醒时延的测试系统,所述测试系统包括:The present invention provides a test system for flow reminder time delay, the test system includes:

服务器,用于向移动终端发送携带有测试指令的测试脚本;The server is configured to send a test script carrying test instructions to the mobile terminal;

移动终端,用于根据接收到的测试脚本中携带的测试指令,消耗第一当前流量,并更新消耗后的第一当前流量的值;如果检测到所述第一当前流量的值不大于设定的流量阈值,则记录当前时刻对应的第一时间;接收第一提醒短信,并记录接收到所述第一提醒短信的第二时间;根据所述第一时间及所述第二时间,确定流量提醒时延;The mobile terminal is configured to consume the first current flow according to the test instruction carried in the received test script, and update the value of the consumed first current flow; if it is detected that the value of the first current flow is not greater than the set If the traffic threshold is higher than the threshold value, then record the first time corresponding to the current moment; receive the first reminder text message, and record the second time when the first reminder text message is received; determine the traffic flow according to the first time and the second time reminder delay;

短信服务器,用于如果检测到所述移动终端的第一当前流量的值不大于设定的流量阈值,向所述移动终端发送第一提醒短信。The short message server is configured to send a first reminder short message to the mobile terminal if it detects that the first current traffic value of the mobile terminal is not greater than the set traffic threshold.

进一步地,所述服务器,还用于采用通用分组无线服务GPRS无线调度技术,对所述移动终端进行远程获取操作;Further, the server is also used to perform remote acquisition operations on the mobile terminal by using the General Packet Radio Service GPRS wireless scheduling technology;

所述移动终端,还用于根据接收到所述服务器的远程获取操作,向短信服务器发送流量查询请求;根据接收到的短信服务器返回的信息,确定所述移动终端的第一剩余流量;根据所述第一剩余流量与预设的溢出流量的和确定第一当前流量的值,判断所述第一当前流量的值是否大于设定的流量阈值,如果是,根据接收到的测试脚本中携带的测试指令,消耗第一当前流量;The mobile terminal is further configured to send a traffic query request to the short message server according to receiving the remote acquisition operation of the server; determine the first remaining traffic of the mobile terminal according to the received information returned by the short message server; The sum of the first remaining flow and the preset overflow flow determines the value of the first current flow, and judges whether the value of the first current flow is greater than the set flow threshold, and if so, according to the value carried in the received test script Test command, consume the first current traffic;

所述短信服务器,还用于接收所述移动终端发送的流量查询请求,针对所述流量查询请求返回信息。The short message server is further configured to receive the traffic query request sent by the mobile terminal, and return information in response to the traffic query request.

进一步地,所述移动终端,还用于如果所述第一当前流量的值不大于设定的流量阈值,且所述第一剩余流量的值不为0,消耗所述第一剩余流量;如果接收到第二提醒短信,向服务器发送订购请求,根据接收到的服务器针对所述订购请求的远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信;接收短信服务器返回的订购成功信息;向短信服务器发送流量查询请求,判断在设定的时间长度内是否接收到短信服务器针对所述流量查询请求返回的信息;如果是,根据所述返回的信息,确定所述移动终端的第二剩余流量,根据所述第二剩余流量与预设的溢出流量的和确定第二当前流量,将所述第二当前流量作为第一当前流量,根据接收到的测试脚本中携带的测试指令,消耗第一当前流量;Further, the mobile terminal is further configured to consume the first remaining flow if the value of the first current flow is not greater than a set flow threshold and the value of the first remaining flow is not 0; if Receive the second reminder text message, send order request to the server, according to the remote order operation of the server received for the order request, send the traffic order text message of ordering the preset first traffic value to the text message server; receive the order returned by the text message server Success information; send a traffic query request to the short message server, and judge whether the information returned by the short message server for the traffic query request is received within the set time length; if so, determine the mobile terminal according to the returned information The second remaining flow, determining the second current flow according to the sum of the second remaining flow and the preset overflow flow, using the second current flow as the first current flow, according to the test instruction carried in the received test script , consume the first current flow;

所述服务器,还用于接收所述移动终端发送的订购请求,采用GPRS无线调度技术,对所述移动终端进行远程订购操作;The server is also used to receive the order request sent by the mobile terminal, and use GPRS wireless scheduling technology to perform remote order operations on the mobile terminal;

所述短信服务器,还用于如果检测到所述移动终端的第一剩余流量的值为0时发送的第二提醒短信;接收所述移动终端发送的订购预设第一流量值的流量订购短信,为所述移动终端订购所述第一流量值的流量,并向所述移动终端返回订购成功信息;接收所述移动终端发送的流量查询请求,向所述移动终端返回第二剩余流量的信息。The short message server is also used to send a second reminder text message if it is detected that the value of the first remaining traffic of the mobile terminal is 0; receive a traffic subscription text message sent by the mobile terminal to order a preset first traffic value , order the flow of the first flow value for the mobile terminal, and return order success information to the mobile terminal; receive the flow query request sent by the mobile terminal, and return the information of the second remaining flow to the mobile terminal .

进一步地,所述移动终端,还用于如果所述第一当前流量的值不大于设定的流量阈值,且所述第一剩余流量的值为0,向服务器发送订购请求,根据接收到的服务器针对所述订购请求的远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信;接收短信服务器针对所述流量订购短信返回的订购成功信息;向短信服务器发送流量查询请求,判断在设定的时间长度内是否接收到短信服务器针对所述流量查询请求返回的信息;如果是,根据所述返回的信息,确定所述移动终端的第三剩余流量,根据所述第三剩余流量与预设的溢出流量的和确定第三当前流量,将所述第三当前流量作为第一当前流量,根据接收到的测试脚本中携带的测试指令,消耗第一当前流量。Further, the mobile terminal is further configured to send an order request to the server if the value of the first current flow is not greater than the set flow threshold and the value of the first remaining flow is 0, and according to the received For the remote order operation of the order request, the server sends to the SMS server a traffic order text message ordering a preset first traffic value; receives the order success information returned by the SMS server for the traffic order text message; sends a traffic query request to the SMS server, Judging whether the information returned by the short message server for the traffic query request is received within the set time length; if yes, according to the returned information, determine the third remaining traffic of the mobile terminal, and determine the third remaining traffic of the mobile terminal according to the third remaining The sum of the flow and the preset overflow flow determines the third current flow, takes the third current flow as the first current flow, and consumes the first current flow according to the test instruction carried in the received test script.

进一步地,所述移动终端,还用于将携带有所述流量提醒时延的测试结果发送给服务器;Further, the mobile terminal is further configured to send the test result carrying the traffic reminder delay to the server;

所述服务器,还用于接收所述移动终端发送的携带有所述流量提醒时延的测试结果。The server is further configured to receive the test result sent by the mobile terminal and carrying the traffic reminder delay.

本发明提供了一种流量提醒时延的测试方法、装置及系统,该方法包括:移动终端根据接收到的测试脚本中携带的测试指令,消耗第一当前流量,并更新消耗后的第一当前流量的值,其中所述测试脚本是由服务器发送的;如果检测到所述第一当前流量的值不大于设定的流量阈值,则记录当前时刻对应的第一时间;接收第一提醒短信,并记录接收到第一提醒短信的第二时间,其中所述第一提醒短信为短信服务器检测到所述移动终端的第一当前流量的值不大于设定的流量阈值时发送的;根据所述第一时间及所述第二时间,确定流量提醒时延。由于本发明实施例中移动终端检测到第一当前流量的值不大于设定的流量阈值时,记录当前时刻对应的第一时间,及接收到短信服务器检测到第一当前流量的值不大于设定的流量阈值发送的提醒短信,记录对应的第二时间,并且所述第一时间为用户流量理论提醒时刻,所述第二时间为用户流量实际提醒时刻,通过第一时间和第二时间确定流量提醒时延,覆盖了流量提醒时延的所有环节,因此提高了流量提醒时延的测试结果准确度。The present invention provides a method, device and system for testing traffic reminder delay. The method includes: the mobile terminal consumes the first current traffic according to the test instruction carried in the received test script, and updates the consumed first current traffic. The value of the flow, wherein the test script is sent by the server; if it is detected that the value of the first current flow is not greater than the set flow threshold, record the first time corresponding to the current moment; receive the first reminder message, And record the second time of receiving the first reminder text message, wherein the first reminder text message is sent when the first current flow value of the mobile terminal is detected by the short message server is not greater than the set flow threshold; according to the The first time and the second time determine the flow reminder delay. Because in the embodiment of the present invention, when the mobile terminal detects that the value of the first current flow is not greater than the set flow threshold, it records the first time corresponding to the current moment, and receives the SMS server to detect that the value of the first current flow is not greater than the set The reminder text message sent by the flow threshold, record the corresponding second time, and the first time is the theoretical reminder time of the user flow, and the second time is the actual reminder time of the user flow, and the flow is determined by the first time and the second time The reminder delay covers all aspects of the traffic reminder delay, thus improving the accuracy of the test result of the traffic reminder delay.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1为本发明实施例1提供的一种流量提醒时延的测试过程的示意图;FIG. 1 is a schematic diagram of a test process of a flow reminder delay provided by Embodiment 1 of the present invention;

图2A为本发明实施例4提供的另一种流量提醒时延的测试过程的示意图;FIG. 2A is a schematic diagram of another test process of traffic reminder delay provided by Embodiment 4 of the present invention;

图2B为本发明实施例5提供的一种流量提醒时延的测试系统的结构示意图;FIG. 2B is a schematic structural diagram of a test system for traffic reminder delay provided by Embodiment 5 of the present invention;

图3为本发明实施例6提供的一种流量提醒时延的测试过程示意图;FIG. 3 is a schematic diagram of a test process of a flow reminder delay provided by Embodiment 6 of the present invention;

图4为本发明实施例提供的一种流量提醒时延的测试装置示意图。Fig. 4 is a schematic diagram of a test device for traffic alert delay provided by an embodiment of the present invention.

具体实施方式Detailed ways

为了提高流量提醒时延的测试结果的准确性,本发明实施例提供了一种流量提醒时延的测试方法、装置及系统。In order to improve the accuracy of the test result of the time delay of traffic reminder, the embodiment of the present invention provides a method, device and system for testing the time delay of traffic reminder.

为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Apparently, the described embodiments are only some of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

实施例1:Example 1:

图1为本发明实施例提供的一种流量提醒时延的测试过程的示意图,该过程包括以下步骤:FIG. 1 is a schematic diagram of a test process of a flow reminder delay provided by an embodiment of the present invention, and the process includes the following steps:

S101:根据接收到的测试脚本中携带的测试指令,消耗第一当前流量,并更新消耗后的第一当前流量的值,其中所述测试脚本是由服务器发送的。S101: Consume the first current flow according to the test instruction carried in the received test script, and update the value of the consumed first current flow, wherein the test script is sent by the server.

本发明实施例提供的流量提醒时延的测试方法应用于移动终端,该移动终端主要是指手机,但不排除其他设备,比如平板电脑、个人数字助理(PDA)等能够消耗流量的设备,对于本发明的核心构思来说,手机能够充分发挥本发明的优势,但手机并非本发明的移动终端的唯一表现形式。The test method of traffic reminder delay provided by the embodiment of the present invention is applied to mobile terminals, and the mobile terminal mainly refers to mobile phones, but does not exclude other devices, such as tablet computers, personal digital assistants (PDAs) and other devices that can consume traffic, for In terms of the core idea of the present invention, the mobile phone can give full play to the advantages of the present invention, but the mobile phone is not the only form of expression of the mobile terminal of the present invention.

所述移动终端可以用来接收服务器发送的测试脚本,并根据所述测试脚本中携带的测试指令,消耗第一当前流量,并更新消耗后的第一当前流量的值。The mobile terminal may be used to receive the test script sent by the server, consume the first current flow according to the test instruction carried in the test script, and update the value of the consumed first current flow.

所述移动终端消耗第一当前流量可以通过下载文件、播放网络上的视频或音频等方式消耗,所述移动终端采取何种方式消耗流量可以根据所述测试脚本中携带的测试指令进行。具体的通过不同的方式消耗流量的过程属于现有技术,在本发明实施例中对该过程不进行赘述。The first current traffic consumed by the mobile terminal can be consumed by downloading files, playing video or audio on the network, etc. The way the mobile terminal consumes traffic can be determined according to the test instructions carried in the test script. The specific process of consuming traffic in different ways belongs to the prior art, and will not be described in detail in this embodiment of the present invention.

所述测试脚本可以是服务器按照测试人员保存的脚本生成算法,预先生成并保存在本地的,也可以是服务器在接收到移动终端发送的任务执行查询请求后,针对所述任务执行查询请求生成的,其中所述任务执行查询请求中携带有所述移动终端的标识信息。The test script may be pre-generated and stored locally by the server according to the script generation algorithm saved by the tester, or may be generated by the server for the task execution query request after receiving the task execution query request sent by the mobile terminal , wherein the task execution query request carries the identification information of the mobile terminal.

所述移动终端的标识信息可以是该移动终端的设备号,或安装在该移动终端上的SIM(Subscriber Identification Module,客户识别模块)卡对应的手机号码等中的一个或多个,此外所述移动终端的标识信息中还可以携带有该移动终端对应的GPS(GlobalPositioning System,全球定位系统)坐标信息。因为本发明实施例中是测试的是流量提醒时延,所以较佳地,所述移动终端的标识信息可以为安装在该移动终端上的SIM卡对应的手机号码,或安装在该移动终端上的SIM卡对应的手机号码与该移动终端对应的GPS坐标的组合信息。The identification information of the mobile terminal can be the device number of the mobile terminal, or one or more of the mobile phone numbers corresponding to the SIM (Subscriber Identification Module, customer identification module) card installed on the mobile terminal, etc. The identification information of the mobile terminal may also carry GPS (Global Positioning System, Global Positioning System) coordinate information corresponding to the mobile terminal. Because the traffic reminder delay is tested in the embodiment of the present invention, so preferably, the identification information of the mobile terminal can be the mobile phone number corresponding to the SIM card installed on the mobile terminal, or the mobile phone number installed on the mobile terminal Combination information of the mobile phone number corresponding to the SIM card and the GPS coordinates corresponding to the mobile terminal.

如果所述移动终端的标识信息为安装在该移动终端上的SIM卡对应的手机号码与该移动终端对应的GPS坐标的组合信息,服务器可以在接收到任务执行查询请求后,判断所述GPS坐标是否位于所述手机号码的归属地,如果是,则向移动终端发送携带有测试指令的测试脚本。If the identification information of the mobile terminal is the combined information of the mobile phone number corresponding to the SIM card installed on the mobile terminal and the GPS coordinates corresponding to the mobile terminal, the server can determine the GPS coordinates after receiving the task execution query request Whether it is located in the attribution of the mobile phone number, if yes, then send a test script carrying test instructions to the mobile terminal.

服务器可以针对所有的移动终端保存相同的测试脚本,也可以针对不同的移动终端保存不同的测试脚本,例如针对不同的移动终端,服务器按照移动终端的手机号码的归属地,将相同归属地的手机号码作为一组,生成并保存对应的测试脚本。The server can save the same test script for all mobile terminals, and can also save different test scripts for different mobile terminals. Number as a group, generate and save the corresponding test script.

为了避免同一测试任务重复派发多次,服务器将生成的测试脚本的任务状态标记为未调度,服务器将测试脚本发送给移动终端后,可以是直接将对应的测试脚本的任务状态标记为已调度,也可以是启动定时器,判断在设定的时间长度内是否接收到所述移动终端返回的接收确认信息,如果是,将对应的测试脚本的任务状态标记为已调度。In order to prevent the same test task from being dispatched multiple times, the server marks the task status of the generated test script as unscheduled. After the server sends the test script to the mobile terminal, it can directly mark the task status of the corresponding test script as scheduled. It may also be to start a timer to determine whether the receiving confirmation information returned by the mobile terminal is received within the set time length, and if so, mark the task status of the corresponding test script as scheduled.

S102:如果检测到所述第一当前流的量值不大于设定的流量阈值,则记录当前时刻对应的第一时间。S102: If it is detected that the magnitude of the first current flow is not greater than the set flow threshold, record the first time corresponding to the current moment.

移动终端检测第一当前流量的值的方法可以是应用安装在该移动终端上的第三方监控软件实现的,也可以是直接执行该移动终端对应的操作系统提供的流量检测方法实现的,例如针对该移动终端对应的操作系统为安卓系统时,该移动终端通过循环执行安卓系统提供的网络流量方法来实现对当前的第一当前流量的值的检测。The method for the mobile terminal to detect the value of the first current flow can be implemented by using third-party monitoring software installed on the mobile terminal, or by directly executing the flow detection method provided by the operating system corresponding to the mobile terminal, for example, for When the operating system corresponding to the mobile terminal is the Android system, the mobile terminal implements the detection of the current first current flow value by cyclically executing the network flow method provided by the Android system.

所述移动终端检测到所述第一当前流量的值不大于设定的流量阈值时,可以通过调用时钟应用获取当前时刻对应的第一时间,并记录保存所述第一时间,所述移动终端此时记录的所述第一时间为用户流量理论提醒时刻,所述移动终端中保存有所述流量阈值。When the mobile terminal detects that the value of the first current flow is not greater than the set flow threshold, it can obtain the first time corresponding to the current moment by calling the clock application, and record and save the first time, the mobile terminal The first time recorded at this time is the theoretical reminder time of user traffic, and the mobile terminal stores the traffic threshold.

为了进一步提高流量提醒时延的测试结果准确度,所述移动终端检测到所述第一当前流量值不大于设定的流量阈值时,可以停止消耗第一当前流量的操作。In order to further improve the accuracy of the test result of the traffic reminder time delay, when the mobile terminal detects that the first current traffic value is not greater than the set traffic threshold, it may stop the operation of consuming the first current traffic.

所述流量阈值可以是具体的某个数值,如0MB(Mega Byte,兆字节)、80MB或100MB等,也可以是用来表征流量值的其他值,如总流量的50%、总流量的80%或总流量的0.2等,其中总流量的值保存在所述移动终端中。在实际测试流量提醒时延的过程中,所述流量阈值可以是一个,可以为多个,一次流量提醒时延的测试过程是针对一个流量阈值来进行的。The flow threshold can be a specific value, such as 0MB (Mega Byte, megabyte), 80MB or 100MB, etc., or other values used to characterize the flow value, such as 50% of the total flow, 50% of the total flow, etc. 80% or 0.2 of the total traffic, etc., wherein the value of the total traffic is stored in the mobile terminal. In the process of actually testing the traffic alert delay, there may be one or more traffic thresholds, and a traffic alert delay test is performed for one traffic threshold.

S103:接收第一提醒短信,并记录接收到第一提醒短信的第二时间,其中所述第一提醒短信为短信服务器检测到所述移动终端的第一当前流量的值不大于设定的流量阈值时发送的。S103: Receive the first reminder message, and record the second time when the first reminder message is received, wherein the first reminder message is that the SMS server detects that the value of the first current traffic of the mobile terminal is not greater than the set traffic Sent when the threshold is reached.

短信服务器检测到所述移动终端的第一当前流量的值不大于设定的流量阈值时,向所述移动终端发送第一提醒短信,所述短信服务器属于所述移动终端对应的运营商所有,所述短信服务器中保存有所述流量阈值,即短信服务器中保存的流量阈值与移动终端中保存的流量阈值对应相同,每次测试时针对的是哪个流量阈值,双方预先约定。When the short message server detects that the value of the first current flow of the mobile terminal is not greater than the set flow threshold, it sends a first reminder short message to the mobile terminal, and the short message server belongs to the operator corresponding to the mobile terminal, The short message server stores the traffic threshold, that is, the traffic threshold stored in the short message server corresponds to the traffic threshold stored in the mobile terminal, and the traffic threshold for each test is agreed upon in advance by both parties.

在实际测试流量提醒时延的过程中,所述流量阈值可以是一个,可以为多个,一次流量提醒时延的测试过程是针对一个流量阈值来进行的,所述短信服务器在一次流量提醒时延的测试过程发送的第一提醒短信,也是针对与移动终端此次记录第一时间的流量阈值相同的流量阈值发送的。In the process of actually testing the traffic reminder time delay, the traffic threshold can be one or multiple, and the test process of a traffic reminder time delay is carried out for a traffic threshold. The first reminder short message sent during the delayed test process is also sent for the same traffic threshold as the traffic threshold recorded by the mobile terminal at the first time this time.

所述短信服务器检测所述移动终端的第一当前流量的值的过程属于现有技术,在本发明实施例中对该过程不做赘述。The process of detecting the value of the first current traffic of the mobile terminal by the short message server belongs to the prior art, and will not be described in detail in this embodiment of the present invention.

所述移动终端接收到短信服务器发送的第一提醒短信时,可以通过调用时钟应用获取接收到第一提醒短信时对应的第二时间,并记录保存所述第二时间,所述移动终端此时记录的所述第二时间为用户流量实际提醒时刻,也就是运营商的提醒移动终端的用户当前流量达到流量阈值的提醒短信实际到达移动终端的时间。When the mobile terminal receives the first reminder message sent by the message server, it can obtain the corresponding second time when the first reminder message is received by calling the clock application, and record and save the second time, the mobile terminal at this time The recorded second time is the actual reminder time of the user traffic, that is, the time when the operator's reminder message reminding the user of the mobile terminal that the current traffic reaches the traffic threshold actually arrives at the mobile terminal.

S104:根据所述第一时间及所述第二时间,确定流量提醒时延。S104: Determine a flow reminder time delay according to the first time and the second time.

所述移动终端根据所述第一时间与所述第二时间,计算所述第一时间和所述第二时间的差值,将该差值作为流量提醒时延。The mobile terminal calculates a difference between the first time and the second time according to the first time and the second time, and uses the difference as a flow reminder delay.

所述第一时间和所述第二时间都是由移动终端记录的,所述流量提醒时延是由所述移动终端根据所述第一时间和所述第二时间确定的,从而实现了流量提醒时延的自动化测试。Both the first time and the second time are recorded by the mobile terminal, and the traffic reminder delay is determined by the mobile terminal according to the first time and the second time, thereby realizing traffic Automated testing of alert latency.

由于本发明实施例中移动终端检测到第一当前流量的值不大于设定的流量阈值时,记录当前时刻对应的第一时间,及接收到短信服务器检测到第一当前流量的值不大于设定的流量阈值发送的提醒短信,记录对应的第二时间,并且所述第一时间为用户流量理论提醒时刻,所述第二时间为用户流量实际提醒时刻,通过第一时间和第二时间确定流量提醒时延,覆盖了流量提醒时延的所有环节,因此提高了流量提醒时延的测试结果准确度。Because in the embodiment of the present invention, when the mobile terminal detects that the value of the first current flow is not greater than the set flow threshold, it records the first time corresponding to the current moment, and receives the SMS server to detect that the value of the first current flow is not greater than the set The reminder text message sent by the flow threshold, record the corresponding second time, and the first time is the theoretical reminder time of the user flow, and the second time is the actual reminder time of the user flow, and the flow is determined by the first time and the second time The reminder delay covers all aspects of the traffic reminder delay, thus improving the accuracy of the test result of the traffic reminder delay.

实施例2:Example 2:

为了进一步提高流量提醒时延的测试结果准确性,在上述实施例的基础上,本发明实施例中,所述根据接收到的测试脚本中携带的测试指令,消耗当前流量之前,所述方法还包括:In order to further improve the accuracy of the test result of traffic reminder delay, on the basis of the above-mentioned embodiments, in the embodiment of the present invention, before consuming the current traffic according to the test instruction carried in the received test script, the method also include:

根据接收到所述服务器的远程获取操作,向短信服务器发送流量查询请求;Sending a traffic query request to the SMS server according to receiving the remote acquisition operation of the server;

根据接收到的短信服务器返回的信息,确定所述移动终端的第一剩余流量;determining the first remaining traffic of the mobile terminal according to the received information returned by the short message server;

根据所述第一剩余流量与预设的溢出流量的和确定第一当前流量的值,判断所述第一当前流量的值是否大于设定的流量阈值;Determine the value of the first current flow according to the sum of the first remaining flow and the preset overflow flow, and determine whether the value of the first current flow is greater than a set flow threshold;

如果是,进行后续步骤。If yes, proceed to next steps.

由于移动终端自身检测所述第一当前流量的值的方法和短信服务器检测所述第一当前流量的值的方法是不同的,所以在移动终端消耗所述第一当前流量时,移动终端检测更新消耗后的第一当前流量的值和短信服务器检测更新消耗后的第一当前流量的值可能存在差别,并且移动终端本地保存的流量阈值和短信服务器本地保存的流量阈值相同,这就可能存在移动终端检测所述第一当前流量的值不大于流量阈值时,短信服务器检测到的所述第一当前流量的值是大于流量阈值的,从而短信服务器不会向移动终端发送第一提醒短信,这就无法完成针对该设定的流量阈值的流量提醒时延的测试过程,影响了流量提醒时延的测试结果的准确性。Since the method for the mobile terminal itself to detect the value of the first current flow is different from the method for the short message server to detect the value of the first current flow, when the mobile terminal consumes the first current flow, the mobile terminal detects the update There may be a difference between the value of the first current flow after consumption and the value of the first current flow after the SMS server detects and updates the consumed first current flow, and the flow threshold locally saved by the mobile terminal is the same as the flow threshold locally saved by the SMS server, so there may be a mobile When the terminal detects that the value of the first current flow is not greater than the flow threshold, the value of the first current flow detected by the short message server is greater than the flow threshold, so that the short message server will not send the first reminder message to the mobile terminal. It is impossible to complete the test process of the traffic alert time delay for the set traffic threshold, which affects the accuracy of the test result of the traffic alert time delay.

所以为了进一步提高流量提醒时延的测试结果的准确性,在进行测试时,一般测试人员可以在移动终端中设置并保存溢出流量,使移动终端根据第一剩余流量和溢出流量确定第一当前流量的值,当消耗所述第一当前流量至所述第一当前流量的值不大于流量阈值时,能够触发短信服务器向移动终端发送第一提醒短信。Therefore, in order to further improve the accuracy of the test results of the traffic reminder delay, during the test, general testers can set and save the overflow traffic in the mobile terminal, so that the mobile terminal can determine the first current traffic according to the first remaining traffic and the overflow traffic When the value of the first current flow is consumed until the value of the first current flow is not greater than the flow threshold, the short message server can be triggered to send a first reminder short message to the mobile terminal.

为能够进行流量提醒时延的测试过程,服务器可以远程操作所述移动终端来完成剩余流量查询和流量订购等操作,此外,服务器远程操作所述移动终端,还可以实现多种场景下的流量提醒时延的测试,包括移动终端所在位于其归属地的普通状态,及移动终端所在位于不同于其归属地的漫游状态等,为了进一步地提高流量提醒时延的测试结果的准确性,还可以让所述移动终端处于多个不同位置进行测试。In order to be able to test the traffic reminder delay, the server can remotely operate the mobile terminal to complete operations such as remaining traffic query and traffic subscription. In addition, the server can remotely operate the mobile terminal to realize traffic reminders in various scenarios The delay test includes the normal state where the mobile terminal is located at its home location, and the roaming state where the mobile terminal is located different from its home location. In order to further improve the accuracy of the test results of the traffic reminder delay, it is also possible to let The mobile terminal is tested in a number of different locations.

在异地旅游、出差等情况下,由于移动终端所在位于不同于其归属地,所以处于漫游状态,用户在消耗移动终端的当前流量至当前流量值达到设定的流量阈值时,运营商的短信服务器检测到移动终端的当前流量值到达设定的流量阈值向移动终端发送第一提醒短信中间经历的流程会更加复杂,例如针对同一运营商,不同的移动终端,其所在的区域和其手机号码的归属地不同,其所在的区域的短信服务器对应的端口和其归属地的短信服务器对应的端口可能不同,在进行流量提醒时,可能需要移动终端的归属地的短信服务器对应的端口,将第一提醒短信转发到该移动终端所属的区域的短信服务器的端口,然后再发送给移动终端。所以为了进一步地提高流量提醒时延的测试结果准确性,就需要测试人员人工将被测的移动终端携带至不同地区或将被测的移动终端邮寄到不同地区。将被测的移动终端邮寄到不同地区,服务器远程操作所述移动终端来完成流量提醒时延的测试,进一步地节约了测试成本,提高了测试效率。In the case of traveling in different places, business trips, etc., because the location of the mobile terminal is different from where it belongs, it is in a roaming state. When the user consumes the current traffic of the mobile terminal until the current traffic value reaches the set traffic threshold, the operator's SMS server Detecting that the current traffic value of the mobile terminal reaches the set traffic threshold, the process of sending the first reminder message to the mobile terminal will be more complicated, for example, for the same operator, different mobile terminals, the area where they are located and the mobile phone number. If the location is different, the port corresponding to the SMS server in the area where it is located may be different from the port corresponding to the SMS server in the location where the mobile terminal belongs. The reminder short message is forwarded to the port of the short message server in the area to which the mobile terminal belongs, and then sent to the mobile terminal. Therefore, in order to further improve the accuracy of the test result of the traffic alert time delay, testers need to manually carry the tested mobile terminal to different regions or mail the tested mobile terminal to different regions. The mobile terminal to be tested is mailed to different regions, and the server remotely operates the mobile terminal to complete the test of traffic reminder time delay, which further saves the test cost and improves the test efficiency.

所述服务器远程操作所述移动终端可以是采用GPRS(General Packet RadioService,通用分组无线服务)无线调度技术来完成远程操作。The remote operation of the mobile terminal by the server may be accomplished by using a GPRS (General Packet Radio Service, General Packet Radio Service) wireless scheduling technology.

所述服务器对移动终端进行远程获取操作可以是移动终端根据所述脚本指令,向服务器发送获取操作请求,服务器针对该获取操作请求,对移动终端进行远程获取操作。The remote acquisition operation performed by the server on the mobile terminal may be that the mobile terminal sends an acquisition operation request to the server according to the script instruction, and the server performs a remote acquisition operation on the mobile terminal according to the acquisition operation request.

移动终端接收到的远程获取操作,向短信服务器发送流量查询请求,其中所述流量查询请求中携带有移动终端的标识信息,针对不同运营商的短信服务器,移动终端发送的流量查询请求不同,针对同一运营商的不同区域的短信服务器对应的端口可能相同可能不同,移动终端发送的流量查询请求可能相同可能不同。The remote acquisition operation received by the mobile terminal sends a traffic query request to the SMS server, wherein the traffic query request carries the identification information of the mobile terminal. For the SMS servers of different operators, the traffic query requests sent by the mobile terminal are different. The ports corresponding to the SMS servers in different regions of the same operator may be the same or different, and the traffic query requests sent by the mobile terminal may be the same or different.

短信服务器针对接收到的移动终端发送的流量查询请求,向该移动终端返回携带有剩余流量的信息,移动终端接收短信服务器返回的信息,确定第一剩余流量。所述移动终端根据接收到的短信服务器返回的信息,确定第一剩余流量的过程可以是,移动终端根据接收到的短信服务器返回的信息,通过前后关键词匹配的方法获取第一剩余流量。The short message server returns information carrying the remaining traffic to the mobile terminal in response to the received traffic query request sent by the mobile terminal, and the mobile terminal receives the information returned by the short message server to determine the first remaining traffic. The process of determining the first remaining flow by the mobile terminal according to the received information returned by the short message server may be that the mobile terminal obtains the first remaining flow by matching the preceding and following keywords according to the received information returned by the short message server.

所述移动终端根据接收到的短信服务器返回的信息,通过前后关键词匹配的方法获取第一剩余流量的过程属于现有技术,在本发明实施例中对该过程不做赘述。The process in which the mobile terminal obtains the first remaining traffic by matching the preceding and following keywords according to the received information returned by the short message server belongs to the prior art, and will not be described in detail in this embodiment of the present invention.

移动终端根据第一剩余流量与预设的溢出流量的和确定第一当前流量的值,如果判断所述第一当前流量的值大于设定的流量阈值,则消耗第一当前流量。The mobile terminal determines the value of the first current flow according to the sum of the first remaining flow and the preset overflow flow, and consumes the first current flow if it judges that the value of the first current flow is greater than the set flow threshold.

移动终端应当消耗的流量的值为:应当消耗的流量的值=剩余流量的值-流量阈值+溢出流量的值,其中流量阈值为具体的数值,如果流量阈值为百分比或小数等表示方式,则应当消耗的流量的值=剩余流量的值-总流量的值*流量阈值+溢出流量的值,其中所述总流量的值预先保存在移动终端中。例如,移动终端中保存的所述总流量的值为100M,流量阈值为总流量的10%,溢出流量的值为3M,移动终端检测到剩余流量的值为80M,根据上述计算过程,应当消耗的流量的值=80-100*10%+3=73M。The value of the traffic that the mobile terminal should consume is: the value of the traffic that should be consumed = the value of the remaining traffic - the traffic threshold + the value of the overflow traffic, where the traffic threshold is a specific value, if the traffic threshold is expressed as a percentage or a decimal, then The value of the flow that should be consumed = the value of the remaining flow - the value of the total flow * the flow threshold + the value of the overflow flow, wherein the value of the total flow is pre-stored in the mobile terminal. For example, the value of the total traffic stored in the mobile terminal is 100M, the traffic threshold is 10% of the total traffic, the value of the overflow traffic is 3M, and the value of the remaining traffic detected by the mobile terminal is 80M. According to the above calculation process, it should consume The value of the flow rate=80-100*10%+3=73M.

由于本发明实施例中,针对多种场景进行测试,位于不同区域的移动终端,服务器采用远程操作的方式,对移动终端进行远程获取操作来完成流量提醒时延的测试,从而测试移动终端在其对应的归属地,以及漫游状态下的流量提醒时延,进一步提高了流量提醒时延的测试结果准确性。Because in the embodiment of the present invention, tests are carried out for various scenarios, the mobile terminal located in different areas, the server adopts the mode of remote operation, and the remote acquisition operation is performed on the mobile terminal to complete the test of the traffic reminder delay, so as to test the mobile terminal in its The corresponding attribution and the traffic alert delay in the roaming state further improve the accuracy of the test result of the traffic alert delay.

实施例3:Example 3:

为了进一步提高流量提醒时延的测试结果准确性,在上述各实施例的基础上,本发明实施例中,如果所述第一当前流量值不大于设定的流量阈值,所述根据接收到的测试脚本中携带的测试指令,消耗第一当前流量之前,所述方法还包括:In order to further improve the accuracy of the test results of the flow reminder delay, on the basis of the above embodiments, in the embodiment of the present invention, if the first current flow value is not greater than the set flow threshold, the received Before the test instruction carried in the test script consumes the first current traffic, the method further includes:

如果所述第一剩余流量的值不为0,消耗所述第一剩余流量;If the value of the first remaining flow is not 0, consume the first remaining flow;

如果接收短信服务器针对检测到所述第一剩余流量的值为0时发送的第二提醒短信,向服务器发送订购请求,根据接收到的服务器针对所述订购请求的远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信;If the receiving short message server sends an order request to the server for the second reminding short message sent when the value of the first remaining traffic is detected to be 0, according to the remote order operation of the received server for the order request, send to the short message server Subscribe to the traffic subscription SMS with the preset first traffic value;

接收短信服务器针对所述流量订购短信返回的订购成功信息;Receiving the order success information returned by the SMS server for the traffic order SMS;

向短信服务器发送流量查询请求,判断在设定的时间长度内是否接收到短信服务器针对所述流量查询请求返回的信息;Send a traffic query request to the SMS server, and judge whether the information returned by the SMS server for the traffic query request is received within the set time length;

如果是,根据所述返回的信息,确定所述移动终端的第二剩余流量,根据所述第二剩余流量与预设的溢出流量的和确定第二当前流量,将所述第二当前流量作为第一当前流量,进行后续步骤。If so, determine the second remaining flow of the mobile terminal according to the returned information, determine the second current flow according to the sum of the second remaining flow and the preset overflow flow, and use the second current flow as The first current flow, proceed to the subsequent steps.

针对所述第一当前流量的值不大于设定的流量阈值,且第一剩余流量的值不为0时,为了确保流量提醒时延的测试能够进行,移动终端需要进行流量订购,使当前流量大于设定的流量阈值,进一步提高流量提醒时延的测试结果准确性,移动终端需要先消耗完第一剩余流量,使第一剩余流量的值为0再进行订购操作。When the value of the first current flow is not greater than the set flow threshold and the value of the first remaining flow is not 0, in order to ensure that the test of flow reminder delay can be carried out, the mobile terminal needs to order the flow, so that the current flow If it is greater than the set flow threshold, the accuracy of the test result of the flow reminder delay is further improved. The mobile terminal needs to consume the first remaining flow first, so that the value of the first remaining flow is 0 before ordering.

移动终端判断所述第一剩余流量的值不为0,消耗第一剩余流量,所述移动终端消耗第一剩余流量可以通过下载文件、播放网络上的视频或音频等方式消耗,所述移动终端采取何种方式消耗流量可以根据所述测试脚本中携带的测试指令进行。具体的通过不同的方式消耗流量的过程属于现有技术,在本发明实施例中对该过程不进行赘述。The mobile terminal judges that the value of the first remaining traffic is not 0, and consumes the first remaining traffic. The mobile terminal can consume the first remaining traffic by downloading files, playing video or audio on the network, etc., and the mobile terminal consumes the first remaining traffic. The way to consume traffic can be performed according to the test instructions carried in the test script. The specific process of consuming traffic in different ways belongs to the prior art, and will not be described in detail in this embodiment of the present invention.

为了进一步提高流量提醒时延的测试结果准确度,所述移动终端检测到所述第一剩余流量的值为0时,可以停止消耗第一剩余流量的操作。In order to further improve the accuracy of the test result of the traffic reminder time delay, when the mobile terminal detects that the value of the first remaining traffic is 0, it may stop the operation of consuming the first surplus traffic.

移动终端在停止消耗第一剩余流量的操作后,可以根据所述脚本指令,每隔设定的时间间隔向短信服务器发送流量查询请求,直至根据接收到的短信服务器针对流量查询请求返回的信息,确定的第一剩余流量的值为0,向服务器发送订购请求,其中所述订购请求中包括所述移动终端的标识信息,其中所述设定的时间间隔可以是5秒、1分钟或5分钟等,在测试场景为漫游状态下,由于所述移动终端对应的归属地与其所在的区域不同,所以可将该设定的时间间隔设置的较长。After the mobile terminal stops the operation of consuming the first remaining traffic, it can send a traffic query request to the SMS server at a set time interval according to the script instruction, until according to the received information returned by the SMS server for the traffic query request, The value of the determined first remaining traffic is 0, and an order request is sent to the server, wherein the order request includes the identification information of the mobile terminal, and the set time interval can be 5 seconds, 1 minute or 5 minutes etc., when the test scenario is a roaming state, since the corresponding home of the mobile terminal is different from the area where it is located, the set time interval can be set longer.

服务器接收移动终端发送的订购请求,根据所述订购请求,对所述移动终端进行远程订购操作。所述服务器远程操作所述移动终端可以是采用GPRS无线调度技术来完成远程操作。The server receives the order request sent by the mobile terminal, and performs a remote order operation on the mobile terminal according to the order request. The remote operation of the mobile terminal by the server may be accomplished by using GPRS wireless scheduling technology.

移动终端接收到远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信,所述预设第一流量值可以是保存在移动终端中,可以是保存在所述测试脚本中,也可以是保存在服务器中。其中所述流量订购短信中携带有移动终端的标识信息,针对不同运营商的短信服务器,移动终端发送的流量订购短信不同,针对同一运营商的不同区域的短信服务器对应的端口可能相同可能不同,移动终端发送的流量订购短信可能相同可能不同。The mobile terminal receives the remote ordering operation, and sends to the SMS server a traffic subscription text message ordering a preset first traffic value, the preset first traffic value may be stored in the mobile terminal, or may be stored in the test script, It can also be saved in the server. Wherein the mobile terminal identification information is carried in the traffic subscription short message, for the short message servers of different operators, the traffic subscription short messages sent by the mobile terminal are different, and the ports corresponding to the short message servers in different regions of the same operator may be the same or different, The traffic subscription SMS sent by the mobile terminal may be the same or different.

短信服务器针对移动终端发送的流量订购短信,向移动终端返回订购成功信息,移动终端接收到所述订购成功信息后,根据所述脚本指令向短信服务器发送流量查询请求,启动定时器,判断在设定的时间长度内是否接收到短信服务器针对流量查询请求返回的信息,如果接收到,则认为订购的预设第一流量值的流量到账,进行后续步骤;如果没有接收到,则认为任务超时,移动终端强制结束该测试任务,针对下一个流量阈值进行流量提醒时延的测试,其中设定的时间长度可以为5分钟、20分钟或1小时等,在测试场景为漫游状态下,由于所述移动终端对应的归属地与其所在的区域不同,所以可将该设定的时间长度设置的较长。The short message server returns ordering success information to the mobile terminal for the traffic ordering short message sent by the mobile terminal. After receiving the ordering success message, the mobile terminal sends a traffic query request to the short message server according to the script instruction, starts a timer, and judges whether the traffic is in the setting. Whether the information returned by the SMS server for the traffic query request is received within a predetermined length of time. If it is received, it will be considered that the ordered traffic of the first preset traffic value has arrived, and the next steps will be carried out; if it is not received, it will be considered that the task has timed out. , the mobile terminal forcibly terminates the test task, and performs a traffic reminder delay test for the next traffic threshold, where the set time length can be 5 minutes, 20 minutes, or 1 hour. The attribution corresponding to the above-mentioned mobile terminal is different from the area where it is located, so the set time length can be set longer.

如果移动终端在设定的时间长度内接收到短信服务器返回的信息,则根据所述返回的信息,确定所述移动终端的第二剩余流量,根据第二剩余流量与溢出流量的和确定第二当前流量,将所述第二当前流量作为第一当前流量,进行后续步骤。If the mobile terminal receives the information returned by the short message server within the set time length, then according to the returned information, determine the second remaining flow of the mobile terminal, and determine the second remaining flow according to the sum of the second remaining flow and the overflow flow. For the current flow, the second current flow is used as the first current flow, and the subsequent steps are performed.

由于本发明实施例中,针对所述第一当前流量的值不大于设定的流量阈值,且第一剩余流量的值不为0时,为了确保流量提醒时延的测试能够进行,移动终端需要进行流量订购,使当前流量大于设定的流量阈值,移动终端先消耗完当前流量,使当前流量的值为0再进行订购操作,进一步提高流量提醒时延的测试结果准确性。Since in the embodiment of the present invention, when the value of the first current traffic is not greater than the set traffic threshold and the value of the first remaining traffic is not 0, in order to ensure that the traffic reminder delay test can be carried out, the mobile terminal needs Order traffic to make the current traffic greater than the set traffic threshold, and the mobile terminal consumes the current traffic first, so that the value of the current traffic is 0 before ordering, further improving the accuracy of the test results of the traffic reminder delay.

实施例4:Example 4:

为了进一步提高流量提醒时延的测试结果准确性,在上述各实施例的基础上,本发明实施例中,如果所述第一当前流量的值不大于设定的流量阈值,所述根据接收到的测试脚本中携带的测试指令,消耗第一当前流量之前,所述方法还包括:In order to further improve the accuracy of the test results of the flow reminder delay, on the basis of the above embodiments, in the embodiment of the present invention, if the value of the first current flow is not greater than the set flow threshold, the received Before the test instruction carried in the test script consumes the first current traffic, the method further includes:

如果所述第一剩余流量的值为0,向服务器发送订购请求,根据接收到的服务器针对所述订购请求的远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信;If the value of the first remaining traffic is 0, an order request is sent to the server, and according to the received remote order operation of the server for the order request, a traffic order text message for ordering a preset first traffic value is sent to the SMS server;

接收短信服务器针对所述流量订购短信返回的订购成功信息;Receiving the order success information returned by the SMS server for the traffic order SMS;

向短信服务器发送流量查询请求,判断在设定的时间长度内是否接收到短信服务器针对所述流量查询请求返回的信息;Send a traffic query request to the SMS server, and judge whether the information returned by the SMS server for the traffic query request is received within the set time length;

如果是,根据所述返回的信息,确定所述移动终端的第三剩余流量,根据所述第三剩余流量与预设的溢出流量的和确定第三当前流量,将所述第三当前流量作为第一当前流量,进行后续步骤。If so, determine the third remaining flow of the mobile terminal according to the returned information, determine the third current flow according to the sum of the third remaining flow and the preset overflow flow, and use the third current flow as The first current flow, proceed to the subsequent steps.

针对所述第一当前流量的值不大于设定的流量阈值,且第一剩余流量的值为0时,为了确保流量提醒时延的测试能够进行,移动终端需要进行流量订购,使第一当前流量大于设定的流量阈值,从而进一步提高了流量提醒时延的测试结果准确性。When the value of the first current traffic is not greater than the set traffic threshold, and the value of the first remaining traffic is 0, in order to ensure that the traffic reminder delay test can be carried out, the mobile terminal needs to order traffic, so that the first current The flow is greater than the set flow threshold, thereby further improving the accuracy of the test result of the flow reminder delay.

移动终端可以根据所述脚本指令,向服务器发送订购请求,其中所述订购请求中包括所述移动终端的标识信息。The mobile terminal may send an order request to the server according to the script instruction, wherein the order request includes the identification information of the mobile terminal.

服务器接收移动终端发送的订购请求,根据所述订购请求,对所述移动终端进行远程订购操作,所述服务器远程操作所述移动终端可以是采用GPRS无线调度技术来完成远程操作。The server receives the order request sent by the mobile terminal, and performs a remote order operation on the mobile terminal according to the order request. The remote operation of the mobile terminal by the server may be accomplished by using GPRS wireless scheduling technology.

移动终端接收到远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信,所述预设第一流量值可以是保存在移动终端中,可以是保存在所述测试脚本中,也可以是保存在服务器中。其中所述流量订购短信中携带有移动终端的标识信息,针对不同运营商的短信服务器,移动终端发送的流量订购短信不同,针对同一运营商的不同区域的短信服务器对应的端口可能相同可能不同,移动终端发送的流量订购短信可能相同可能不同。The mobile terminal receives the remote ordering operation, and sends to the SMS server a traffic order text message ordering a preset first traffic value, the preset first traffic value may be stored in the mobile terminal, or may be stored in the test script, It can also be saved in the server. Wherein the mobile terminal identification information is carried in the traffic subscription short message, for the short message servers of different operators, the traffic subscription short messages sent by the mobile terminal are different, and the ports corresponding to the short message servers in different regions of the same operator may be the same or different, The traffic subscription SMS sent by the mobile terminal may be the same or different.

短信服务器针对移动终端发送的流量订购短信,向移动终端返回订购成功信息,移动终端接收到所述订购成功信息后,根据所述脚本指令向短信服务器发送流量查询请求,启动定时器,判断在设定的时间长度内是否接收到短信服务器针对流量查询请求返回的信息,如果接收到,则认为订购的预设第一流量值的流量到账,进行后续步骤;如果没有接收到,则认为任务超时,移动终端强制结束该测试任务,针对下一个流量阈值进行流量提醒时延的测试,其中设定的时间长度可以为5分钟、20分钟或1小时等,在测试场景为漫游状态下,由于所述移动终端对应的归属地与其所在的区域不同,所以可将该设定的时间长度设置的较长。The short message server returns ordering success information to the mobile terminal for the traffic ordering short message sent by the mobile terminal. After receiving the ordering success message, the mobile terminal sends a traffic query request to the short message server according to the script instruction, starts a timer, and judges whether the traffic is in the setting. Whether the information returned by the SMS server for the traffic query request is received within a predetermined length of time. If it is received, it will be considered that the ordered traffic of the first preset traffic value has arrived, and the next steps will be carried out; if it is not received, it will be considered that the task has timed out. , the mobile terminal forcibly terminates the test task, and performs a traffic reminder delay test for the next traffic threshold, where the set time length can be 5 minutes, 20 minutes, or 1 hour. The attribution corresponding to the above-mentioned mobile terminal is different from the area where it is located, so the set time length can be set longer.

如果移动终端在设定的时间长度内接收到短信服务器返回的信息,则根据所述返回的信息,确定所述移动终端的第三剩余流量,根据第三剩余流量与溢出流量的和确定第三当前流量,将所述第三当前流量作为第一当前流量,进行后续步骤。If the mobile terminal receives the information returned by the short message server within the set time length, then according to the returned information, determine the third remaining flow of the mobile terminal, and determine the third remaining flow according to the sum of the third remaining flow and the overflow flow. For the current flow, the third current flow is used as the first current flow, and the subsequent steps are performed.

为了流量提醒阈值的测试结果进行分析,在所述确定流量提醒时延后,所述方法还包括:In order to analyze the test results of the traffic reminder threshold, after the time delay of determining the traffic reminder, the method further includes:

将携带有所述流量提醒时延的测试结果发送给服务器。Send the test result carrying the traffic alert time delay to the server.

如果在流量提醒时延的测试过程中,移动终端存在强制终止任务的操作,则向服务器发送告警信息,此外在实际测试过程中,可能发生移动终端由于电力不足强制关机或断网等情况,服务器在将测试脚本发送给移动终端后,启动定时器,判断在设定的测试时长内是否接收到移动终端发送的测试结果,如果没有,则产生告警信息或针对该移动终端在本地标识任务失败,其中设定的测试时长可以为5分钟、20分钟或1小时等,在测试场景为漫游状态下,由于所述移动终端对应的归属地与其所在的区域不同,所以可将该设定的测试时长设置的较长。If during the test of traffic reminder delay, the mobile terminal has an operation to forcibly terminate the task, it will send an alarm message to the server. In addition, in the actual test process, the mobile terminal may be forced to shut down or disconnect due to insufficient power. After the test script is sent to the mobile terminal, start the timer to judge whether the test result sent by the mobile terminal is received within the set test duration, if not, then generate an alarm message or fail the local identification task for the mobile terminal, Wherein the set test duration can be 5 minutes, 20 minutes or 1 hour, etc., when the test scene is in a roaming state, since the attribution corresponding to the mobile terminal is different from the area where it is located, the set test duration can be The setting is longer.

下面以一个具体的实施例对上述实施例进行说明,图2A为本发明实施例提供的另一种流量提醒时延的测试过程的示意图,该过程包括以下步骤:The above-mentioned embodiment is described below with a specific embodiment. FIG. 2A is a schematic diagram of another test process of traffic alert delay provided by the embodiment of the present invention. The process includes the following steps:

S201:根据接收到所述服务器的远程获取操作,向短信服务器发送流量查询请求;根据接收到的短信服务器返回的信息,确定所述移动终端的第一剩余流量;根据所述第一剩余流量与预设的溢出流量的和确定第一当前流量的值,判断第一当前流量的值是否大于设定的流量阈值;如果是,进行S208;如果否,进行S202。S201: Send a traffic query request to the short message server according to receiving the remote acquisition operation of the server; determine the first remaining traffic of the mobile terminal according to the received information returned by the short message server; and determine the first remaining traffic of the mobile terminal according to the first remaining traffic and The sum of the preset overflow flow determines the value of the first current flow, and judges whether the value of the first current flow is greater than the set flow threshold; if yes, go to S208; if not, go to S202.

S202:判断所述第一剩余流量的值是否为0;如果是,进行S204;如果否,进行S203。S202: Determine whether the value of the first remaining flow is 0; if yes, go to S204; if not, go to S203.

S203:消耗所述第一剩余流量,接收短信服务器针对检测到所述第一剩余流量的值为0时发送的第二提醒短信。S203: Consume the first remaining traffic, and receive a second reminder text message sent by the short message server when detecting that the value of the first remaining traffic is 0.

S204:向服务器发送订购请求,根据接收到的服务器针对所述订购请求的远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信。S204: Send a subscription request to the server, and send a traffic subscription text message for ordering a preset first traffic value to the short message server according to the received remote subscription operation of the server for the subscription request.

S205:接收短信服务器针对所述流量订购短信返回的订购成功信息。S205: Receive subscription success information returned by the SMS server regarding the traffic subscription SMS.

S206:向短信服务器发送流量查询请求,判断在设定的时间长度内是否接收到短信服务器针对所述流量查询请求返回的信息;如果是,进行S207。S206: Send a traffic query request to the short message server, and judge whether the information returned by the short message server for the traffic query request is received within a set time period; if yes, go to S207.

当然,如果在设定的时间长度内没有接收到短信服务器针对所述流量查询请求返回的信息,移动终端可以是继续向短信服务器发送流量查询请求,也可以是强制终止本次流量提醒时延的测试过程等。Of course, if the short message server does not receive the information returned by the short message server for the traffic query request within the set time length, the mobile terminal can continue to send the traffic query request to the short message server, or it can forcefully terminate the time delay of this traffic reminder. testing process etc.

S207:根据所述返回的信息,确定所述移动终端的剩余流量,根据所述剩余流量与预设的溢出流量的和确定当前流量,将所述当前流量作为第一当前流量。S207: Determine the remaining flow of the mobile terminal according to the returned information, determine the current flow according to the sum of the remaining flow and the preset overflow flow, and use the current flow as the first current flow.

S208:根据接收到的测试脚本中携带的测试指令,消耗第一当前流量,并更新消耗后的第一当前流量的值;如果检测到所述第一当前流量的值不大于设定的流量阈值,则记录当前时刻对应的第一时间;接收第一提醒短信,并记录接收到所述第一提醒短信的第二时间,根据所述第一时间及所述第二时间,确定流量提醒时延。S208: Consume the first current flow according to the test instruction carried in the received test script, and update the value of the consumed first current flow; if it is detected that the value of the first current flow is not greater than the set flow threshold , then record the first time corresponding to the current moment; receive the first reminder message, and record the second time when the first reminder message is received, and determine the traffic reminder delay according to the first time and the second time .

由于本发明实施例中。针对所述第一当前流量值不大于设定的流量阈值,且第一剩余流量的值不为0时,为了确保流量提醒时延的测试能够进行,移动终端需要进行流量订购,使第一当前流量大于设定的流量阈值,进一步提高流量提醒时延的测试结果准确性。As in the embodiment of the present invention. When the first current traffic value is not greater than the set traffic threshold and the value of the first remaining traffic is not 0, in order to ensure that the traffic reminder delay test can be carried out, the mobile terminal needs to order traffic, so that the first current The flow is greater than the set flow threshold, which further improves the accuracy of the test result of the flow reminder delay.

实施例5:Example 5:

图2B为本发明实施例提供的一种流量提醒时延的测试系统的结构示意图,如图2B所示,所述流量提醒时延的测试系统包括:服务器21、移动终端22和短信服务器23;其中,2B is a schematic structural diagram of a test system for traffic reminder delay provided by an embodiment of the present invention. As shown in FIG. 2B , the test system for traffic reminder delay includes: a server 21, a mobile terminal 22 and a short message server 23; in,

所述服务器21,用于向移动终端22发送携带有测试指令的测试脚本;The server 21 is configured to send a test script carrying a test instruction to the mobile terminal 22;

所述移动终端22,用于根据接收到的测试脚本中携带的测试指令,消耗第一当前流量,并更新消耗后的第一当前流量的值;如果检测到所述第一当前流量的值不大于设定的流量阈值,则记录当前时刻对应的第一时间;接收第一提醒短信,并记录接收到所述第一提醒短信的第二时间;根据所述第一时间及所述第二时间,确定流量提醒时延;The mobile terminal 22 is configured to consume the first current flow according to the test instruction carried in the received test script, and update the value of the consumed first current flow; if it is detected that the value of the first current flow is not Greater than the set flow threshold, then record the first time corresponding to the current moment; receive the first reminder text message, and record the second time when the first reminder text message is received; according to the first time and the second time , to determine the flow reminder delay;

所述短信服务器23,用于如果检测到所述移动终端22的第一当前流量的值不大于设定的流量阈值,向所述移动终端22发送第一提醒短信。The short message server 23 is configured to send a first reminder short message to the mobile terminal 22 if it detects that the first current traffic value of the mobile terminal 22 is not greater than a set traffic threshold.

为了提高流量提醒时延的测试结果准确性,在该系统中部署了服务器、移动终端和短信服务器,所述移动终端主要是指手机,但不排除其他设备,比如平板电脑、个人数字助理(PDA)等能够消耗流量的设备,对于本发明的核心构思来说,手机能够充分发挥本发明的优势,但手机并非本发明的移动终端的唯一表现形式。所述短信服务器属于所述移动终端对应的运营商所有。In order to improve the accuracy of the test results of traffic reminder delay, servers, mobile terminals and short message servers are deployed in the system. The mobile terminals mainly refer to mobile phones, but do not exclude other devices, such as tablet computers, personal digital assistants (PDAs) ) and other devices that can consume traffic, for the core idea of the present invention, the mobile phone can fully exert the advantages of the present invention, but the mobile phone is not the only form of expression of the mobile terminal of the present invention. The short message server belongs to the operator corresponding to the mobile terminal.

所述服务器21,还用于采用通用分组无线服务GPRS无线调度技术,对所述移动终端22进行远程获取操作;The server 21 is also used to perform remote acquisition operations on the mobile terminal 22 by using the General Packet Radio Service GPRS wireless scheduling technology;

所述移动终端22,还用于根据接收到所述服务器21的远程获取操作,向短信服务器23发送流量查询请求;根据接收到的短信服务器23返回的信息,确定所述移动终端22的第一剩余流量;根据所述第一剩余流量与预设的溢出流量的和确定第一当前流量的值,判断所述第一当前流量的值是否大于设定的流量阈值,如果是,根据接收到的测试脚本中携带的测试指令,消耗第一当前流量;The mobile terminal 22 is also used to send a flow query request to the short message server 23 according to receiving the remote acquisition operation of the server 21; Residual flow: determine the value of the first current flow according to the sum of the first remaining flow and the preset overflow flow, and determine whether the value of the first current flow is greater than the set flow threshold, and if so, according to the received The test command carried in the test script consumes the first current flow;

所述短信服务器23,还用于接收所述移动终端22发送的流量查询请求,针对所述流量查询请求返回信息。The short message server 23 is further configured to receive the traffic query request sent by the mobile terminal 22, and return information in response to the traffic query request.

所述移动终端22,还用于如果所述第一剩余流量的值不为0,消耗所述第一剩余流量;如果接收短信服务器23针对检测到所述剩余流量的值为0时发送的第二提醒短信,向服务器21发送订购请求,根据接收到的服务器21针对所述订购请求的远程订购操作,向短信服务器23发送订购预设第一流量值的流量订购短信;接收短信服务器23针对所述流量订购短信返回的订购成功信息;向短信服务器23发送流量查询请求,判断在设定的时间长度内是否接收到短信服务器23针对所述流量查询请求返回的信息;如果是,根据所述返回的信息,确定所述移动终端22的第二剩余流量,根据所述第二剩余流量与预设的溢出流量的和确定第二当前流量,将所述第二当前流量作为第一当前流量,根据接收到的测试脚本中携带的测试指令,消耗第一当前流量;The mobile terminal 22 is also configured to consume the first remaining flow if the value of the first remaining flow is not 0; if the receiving message server 23 detects that the value of the remaining flow is 0, the Two remind short messages, send order request to server 21, according to the remote order operation of described order request by server 21 received, send to short message server 23 the traffic order short message of ordering preset first traffic value; Receive short message server 23 for all The ordering success information that the above-mentioned traffic order short message returns; Send traffic query request to short message server 23, judge whether to receive the information that short message server 23 returns for described traffic query request in the length of time of setting; If yes, according to described return information, determine the second remaining flow of the mobile terminal 22, determine the second current flow according to the sum of the second remaining flow and the preset overflow flow, and use the second current flow as the first current flow, according to The test command carried in the received test script consumes the first current flow;

所述服务器21,还用于接收所述移动终端22发送的订购请求,采用GPRS无线调度技术,对所述移动终端22进行远程订购操作;The server 21 is also configured to receive the order request sent by the mobile terminal 22, and perform remote order operations on the mobile terminal 22 by using GPRS wireless scheduling technology;

所述短信服务器23,还用于如果检测到所述移动终端22的第一剩余流量的值为0时发送的第二提醒短信;接收所述移动终端22发送的订购预设第一流量值的流量订购短信,为所述移动终端22订购所述第一流量值的流量,并向所述移动终端22返回订购成功信息;接收所述移动终端22发送的流量查询请求,向所述移动终端22返回第二剩余流量的信息。The short message server 23 is also used for sending a second reminder text message if it detects that the value of the first remaining flow of the mobile terminal 22 is 0; receiving the order preset first flow value sent by the mobile terminal 22 A traffic order SMS, ordering the traffic of the first traffic value for the mobile terminal 22, and returning order success information to the mobile terminal 22; receiving the traffic query request sent by the mobile terminal 22, and sending the mobile terminal 22 Returns information about the second remaining flow.

所述移动终端22,还用于如果所述第一剩余流量的值为0,向服务器21发送订购请求,根据接收到的服务器21针对所述订购请求的远程订购操作,向短信服务器23发送订购预设第一流量值的流量订购短信;接收短信服务器23针对所述流量订购短信返回的订购成功信息;向短信服务器23发送流量查询请求,判断在设定的时间长度内是否接收到短信服务器23针对所述流量查询请求返回的信息;如果是,根据所述返回的信息,确定所述移动终端22的第三剩余流量,根据所述第三剩余流量与预设的溢出流量的和确定第三当前流量,将所述第三当前流量作为第一当前流量,根据接收到的测试脚本中携带的测试指令,消耗第一当前流量。The mobile terminal 22 is further configured to send an order request to the server 21 if the value of the first remaining traffic is 0, and send an order request to the short message server 23 according to the received remote order operation of the order request by the server 21. Preset the traffic order short message of the first traffic value; Receive the order success information returned by SMS server 23 for the traffic subscription text message; Send traffic query request to SMS server 23, judge whether to receive SMS server 23 within the length of time set For the information returned by the flow query request; if so, according to the returned information, determine the third remaining flow of the mobile terminal 22, and determine the third remaining flow according to the sum of the third remaining flow and the preset overflow flow The current flow, using the third current flow as the first current flow, consumes the first current flow according to the test instruction carried in the received test script.

所述移动终端22,还用于将携带有所述流量提醒时延的测试结果发送给服务器21;The mobile terminal 22 is further configured to send the test result carrying the traffic reminder delay to the server 21;

所述服务器21,还用于接收所述移动终端22发送的携带有所述流量提醒时延的测试结果。The server 21 is further configured to receive the test result sent by the mobile terminal 22 and carrying the traffic reminder delay.

由于本发明实施例中移动终端检测到当前流量值不大于设定的流量阈值时,记录当前时刻对应的第一时间,及接收到短信服务器检测到当前流量值不大于设定的流量阈值发送的提醒短信,记录对应的第二时间,并且所述第一时间为用户流量理论提醒时刻,所述第二时间为用户流量实际提醒时刻,通过第一时间和第二时间确定流量提醒时延,覆盖了流量提醒时延的所有环节,因此提高了流量提醒时延的测试结果准确度。Because in the embodiment of the present invention, when the mobile terminal detects that the current flow value is not greater than the set flow threshold, it records the first time corresponding to the current moment, and receives a reminder from the SMS server that the current flow value is not greater than the set flow threshold. SMS, record the corresponding second time, and the first time is the theoretical reminder time of user traffic, and the second time is the actual reminder time of user traffic, the traffic reminder delay is determined by the first time and the second time, covering All aspects of the traffic reminder delay, thus improving the accuracy of the test result of the traffic reminder delay.

实施例6:Embodiment 6:

在上述各实施例的基础上,本发明实施例中以一个具体的实施例对上述各实施例进行说明,图3为本发明实施例提供的一种流量提醒时延的测试过程示意图,如图3所示,该过程包括以下步骤:On the basis of the above-mentioned embodiments, in the embodiment of the present invention, a specific embodiment is used to illustrate the above-mentioned embodiments. Fig. 3 is a schematic diagram of the test process of a flow reminder delay provided by the embodiment of the present invention, as shown in Fig. 3, the process includes the following steps:

S301:测试任务调度阶段。S301: Test task scheduling stage.

测试人员预先在服务器中保存有脚本生成算法,所述脚本生成算法具体包括测试任务调度策略,服务器根据所述脚本生成算法中的调度策略,生成针对不同移动终端的流量提醒时延的测试任务,所述流量提醒时延的测试任务中包括不同移动终端执行测试任务的优先级及测试任务的周期性等。服务器在针对不同移动终端的流量提醒时延的测试任务生成后,将所述流量提醒时延的测试任务的任务状态标记为未调度。进一步地,为了减少测试次数,节约资源,服务器生成的流量提醒时延的测试任务可以按照移动终端的手机号码的归属地,将相同归属地的手机号码作为一组生成的。The testers have stored the script generation algorithm in the server in advance, and the script generation algorithm specifically includes the test task scheduling strategy, and the server generates the test task for the traffic reminder time delay of different mobile terminals according to the scheduling strategy in the script generation algorithm, The test task of the traffic reminder delay includes the priority of different mobile terminals to execute the test task, the periodicity of the test task, and the like. After the server generates the test task for the traffic alert delay of different mobile terminals, it marks the task state of the traffic alert delay test task as unscheduled. Further, in order to reduce the number of tests and save resources, the traffic reminder delay test task generated by the server can be generated according to the mobile phone numbers of the mobile terminal, and the mobile phone numbers of the same attribution can be generated as a group.

例如服务器根据调度策略,针对第一移动终端生成的流量提醒时延的测试任务为2017年3月23日上午10点执行,优先级为最高,周期性为仅一次,并标记该测试任务的任务状态为未调度,针对第二移动终端生成的流量提醒时延的测试任务为2017年3月23日上午11点执行,优先级为普通,周期性为仅一次,并标记该测试任务的任务状态为未调度。For example, according to the scheduling strategy, the server will execute the test task of the traffic reminder delay generated by the first mobile terminal at 10:00 am on March 23, 2017, with the highest priority and only once periodicity, and mark the test task as a task The status is unscheduled, and the test task for the traffic reminder delay generated by the second mobile terminal is executed at 11 am on March 23, 2017. The priority is normal and the periodicity is only once, and the task status of the test task is marked is unscheduled.

针对不同移动终端的流量阈值可以是一个,也可以为多个,如果一个移动终端的流量阈值为多个,所述服务器针对该移动终端生成的流量提醒时延的测试任务可以为一个,可以为多个。There can be one or more traffic thresholds for different mobile terminals. If there are multiple traffic thresholds for a mobile terminal, the server can have one traffic reminder delay test task generated by the mobile terminal. Multiple.

S302:测试任务派发阶段。S302: the test task distribution stage.

本发明实施例中,在待测试的移动终端中安装有进行测试的测试客户端软件,移动终端和服务器之间的数据交互可以通过所述测试客户端软件来完成。In the embodiment of the present invention, the test client software for testing is installed in the mobile terminal to be tested, and the data interaction between the mobile terminal and the server can be completed through the test client software.

移动终端向服务器发送任务执行查询请求,其中所述任务执行查询请求中携带有移动终端的标识信息,所述移动终端的标识信息为安装在该移动终端上的SIM卡对应的手机号码与该移动终端对应的GPS坐标的组合信息,服务器在接收到任务执行查询请求后,判断所述GPS坐标是否位于所述手机号码的归属地。The mobile terminal sends a task execution query request to the server, wherein the task execution query request carries identification information of the mobile terminal, and the identification information of the mobile terminal is the mobile phone number corresponding to the SIM card installed on the mobile terminal and the mobile phone number corresponding to the mobile terminal. The combined information of the GPS coordinates corresponding to the terminal, after the server receives the task execution query request, determines whether the GPS coordinates are located at the home of the mobile phone number.

如果是,服务器根据所述手机号码的归属地判断本地是否保存有针对该归属地的待派发的测试任务,如果没有,则向所述移动终端返回任务结束的信息。如果有,在本地查找到针对所述移动终端的测试任务,将所述测试任务封装为待派发任务应答包发送给所述移动终端。If so, the server judges according to the location of the mobile phone number whether there is a test task to be dispatched for the location stored locally, and if not, returns the information that the task is completed to the mobile terminal. If there is, the test task for the mobile terminal is found locally, and the test task is packaged into a task response packet to be dispatched and sent to the mobile terminal.

为了避免同一测试任务重复派发多次,服务器将待派发任务应答包发送给移动终端后,可以是直接将对应的测试任务的任务状态标记为已调度,也可以是启动定时器,判断在设定的时间长度内是否接收到所述移动终端返回的接收确认信息,如果是,将对应的测试任务的任务状态标记为已调度;如果没有,则产生告警信息或针对该移动终端在本地标识任务失败。In order to avoid repeatedly dispatching the same test task multiple times, after the server sends the response packet of the task to be dispatched to the mobile terminal, it can directly mark the task status of the corresponding test task as scheduled, or it can start a timer to determine whether the Whether the receiving confirmation information returned by the mobile terminal is received within the time length, if yes, the task status of the corresponding test task is marked as scheduled; if not, an alarm message is generated or the task is locally identified as failed for the mobile terminal .

S303:测试任务执行阶段。S303: a test task execution stage.

移动终端接收到待派发任务应答包后,测试客户端软件在接收到的待派发任务应答包中解析测试任务的测试脚本。After the mobile terminal receives the response packet of the task to be dispatched, the test client software parses the test script of the test task in the received response packet of the task to be dispatched.

移动终端根据测试脚本中的测试指令,向服务器发送操作请求,服务器针对该获取操作请求,对移动终端进行远程获取操作,移动终端根据接收到的所述服务器的远程获取操作,向短信服务器的指定端口发送流量查询请求,根据接收到的短信服务器返回的信息,通过前后关键词匹配的方法确定所述移动终端的剩余流量。The mobile terminal sends an operation request to the server according to the test instruction in the test script, and the server performs a remote acquisition operation on the mobile terminal according to the acquisition operation request, and the mobile terminal sends the specified message server to the short message server according to the received remote acquisition operation of the server. The port sends a flow query request, and according to the received information returned by the short message server, the remaining flow of the mobile terminal is determined by matching keywords before and after.

移动终端确定剩余流量后,可以是将剩余流量确定为第一当前流量,直接判断第一当前流量值是否大于设定的流量阈值,也可以是根据剩余流量和溢出流量的和确定第一当前流量的值,判断第一当前流量的值是否大于设定的流量阈值。After determining the remaining flow, the mobile terminal may determine the remaining flow as the first current flow, and directly judge whether the first current flow value is greater than the set flow threshold, or determine the first current flow based on the sum of the remaining flow and the overflow flow value, and determine whether the value of the first current flow is greater than the set flow threshold.

如果是,通过下载文件的方式,消耗第一当前流量,更新消耗后的第一当前流量的值,通过循环执行操作系统提供的网络流量方法来检测第一当前流量的值,如果检测到所述第一当前流量的值不大于设定的流量阈值,则通过调用时钟应用记录当前时刻对应的第一时间,并保存所述第一时间。移动终端应当消耗的流量值为:应当消耗的流量的值=剩余流量的值-总流量的值*流量阈值+溢出流量的值,其中流量阈值为百分比或小数等表示方式,所述总流量的值预先保存在移动终端中。If so, consume the first current flow by downloading files, update the value of the consumed first current flow, and detect the value of the first current flow by cyclically executing the network flow method provided by the operating system, if the value of the first current flow is detected If the value of the first current flow is not greater than the set flow threshold, the first time corresponding to the current time is recorded by calling the clock application, and the first time is saved. The flow value that the mobile terminal should consume is: the value of the flow that should be consumed = the value of the remaining flow - the value of the total flow * the flow threshold + the value of the overflow flow, where the flow threshold is expressed as a percentage or a decimal, etc., and the total flow The value is pre-stored in the mobile terminal.

短信服务器检测到所述移动终端的第一当前流量的值不大于设定的流量阈值时,向所述移动终端发送第一提醒短信,移动终端接收第一提醒短信,通过调用时钟应用获取接收到第一提醒短信时对应的第二时间,并保存所述第二时间,计算所述第一时间和所述第二时间的差值,将该差值作为流量提醒时延。When the short message server detects that the value of the first current flow of the mobile terminal is not greater than the set flow threshold, it sends a first reminder message to the mobile terminal, and the mobile terminal receives the first reminder message, and obtains the received message by calling the clock application. The second time corresponding to the first reminder message, and save the second time, calculate the difference between the first time and the second time, and use the difference as the flow reminder delay.

如果所述移动终端判断第一当前流量值不大于设定的流量阈值,判断第一剩余流量的值是否为0,如果不为0,则消耗第一剩余流量,按照设定的第一时间间隔向短信服务发送流量查询请求,直至接收到短信服务器针对检测到所述第一剩余流量的值为0时发送的第二提醒短信,向服务器发送订购请求,其中所述第一时间间隔可以为10秒、5分钟或1小时等,在测试场景为漫游状态下,由于所述移动终端对应的归属地与其所在的区域不同,所以可将该设定的时间间隔设置的较长。If the mobile terminal judges that the first current flow value is not greater than the set flow threshold, it judges whether the value of the first remaining flow is 0, and if it is not 0, consumes the first remaining flow, according to the set first time interval Send a flow query request to the SMS service until the second reminder message sent by the SMS server for detecting that the value of the first remaining flow is 0 is received, and send an order request to the server, wherein the first time interval can be 10 Seconds, 5 minutes, or 1 hour, etc., when the test scenario is in a roaming state, since the home location corresponding to the mobile terminal is different from the area where it is located, the set time interval can be set longer.

服务器接收移动终端发送的订购请求,根据所述订购请求,对所述移动终端进行远程订购操作,移动终端根据接收到的服务器针对所述订购请求的远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信,接收短信服务器针对所述流量订购短信返回的订购成功信息,移动终端按照设定的第二时间间隔向短信服务器发送流量查询请求,其中所述第二时间间隔与所述第一时间间隔可以相同可以不同,所述第二时间间隔可以为20秒、5分钟或1小时等。The server receives the order request sent by the mobile terminal, and performs a remote order operation on the mobile terminal according to the order request, and the mobile terminal sends an order preset number to the short message server according to the received remote order operation of the server for the order request. A traffic subscription short message of a traffic value, receiving the order success information returned by the short message server for the traffic subscription short message, the mobile terminal sends a traffic query request to the short message server according to a set second time interval, wherein the second time interval is the same as the set The first time interval may be the same or different, and the second time interval may be 20 seconds, 5 minutes, or 1 hour.

移动终端判断在设定的时间长度内是否接收到短信服务器针对所述流量查询请求返回的信息,如果接收到,则认为订购的预设第一流量值的流量已经到账,则根据返回的信息,确定所述移动终端的第二剩余流量,根据所述第二剩余流量与预设的溢出流量的和确定第二当前流量,将所述第二当前流量作为第一当前流量,并且移动终端根据接收到的测试脚本中携带的测试指令,消耗第一当前流量,具体的移动终端通过下载文件的方式,消耗第一当前流量。The mobile terminal judges whether it has received the information returned by the SMS server for the traffic query request within the set time length, if received, it considers that the ordered traffic of the preset first traffic value has arrived, and then according to the returned information , determine the second remaining flow of the mobile terminal, determine the second current flow according to the sum of the second remaining flow and the preset overflow flow, use the second current flow as the first current flow, and the mobile terminal according to The test instruction carried in the received test script consumes the first current traffic, and the specific mobile terminal consumes the first current traffic by downloading files.

如果移动终端判断第一当前流量值不大于设定的流量阈值,且第一剩余流量的值为0,向服务器发送订购请求,其中所述第一时间间隔可以为10秒、5分钟或1小时等,在测试场景为漫游状态下,由于所述移动终端对应的归属地与其所在的区域不同,所以可将该第一时间间隔设置的较长。If the mobile terminal judges that the first current traffic value is not greater than the set traffic threshold, and the value of the first remaining traffic is 0, send an order request to the server, wherein the first time interval can be 10 seconds, 5 minutes or 1 hour etc., when the test scenario is a roaming state, since the corresponding home of the mobile terminal is different from the area where it is located, the first time interval may be set longer.

服务器接收移动终端发送的订购请求,根据所述订购请求,对所述移动终端进行远程订购操作,移动终端根据接收到的服务器针对所述订购请求的远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信,接收短信服务器针对所述流量订购短信返回的订购成功信息,移动终端按照设定的第二时间间隔向短信服务器发送流量查询请求,其中所述第二时间间隔与所述第一时间间隔可以相同可以不同,所述第二时间间隔可以为20秒、5分钟或1小时等,在测试场景为漫游状态下,由于所述移动终端对应的归属地与其所在的区域不同,所以可将该第二时间间隔设置的较长。The server receives the order request sent by the mobile terminal, and performs a remote order operation on the mobile terminal according to the order request, and the mobile terminal sends an order preset number to the short message server according to the received remote order operation of the server for the order request. A traffic subscription short message of a traffic value, receiving the order success information returned by the short message server for the traffic subscription short message, the mobile terminal sends a traffic query request to the short message server according to a set second time interval, wherein the second time interval is the same as the set The first time interval may be the same or different, and the second time interval may be 20 seconds, 5 minutes, or 1 hour, etc. In a roaming state in the test scenario, since the corresponding home of the mobile terminal is different from the area where it is located , so the second time interval can be set longer.

移动终端判断在设定的时间长度内是否接收到短信服务器针对所述流量查询请求返回的信息,如果接收到,则认为订购的预设第一流量值的流量已经到账,则根据返回的信息,确定所述移动终端的第三剩余流量,根据所述第三剩余流量与预设的溢出流量的和确定第三当前流量,将所述第三当前流量作为第一当前流量,并且移动终端根据接收到的测试脚本中携带的测试指令,消耗第一当前流量,具体的移动终端通过下载文件的方式,消耗第一当前流量。The mobile terminal judges whether it has received the information returned by the SMS server for the traffic query request within the set time length, if received, it considers that the ordered traffic of the preset first traffic value has arrived, and then according to the returned information , determine the third remaining flow of the mobile terminal, determine the third current flow according to the sum of the third remaining flow and the preset overflow flow, use the third current flow as the first current flow, and the mobile terminal according to The test instruction carried in the received test script consumes the first current traffic, and the specific mobile terminal consumes the first current traffic by downloading files.

如果移动终端在设定的等待时长内没有接收到短信服务器检测到所述移动终端当前流量值不大于设定的流量阈值的第一提醒短信,则移动终端认为该测试任务超时,强制终止该测试任务,向服务器发送告警信息。If the mobile terminal does not receive the first reminder message that the short message server detects that the current flow value of the mobile terminal is not greater than the set flow threshold within the set waiting time, the mobile terminal thinks that the test task is overtime, and the test is forcibly terminated Task to send alarm information to the server.

如果所述测试任务中存在有多个流量阈值,则针对每个流量阈值都进行如上所述的操作。移动终端针对每个流量阈值都进行完如上操作后,将每个流量阈值的测试结果封装后发送给服务器。If there are multiple traffic thresholds in the test task, the above operation is performed for each traffic threshold. After performing the above operations for each traffic threshold, the mobile terminal encapsulates the test result of each traffic threshold and sends it to the server.

S304:测试任务结束阶段。S304: the end stage of the test task.

服务器判断在设定的测试时长内是否接收到移动终端发送的测试结果,如果有,则保存测试结果,如果没有,则产生告警信息或针对该移动终端在本地标识任务失败。The server judges whether the test result sent by the mobile terminal is received within the set test duration, if yes, then saves the test result, if not, then generates an alarm message or locally identifies the task failure for the mobile terminal.

由于本发明实施例中移动终端检测到第一当前流量的值不大于设定的流量阈值时,记录当前时刻对应的第一时间,及接收到短信服务器检测到第一当前流量的值不大于设定的流量阈值发送的提醒短信,记录对应的第二时间,并且所述第一时间为用户流量理论提醒时刻,所述第二时间为用户流量实际提醒时刻,通过第一时间和第二时间确定流量提醒时延,覆盖了流量提醒时延的所有环节,因此提高了流量提醒时延的测试结果准确度。Because in the embodiment of the present invention, when the mobile terminal detects that the value of the first current flow is not greater than the set flow threshold, it records the first time corresponding to the current moment, and receives the SMS server to detect that the value of the first current flow is not greater than the set The reminder text message sent by the flow threshold, record the corresponding second time, and the first time is the theoretical reminder time of the user flow, and the second time is the actual reminder time of the user flow, and the flow is determined by the first time and the second time The reminder delay covers all aspects of the traffic reminder delay, thus improving the accuracy of the test result of the traffic reminder delay.

图4为本发明实施例提供的一种流量提醒时延的测试装置示意图,应用于移动终端,该装置包括:Fig. 4 is a schematic diagram of a test device for traffic reminder delay provided by an embodiment of the present invention, which is applied to a mobile terminal, and the device includes:

消耗更新模块41,用于根据接收到的测试脚本中携带的测试指令,消耗第一当前流量,并更新消耗后的第一当前流量的值,其中所述测试脚本是由服务器发送的;The consumption update module 41 is configured to consume the first current flow according to the test instruction carried in the received test script, and update the value of the consumed first current flow, wherein the test script is sent by the server;

检测记录模块42,用于如果检测到所述第一当前流量的值不大于设定的流量阈值,则记录当前时刻对应的第一时间;A detection and recording module 42, configured to record the first time corresponding to the current moment if it is detected that the value of the first current flow is not greater than the set flow threshold;

接收记录模块43,用于接收第一提醒短信,并记录接收到所述第一提醒短信的第二时间,其中所述第一提醒短信为短信服务器检测到所述移动终端的第一当前流量的值不大于设定的流量阈值时发送的;Receiving and recording module 43, is used for receiving the first reminding short message, and record receives the second time of described first reminding short message, wherein the first reminding short message is that short message server detects the first current flow of described mobile terminal Sent when the value is not greater than the set traffic threshold;

时延确定模块44,用于根据所述第一时间及所述第二时间,确定流量提醒时延。The delay determination module 44 is configured to determine a flow reminder delay according to the first time and the second time.

所述装置还包括:The device also includes:

查询判断模块45,用于根据接收到所述服务器的远程获取操作,向短信服务器发送流量查询请求;根据接收到的短信服务器返回的信息,确定所述移动终端的第一剩余流量;根据所述第一剩余流量与预设的溢出流量的和确定第一当前流量的值,判断所述第一当前流量的值是否大于设定的流量阈值;如果是,触发消耗更新模块41。Inquiry judging module 45, is used for according to receiving the remote acquisition operation of described server, sends traffic inquiry request to short message server; According to the information that the short message server that receives receives returns, determine the first remaining traffic of described mobile terminal; According to the The sum of the first remaining flow and the preset overflow flow determines the value of the first current flow, and judges whether the value of the first current flow is greater than the set flow threshold; if so, triggers the consumption updating module 41 .

所述装置还包括:The device also includes:

消耗订购模块46,用于判断所述第一当前流量值不大于设定的流量阈值,如果所述第一剩余流量的值不为0,消耗所述第一剩余流量;如果接收短信服务器针对检测到所述第一剩余流量的值为0时发送的第二提醒短信,向服务器发送订购请求,根据接收到的服务器针对所述订购请求的远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信;接收短信服务器针对所述流量订购短信返回的订购成功信息;向短信服务器发送流量查询请求,判断在设定的时间长度内是否接收到短信服务器针对所述流量查询请求返回的信息;如果是,根据所述返回的信息,确定所述移动终端的第二剩余流量,根据所述第二剩余流量与预设的溢出流量的和确定第二当前流量,将所述第二当前流量作为第一当前流量,触发消耗更新模块41。Consumption ordering module 46, for judging that the first current flow value is not greater than the set flow threshold, if the value of the first remaining flow is not 0, consume the first remaining flow; The second reminder text message sent when the value of the first remaining traffic is 0, sends an order request to the server, and sends an order preset first traffic to the SMS server according to the received remote order operation of the server for the order request value of the traffic order text message; receive the order success information returned by the SMS server for the traffic order text message; send a traffic query request to the SMS server, and judge whether the text message server receives the return message for the traffic query request within the set time length information; if yes, determine the second remaining flow of the mobile terminal according to the returned information, determine the second current flow according to the sum of the second remaining flow and the preset overflow flow, and set the second current flow The flow rate is used as the first current flow rate to trigger the consumption update module 41 .

所述装置还包括:The device also includes:

订购判断模块47,用于判断所述当前流量值不大于设定的流量阈值,如果所述第一剩余流量的值为0,向服务器发送订购请求,根据接收到的服务器针对所述订购请求的远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信;接收短信服务器针对所述流量订购短信返回的订购成功信息;向短信服务器发送流量查询请求,判断在设定的时间长度内是否接收到短信服务器针对所述流量查询请求返回的信息;如果是,根据所述返回的信息,确定所述移动终端的第三剩余流量,根据所述第三剩余流量与预设的溢出流量的和确定第三当前流量,将所述第三当前流量作为第一当前流量,触发消耗更新模块41。An order judging module 47, configured to judge that the current flow value is not greater than the set flow threshold, if the value of the first remaining flow is 0, send an order request to the server, and send an order request to the server according to the received order request from the server Remote ordering operation, sending to the SMS server a traffic subscription text message ordering the preset first traffic value; receiving the order success information returned by the SMS server for the traffic subscription text message; sending a traffic query request to the SMS server, and judging the time length within the set time whether to receive the information returned by the short message server for the traffic query request; if yes, determine the third remaining traffic of the mobile terminal according to the returned information, and determine the third remaining traffic of the mobile terminal according to the third remaining traffic and the preset overflow traffic and determine the third current flow, and use the third current flow as the first current flow to trigger the consumption update module 41 .

所述装置还包括:The device also includes:

结果发送模块48,用于将携带有所述流量提醒时延的测试结果发送给服务器。The result sending module 48 is configured to send the test result carrying the traffic reminder delay to the server.

本发明实施例提供了一种流量提醒时延的测试方法、装置及系统,该方法包括:移动终端根据接收到的测试脚本中携带的测试指令,消耗第一当前流量,并更新消耗后的第一当前流量的值,其中所述测试脚本是由服务器发送的;如果检测到所述第一当前流量的值不大于设定的流量阈值,则记录当前时刻对应的第一时间;接收第一提醒短信,并记录接收到第一提醒短信的第二时间,其中所述第一提醒短信为短信服务器检测到所述移动终端的第一当前流量的值不大于设定的流量阈值时发送的;根据所述第一时间及所述第二时间,确定流量提醒时延。由于本发明实施例中移动终端检测到第一当前流量的值不大于设定的流量阈值时,记录当前时刻对应的第一时间,及接收到短信服务器检测到第一当前流量的值不大于设定的流量阈值发送的提醒短信,记录对应的第二时间,并且所述第一时间为用户流量应提醒时刻,所述第二时间为用户流量实际提醒时刻,通过第一时间和第二时间确定流量提醒时延,覆盖了流量提醒时延的所有环节,因此提高了流量提醒时延的测试结果准确度。Embodiments of the present invention provide a method, device, and system for testing traffic reminder delay. The method includes: the mobile terminal consumes the first current traffic according to the test instruction carried in the received test script, and updates the consumed first traffic. A value of the current flow, wherein the test script is sent by the server; if it is detected that the value of the first current flow is not greater than the set flow threshold, record the first time corresponding to the current moment; receive the first reminder SMS, and record the second time when the first reminder SMS is received, wherein the first reminder SMS is sent when the SMS server detects that the value of the first current flow of the mobile terminal is not greater than the set flow threshold; according to The first time and the second time determine a flow reminder delay. Because in the embodiment of the present invention, when the mobile terminal detects that the value of the first current flow is not greater than the set flow threshold, it records the first time corresponding to the current moment, and receives the SMS server to detect that the value of the first current flow is not greater than the set The reminder text message sent by the traffic threshold, record the corresponding second time, and the first time is the time when the user traffic should be reminded, and the second time is the actual reminder time for the user traffic, and the traffic is determined by the first time and the second time The reminder delay covers all aspects of the traffic reminder delay, thus improving the accuracy of the test result of the traffic reminder delay.

对于系统/装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。As for the system/apparatus embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for related parts, please refer to part of the description of the method embodiments.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowcharts and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.

尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。While preferred embodiments of the present application have been described, additional changes and modifications to these embodiments can be made by those skilled in the art once the basic inventive concept is appreciated. Therefore, the appended claims are intended to be construed to cover the preferred embodiment and all changes and modifications which fall within the scope of the application.

显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention also intends to include these modifications and variations.

Claims (15)

1.一种流量提醒时延的测试方法,其特征在于,应用于移动终端,该方法包括:1. a kind of test method of flow reminder time delay, it is characterized in that, be applied to mobile terminal, this method comprises: 根据接收到的测试脚本中携带的测试指令,消耗第一当前流量,并更新消耗后的第一当前流量的值,其中所述测试脚本是由服务器发送的;Consuming the first current flow according to the test instruction carried in the received test script, and updating the value of the consumed first current flow, wherein the test script is sent by the server; 如果检测到所述第一当前流量的值不大于设定的流量阈值,则记录当前时刻对应的第一时间;If it is detected that the value of the first current flow is not greater than the set flow threshold, record the first time corresponding to the current moment; 接收第一提醒短信,并记录接收到所述第一提醒短信的第二时间,其中所述第一提醒短信为短信服务器检测到所述移动终端的第一当前流量的值不大于设定的流量阈值时发送的;Receive the first reminder message, and record the second time when the first reminder message is received, wherein the first reminder message is that the SMS server detects that the value of the first current flow of the mobile terminal is not greater than the set flow Sent when the threshold is reached; 根据所述第一时间及所述第二时间,确定流量提醒时延。According to the first time and the second time, a flow reminder time delay is determined. 2.如权利要求1所述的方法,其特征在于,所述根据接收到的测试脚本中携带的测试指令,消耗第一当前流量之前,所述方法还包括:2. The method according to claim 1, wherein, before consuming the first current traffic according to the test instruction carried in the received test script, the method further comprises: 根据接收到所述服务器的远程获取操作,向短信服务器发送流量查询请求;Sending a traffic query request to the SMS server according to receiving the remote acquisition operation of the server; 根据接收到的短信服务器返回的信息,确定所述移动终端的第一剩余流量;determining the first remaining traffic of the mobile terminal according to the received information returned by the short message server; 根据所述第一剩余流量与预设的溢出流量的和确定第一当前流量的值,判断第一当前流量的值是否大于设定的流量阈值;determining the value of the first current flow according to the sum of the first remaining flow and the preset overflow flow, and judging whether the value of the first current flow is greater than a set flow threshold; 如果是,进行后续步骤。If yes, proceed to next steps. 3.如权利要求2所述的方法,其特征在于,如果所述第一当前流量的值不大于设定的流量阈值,所述根据接收到的测试脚本中携带的测试指令,消耗第一当前流量之前,所述方法还包括:3. The method according to claim 2, wherein if the value of the first current flow is not greater than the set flow threshold, the first current flow is consumed according to the test instruction carried in the received test script. Before the flow, the method also includes: 如果所述第一剩余流量的值不为0,消耗所述第一剩余流量;If the value of the first remaining flow is not 0, consume the first remaining flow; 如果接收到短信服务器针对检测到所述第一剩余流量的值为0时发送的第二提醒短信,向服务器发送订购请求,根据接收到的服务器针对所述订购请求的远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信;If the second reminder message sent by the SMS server for detecting that the value of the first remaining traffic is 0 is received, an order request is sent to the server, and the remote order operation of the order request is sent to the SMS server according to the received server's remote order operation for the order request. Send a traffic order text message for ordering the preset first traffic value; 接收短信服务器针对所述流量订购短信返回的订购成功信息;Receiving the order success information returned by the SMS server for the traffic order SMS; 向短信服务器发送流量查询请求,判断在设定的时间长度内是否接收到短信服务器针对所述流量查询请求返回的信息;Send a traffic query request to the SMS server, and judge whether the information returned by the SMS server for the traffic query request is received within the set time length; 如果是,根据所述返回的信息,确定所述移动终端的第二剩余流量,根据所述第二剩余流量与预设的溢出流量的和确定第二当前流量,将所述第二当前流量作为第一当前流量,进行后续步骤。If so, determine the second remaining flow of the mobile terminal according to the returned information, determine the second current flow according to the sum of the second remaining flow and the preset overflow flow, and use the second current flow as The first current flow, proceed to the subsequent steps. 4.如权利要求2所述的方法,其特征在于,如果所述第一当前流量的值不大于设定的流量阈值,所述根据接收到的测试脚本中携带的测试指令,消耗第一当前流量之前,所述方法还包括:4. The method according to claim 2, wherein if the value of the first current flow is not greater than the set flow threshold, the first current flow is consumed according to the test instruction carried in the received test script. Before the flow, the method also includes: 如果所述第一剩余流量的值为0,向服务器发送订购请求,根据接收到的服务器针对所述订购请求的远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信;If the value of the first remaining traffic is 0, an order request is sent to the server, and according to the received remote order operation of the server for the order request, a traffic order text message for ordering a preset first traffic value is sent to the SMS server; 接收短信服务器针对所述流量订购短信返回的订购成功信息;Receiving the order success information returned by the SMS server for the traffic order SMS; 向短信服务器发送流量查询请求,判断在设定的时间长度内是否接收到短信服务器针对所述流量查询请求返回的信息;Send a traffic query request to the SMS server, and judge whether the information returned by the SMS server for the traffic query request is received within the set time length; 如果是,根据所述返回的信息,确定所述移动终端的第三剩余流量,根据所述第三剩余流量与预设的溢出流量的和确定第三当前流量,将所述第三当前流量作为第一当前流量,进行后续步骤。If so, determine the third remaining flow of the mobile terminal according to the returned information, determine the third current flow according to the sum of the third remaining flow and the preset overflow flow, and use the third current flow as The first current flow, proceed to the subsequent steps. 5.如权利要求1所述的方法,其特征在于,在所述确定流量提醒时延后,所述方法还包括:5. The method according to claim 1, characterized in that, after the time delay for determining the flow reminder, the method further comprises: 将携带有所述流量提醒时延的测试结果发送给服务器。Send the test result carrying the traffic alert time delay to the server. 6.一种流量提醒时延的测试装置,其特征在于,应用于移动终端,该装置包括:6. A test device for flow reminder time delay, characterized in that it is applied to a mobile terminal, and the device includes: 消耗更新模块,用于根据接收到的测试脚本中携带的测试指令,消耗第一当前流量,并更新消耗后的第一当前流量的值,其中所述测试脚本是由服务器发送的;A consumption update module, configured to consume the first current flow according to the test instruction carried in the received test script, and update the value of the consumed first current flow, wherein the test script is sent by the server; 检测记录模块,用于如果检测到所述第一当前流量的值不大于设定的流量阈值,则记录当前时刻对应的第一时间;A detection and recording module, configured to record the first time corresponding to the current moment if it is detected that the value of the first current flow is not greater than the set flow threshold; 接收记录模块,用于接收第一提醒短信,并记录接收到所述第一提醒短信的第二时间,其中所述第一提醒短信为短信服务器检测到所述移动终端的第一当前流量的值不大于设定的流量阈值时发送的;The receiving and recording module is used to receive the first reminder message, and record the second time when the first reminder message is received, wherein the first reminder message is the first current flow value of the mobile terminal detected by the SMS server Sent when it is not greater than the set traffic threshold; 时延确定模块,用于根据所述第一时间及所述第二时间,确定流量提醒时延。A time delay determining module, configured to determine a flow reminder time delay according to the first time and the second time. 7.如权利要求6所述的装置,其特征在于,所述装置还包括:7. The device of claim 6, further comprising: 查询判断模块,用于根据接收到所述服务器的远程获取操作,向短信服务器发送流量查询请求;根据接收到的短信服务器返回的信息,确定所述移动终端的第一剩余流量;根据所述第一剩余流量与预设的溢出流量的和确定第一当前流量的值,判断所述第一当前流量的值是否大于设定的流量阈值;如果是,触发消耗更新模块。The query judgment module is used to send a traffic query request to the short message server according to the remote acquisition operation received from the server; determine the first remaining traffic of the mobile terminal according to the received information returned by the short message server; according to the second The sum of the remaining flow and the preset overflow flow determines the value of the first current flow, and judges whether the value of the first current flow is greater than the set flow threshold; if so, triggers the consumption update module. 8.如权利要求7所述的装置,其特征在于,所述装置还包括:8. The device of claim 7, further comprising: 消耗订购模块,用于判断所述第一当前流量值不大于设定的流量阈值,如果所述第一剩余流量的值不为0,消耗所述第一剩余流量;如果接收短信服务器针对检测到所述第一剩余流量的值为0时发送的第二提醒短信,向服务器发送订购请求,根据接收到的服务器针对所述订购请求的远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信;接收短信服务器针对所述流量订购短信返回的订购成功信息;向短信服务器发送流量查询请求,判断在设定的时间长度内是否接收到短信服务器针对所述流量查询请求返回的信息;如果是,根据所述返回的信息,确定所述移动终端的第二剩余流量,根据所述第二剩余流量与预设的溢出流量的和确定第二当前流量,将所述第二当前流量作为第一当前流量,触发消耗更新模块。Consumption ordering module, for judging that the first current flow value is not greater than the set flow threshold, if the value of the first remaining flow is not 0, consume the first remaining flow; if the receiving SMS server detects The second reminder text message sent when the value of the first remaining traffic is 0, sends an order request to the server, and sends an order preset first traffic value to the SMS server according to the received remote order operation of the server for the order request receive the order success information returned by the SMS server for the traffic order SMS; send a traffic query request to the SMS server, and determine whether the information returned by the SMS server for the traffic query request is received within the set time length ; If so, according to the returned information, determine the second remaining flow of the mobile terminal, determine the second current flow according to the sum of the second remaining flow and the preset overflow flow, and convert the second current flow As the first current flow, the consumption update module is triggered. 9.如权利要求7所述的装置,其特征在于,所述装置还包括:9. The device of claim 7, further comprising: 订购判断模块,用于判断所述当前流量值不大于设定的流量阈值,如果所述第一剩余流量的值为0,向服务器发送订购请求,根据接收到的服务器针对所述订购请求的远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信;接收短信服务器针对所述流量订购短信返回的订购成功信息;向短信服务器发送流量查询请求,判断在设定的时间长度内是否接收到短信服务器针对所述流量查询请求返回的信息;如果是,根据所述返回的信息,确定所述移动终端的第三剩余流量,根据所述第三剩余流量与预设的溢出流量的和确定第三当前流量,将所述第三当前流量作为第一当前流量,触发消耗更新模块。An order judging module, configured to judge that the current flow value is not greater than the set flow threshold, and if the value of the first remaining flow is 0, send an order request to the server, and send an order request to the server according to the received remote The ordering operation is to send to the SMS server a traffic subscription text message for ordering the preset first traffic value; receive the order success information returned by the SMS server for the traffic subscription text message; send a traffic query request to the SMS server, and judge that within the set time length Whether the information returned by the short message server for the traffic query request is received; if yes, according to the returned information, determine the third remaining traffic of the mobile terminal, and determine the third remaining traffic of the mobile terminal according to the difference between the third remaining traffic and the preset overflow traffic And determine the third current flow, use the third current flow as the first current flow, and trigger the consumption updating module. 10.如权利要求6所述的装置,其特征在于,所述装置还包括:10. The device of claim 6, further comprising: 结果发送模块,用于将携带有所述流量提醒时延的测试结果发送给服务器。The result sending module is used to send the test result carrying the traffic reminder delay to the server. 11.一种流量提醒时延的测试系统,其特征在于,所述测试系统包括:11. A test system for flow reminder time delay, characterized in that the test system includes: 服务器,用于向移动终端发送携带有测试指令的测试脚本;The server is configured to send a test script carrying test instructions to the mobile terminal; 移动终端,用于根据接收到的测试脚本中携带的测试指令,消耗第一当前流量,并更新消耗后的第一当前流量的值;如果检测到所述第一当前流量的值不大于设定的流量阈值,则记录当前时刻对应的第一时间;接收第一提醒短信,并记录接收到所述第一提醒短信的第二时间;根据所述第一时间及所述第二时间,确定流量提醒时延;The mobile terminal is configured to consume the first current flow according to the test instruction carried in the received test script, and update the value of the consumed first current flow; if it is detected that the value of the first current flow is not greater than the set If the traffic threshold is higher than the threshold value, then record the first time corresponding to the current moment; receive the first reminder text message, and record the second time when the first reminder text message is received; determine the traffic flow according to the first time and the second time reminder delay; 短信服务器,用于如果检测到所述移动终端的第一当前流量的值不大于设定的流量阈值,向所述移动终端发送第一提醒短信。The short message server is configured to send a first reminder short message to the mobile terminal if it detects that the first current traffic value of the mobile terminal is not greater than the set traffic threshold. 12.如权利要求11所述的系统,其特征在于,所述服务器,还用于采用通用分组无线服务GPRS无线调度技术,对所述移动终端进行远程获取操作;12. The system according to claim 11, wherein the server is further configured to use General Packet Radio Service (GPRS) wireless scheduling technology to perform remote acquisition operations on the mobile terminal; 所述移动终端,还用于根据接收到所述服务器的远程获取操作,向短信服务器发送流量查询请求;根据接收到的短信服务器返回的信息,确定所述移动终端的第一剩余流量;根据所述第一剩余流量与预设的溢出流量的和确定第一当前流量的值,判断所述第一当前流量的值是否大于设定的流量阈值,如果是,根据接收到的测试脚本中携带的测试指令,消耗第一当前流量;The mobile terminal is further configured to send a traffic query request to the short message server according to receiving the remote acquisition operation of the server; determine the first remaining traffic of the mobile terminal according to the received information returned by the short message server; The sum of the first remaining flow and the preset overflow flow determines the value of the first current flow, and judges whether the value of the first current flow is greater than the set flow threshold, and if so, according to the value carried in the received test script Test command, consume the first current traffic; 所述短信服务器,还用于接收所述移动终端发送的流量查询请求,针对所述流量查询请求返回信息。The short message server is further configured to receive the traffic query request sent by the mobile terminal, and return information in response to the traffic query request. 13.如权利要求12所述的系统,其特征在于,所述移动终端,还用于如果所述第一当前流量的值不大于设定的流量阈值,且所述第一剩余流量的值不为0,消耗所述第一剩余流量;如果接收到第二提醒短信,向服务器发送订购请求,根据接收到的服务器针对所述订购请求的远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信;接收短信服务器返回的订购成功信息;向短信服务器发送流量查询请求,判断在设定的时间长度内是否接收到短信服务器针对所述流量查询请求返回的信息;如果是,根据所述返回的信息,确定所述移动终端的第二剩余流量,根据所述第二剩余流量与预设的溢出流量的和确定第二当前流量,将所述第二当前流量作为第一当前流量,根据接收到的测试脚本中携带的测试指令,消耗第一当前流量;13. The system according to claim 12, wherein the mobile terminal is further configured to: if the value of the first current flow is not greater than the set flow threshold and the value of the first remaining flow is not If it is 0, the first remaining traffic is consumed; if the second reminder text message is received, an order request is sent to the server, and according to the received remote order operation of the server for the order request, the order preset first traffic is sent to the SMS server value of traffic order SMS; receive the order success information returned by the SMS server; send a traffic query request to the SMS server, and judge whether the information returned by the SMS server for the traffic query request is received within the set time length; if yes, according to The returned information determines the second remaining flow of the mobile terminal, determines the second current flow according to the sum of the second remaining flow and the preset overflow flow, and uses the second current flow as the first current flow , consume the first current flow according to the test instruction carried in the received test script; 所述服务器,还用于接收所述移动终端发送的订购请求,采用GPRS无线调度技术,对所述移动终端进行远程订购操作;The server is also used to receive the order request sent by the mobile terminal, and use GPRS wireless scheduling technology to perform remote order operations on the mobile terminal; 所述短信服务器,还用于如果检测到所述移动终端的第一剩余流量的值为0时发送的第二提醒短信;接收所述移动终端发送的订购预设第一流量值的流量订购短信,为所述移动终端订购所述第一流量值的流量,并向所述移动终端返回订购成功信息;接收所述移动终端发送的流量查询请求,向所述移动终端返回第二剩余流量的信息。The short message server is also used to send a second reminder text message if it is detected that the value of the first remaining traffic of the mobile terminal is 0; receive a traffic subscription text message sent by the mobile terminal to order a preset first traffic value , order the flow of the first flow value for the mobile terminal, and return order success information to the mobile terminal; receive the flow query request sent by the mobile terminal, and return the information of the second remaining flow to the mobile terminal . 14.如权利要求12所述的系统,其特征在于,所述移动终端,还用于如果所述第一当前流量的值不大于设定的流量阈值,且所述第一剩余流量的值为0,向服务器发送订购请求,根据接收到的服务器针对所述订购请求的远程订购操作,向短信服务器发送订购预设第一流量值的流量订购短信;接收短信服务器针对所述流量订购短信返回的订购成功信息;向短信服务器发送流量查询请求,判断在设定的时间长度内是否接收到短信服务器针对所述流量查询请求返回的信息;如果是,根据所述返回的信息,确定所述移动终端的第三剩余流量,根据所述第三剩余流量与预设的溢出流量的和确定第三当前流量,将所述第三当前流量作为第一当前流量,根据接收到的测试脚本中携带的测试指令,消耗第一当前流量。14. The system according to claim 12, wherein the mobile terminal is further configured to: if the value of the first current flow is not greater than the set flow threshold, and the value of the first remaining flow is 0, send an order request to the server, and send a traffic order text message to the SMS server for ordering the preset first traffic value according to the received remote order operation of the server for the order request; receive the text message returned by the SMS server for the traffic order text message order success information; send a traffic query request to the SMS server, and judge whether the information returned by the SMS server for the traffic query request is received within the set time length; if so, determine the mobile terminal according to the returned information The third remaining flow, determine the third current flow according to the sum of the third remaining flow and the preset overflow flow, and use the third current flow as the first current flow, according to the test carried in the received test script instruction to consume the first current flow. 15.如权利要求11所述的系统,其特征在于,所述移动终端,还用于将携带有所述流量提醒时延的测试结果发送给服务器;15. The system according to claim 11, wherein the mobile terminal is further configured to send the test result carrying the traffic reminder delay to the server; 所述服务器,还用于接收所述移动终端发送的携带有所述流量提醒时延的测试结果。The server is further configured to receive the test result carrying the traffic reminder delay sent by the mobile terminal.
CN201710411864.6A 2017-06-05 2017-06-05 Method, device and system for testing flow reminding time delay Active CN108989140B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710411864.6A CN108989140B (en) 2017-06-05 2017-06-05 Method, device and system for testing flow reminding time delay

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710411864.6A CN108989140B (en) 2017-06-05 2017-06-05 Method, device and system for testing flow reminding time delay

Publications (2)

Publication Number Publication Date
CN108989140A true CN108989140A (en) 2018-12-11
CN108989140B CN108989140B (en) 2020-10-30

Family

ID=64501821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710411864.6A Active CN108989140B (en) 2017-06-05 2017-06-05 Method, device and system for testing flow reminding time delay

Country Status (1)

Country Link
CN (1) CN108989140B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112367684A (en) * 2020-10-13 2021-02-12 北京健康之家科技有限公司 Flow control method, flow control device, storage medium and computer equipment

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7587209B2 (en) * 2002-12-30 2009-09-08 Nortel Networks Limited Method of SMS message transfer after GPRS attach
CN101697645A (en) * 2009-10-20 2010-04-21 厦门敏讯信息技术股份有限公司 Method and device for acquiring current time for mobile communication terminal
CN102387486A (en) * 2010-09-06 2012-03-21 中国移动通信集团河北有限公司 Method and device for charging general packet radio service (GPRS) partition bill
CN102480578A (en) * 2010-11-25 2012-05-30 中国移动通信集团四川有限公司 Data flow reminder method, system and device
US8463306B1 (en) * 2011-05-22 2013-06-11 Mobivity, Inc. Method and system for SMS messaging verification
CN103179589A (en) * 2011-12-20 2013-06-26 中国移动通信集团安徽有限公司 Method and system for user terminal Internet traffic reminder
CN103812897A (en) * 2012-11-12 2014-05-21 中国移动通信集团山东有限公司 Network flow control method and device
CN104010281A (en) * 2014-05-30 2014-08-27 可牛网络技术(北京)有限公司 Hinting method and device of mobile equipment traffic
CN104703163A (en) * 2013-12-06 2015-06-10 中国电信股份有限公司 Real-time monitoring method for remaining Internet surfing flow of terminal and flow monitoring server
CN104767650A (en) * 2014-01-03 2015-07-08 中国移动通信集团广东有限公司 Method and device for measuring and calculating message network delay
US20150245264A1 (en) * 2012-10-30 2015-08-27 Huawei Technologies Co., Ltd. Data Transmitting Method, Handover Method, Apparatus, Equipment, Access Node, and System
EP2993828A1 (en) * 2014-09-02 2016-03-09 Tektronix, Inc. Methods and devices to efficiently determine node delay in a communication network
CN106656646A (en) * 2015-10-29 2017-05-10 中国移动通信集团河北有限公司 Intelligent flow prompt method and device, and corresponding mobile terminal

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7587209B2 (en) * 2002-12-30 2009-09-08 Nortel Networks Limited Method of SMS message transfer after GPRS attach
CN101697645A (en) * 2009-10-20 2010-04-21 厦门敏讯信息技术股份有限公司 Method and device for acquiring current time for mobile communication terminal
CN102387486A (en) * 2010-09-06 2012-03-21 中国移动通信集团河北有限公司 Method and device for charging general packet radio service (GPRS) partition bill
CN102480578A (en) * 2010-11-25 2012-05-30 中国移动通信集团四川有限公司 Data flow reminder method, system and device
US8463306B1 (en) * 2011-05-22 2013-06-11 Mobivity, Inc. Method and system for SMS messaging verification
US9307430B1 (en) * 2011-05-22 2016-04-05 Mobivity, Inc. Method and system for SMS messaging verification
CN103179589A (en) * 2011-12-20 2013-06-26 中国移动通信集团安徽有限公司 Method and system for user terminal Internet traffic reminder
US20150245264A1 (en) * 2012-10-30 2015-08-27 Huawei Technologies Co., Ltd. Data Transmitting Method, Handover Method, Apparatus, Equipment, Access Node, and System
CN103812897A (en) * 2012-11-12 2014-05-21 中国移动通信集团山东有限公司 Network flow control method and device
CN104703163A (en) * 2013-12-06 2015-06-10 中国电信股份有限公司 Real-time monitoring method for remaining Internet surfing flow of terminal and flow monitoring server
CN104767650A (en) * 2014-01-03 2015-07-08 中国移动通信集团广东有限公司 Method and device for measuring and calculating message network delay
CN104010281A (en) * 2014-05-30 2014-08-27 可牛网络技术(北京)有限公司 Hinting method and device of mobile equipment traffic
EP2993828A1 (en) * 2014-09-02 2016-03-09 Tektronix, Inc. Methods and devices to efficiently determine node delay in a communication network
CN106656646A (en) * 2015-10-29 2017-05-10 中国移动通信集团河北有限公司 Intelligent flow prompt method and device, and corresponding mobile terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
文英: "移动数据流量业务阀值提醒短信下发时延的优化与应用", 《电信工程技术与标准化》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112367684A (en) * 2020-10-13 2021-02-12 北京健康之家科技有限公司 Flow control method, flow control device, storage medium and computer equipment
CN112367684B (en) * 2020-10-13 2023-11-14 北京水滴科技集团有限公司 Flow control method, device, storage medium and computer equipment

Also Published As

Publication number Publication date
CN108989140B (en) 2020-10-30

Similar Documents

Publication Publication Date Title
US20220141110A1 (en) Managing data transfers over network connections based on priority and a data usage plan
CN105682077B (en) A virtual SIM card switching method and device
CN105677477B (en) Method and device for optimizing application program resources and electronic equipment
US8204484B2 (en) System and method for managing missed calls and unread messages
CN103209439A (en) Method, apparatus and device for monitoring data traffic
CN110502318A (en) Event-handling method, event processing server, storage medium and device
US20130055271A1 (en) Apparatus and method for controlling polling
CN103401991A (en) Method and device for prompting communication event of terminal device
CN109002457A (en) Downloading channel statistical processing methods, device and the electronic equipment of application program
CN103596246A (en) Method and terminal for recovering data service
CN104754610A (en) Pseudo base station positioning method, device and system
CN111209060A (en) Capability development platform processing method and device
CN114157999B (en) Processing method, system, equipment and medium for user to recover internet surfing
CN106331060B (en) WIFI-based deployment and control method and system
CN108989140B (en) Method, device and system for testing flow reminding time delay
CN112422995A (en) System for reducing flow cost and working method
CN105573842B (en) The method and device of process recovery processing is carried out in the application
CN105468438B (en) The method and device of process recovery processing is carried out in the application
CN101699843B (en) Method and device for automatically adapting to voice call of camel network type
CN103095528B (en) A kind of method and apparatus running the application of Sampling network flow
WO2017206318A1 (en) Mobile device, and method and apparatus for sharing location thereof
CN108513303A (en) The abnormality monitoring method and device of jack per line terminal
CN104519469A (en) SMS (short message service) charging behavior detection method, device and terminal
CN112989323B (en) Process detection method, device, terminal and storage medium
US9800740B2 (en) Push/pull hybrid for wireless device usage metering

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 518048, 10 floor, Guo Tong Building, 9023 Binhe Road, Futian District, Shenzhen, Guangdong.

Applicant after: CHINA MOBILE INFORMATION TECHNOLOGY Co.,Ltd.

Applicant after: CHINA MOBILE COMMUNICATIONS GROUP Co.,Ltd.

Address before: 518048, 10 floor, Guo Tong Building, 9023 Binhe Road, Futian District, Shenzhen, Guangdong.

Applicant before: CHINA MOBILE INFORMATION TECHNOLOGY Co.,Ltd.

Applicant before: China Mobile Communications Corp.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200327

Address after: Room 1006, building 16, yard 16, Yingcai North Third Street, future science city, Changping District, Beijing 102209

Applicant after: China Mobile Information Technology Co.,Ltd.

Applicant after: CHINA MOBILE COMMUNICATIONS GROUP Co.,Ltd.

Address before: 518048, 10 floor, Guo Tong Building, 9023 Binhe Road, Futian District, Shenzhen, Guangdong.

Applicant before: CHINA MOBILE INFORMATION TECHNOLOGY Co.,Ltd.

Applicant before: CHINA MOBILE COMMUNICATIONS GROUP Co.,Ltd.

GR01 Patent grant
GR01 Patent grant