Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached
The embodiment of figure description is exemplary, and for explaining only the invention, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one
It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in specification of the invention
Diction " comprising " refer to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition
Other one or more features, integer, step, operation, element, component and/or their group.It should be understood that when we claim member
Part is " connected " or when " coupled " to another element, it can be directly connected or coupled to other elements, or there may also be
Intermediary element.In addition, " connection " used herein or " coupling " may include being wirelessly connected or wirelessly coupling.It is used herein to arrange
Diction "and/or" includes one or more associated wholes for listing item or any cell and all combinations.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technology art
Language and scientific term), there is meaning identical with the general understanding of those of ordinary skill in fields of the present invention.Should also
Understand, those terms such as defined in the general dictionary, it should be understood that have in the context of the prior art
The consistent meaning of meaning, and unless idealization or meaning too formal otherwise will not be used by specific definitions as here
To explain.
Those skilled in the art of the present technique are appreciated that " terminal " used herein above, " terminal device " both include wireless communication
The equipment of number receiver, only has the equipment of the wireless signal receiver of non-emissive ability, and including receiving and emitting hardware
Equipment, have on bidirectional communication link, can execute two-way communication reception and emit hardware equipment.This equipment
It may include: honeycomb or other communication equipments, shown with single line display or multi-line display or without multi-line
The honeycomb of device or other communication equipments;PCS (Personal Communications Service, PCS Personal Communications System), can
With combine voice, data processing, fax and/or communication ability;PDA (Personal Digital Assistant, it is personal
Digital assistants), it may include radio frequency receiver, pager, the Internet/intranet access, web browser, notepad, day
It goes through and/or GPS (Global Positioning System, global positioning system) receiver;Conventional laptop and/or palm
Type computer or other equipment, have and/or the conventional laptop including radio frequency receiver and/or palmtop computer or its
His equipment." terminal " used herein above, " terminal device " can be it is portable, can transport, be mounted on the vehicles (aviation,
Sea-freight and/or land) in, or be suitable for and/or be configured in local runtime, and/or with distribution form, operate in the earth
And/or any other position operation in space." terminal " used herein above, " terminal device " can also be communication terminal, on
Network termination, music/video playback terminal, such as can be PDA, MID (Mobile Internet Device, mobile Internet
Equipment) and/or mobile phone with music/video playing function, it is also possible to the equipment such as smart television, set-top box.
Those skilled in the art of the present technique are appreciated that remote network devices used herein above comprising but be not limited to count
The cloud that calculation machine, network host, single network server, multiple network server collection or multiple servers are constituted.Here, Yun Youji
It is constituted in a large number of computers or network servers of cloud computing (Cloud Computing), wherein cloud computing is distributed computing
One kind, a super virtual computer consisting of a loosely coupled set of computers.In the embodiment of the present invention, distal end
It can be realized and be communicated by any communication mode between the network equipment, terminal device and WNS server, including but not limited to, is based on
The mobile communication of 3GPP, LTE, WIMAX, based on TCP/IP, the computer network communication of udp protocol and based on bluetooth, infrared
The low coverage wireless transmission method of transmission standard.
It will be appreciated by those skilled in the art that so-called " application ", " application program ", " application software " and class of the invention
It is same concept well known to those skilled in the art like the concept of statement, refers to and instructed by series of computation machine and related data
The computer software for being suitable for electronics operation of the organic construction of resource.Unless specified, this name itself is not by programming language
Type, rank, the operating system of operation of also not rely by it or platform are limited.In the nature of things, this genus also not by appoint
The terminal of what form is limited.
Fig. 1 is the flow chart of one embodiment of the method according to the present invention for mobile terminal traffic alignment, such as Fig. 1
It is shown:
Step 101, message is modified by the short message calibration command that remote interface receives terminal side transmission.Short message calibration refers to
It enables in modification message and carries newly-installed short message calibration command, operator SMS corresponding with newly-installed short message calibration command
Number.For example, for China Mobile, carried in short message calibration command modification message user be arranged on the interface of terminal it is new short
Believe that calibration command CXYL, operator SMS number corresponding with CXYL are 100086.
Step 102, whether judgement can obtain data on flows based on newly-installed short message calibration command.
Step 103, if it is possible to obtain data on flows, then will short message calibration command corresponding with operator SMS number more
Newly it is newly-installed short message calibration command, traffic alignment data is generated according to data on flows.For example, in the short of server end storage
Letter calibration command is CXYL0, after the data on flows for judging to send by the available China Mobile of short message calibration command CXYL,
CXYL0 is then replaced with into CXYL and is stored.
Operator, such as China Mobile provide multiple communication services set meal, such as 10 yuan of 70 megastream to each mobile terminal
Measure set meal, 20 yuan of 150,000,000 flow package etc..The data on flows of mobile terminal, example can be obtained by short message calibration command CXYL
Such as, residual flow, consumed flow, remaining telephone expenses etc., available more accurate data.
Step 104, terminal side is sent by traffic alignment data, traffic alignment data carry out data on flows for terminal side
Calibration.For example, the data on flows obtained from operator is formatted, traffic alignment data are generated, by traffic alignment number
According to terminal is sent to, the monitoring software run at the terminal is based on traffic alignment data progress traffic alignment, will be more acurrate
Data on flows be presented to the user, for example, set meal content, consumed flow, residual flow etc..
The method for mobile terminal traffic alignment in above-described embodiment, can be by using the newly-installed flow of user
Calibration command obtains data on flows, can be to avoid generation the case where can not carrying out traffic alignment, so that flux monitoring system is shown
Data traffic it is more accurate.
It in one embodiment, can be by terminal side or service after the short message calibration command modification message that terminal side is sent
Device end side sends short message enquiry.For example, terminal side generates the first short message enquiry comprising newly-installed short message calibration command, and will
First short message enquiry is sent to operator SMS number, terminal side intercept it is being sent by operator SMS number, looked into for first
Ask the first flow information short message of short message feedback.The first flow information short message that received server-side is sent to terminal side, is based on
Default rule judges whether first flow information short message carries data on flows.
For example, new short message calibration command CXYL, operator SMS number corresponding with CXYL is 100086, mobile whole
After monitoring software on end has sent short message calibration command modification message, the monitoring software on mobile terminal sends short message calibration and refers to
The short message enquiry for being CXYL is enabled to be sent to 10086.Monitoring software on mobile terminal monitors the flow for having received 10086 returns
When information short message, then the short breath of this flow information is intercepted, and be sent to server end, received server-side to flow information short message
Afterwards, judge whether it carries data on flows.
Monitoring software on mobile terminal intercepts there are many modes of short message, for example, being intercepted according to keyword or according to fortune
It seeks quotient's note number to intercept, for example, intercepting the short message sent according to operator SMS number 10086.Operator can configure to
A few telecommunication service server is used to record the data on flows of each mobile terminal, short by sending to telecommunication service server
The modes such as letter, message or notice are inquired.The first short message enquiry for query flows data can be write in advance it is short
Letter, is also possible to the short message that the information according to required for query flows temporarily generates.
Judge whether first flow information short message carries there are many datas on flows based on default rule, for example, from fortune
Short message text information is extracted in the first flow information short message of battalion's quotient's feedback, by short message text information and is used to grab data on flows
Regular expression carry out canonical matching.Whether judgement can grab the flow number in short message text information by regular expression
According to if it is, determination carries data on flows, if it is not, then determination does not carry data on flows.
For example, server end selects short message pattern corresponding with first flow information short message according to operator SMS number
Afterwards, it obtains canonical formula corresponding with first flow information short message and carries out canonical matching, extract the stream in first flow information short message
Measure data.Regular expression, also known as normal representation method, conventional expressing method, regular expression described using single string,
With a series of character strings for meeting some syntactic rule.The predefined some specific characters of regular expression and these
The combination of specific character, forms one " regular character string ", this " regular character string " is used to express a kind of mistake to character string
Filter logic.The data on flows in first flow information short message sent using regular expression crawl operator.
For example, the first flow information short message that the note number 10086 of China Mobile is sent is " residual flow 18,000,000;Make
With flow 15,000,000 ".Regular expression corresponding with the note number 10086 of operator is " residual flow (.*);Use flow
(.*) can then grab outflow data 18,000,000 and 15,000,000 using this regular expression from short message.
In one embodiment, when determining that first flow information short message carries data on flows, server end judgement is
It is no that new short message calibration command is provided with to operator SMS number.If it is determined that being provided with new short message calibration command, then sentence
It is disconnected that whether data on flows can be obtained based on original short message calibration command corresponding with operator SMS number.
If it is determined that data on flows cannot be obtained based on original short message calibration command, then mail confirmation is sent to operator
Whether with operator SMS number corresponding short message calibration command is had modified.If the mail confirmation operator modification based on return
Short message calibration command, then replace with newly-installed short message calibration command for original short message calibration command and store.
For example, the first flow information short message " residual flow 18 that server end is sent from the note number 10086 of operator
Million;Use flow 15,000,000 " in, outflow data 18,000,000 and 15,000,000 are grabbed using this regular expression, determine first flow information
Short message carries data on flows, and server end then judges whether to be provided with new short message calibration command to operator SMS number.
For example, server end stores it in log information, short message when receiving short message calibration command modification message
Calibration command modification message includes: 100086, CXYL and for showing newly-installed identifier 02.When determining first flow information
When short message carries data on flows, log information is retrieved, when judging to occur 100086 and 02, it is determined that operator SMS number
100086 are provided with new short message calibration command, as CXYL.Short message calibration command modification message also can store in memory.
If it is determined that being provided with new short message calibration command CXYL, then judgement is based on original corresponding with operator SMS number
Whether some short message calibration command CXYL0 can obtain data on flows.For example, counting during preset, such as 1 day, 2 days
It is interior, by operator SMS number 100086 be directed to the short message comprising original short message calibration command CXYL0 feedback, do not take
The quantity of flow information short message with data on flows accounts for operator SMS number 100086 and is directed to comprising the calibration of original short message
The ratio for instructing whole short messages of the short message feedback of CXYL0, judges whether ratio is more than preset proportion threshold value, such as 60%,
If it is, determining that original short message calibration command CXYL0 can not obtain data on flows.
If it is determined that data on flows cannot be obtained based on original short message calibration command CXYL0, then it is specified to China Mobile
Mailbox send mail, be confirmed whether to have modified short message calibration command CXYL0 corresponding with operator SMS number, after modification
For CXYL.Mail can have the format of standard, can be read automatically by machine.The mail of China Mobile's return is received, and is solved
Analysis Mail Contents confirmation China Mobile has modified short message calibration command, then replaces with original short message calibration command CXYL0 newly
The short message calibration command CXYL of setting is simultaneously stored, in case being later used to traffic alignment.
When determining that first flow information short message does not carry data on flows, then obtain corresponding with operator SMS number
Original short message calibration command, generate include original short message calibration command the second short message enquiry, and by the second short message enquiry
It is sent to operator SMS number.Receive second flow that operator SMS number is sent, for the second short message enquiry feedback
Information short message.Outflow data are grabbed from second flow information short message and traffic alignment data are generated according to data on flows, it will
Traffic alignment data and the newly-installed incorrect information of short message calibration command are sent to terminal side.
For example, not extracted when received server-side to terminal sends first flow information short message, but by regular expression
When outflow data, then explanation cannot obtain data on flows based on the newly-installed short message calibration command CXYL of user.Server end
Pre-stored original short message calibration command CXYL0 corresponding with operator SMS number 100086 is obtained, is generated comprising original
Second short message enquiry is sent to operator SMS number by the second short message enquiry of some short message calibration command CXYL0, server end
Code 100086.
Second flow that received server-side operator SMS number 100086 is sent, for the second short message enquiry feedback
Information short message grabs outflow data from second flow information short message and generates traffic alignment data, example according to data on flows
Such as, data on flows is extracted using regular expression.Traffic alignment data and newly-installed short message calibration command CXYL are incorrect
Information be sent to terminal side, the data on flows shown to the traffic statistics software installed on mobile terminals is calibrated,
And the incorrect prompt information of newly-installed short message calibration command CXYL is shown to user.
The method for mobile terminal traffic alignment in through the foregoing embodiment allows users to actively set newly
Short message calibration command simultaneously carries out traffic alignment, the short message that can timely update calibration command, repair data on flows calibration can in time
It just, can be to avoid generation the case where can not carrying out traffic alignment, so that the data traffic that flux monitoring system is shown is more accurate.
As shown in Fig. 2, the present invention provides a kind of device 2 for mobile terminal traffic alignment.Modify command reception module
21, which receive the short message calibration command that terminal side is sent by remote interface, modifies message, carries in short message calibration command modification message
There are newly-installed short message calibration command, operator SMS number corresponding with newly-installed short message calibration command.
Whether flow obtains the judgement of judgment module 22 can obtain data on flows based on newly-installed short message calibration command.Such as
Fruit, which is based on newly-installed short message calibration command, can obtain data on flows, then short-message instruction update module 23 will be with operator SMS
The corresponding short message calibration command of number is updated to newly-installed short message calibration command.Data on flows generation module 24 is according to flow number
According to generation traffic alignment data.Traffic alignment data are sent terminal side by data on flows sending module 25.
Terminal side generates the first short message enquiry comprising newly-installed short message calibration command, and the first short message enquiry is sent
To operator SMS number.That terminal side interception is sent by operator SMS number, being fed back for the first short message enquiry first
Flow information short message.As shown in figure 3, it includes: short message receiving unit 221, short message judging unit 222 that flow, which obtains judgment module 22,
With short message transmission unit 223.Short message receiving unit 221 receives the first flow information short message that terminal side is sent.Short message judgement is single
Member 222 judges whether first flow information short message carries data on flows based on default rule.
In one embodiment, short message judging unit 222 extracts short message text information from first flow information short message, will
Short message text information carries out canonical matching with the regular expression for grabbing data on flows.The judgement of short message judging unit 222 is logical
Cross whether regular expression can grab data on flows in short message text information, if it is, determination carries data on flows,
If it is not, then determination does not carry data on flows.
When determining that first flow information short message does not carry data on flows, then short message transmission unit 223 is obtained and is runed
The corresponding original short message calibration command of quotient's note number generates the second short message enquiry comprising original short message calibration command,
And the second short message enquiry is sent to operator SMS number.That the reception operator SMS number of short message receiving unit 221 is sent,
For the second flow information short message of the second short message enquiry feedback.Data on flows generation module 24 is from second flow information short message
It grabs outflow data and traffic alignment data is generated according to data on flows.Data on flows sending module 25 is by traffic alignment data
Terminal side is sent to the newly-installed incorrect information of short message calibration command.
Short-message instruction update module 23 includes: the first judging unit 231, second judgment unit 232, third judging unit
233 and instruction replacement unit 234.First judging unit 231 is sentenced when determining that first flow information short message carries data on flows
It is disconnected whether new short message calibration command to be provided with to operator SMS number.If it is determined that it is provided with new short message calibration command,
Whether the then judgement of second judgment unit 232 can be obtained based on original short message calibration command corresponding with operator SMS number
Data on flows.
If it is determined that cannot obtain data on flows based on original short message calibration command, then third judging unit 233 is to fortune
Battalion quotient sends mail and is confirmed whether to have modified short message calibration command corresponding with operator SMS number.If the postal based on return
Part confirmation operator has modified short message calibration command, then replacement unit 234 is instructed to replace with original short message calibration command newly
The short message calibration command of setting simultaneously stores.
In one embodiment, the statistics of second judgment unit 232 is directed to by operator SMS number comprising original short
Believe the ratio of flow information short message that the short message of calibration command is fed back, without carrying data on flows;Judge ratio whether be more than
Preset proportion threshold value, if it is, determining that original short message calibration command can not obtain data on flows.
Short message calibration command modification message is stored in log information by modification command reception module 21.First judging unit
231 judge whether to be provided with new short message calibration command to operator SMS number based on log information.
In one embodiment, the present invention provides a kind of traffic server, is used for mobile terminal flow school including as above
Quasi- device.
Method, apparatus and traffic server provided by the above embodiment for mobile terminal traffic alignment, so that user
New short message calibration command can actively be set and carry out traffic alignment, the short message that can timely update calibration command makes flow number
It can be corrected in time according to calibration, it can be to avoid generation the case where can not carrying out traffic alignment, so that flux monitoring system was shown
Data traffic is more accurate, improves the use feeling of user.
The embodiment of the present invention provides at least following technical scheme:
1, a kind of method for mobile terminal traffic alignment, comprising:
Message is modified by the short message calibration command that remote interface receives terminal side transmission, wherein the short message calibration
Newly-installed short message calibration command, operation corresponding with the newly-installed short message calibration command are carried in instruction modification message
Quotient's note number;
Whether judgement can obtain data on flows based on the newly-installed short message calibration command, if it is, will be with institute
It states the corresponding short message calibration command of operator SMS number and is updated to the newly-installed short message calibration command, and according to the stream
It measures data and generates traffic alignment data;
The terminal side is sent by the traffic alignment data, wherein the traffic alignment data are used for the terminal
Side carries out data on flows calibration.
2, whether the method as described in 1, judgement can obtain data on flows based on the newly-installed short message calibration command
Include:
The terminal side generate include the newly-installed short message calibration command the first short message enquiry, and by described first
Short message enquiry is sent to the operator SMS number;
The terminal side intercept it is being sent by the operator SMS number, fed back for first short message enquiry the
One flow information short message;
The first flow information short message that the terminal side is sent is received, judges described first based on default rule
Whether flow information short message carries data on flows.
3, the method as described in 2, it is described to judge whether the first flow information short message carries based on default rule
Data on flows includes:
Short message text information is extracted from the first flow information short message;
The short message text information is subjected to canonical matching with the regular expression for being used to grab data on flows;
Whether judgement can grab the data on flows in the short message text information by the regular expression, if
It is, it is determined that data on flows is carried, if it is not, then determination does not carry data on flows.
4, the method as described in 3, it is described that short message calibration command corresponding with the operator SMS number is updated to institute
Stating newly-installed short message calibration command includes:
When determining that the first flow information short message carries data on flows, judge whether to the operator SMS number
Code is provided with new short message calibration command;
If it is determined that being provided with new short message calibration command, then judgement is based on original corresponding with the operator SMS number
Whether some short message calibration commands can obtain data on flows;
If it is determined that data on flows cannot be obtained based on original short message calibration command, then mail is sent to operator
It is confirmed whether to have modified short message calibration command corresponding with the operator SMS number;
If the mail confirmation operator based on return has modified short message calibration command, original short message is calibrated
Instruction replaces with the newly-installed short message calibration command and stores.
5, the method as described in 4, judgement are based on original short message calibration command corresponding with the operator SMS number
Data on flows, which whether can be obtained, includes:
It is anti-that statistics by the operator SMS number is directed to the short message enquiry comprising original short message calibration command
The ratio of flow information short message present, without carrying data on flows;
Judge whether the ratio is more than preset proportion threshold value, if it is, determining that original short message calibration refers to
Order cannot obtain data on flows.
6, the method as described in 4 judges whether to be provided with new short message calibration command packet to the operator SMS number
It includes:
Short message calibration command modification message is stored in log information;
Judge whether to be provided with new short message calibration command to the operator SMS number based on the log information.
7, the method as described in 3, comprising:
When determining that the first flow information short message does not carry data on flows, then obtain and the operator SMS number
The corresponding original short message calibration command of code;
The second short message enquiry comprising original short message calibration command is generated, and second short message enquiry is sent
To the operator SMS number;
Receive it is that the operator SMS number is sent, for second short message enquiry feedback second flow information it is short
Letter;
Outflow data are grabbed from the second flow information short message and traffic alignment is generated according to the data on flows
Data;
The traffic alignment data and the newly-installed incorrect information of short message calibration command are sent to the terminal side.
8, the method as described in 1, comprising:
The terminal side receives the traffic alignment data, the traffic statistics software institute exhibition to installing in the terminal side
The data on flows shown is calibrated.
9, a kind of device for mobile terminal traffic alignment, comprising:
Command reception module is modified, is disappeared for receiving the short message calibration command modification that terminal side is sent by remote interface
Breath, wherein carried in short message calibration command modification message newly-installed short message calibration command, with it is described newly-installed short
Believe the corresponding operator SMS number of calibration command;
Flow obtains judgment module, for judging whether flow can be obtained based on the newly-installed short message calibration command
Data;
Short-message instruction update module, for if it is determined that flow can be obtained based on the newly-installed short message calibration command
Short message calibration command corresponding with the operator SMS number is then updated to the newly-installed short message calibration and referred to by data
It enables;
Data on flows generation module, for generating traffic alignment data according to the data on flows;
Data on flows sending module, for sending the terminal side for the traffic alignment data, wherein the flow
Calibration data carries out data on flows calibration for the terminal side.
10, the device as described in 9,
The terminal side generate include the newly-installed short message calibration command the first short message enquiry, and by described first
Short message enquiry is sent to the operator SMS number;The terminal side intercepts sent by the operator SMS number, needle
To the first flow information short message of first short message enquiry feedback;
The flow obtains judgment module, comprising:
Short message receiving unit, the first flow information short message sent for receiving the terminal side;
Short message judging unit judges whether the first flow information short message carries flow number for default rule
According to.
11, the device as described in 10,
The short message judging unit is also used to extract short message text information from the first flow information short message, by institute
It states short message text information and carries out canonical matching with the regular expression for grabbing data on flows, judgement passes through the regular expressions
Whether formula can grab the data on flows in the short message text information, if it is, determination carries data on flows, if
It is no, it is determined that not carry data on flows.
12, the device as described in 11,
The short-message instruction update module, comprising:
First judging unit, for judging whether when determining that the first flow information short message carries data on flows
New short message calibration command is provided with to the operator SMS number;
Second judgment unit, for if it is determined that being provided with new short message calibration command, then judgement to be based on and the operation
Whether the corresponding original short message calibration command of quotient's note number can obtain data on flows;
Third judging unit, for if it is determined that data on flows cannot be obtained based on original short message calibration command,
Then mail is sent to operator to be confirmed whether to have modified short message calibration command corresponding with the operator SMS number;
Replacement unit is instructed, it, will if having modified short message calibration command for the mail confirmation operator based on return
Original short message calibration command replaces with the newly-installed short message calibration command and stores.
13, the device as described in 12,
The second judgment unit is also used to statistics and is directed to by the operator SMS number comprising described original short
Believe the ratio of flow information short message that the short message enquiry of calibration command is fed back, without carrying data on flows;Judge the ratio
It whether is more than preset proportion threshold value, if it is, determining that original short message calibration command cannot obtain data on flows.
14, the device as described in 13,
The modification command reception module is also used to short message calibration command modification message being stored in log information
In;
First judging unit is also used to judge whether to set the operator SMS number based on the log information
New short message calibration command is set.
15, the device as described in 14, comprising:
The flow obtains judgment module, further includes:
Short message transmission unit, for when determining that the first flow information short message does not carry data on flows, then obtaining
Original short message calibration command corresponding with the operator SMS number;It generates comprising original short message calibration command
Second short message enquiry, and second short message enquiry is sent to the operator SMS number;
The short message receiving unit, it is that the operator SMS number is sent, short for second inquiry for receiving
Believe the second flow information short message of feedback;
The data on flows generation module, for grabbing outflow data and basis from the second flow information short message
The data on flows generates traffic alignment data;
The data on flows sending module, the traffic alignment data and newly-installed short message calibration command are incorrect
Information is sent to the terminal side.
16, a kind of traffic server, comprising:
Such as 9 to 15 described in any item devices for mobile terminal traffic alignment.
The above is only some embodiments of the invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.