CN106899987B - Method and device for calibrating data traffic of mobile terminal - Google Patents
Method and device for calibrating data traffic of mobile terminal Download PDFInfo
- Publication number
- CN106899987B CN106899987B CN201510964220.0A CN201510964220A CN106899987B CN 106899987 B CN106899987 B CN 106899987B CN 201510964220 A CN201510964220 A CN 201510964220A CN 106899987 B CN106899987 B CN 106899987B
- Authority
- CN
- China
- Prior art keywords
- flow
- traffic
- query
- query result
- mobile terminal
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 40
- 238000004891 communication Methods 0.000 claims abstract description 54
- 230000006870 function Effects 0.000 description 10
- 230000008569 process Effects 0.000 description 5
- 230000007704 transition Effects 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W24/00—Supervisory, monitoring or testing arrangements
- H04W24/02—Arrangements for optimising operational condition
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/24—Accounting or billing
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephonic Communication Services (AREA)
Abstract
The invention discloses a method and a device for calibrating data traffic of a mobile terminal, which are used for solving the technical problem that the existing traffic monitoring software cannot provide accurate traffic use information for a user. The method comprises the following steps: sending a flow inquiry request to an operator server according to the communication service type of the mobile terminal and a flow inquiry instruction corresponding to the communication service of the type; receiving a flow query result returned by the operator server, and analyzing the flow query result according to a preset analysis rule to acquire flow information contained in the flow query result; and sending the flow information to the mobile terminal so that the mobile terminal can calibrate the data flow counted by the local equipment according to the flow information.
Description
Technical Field
The invention relates to the technical field of network communication, in particular to a method and a device for calibrating data traffic of a mobile terminal.
Background
With the popularization of intelligent mobile terminals, more and more users are used to access the internet through mobile terminals so as to acquire various network information at any time. An operator generally charges a corresponding traffic fee according to data traffic generated when the mobile terminal acquires the network information. In order to control the traffic charge of the mobile terminal within a reasonable limit, in general, a user may install traffic monitoring software on the mobile terminal, and the traffic monitoring software monitors the data traffic usage of the mobile terminal in real time in the background.
However, the data traffic counted by the traffic monitoring software is often inconsistent with the data traffic counted by the operator: for example, because the charging rules are different, the traffic counted by the traffic monitoring software installed on the local device includes all data traffic generated by the mobile terminal, and the traffic may be further divided into multiple types, such as normal traffic, directional traffic, and preferential traffic, during the charging of the operator, so the operator may only count the normal traffic, thereby causing inconsistency between the normal traffic and the preferential traffic. In addition, some services are not charged because they belong to the traffic download-free service category, such as applications and multimedia message services provided in a traffic-free private area. For another example, the traffic monitoring software installed on the local device cannot count the traffic retransmitted by the gateway, and the data traffic counted by the operator includes the data traffic retransmitted by the gateway, so that the two traffic are inconsistent.
In short, the data traffic counted by the existing traffic monitoring software has an error with the data traffic counted by the operator, so that accurate traffic usage information cannot be provided for the user, and the user cannot accurately manage the traffic tariff according to the data traffic counted by the traffic monitoring software.
Disclosure of Invention
In view of the above, the present invention has been made to provide a method and apparatus for calibrating data traffic of a mobile terminal that overcomes or at least partially solves the above-mentioned problems.
According to an aspect of the present invention, there is provided a method for calibrating data traffic of a mobile terminal, including: sending a flow inquiry request to an operator server according to the communication service type of the mobile terminal and a flow inquiry instruction corresponding to the communication service of the type; receiving a flow query result returned by the operator server, and analyzing the flow query result according to a preset analysis rule to acquire flow information contained in the flow query result; and sending the flow information to the mobile terminal so that the mobile terminal can calibrate the data flow counted by the local equipment according to the flow information.
According to another aspect of the present invention, there is provided an apparatus for calibrating data traffic of a mobile terminal, including: the query module is suitable for sending a flow query request to an operator server according to the communication service type of the mobile terminal and a flow query instruction corresponding to the communication service of the type; the analysis module is suitable for receiving the flow query result returned by the operator server and analyzing the flow query result according to a preset analysis rule so as to obtain the flow information contained in the flow query result; and the sending module is suitable for sending the flow information to the mobile terminal so that the mobile terminal can calibrate the data flow counted by the local equipment according to the flow information.
In the method and the device for calibrating the data traffic of the mobile terminal, provided by the invention, the traffic query request can be sent to the operator server according to the communication service type of the mobile terminal and the traffic query instruction corresponding to the communication service of the type, and the data traffic of the mobile terminal is calibrated according to the traffic query result returned by the operator server, so that the technical problem that the data traffic counted by local equipment has errors with the data traffic counted by the operator is solved, and a user can accurately manage the traffic tariff according to the data traffic counted by the local equipment. Specifically, in the invention, the flow query result returned by the operator server is analyzed through the preset analysis rule to obtain the flow information contained in the flow query result, so that the analysis efficiency and accuracy are improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating a method for calibrating data traffic of a mobile terminal according to the present invention;
fig. 2 is a flowchart illustrating a method for calibrating data traffic of a mobile terminal according to another embodiment of the present invention; and the number of the first and second groups,
fig. 3 is a block diagram illustrating an apparatus for calibrating data traffic of a mobile terminal according to the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The embodiment of the invention provides a method and a device for calibrating data traffic of a mobile terminal, which can at least solve the technical problem that the existing traffic monitoring software cannot provide accurate traffic use information for a user.
Fig. 1 shows a flowchart of a method for calibrating data traffic of a mobile terminal according to the present invention. As shown in fig. 1, the method comprises the steps of:
step S110: and sending a flow inquiry request to an operator server according to the communication service type of the mobile terminal and the flow inquiry instruction corresponding to the communication service of the type.
The communication service types of the mobile terminal include various types such as mobile, internet, telecommunication and the like, and each type can be further divided into a plurality of subtypes. The traffic query instructions corresponding to various communication service types can be determined according to the traffic query mode provided by the corresponding operator.
Step S120: and receiving a flow query result returned by the operator server, and analyzing the flow query result according to a preset analysis rule to acquire flow information contained in the flow query result.
The parsing rule can be set in the following manner: collecting flow inquiry results corresponding to various types of communication services in advance, and dividing the flow inquiry results into various types according to identification information contained in the flow inquiry results; analyzing the type of the traffic information contained in each type of traffic query result and the format specification of the information field corresponding to each type of traffic information; and respectively setting corresponding regular expression matching rules for each type of flow query result according to the format specification of the information field.
Correspondingly, the step of analyzing the flow query result according to the preset analysis rule comprises the following steps: determining the type of the flow query result according to the identification information contained in the flow query result returned by the operator server; acquiring a regular expression matching rule corresponding to the type of flow query result; and matching each character in the flow query result returned by the operator server according to the regular expression matching rule to obtain the numerical value of each flow information contained in the flow query result.
Step S130: and sending the flow information to the mobile terminal so that the mobile terminal can calibrate the data flow counted by the local equipment according to the flow information.
Therefore, in the method provided by the invention, the traffic query request can be sent to the operator server according to the communication service type of the mobile terminal and the traffic query instruction corresponding to the communication service of the type, and the data traffic of the mobile terminal is calibrated according to the traffic query result returned by the operator server, so that the technical problem that the data traffic counted by the local equipment has errors with the data traffic counted by the operator is solved, and the user can accurately manage the traffic charge according to the data traffic counted by the local equipment. Specifically, in the invention, the flow query result returned by the operator server is analyzed through the preset analysis rule to obtain the flow information contained in the flow query result, so that the analysis efficiency and accuracy are improved.
Fig. 2 is a flowchart illustrating a method for calibrating data traffic of a mobile terminal according to another embodiment of the present invention. As shown in fig. 2, the method comprises the steps of:
step S210: and acquiring the communication service type of each mobile terminal to be calibrated.
In this embodiment, the data traffic of a plurality of mobile terminals can be calibrated by the traffic calibration server. In specific implementation, all mobile terminals used by any software users with a flow monitoring function, such as flow monitoring software or mobile phone assistant software, can be used as calibration objects, or only mobile terminals with an automatic calibration function can be used as calibration objects. For example, a function entry of an "automatic calibration function" may be set on any software interface with a traffic monitoring function, and when a user selects to start the automatic calibration function through the function entry, the mobile terminal obtains an automatic calibration instruction and automatically sends an automatic calibration request including identification information of the mobile terminal to the server according to the instruction. And the server determines the communication service type of the corresponding mobile terminal according to the identification information contained in the received automatic calibration request. Specifically, the identification information may be a mobile phone number of the mobile terminal, and the server determines the corresponding communication service type according to information such as a home location of the mobile phone number. In addition, the identification information can also be an ICCID of the mobile terminal, which is solidified in a mobile phone SIM card and consists of 20 digits in total, and the corresponding communication service type can be determined according to the operator code contained therein. For example, china mobile codes are 898600 or 898602, china unicom codes are 898601, and china telecom codes are 898603. Those skilled in the art may also use other forms of identification information for the purpose of uniquely identifying the mobile terminal and determining the type of service.
In addition, besides the server analyzes the identification information to obtain the communication service type, the mobile terminal can directly send the communication service type used by the mobile terminal to the server.
Step S220: and acquiring flow inquiry instructions corresponding to various communication service types.
In this embodiment, the communication service types can be divided into three major types, namely, a mobile type, a connectivity type, and a telecommunication type, according to the operator type. Further, because of regional differences among operators, each of the three major categories may be further divided into tens of minor categories according to the number of provinces and cities included in the country, for example, the mobile category is further divided into minor categories such as beijing mobile, south-river mobile, and Jiangsu mobile. Still further, each small type of communication service is capable of providing a plurality of package type services to users, and thus, each of the small types described above may be further subdivided into several sub-types, for example, Beijing Mobile, which further includes a dynamic zone type of communication service, a Shenzhou line type of communication service, and so on. As can be seen, the communication service types in this embodiment include many sub-types, some of which have the same traffic query command, and some of which have different traffic query commands, so that in this step, it is necessary to configure corresponding traffic query commands for each communication service type (including the above-mentioned major type, minor type, and sub-type).
The traffic query instruction is determined according to a traffic query mode provided by an operator for a user. For example, an operator usually provides a user with a short message data traffic query mode, a telephone data traffic query mode, a WeChat data traffic query mode, and the like. In this embodiment, the traffic query instruction is mainly set according to a manner of querying data traffic through short messages provided by an operator. The traffic query command further includes a query code and a query port number. For example, taking the beijing mobile communication service as an example, the traffic query instruction includes the following two parts: (1) and querying codes: CXGLL (2) query port number: 10086.
for convenience of statistics and query, in this embodiment, the obtained traffic query instructions corresponding to various communication service types may be stored in a traffic query instruction table, where the traffic query instruction table stores identification information of all mobile terminals to be calibrated, the communication service types, and traffic query instructions corresponding to the communication service types. In addition, in order to meet the requirements of upgrading and revising the operator server, the flow query instruction table can be updated according to the received update instruction, and the update instruction further comprises: an update instruction of a new addition type, an update instruction of a modification type, and an update instruction of a deletion type. The flow query instruction table can be maintained and updated by a special server, so that the stored flow query instructions are the latest instruction information.
Step S230: dividing all the mobile terminals to be calibrated into a plurality of groups, and respectively creating a subprocess for calibrating the data traffic of each mobile terminal in each group for each group.
All the mobile terminals to be calibrated can be divided into a plurality of groups according to the communication service types of the mobile terminals. For example, the mobile terminals to be calibrated may be divided into tens of groups according to the type of the operator and the territory of the operator, that is, the groups include: dozens of groups such as Beijing Mobile, Henan Mobile, Beijing Unicom, Beijing Telecommunications, and Jiangsu Telecommunications. Alternatively, the packets may be divided according to the traffic query instruction corresponding to the communication service type, so that the mobile terminals with the same traffic query instruction are divided into the same packet. For example, it is possible that the traffic query instructions for the beijing mobile and the hebei mobile are the same, and thus the two types of mobile terminals may be grouped into the same group.
After dividing the mobile terminal into a plurality of groups, one or more sub-processes for calibrating the data traffic of each mobile terminal in the group are respectively created for each group. The calibration efficiency can be obviously improved through a multi-process parallel processing mode, so that the server can provide calibration service for a plurality of mobile terminals at the same time.
Step S240: and each sub-process sends a flow inquiry request to an operator server according to the communication service type of the mobile terminal and the flow inquiry instruction corresponding to the communication service of the type.
Each subprocess may send a traffic query request at preset time intervals to trigger subsequent traffic calibration operations. The time interval may be determined in various ways, for example, by a period setting instruction received in advance from the mobile terminal, or may be set by the server, for example, by setting to send the traffic query request once every day or once every hour.
In concrete implementation, each subprocess sends flow query requests for each mobile terminal in the group in parallel, so that query efficiency is improved. Each subprocess firstly obtains the identification information of the mobile terminal to be calibrated in the corresponding group, the communication service type and the corresponding flow query instruction by reading the flow query instruction table. Then, according to the identification information of the mobile terminal, a flow inquiry request is sent to each mobile terminal in the group. Each traffic query request is sent on behalf of the corresponding mobile terminal, for example, the purpose of sending the traffic query request instead of the mobile terminal to query the data traffic of the corresponding mobile terminal is achieved by modifying the sender address contained in the traffic query request.
The traffic query request may be a traffic query short message generated according to a query code and a query port number included in the traffic query instruction. For example, when the traffic query instruction includes a query code "CXGLL" and a query port number "10086", a short message with the short message content "CXGLL" is constructed and sent to the recipient with the number "10086". Besides the implementation of the traffic query short message, those skilled in the art can also send the traffic query request in various forms such as voice message, WeChat message, and the like.
Step S250: and receiving a flow query result returned by the operator server, and analyzing the flow query result according to a preset analysis rule to acquire flow information contained in the flow query result.
And when the flow query request is a flow query short message, the flow query result returned by the operator server is a flow feedback short message containing flow information. The traffic query result may include various traffic information, including: total traffic in the package, used traffic in the month, remaining traffic in the month, local data traffic, roaming data traffic, and the like.
In this step, the preset parsing rule is used to parse the traffic query result to obtain the specific value of the traffic information contained therein. Wherein, the analysis rule can be set by the following steps:
(1) and collecting flow inquiry results corresponding to various types of communication services in advance.
The purpose of this step is to obtain a sample of the traffic query result. The traffic query requests of various communication service types can be sent to each operator server through the server so as to obtain corresponding traffic query results. For convenience of analysis, for each type of communication service, a plurality of flow query results can be obtained as samples, and the more the number of the samples is, the more accurate the analysis result is, and the higher the subsequent analysis accuracy is.
(2) And dividing the flow query result into a plurality of types according to the identification information contained in the flow query result.
The purpose of this step is to classify the samples of the massive traffic query results. The identification information included in the traffic query result may be an operator identification, for example, the traffic query result returned by china mobile includes a port number "10086" for identifying the operator information. Correspondingly, the traffic query result returned by the china unicom includes the port number "10010". Therefore, the flow query result can be divided into three types of mobile, communication and telecommunication according to the operator identification. In addition, the identification information included in the traffic query result may further include region information, and the traffic query result may be further subdivided into a beijing mobile type, a hebei mobile type, and the like through the region information. In addition, the Beijing mobile types can be further divided into dynamic belt type Beijing mobile types, global type Beijing mobile terminal types and Shenzhou line type Beijing mobile types according to the package types of the mobile terminals. In short, the specific content and classification manner of the identification information are not limited in the present invention. Because the short message formats corresponding to the same type of flow query results are the same, the classification of the samples of the flow query results can uniformly process the same type of results, thereby improving the processing efficiency.
(3) The type of traffic information contained in each type of traffic query result and the format specification of the information field corresponding to each type of traffic information are analyzed separately.
For example, taking the traffic query result of the dynamic zone type beijing mobile type as an example, the short message content of a corresponding sample is "hello |)! The last month is converted to the current month: the monthly change of domestic general flow rate is 6.0MB, and the monthly change of local idle flow rate is 100.0 MB. By 15 cents on 17 th on 12 th and 17 th on 2015, you have used 9.15MB of data traffic and 216.86MB of remaining traffic in the package, wherein the domestic general traffic is left at 17.86MB (including domestic general traffic carry forward 0.0MB), the local idle traffic is left at 199.0MB (including local idle traffic carry forward 99.0MB), and you are thanked to use the traffic query service. You can use the client to inquire the traffic use condition at any time. Click downloading:http://mobilebj.cn/?c=120/china Mobile ".
Firstly, analyzing the short message content to determine that the short message content at least comprises the following traffic information: a) monthly transition of domestic general flow, b) monthly transition of local idle flow, c) used data flow, and d) remaining flow in the package. The rest flow in the package is further divided into two parts of domestic general flow rest and local idle flow rest.
Then, the format specification of the information field corresponding to each traffic information is analyzed. For example, the information field corresponding to the monthly transition on the domestic general traffic includes "monthly transition on the domestic general traffic" and "6.0 MB". The information field 'domestic general flow last month' is a fixed field, and the field is not changed in the query result returned every time. The information field "6.0 MB" is a variable field that is updated in real time according to traffic usage in each returned query result, and further includes a first part consisting of arabic numerals and a second part consisting of english letters. Similarly, several other traffic information also include at least a fixed field and a variable field.
(4) And respectively setting corresponding regular expression matching rules for each type of flow query result according to the format specification of the information field.
And when the regular expression matching rule is set, setting is carried out by combining the characteristics of the information field and the format specification. For example, taking the fixed field "monthly forward of domestic general traffic" as an example, the matching rule may be set by the regular expression "[ u4e00-u9fa5 ]" matching Chinese characters. For another example, taking the variable field "6.0 MB" as an example, the first part of the variable field may set the matching rule through a regular expression for matching arabic numerals, and the second part of the variable field may set the matching rule through a regular expression for matching capital english letters. In addition, the regular expression can also match various types of contents such as blank spaces, URL (uniform resource locator) addresses, positive integers, negative integers, floating point numbers and the like.
Correspondingly, when the flow query result is analyzed according to the analysis rule, the method can be specifically realized through the following steps:
(1) and determining the type of the flow query result according to the identification information contained in the flow query result returned by the operator server.
For example, when the identification information is "10086", it is determined as a chinese mobile type traffic query result. Further, the attribution of the operator and the type of the package corresponding to the number can be determined according to the number of the mobile terminal contained in the flow query result.
(2) And acquiring a regular expression matching rule corresponding to the flow query result of the type.
The regular expression matching rules corresponding to the various types of traffic query results can be stored in a preset matching rule table in advance, and the regular expression matching rules corresponding to the various types of traffic query results can be obtained by querying the matching rule table.
(3) And matching each character in the flow query result returned by the operator server according to the obtained regular expression matching rule to obtain the numerical value of each flow information contained in the flow query result.
For example, taking the traffic query result of the dynamic zone type beijing mobile type as an example, matching each character in the traffic query result through a regular expression matching rule can determine the content of a fixed field and a variable field corresponding to various traffic information contained therein, and further analyze the value of various traffic information.
Step S260: and sending the acquired flow information to the mobile terminal so that the mobile terminal can calibrate the data flow counted by the local equipment according to the flow information.
The data traffic counted by the local device of the mobile terminal may be the data traffic counted by the traffic monitoring software, and the data traffic is mainly acquired through a network card of the mobile terminal. After receiving the traffic information from the server, the traffic monitoring software compares the traffic information from the server with the locally-counted traffic information, and if the traffic information is consistent with the locally-counted traffic information, the traffic monitoring software does not need to process the traffic information; and if the traffic information is inconsistent with the local statistical traffic information, correcting the local statistical traffic information according to the traffic information from the server.
Because the mobile terminal cannot count the data traffic retransmitted by the network manager locally, and the mobile terminal cannot identify preferential traffic of some traffic-free special areas locally, the counting result cannot be realized accurately, and the data traffic returned by the operator server is the measurement standard of final charging, the data traffic counted locally by the mobile terminal can be consistent with the operator through the mode in the embodiment, so that the tariff condition of the user can be accurately reminded.
Optionally, in the method, a reminding message may be further sent to the user according to the calibrated data traffic. For example, when the calibrated data flow exceeds the preset threshold, a reminding message may be sent to the user, and the reminding message may be sent in various manners, such as a pop-up frame manner, a short message manner, and the like. The preset threshold value can be determined according to a threshold value setting instruction received in advance, and a user can send the threshold value setting instruction containing preset threshold value information through a function entrance for setting an alarm threshold value provided by the flow monitoring software. In addition, the preset threshold may also be set according to the total traffic included in the package service of the mobile terminal, for example, when the used data traffic reaches eighty percent of the total available traffic, a warning message is sent. Further, if the calibrated used data flow is equal to or larger than the total available flow, the current network connection can be disconnected, and a prompt is given to the user.
Through the steps in the embodiment of the invention, the server can automatically finish the flow calibration operation of a plurality of mobile terminals. Because the operations of sending the flow query request and receiving the flow query result are uniformly completed by the server in a multi-process parallel processing mode, the query efficiency can be improved, and a large number of mobile terminals can be calibrated; moreover, the interference of the operation of receiving and sending the short message to the mobile terminal user is avoided. In addition, in the invention, the regular expression matching rule is preset, and the flow query result is analyzed according to the matching rule, so that the analysis time of the server is shortened and the analysis efficiency is improved because the regular expression is convenient to query and quick to match; moreover, the type of the regular expression is very flexible, and the regular expression can be adapted to fields in various formats, so that the analysis accuracy is improved, and the flow calibrated by the method is more accurate.
Various modifications and variations of the above-described embodiments may be made by those skilled in the art, and the various steps described above may be combined into fewer steps or split into more steps, and some of the steps may be omitted. For example, the step of grouping the mobile terminals and setting a plurality of processes to calibrate the mobile terminals in each group may be omitted.
In addition, the implementation manner of the steps can be flexibly changed by a person skilled in the art. For example, the steps of sending the traffic query request and receiving the traffic query result may also be completed by the mobile terminal, and at this time, the mobile terminal sends the received traffic query result to the server for analysis. In order to reduce the interference to the mobile terminal user, the operation of sending the traffic query request may be automatically performed by the mobile terminal, for example, the user only needs to set the "silent calibration" function entry provided by the traffic monitoring software. And the mobile terminal can intercept the received flow inquiry result, so that the flow inquiry result does not enter an inbox of a mobile terminal user. For example, the interception can be performed through a short message interception function entry in protection software installed in the mobile terminal. The interception can also be performed according to the sender number (the interception number is the short message of the operator), and in order to avoid intercepting the short message useful for the user, the interception time can be set, for example, the short message of the operator in a preset time period after the flow query request is sent is intercepted.
Fig. 3 is a block diagram illustrating an apparatus for calibrating data traffic of a mobile terminal according to another embodiment of the present invention. As shown in fig. 3, the apparatus includes:
the query module 31 is adapted to send a traffic query request to the operator server according to the communication service type of the mobile terminal and a traffic query instruction corresponding to the communication service of the type;
the analysis module 32 is adapted to receive the traffic query result returned by the operator server, and analyze the traffic query result according to a preset analysis rule to obtain traffic information contained in the traffic query result;
the sending module 33 is adapted to send the traffic information to the mobile terminal, so that the mobile terminal calibrates data traffic counted by the local device according to the traffic information.
Optionally, the apparatus further comprises: the analysis rule setting module is suitable for collecting flow inquiry results corresponding to various types of communication services in advance and dividing the flow inquiry results into various types according to identification information contained in the flow inquiry results; analyzing the type of the traffic information contained in each type of traffic query result and the format specification of the information field corresponding to each type of traffic information; and respectively setting corresponding regular expression matching rules for each type of flow query result according to the format specification of the information field.
Optionally, the parsing module 32 is specifically configured to: determining the type of the flow query result according to the identification information contained in the flow query result returned by the operator server; acquiring a regular expression matching rule corresponding to the type of flow query result; and matching each character in the flow query result returned by the operator server according to the regular expression matching rule to obtain the numerical value of each flow information contained in the flow query result.
Optionally, the type of the traffic information included in the traffic query result includes one or more of the following: total traffic within a package, used traffic in the month, remaining traffic in the month, local data traffic, and roaming data traffic.
Optionally, the traffic query request is a traffic query short message generated according to a query code and a query port number included in the traffic query instruction, and the traffic query result is a traffic feedback short message including traffic information.
Optionally, the apparatus further comprises: and the flow reminding module is suitable for sending a flow reminding message to the mobile terminal when the numerical value of the flow information contained in the flow inquiry result returned by the operator server exceeds a preset threshold value.
In the method and the device for calibrating the data traffic of the mobile terminal, provided by the invention, the traffic query request can be sent to the operator server according to the communication service type of the mobile terminal and the traffic query instruction corresponding to the communication service of the type, and the data traffic of the mobile terminal is calibrated according to the traffic query result returned by the operator server, so that the technical problem that the data traffic counted by local equipment has errors with the data traffic counted by the operator is solved, and a user can accurately manage the traffic tariff according to the data traffic counted by the local equipment. Specifically, in the invention, the flow query result returned by the operator server is analyzed through the preset analysis rule to obtain the flow information contained in the flow query result, so that the analysis efficiency and accuracy are improved.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components in an apparatus according to an embodiment of the invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
Claims (12)
1. A method for calibrating data traffic of a mobile terminal, comprising:
sending a flow inquiry request to an operator server according to the communication service type of the mobile terminal and a flow inquiry instruction corresponding to the communication service of the type;
receiving a flow query result returned by the operator server, and analyzing the flow query result according to a preset analysis rule to acquire flow information contained in the flow query result; sending the flow information to the mobile terminal so that the mobile terminal can calibrate the data flow counted by the local equipment according to the flow information;
dividing all mobile terminals to be calibrated into a plurality of groups, respectively creating subprocesses for calibrating the data traffic of each mobile terminal in each group for each group, and calibrating by each subprocess; the grouping is divided according to the flow inquiry command corresponding to the communication service type, so that the mobile terminals with the same flow inquiry command are divided into the same grouping.
2. The method of claim 1, wherein the parsing rule is set by:
collecting flow query results corresponding to various types of communication services in advance, and dividing the flow query results into various types according to identification information contained in the flow query results;
analyzing the type of the traffic information contained in each type of traffic query result and the format specification of the information field corresponding to each type of traffic information;
and respectively setting corresponding regular expression matching rules for each type of flow query result according to the format specification of the information field.
3. The method of claim 2, wherein the parsing the traffic query result according to a preset parsing rule comprises:
determining the type of the flow query result according to the identification information contained in the flow query result returned by the operator server;
acquiring a regular expression matching rule corresponding to the type of flow query result;
and matching each character in the flow query result returned by the operator server according to the regular expression matching rule to obtain the numerical value of each flow information contained in the flow query result.
4. The method of claim 1, wherein the category of the traffic information included in the traffic query result comprises one or more of: total traffic within a package, used traffic in the month, remaining traffic in the month, local data traffic, and roaming data traffic.
5. The method according to claim 1, wherein the traffic query request is a traffic query short message generated according to a query code and a query port number included in the traffic query instruction, and the traffic query result is a traffic feedback short message including traffic information.
6. The method of claim 1, further comprising the steps of:
and when the numerical value of the flow information contained in the flow inquiry result returned by the operator server exceeds a preset threshold value, sending a flow reminding message to the mobile terminal.
7. An apparatus for calibrating data traffic of a mobile terminal, comprising:
the query module is suitable for sending a flow query request to an operator server according to the communication service type of the mobile terminal and a flow query instruction corresponding to the communication service of the type;
the analysis module is suitable for receiving the flow query result returned by the operator server and analyzing the flow query result according to a preset analysis rule so as to obtain the flow information contained in the flow query result;
the sending module is suitable for sending the flow information to the mobile terminal so that the mobile terminal can calibrate the data flow counted by the local equipment according to the flow information;
dividing all mobile terminals to be calibrated into a plurality of groups in advance, and respectively creating a subprocess for calibrating the data traffic of each mobile terminal in each group for each group; the query module, the analysis module and the sending module are respectively realized by each subprocess; the grouping is divided according to the flow inquiry command corresponding to the communication service type, so that the mobile terminals with the same flow inquiry command are divided into the same grouping.
8. The apparatus of claim 7, further comprising: the analysis rule setting module is suitable for collecting flow inquiry results corresponding to various types of communication services in advance and dividing the flow inquiry results into various types according to identification information contained in the flow inquiry results; analyzing the type of the traffic information contained in each type of traffic query result and the format specification of the information field corresponding to each type of traffic information; and respectively setting corresponding regular expression matching rules for each type of flow query result according to the format specification of the information field.
9. The apparatus of claim 8, wherein the parsing module is specifically configured to: determining the type of the flow query result according to the identification information contained in the flow query result returned by the operator server; acquiring a regular expression matching rule corresponding to the type of flow query result; and matching each character in the flow query result returned by the operator server according to the regular expression matching rule to obtain the numerical value of each flow information contained in the flow query result.
10. The apparatus of claim 7, wherein the category of the traffic information included in the traffic query result comprises one or more of: total traffic within a package, used traffic in the month, remaining traffic in the month, local data traffic, and roaming data traffic.
11. The apparatus according to claim 7, wherein the traffic query request is a traffic query short message generated according to a query code and a query port number included in the traffic query instruction, and the traffic query result is a traffic feedback short message including traffic information.
12. The apparatus of claim 7, further comprising: and the flow reminding module is suitable for sending a flow reminding message to the mobile terminal when the numerical value of the flow information contained in the flow inquiry result returned by the operator server exceeds a preset threshold value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510964220.0A CN106899987B (en) | 2015-12-21 | 2015-12-21 | Method and device for calibrating data traffic of mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510964220.0A CN106899987B (en) | 2015-12-21 | 2015-12-21 | Method and device for calibrating data traffic of mobile terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106899987A CN106899987A (en) | 2017-06-27 |
CN106899987B true CN106899987B (en) | 2020-02-18 |
Family
ID=59190737
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510964220.0A Active CN106899987B (en) | 2015-12-21 | 2015-12-21 | Method and device for calibrating data traffic of mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106899987B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108520056A (en) * | 2018-04-03 | 2018-09-11 | 北京京东金融科技控股有限公司 | Business datum monitoring method and device, system, readable medium and electronic equipment |
CN108768777A (en) * | 2018-05-31 | 2018-11-06 | 连尚(新昌)网络科技有限公司 | Flow information inquiry, flow information providing method, equipment and medium |
CN110876123A (en) * | 2018-08-30 | 2020-03-10 | 北京三星通信技术研究有限公司 | Flow acquiring, providing, sharing, calibrating and transferring method and equipment |
CN110708211B (en) * | 2019-08-30 | 2021-09-17 | 上海唯链信息科技有限公司 | Network flow testing method and system |
CN110995541A (en) * | 2019-12-13 | 2020-04-10 | 北京小米移动软件有限公司 | Method and device for counting flow in real time |
CN113965900B (en) * | 2020-07-20 | 2023-09-05 | 中国移动通信集团安徽有限公司 | Method, device, computing equipment and storage medium for dynamically expanding flow resources |
CN113904884B (en) * | 2021-09-30 | 2023-05-30 | 中国联合网络通信集团有限公司 | Traffic service message control method and equipment |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102752398A (en) * | 2012-07-18 | 2012-10-24 | 腾讯科技(深圳)有限公司 | Method and system for resolving flow value, terminal and server |
CN103188647A (en) * | 2011-12-29 | 2013-07-03 | 北京网秦天下科技有限公司 | Method and system for statistically analyzing and warning Internet surfing flow of mobile terminal |
CN103220643A (en) * | 2012-01-20 | 2013-07-24 | 腾讯科技(深圳)有限公司 | Information providing method and device and template base matching method and device |
CN104159209A (en) * | 2014-08-01 | 2014-11-19 | 北京奇虎科技有限公司 | Data traffic calibration method and device for mobile terminal |
CN104853334A (en) * | 2015-05-25 | 2015-08-19 | 小米科技有限责任公司 | Method and device for analyzing short message |
CN104994220A (en) * | 2015-05-18 | 2015-10-21 | 北京奇虎科技有限公司 | Data processing method and system |
CN104994219A (en) * | 2015-05-18 | 2015-10-21 | 北京奇虎科技有限公司 | Data processing method and system |
CN104994541A (en) * | 2015-05-22 | 2015-10-21 | 小米科技有限责任公司 | Network flow correction method and device |
-
2015
- 2015-12-21 CN CN201510964220.0A patent/CN106899987B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103188647A (en) * | 2011-12-29 | 2013-07-03 | 北京网秦天下科技有限公司 | Method and system for statistically analyzing and warning Internet surfing flow of mobile terminal |
CN103220643A (en) * | 2012-01-20 | 2013-07-24 | 腾讯科技(深圳)有限公司 | Information providing method and device and template base matching method and device |
CN102752398A (en) * | 2012-07-18 | 2012-10-24 | 腾讯科技(深圳)有限公司 | Method and system for resolving flow value, terminal and server |
CN104159209A (en) * | 2014-08-01 | 2014-11-19 | 北京奇虎科技有限公司 | Data traffic calibration method and device for mobile terminal |
CN104994220A (en) * | 2015-05-18 | 2015-10-21 | 北京奇虎科技有限公司 | Data processing method and system |
CN104994219A (en) * | 2015-05-18 | 2015-10-21 | 北京奇虎科技有限公司 | Data processing method and system |
CN104994541A (en) * | 2015-05-22 | 2015-10-21 | 小米科技有限责任公司 | Network flow correction method and device |
CN104853334A (en) * | 2015-05-25 | 2015-08-19 | 小米科技有限责任公司 | Method and device for analyzing short message |
Also Published As
Publication number | Publication date |
---|---|
CN106899987A (en) | 2017-06-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106899987B (en) | Method and device for calibrating data traffic of mobile terminal | |
CN107026746B (en) | Network service quality evaluation method, system and network equipment | |
US20160344606A1 (en) | Method and apparatus to determine network quality | |
CN108810116B (en) | Message processing method and related product | |
US20030229534A1 (en) | Method and system for collecting and analyzing market data in a mobile communications system | |
EP2916580A1 (en) | Ordering tracing of wireless terminal activities | |
CN112087468A (en) | Message processing method, related equipment and readable storage medium | |
CN105139641A (en) | WiFi relay station-based vehicle scheduling method and system | |
CN106899775B (en) | Method and device for calibrating data traffic of mobile terminal | |
CN107818046B (en) | A/B test method and device for application program page | |
US20170280313A1 (en) | Method and Apparatus for Determining Roaming Status of Terminal, Terminal, and Server | |
CN103369486A (en) | System and method for preventing fraud SMS (Short message Service) message | |
KR101404448B1 (en) | Method and system for guiding package data protocol activation | |
CN110519810B (en) | Service relay switching method, terminal equipment, storage medium and device | |
CN113542043A (en) | Data sampling method, device, equipment and medium of network equipment | |
CN104883705A (en) | Problem positioning method for data service complaints and device thereof | |
CN116367102B (en) | Method and device for automatically switching short message route | |
KR20080016094A (en) | System and method for measuring confusion of specific region, and mobile terminal applied to the same | |
CN101834749A (en) | Method and device for acquiring data, method and device for monitoring business service quality | |
EP2273805A1 (en) | A user region locating method and equipment | |
CN105743939B (en) | A kind of method and apparatus of message push | |
CN110602228A (en) | Processing method and device based on short promotion message reach rate and storage medium | |
CN107040603B (en) | Method and device for determining active scene of application program App | |
CN108513351B (en) | Communication position determining method and device | |
CN113873495B (en) | Network access method and device of eSIM card |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220819 Address after: No. 9-3-401, No. 39, Gaoxin 6th Road, Binhai Science and Technology Park, High-tech Zone, Binhai New District, Tianjin 300000 Patentee after: 3600 Technology Group Co.,Ltd. Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park) Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Patentee before: Qizhi software (Beijing) Co.,Ltd. |
|
TR01 | Transfer of patent right |