CN104780528A - Network traffic updating method and device - Google Patents

Network traffic updating method and device Download PDF

Info

Publication number
CN104780528A
CN104780528A CN201410010629.4A CN201410010629A CN104780528A CN 104780528 A CN104780528 A CN 104780528A CN 201410010629 A CN201410010629 A CN 201410010629A CN 104780528 A CN104780528 A CN 104780528A
Authority
CN
China
Prior art keywords
sim card
value
field
current
judge
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410010629.4A
Other languages
Chinese (zh)
Other versions
CN104780528B (en
Inventor
周兰兰
张雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201410010629.4A priority Critical patent/CN104780528B/en
Publication of CN104780528A publication Critical patent/CN104780528A/en
Application granted granted Critical
Publication of CN104780528B publication Critical patent/CN104780528B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a network traffic updating method and a device. The method comprises steps: a value for identifying a field of a currently-networking SIM card is acquired from a terminal configuration file, wherein the terminal is at least configured with a first SIM card and a second SIM card, and the first SIM card and the second SIM card have the corresponding same network card identifiers; whether the currently-networking SIM card identified by the value of the field is the first SIM card or the second SIM card is judged; if the currently-networking SIM card identified by the value of the field is the first SIM card, an acquired current network traffic variation is used for updating historical network traffic of the first SIM card; and if the currently-networking SIM card identified by the value of the field is the second SIM card, an acquired current network traffic variation is used for updating historical network traffic of the second SIM card. The technical problem that a dual-card-two-standby mobile phone with the same network card identifier can not count the network traffic of each card respectively can be solved, and effects of accurately telling and counting the network traffic of each card of the dual-card-two-standby mobile phone can be achieved.

Description

Network traffics update method and device
Technical field
The present invention relates to cell phone managing field, in particular to a kind of network traffics update method and device.
Background technology
In recent years, China's double card double standby mobile phone market development is rapid, and product output continues expansion, and this makes double card double standby mobile phone occupancy volume commercially increasing.In such case, cellphone subscriber is also increasing for the requirement of double card double standby mobile phone, especially pays close attention to and how effectively to manage double card.After the powerful dorsal support of mobile Internet, to the traffic statistics of the double-card mobile phone emphasis paid close attention to of cellphone subscriber especially.
Mobile phone house keeper waits some cell phone managing softwares to be in single-card mobile phone for the support main attention of flow now, and not too perfect for the support of double-card mobile phone.Be limited to the setting of cell phone manufacturer for double-card mobile phone traffic management, this just causes some cell phone softwares such as mobile phone house keeper inaccurate or simply cannot support for the traffic statistics of double-card mobile phone.At present, the technical scheme that mobile phone house keeper adopts mainly relies on the network interface card field configuration of cell phone manufacturer to double-card mobile phone to the traffic statistics of double-card mobile phone, and this is very passive.Which card what mobile phone house keeper judged last networking by the data variation in dev file is, and the SIM(Subscriber Identity Module of last networking, client identification module) block as current SIM card of networking, but, if the field of two cards is the same, just can not differentiate.The program too relies on the mode of cell phone manufacturer to double-card mobile phone discharge record, if field record is not distinguished to double-card mobile phone by cell phone manufacturer, also just say that two cards are the network interface card record of a field, so this scheme is just in very awkward condition, and it is at a complete loss as to what to do to the mobile phone only having the network interface card field of to carry out traffic statistics.
In this application, SIM card, also referred to as smart card or subscriber identification card, may be used for the network of different mobile communication standard standards, such as, and cdma network, WCDMA network, GSM network, TD-SCDMA network.
For above-mentioned problem, at present effective solution is not yet proposed.
Summary of the invention
Embodiments provide a kind of network traffics update method and device, at least to solve the technical problem that the identical double card double standby mobile phone of network card identification cannot add up each card network traffics respectively.
According to an aspect of the embodiment of the present invention, provide a kind of network traffics update method, comprise: the value obtaining the field of the SIM card for identifying current networking from the configuration file of terminal, wherein, the first SIM card and the second SIM card is at least configured with, the network card identification that the first SIM card is corresponding identical with the second SIM card in terminal; Judge that SIM card that the value of field identifies current networking be the first SIM card is still the second SIM card; If the SIM card that the value of field identifies current networking is the first SIM card, then the web-based history flow of the variable quantity of the current network flow got to the first SIM card is used to upgrade; If the SIM card that the value of field identifies current networking is the second SIM card, then the web-based history flow of the variable quantity of the current network flow got to the second SIM card is used to upgrade.
Alternatively, the value obtaining the field of the SIM card for identifying current networking from the configuration file of terminal comprises: the field of searching the SIM card for identify current networking corresponding with the operating system that the type of terminal and/or terminal are run from the adaptation file of installing in the terminal; The value of field is obtained from the configuration file of terminal.
Alternatively, judge that SIM card that the value of field identifies current networking be the first SIM card is still that the second SIM card comprises: the value of the first field comprised according to field judges that the SIM card of current networking be the first SIM card is still the second SIM card; Or the value of the second field at least comprised according to field and the 3rd field judges that the SIM card of current networking be the first SIM card is still the second SIM card.
Alternatively, field comprises the first field, judge that SIM card that the value of field identifies current networking be the first SIM card is still that the second SIM card comprises: whether the value judging the first field is the first value, if the value of the first field is the first value, then represent first SIM card current in running order, the second SIM card is current is in holding state, and judges that the SIM card of current networking is the first SIM card; Whether the value judging the first field is the second value, if the value of the first field is the second value, then represents that the first SIM card is currently in holding state, the second SIM card is current in running order, and judges that the SIM card of current networking is the second SIM card; Whether the value judging the first field is the 3rd value, if the value of the first field is the 3rd value, then represents that the first SIM card is activated, the second SIM card is deactivated, and judges that the SIM card of current networking is the first SIM card; Whether the value judging the first field is the 4th value, if the value of the first field is the 4th value, then represents that the first SIM card is deactivated, the second SIM card is activated, and judges that the SIM card of current networking is the second SIM card.
Alternatively, field comprises the second field and the 3rd field, judge that SIM card that the value of field identifies current networking be the first SIM card is still that the second SIM card comprises: whether the value judging the second field is the 5th value, if the value of the second field is the 5th value, then represent first SIM card current in running order, the second SIM card is current is in holding state, or the first SIM card is current is in holding state, the second SIM card is current in running order; When the value of the second field is the 5th value, judge that the value of the 3rd field be the 6th value is still the 7th value, if the value of the 3rd field is the 6th value, then judge that the SIM card of current networking is the first SIM card, if the value of the 3rd field is the 7th value, then judge that the SIM card of current networking is the second SIM card; Whether the value judging the second field is the 8th value, if the value of the second field is the 8th value, then represents that the first SIM card is activated, the second SIM card is deactivated, and judges that the SIM card of current networking is the first SIM card; Whether the value judging the second field is the 9th value, if the value of the second field is the 9th value, then represents that the first SIM card is deactivated, the second SIM card is activated, and judges that the SIM card of current networking is the second SIM card.
Alternatively, use the web-based history flow of variable quantity to the first SIM card of the current network flow got to carry out renewal to comprise: the web-based history flow of the first SIM card is updated to the web-based history flow of the first SIM card and the variable quantity sum of current network flow; Use the web-based history flow of variable quantity to the second SIM card of the current network flow got to carry out renewal to comprise: the web-based history flow of the second SIM card is updated to the web-based history flow of the second SIM card and the variable quantity sum of current network flow.
According to the another aspect of the embodiment of the present invention, additionally provide a kind of network traffics updating device, comprise: acquiring unit, for obtaining the value of the field of the SIM card for identifying current networking from the configuration file of terminal, wherein, the first SIM card and the second SIM card is at least configured with, the network card identification that the first SIM card is corresponding identical with the second SIM card in terminal; Judging unit, for judging that SIM card that the value of field identifies current networking be the first SIM card is still the second SIM card; First updating block, when being the first SIM card for identifying the SIM card of current networking in the value of field, uses the web-based history flow of variable quantity to the first SIM card of the current network flow got to upgrade; Second updating block, when being the second SIM card for identifying the SIM card of current networking in the value of field, uses the web-based history flow of variable quantity to the second SIM card of the current network flow got to upgrade.
Alternatively, acquiring unit comprises: search module, for searching the field of the SIM card for identify current networking corresponding with the operating system that the type of terminal and/or terminal are run from the adaptation file of installing in the terminal; Acquisition module, for obtaining the value of field from the configuration file of terminal.
Alternatively, judging unit comprises: the first judge module, and the value for the first field comprised according to field judges that the SIM card of current networking be the first SIM card is still the second SIM card; Or the second judge module, the value for the second field of at least comprising according to field and the 3rd field judges that the SIM card of current networking be the first SIM card is still the second SIM card.
Alternatively, field comprises the first field, judging unit also comprises: the 3rd judge module, for judging whether the value of the first field is the first value, if the value of the first field is the first value, then represent first SIM card current in running order, the second SIM card is current is in holding state, and judges that the SIM card of current networking is the first SIM card; 4th judge module, for judging whether the value of the first field is the second value, if the value of the first field is the second value, then represents that the first SIM card is currently in holding state, the second SIM card is current in running order, and judge that the SIM card of current networking is the second SIM card; 5th judge module, for judging whether the value of the first field is the 3rd value, if the value of the first field is the 3rd value, then represents that the first SIM card is activated, the second SIM card is deactivated, and judges that the SIM card of current networking is the first SIM card; 6th judge module, for judging whether the value of the first field is the 4th value, if the value of the first field is the 4th value, then represents that the first SIM card is deactivated, the second SIM card is activated, and judges that the SIM card of current networking is the second SIM card.
Alternatively, field comprises the second field and the 3rd field, judging unit comprises: the 7th judge module, for judging whether the value of the second field is the 5th value, if the value of the second field is the 5th value, then represent first SIM card current in running order, the second SIM card is current is in holding state, or the first SIM card is current is in holding state, the second SIM card is current in running order; When the value of the second field is the 5th value, judge that the value of the 3rd field be the 6th value is still the 7th value, if the value of the 3rd field is the 6th value, then judge that the SIM card of current networking is the first SIM card, if the value of the 3rd field is the 7th value, then judge that the SIM card of current networking is the second SIM card; 8th judge module, for judging whether the value of the second field is the 8th value, if the value of the second field is the 8th value, then represents that the first SIM card is activated, the second SIM card is deactivated, and judges that the SIM card of current networking is the first SIM card; 9th judge module, for judging whether the value of the second field is the 9th value, if the value of the second field is the 9th value, then represents that the first SIM card is deactivated, the second SIM card is activated, and judges that the SIM card of current networking is the second SIM card.
Alternatively, this device also comprises: the first updating block comprises: the first update module, for the web-based history flow of the first SIM card is updated to the web-based history flow of the first SIM card and the variable quantity sum of current network flow; Second updating block comprises: the second update module, for the web-based history flow of the second SIM card is updated to the web-based history flow of the second SIM card and the variable quantity sum of current network flow.
In embodiments of the present invention, adopt the mode of the value of the field of the SIM card obtained from the configuration file of terminal for identifying current networking, by the value of this field, judge the SIM card of current networking is as which card, and then the historical traffic of variable quantity to corresponding SIM card acquiring network traffics is upgraded, reach object double card double standby mobile phone being distinguished to statistic flow, thus achieve the technique effect accurately distinguishing statistics double card double standby mobile phone each card network traffics variable quantity, and then solve the technical problem that the identical double card double standby mobile phone of network card identification cannot add up each card network traffics respectively.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, and form a application's part, schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart of a kind of optional network traffics update method according to the embodiment of the present invention;
Fig. 2 is the schematic diagram of the configuration file of a kind of optional terminal according to the embodiment of the present invention;
Fig. 3 is the flow chart according to the optional network traffics update method of the another kind of the embodiment of the present invention;
Fig. 4 is the flow chart of another the optional network traffics update method according to the embodiment of the present invention;
Fig. 5 is the flow chart of another the optional network traffics update method according to the embodiment of the present invention;
Fig. 6 is the flow chart of another the optional network traffics update method according to the embodiment of the present invention;
Fig. 7 is the schematic diagram of a kind of optional network traffics updating device according to the embodiment of the present invention;
Fig. 8 is the schematic diagram according to the optional network traffics updating device of the another kind of the embodiment of the present invention;
Fig. 9 is the schematic diagram of another the optional network traffics updating device according to the embodiment of the present invention; And
Figure 10 is the schematic diagram of another the optional network traffics updating device according to the embodiment of the present invention.
Embodiment
The present invention program is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the embodiment of a part of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, should belong to the scope of protection of the invention.
It should be noted that, term " first ", " second " etc. in specification of the present invention and claims and above-mentioned accompanying drawing are for distinguishing similar object, and need not be used for describing specific order or precedence.Should be appreciated that the data used like this can be exchanged in the appropriate case, so as embodiments of the invention described herein can with except here diagram or describe those except order implement.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, such as, contain those steps or unit that the process of series of steps or unit, method, system, product or equipment is not necessarily limited to clearly list, but can comprise clearly do not list or for intrinsic other step of these processes, method, product or equipment or unit.
Embodiment 1
According to the embodiment of the present invention, provide a kind of network traffics update method, as shown in Figure 1, the method comprises:
S102, obtains the value of the field of the SIM card for identifying current networking from the configuration file of terminal, wherein, is at least configured with the first SIM card and the second SIM card in terminal, the network card identification that the first SIM card is corresponding identical with the second SIM card;
Alternatively, above-mentioned network traffics update method is applied to various terminal in the present embodiment, such as, and mobile phone, panel computer.Certainly, the citing of above-mentioned terminal is a kind of example, and the application does not limit this.
Alternatively, the terminal in the present embodiment can comprise at least two SIM cards, and such as, two SIM cards or three SIM cards, the application does not limit this.
Alternatively, the running status of double card double standby mobile phone includes but not limited to following at least one in the present embodiment: SIM1 enables that SIM2 stops using, SIM1 stops using that SIM2 enables, SIM1 works, and SIM2 is standby, the standby SIM2 work of SIM1.Alternatively, which SIM card what above-mentioned different running status can indicate current networking is, such as, current networking that what running status " SIM1 enables SIM2 and stops using " indicated is be SIM1.
Describe above-mentioned steps S102 for mobile phone, mobile phone is configured with the first SIM card and the second SIM card, the draw-in groove that two cards are corresponding has identical network card identification, obtains the value of the field of the SIM card for identifying current networking from the configuration file of mobile phone.Alternatively, include but not limited to for the field of the SIM card identifying current networking in the present embodiment: field, two fields or a plural field.
Such as, in composition graphs 2 shown in (a)-(b), describe for mobile phone A, the first SIM card SIM1 and the second SIM card SIM2(is configured with as shown in phantom in FIG.) in mobile phone A, two block corresponding identical network card identification (such as, mark is sim_logo), file in mobile phone includes but not limited to: configuration file (such as, file), audio file (such as, media), picture file (such as, picture), wherein, configuration file (such as, file) field dual_sim_mode_setting is comprised, its value can be but be not limited to: 1, 2, wherein, field dual_sim_mode_setting value is the SIM card of the current networking of 1 expression is the first SIM card SIM1, field dual_sim_mode_setting value is the SIM card of the current networking of 2 expression is the second SIM card SIM2.
S104, judges that SIM card that the value of field identifies current networking be the first SIM card is still the second SIM card;
Such as, obtain the field of the SIM card for identifying current networking (such as, dual_sim_mode_setting) after value, judge that its value is 1 or 2, wherein, the SIM card of to be the first SIM card SIM1, field dual_sim_mode_setting value the be current networking of 2 expression that field dual_sim_mode_setting value is the SIM card of the current networking of 1 expression is the second SIM card SIM2.
S106, if the SIM card that the value of field identifies current networking is the first SIM card, then uses the web-based history flow of the variable quantity of the current network flow got to the first SIM card to upgrade;
Alternatively, web-based history flow in the present embodiment includes but not limited to: total web-based history flow, the web-based history flow of the first SIM card, the web-based history flow of the second SIM card.Such as, total web-based history flow of mobile phone A is 20M, and the web-based history flow of the first SIM card is 15M, and the web-based history flow of the second SIM card is 5M.
Such as, judgement draws the field of SIM card (such as, dual_sim_mode_setting) value is 1, i.e. the SIM card of current networking is the first SIM card SIM1, then utilize the web-based history flow of the variable quantity of current network flow to the first SIM card SIM1 to upgrade.Such as, detect that the current network traffics used are 25M, then can judge that the variable quantity of current network flow is for 5M according to the current network traffics that used and total web-based history flow, judge to learn that the SIM card of current networking is the first SIM card SIM1, then use the web-based history flow of 5M variable quantity to the first SIM card SIM1 got to upgrade.Therefore, the web-based history flow of the first SIM card SIM1 of the mobile phone A after renewal is 20M, and the web-based history flow of the second SIM card SIM2 is 5M, and total web-based history flow of mobile phone A is updated to the current network traffics used, that is, 25M.
S108, if the SIM card that the value of field identifies current networking is the second SIM card, then uses the web-based history flow of the variable quantity of the current network flow got to the second SIM card to upgrade.
Such as, judgement draws the field of SIM card (such as, dual_sim_mode_setting) value is 2, i.e. the SIM card of current networking is the second SIM card SIM2, then utilize the web-based history flow of the variable quantity of current network flow to the second SIM card SIM2 to upgrade.Such as, detect that the current network traffics used are 25M, then can judge that the variable quantity of current network flow is for 5M according to the current network traffics that used and total web-based history flow, judge to learn that the SIM card of current networking is the second SIM card SIM2, then use the web-based history flow of 5M variable quantity to the second SIM card SIM2 got to upgrade.Therefore, the web-based history flow of the first SIM card SIM1 of the mobile phone A after renewal is 15M, and the web-based history flow of the second SIM card SIM2 is 10M, and total web-based history flow of mobile phone A is updated to the current network traffics used, that is, 25M.
By the embodiment that the application provides, utilize in the configuration file of terminal for identifying the value of the field of the SIM card of current networking, judge the SIM card distinguishing current networking, and then utilize the web-based history flow of the variable quantity of network traffics to corresponding SIM card to upgrade, make double card double standby mobile phone can distinguish the variable quantity of the network traffics of adding up each card more accurately.
As the optional scheme of one, as shown in Figure 3, step S102, the value obtaining the field of the SIM card for identifying current networking from the configuration file of terminal comprises:
S302, searches the field of the SIM card for identify current networking corresponding with the operating system that the type of terminal and/or terminal are run from the adaptation file of installing in the terminal;
Alternatively, the type of terminal in the present embodiment can be, but not limited to divide according to production firm, and wherein, cell phone manufacturer includes but not limited to: Samsung, apple, Nokia.Alternatively, the system in the present embodiment terminal run includes but not limited to: apple IOS system, Android android system, Windows Phone system, Saipan Symbian system.
Such as, shown in associative list 1, the adaptation file of installing in the terminal can comprise following content:
Table 1
The type of terminal The system that terminal is run For identifying the field of the SIM card of current networking
Samsung Android android system dual_sim_mode_setting
Apple Apple IOS system dual_sim_mode_setting_ios
Nokia Saipan Symbian system dual_sim_mode_setting_symbian
As shown in table 1, the field of the SIM card for identify current networking corresponding with the operating system that the type of terminal and/or terminal are run can be found in the adaptation file in terminal.
Such as, mobile phone A is Samsung mobile phone, and the system of operation is Android android system, wherein, is dual_sim_mode_setting for identifying the field of the SIM card of current networking in the configuration file of this system.Under this scene, when obtaining the field of SIM card for identifying current networking, the field of the SIM card for identify current networking corresponding with the type of above-mentioned terminal and aforesaid operations system can be found in the adaptation file being arranged on mobile phone, such as, be dual_sim_mode_setting by searching the field of the SIM card that above-mentioned table 1 can find for identifying current networking.
S304, obtains the value of field from the configuration file of terminal.
Such as, that Samsung mobile phone describes for mobile phone A, the system run is Android android system, be dual_sim_mode_setting according to finding this mobile phone for identifying the field of the SIM card of current networking in the adaptation file of mobile phone, then obtain the value of this field dual_sim_mode_setting to the configuration file of mobile phone.
By the embodiment that the application provides, the field of the SIM card for identify current networking corresponding with the operating system that the type of terminal and/or terminal are run is searched from the adaptation file of terminal, the value of this field is obtained again to the configuration file of terminal, can directly obtain different terminals type like this, SIM card in different operational system is for identifying the field of networking, achieve the field that Real-time Obtaining is according to demand different, and then the effect of the variable quantity of network flow calculation more accurately.
As the optional scheme of one, shown in composition graphs 4, step S104, judges that SIM card that the value of field identifies current networking be the first SIM card is still that the second SIM card comprises following at least one mode:
S402, the value of the first field comprised according to field judges that the SIM card of current networking be the first SIM card is still the second SIM card;
Alternatively, be a field for identifying the field of the SIM card of current networking in the present embodiment, when the application is not limited only to this, the field for identifying the SIM card of current networking can also comprise two fields or plural field.
Such as, Samsung mobile phone for mobile phone A, the system run is Android android system, this mobile phone is dual_sim_mode_setting for identifying the first field of the SIM card of current networking, judges that the SIM card of current networking be the first SIM card SIM1 is still the second SIM card SIM2 according to the value of this field.
Shown in associative list 2, can judge that the SIM card of current networking be the first SIM card is still the second SIM card, also can be used for the running status judging current phone according to the value of the first field dual_sim_mode_setting:
Table 2
As seen from the above table, show that the first field dual_sim_mode_setting value is 1 if judge, then judge that the current running status of mobile phone is that the SIM1 SIM2 that works is standby, this represents that the SIM card of current networking is the first SIM card SIM1; Show that the first field dual_sim_mode_setting value is 2 if judge, then judge that the current running status of mobile phone is the standby SIM2 work of SIM1, this represents that the SIM card of current networking is the second SIM card SIM2; Show that the first field dual_sim_mode_setting value is 3 if judge, then judge that the current running status of mobile phone is that SIM1 enables SIM2 and stops using, this represents that the SIM card of current networking is the first SIM card SIM1; Show that the first field dual_sim_mode_setting value is 4 if judge, then judge that the current running status of mobile phone is that the SIM1 SIM2 that stops using enables, this represents that the SIM card of current networking is the second SIM card SIM2.
S404, the value of the second field at least comprised according to field and the 3rd field judges that the SIM card of current networking be the first SIM card is still the second SIM card.
Such as, mobile phone A is Samsung mobile phone is that example describes, the system run is Android android system, this mobile phone is dual_sim_mode_setting for identifying the second field of the SIM card of current networking, 3rd field is gprs_connection_setting, can judge that the SIM card of current networking be the first SIM card SIM1 is still the second SIM card SIM2 according to the value of above-mentioned two fields.
Shown in associative list 3, according to the second field dual_sim_mode_setting of mobile phone and the value of the 3rd field gprs_connection_setting, can judge that the SIM card of current networking be the first SIM card is still the second SIM card, also can be used for the running status judging current phone:
Table 3
As seen from the above table, when showing that the second field dual_sim_mode_setting value is 3 if judge, then the running status of mobile phone can be " SIM2 is standby in SIM1 work " or " the standby SIM2 work of SIM1 ", in this case, which SIM card what can judge current networking further by the 3rd field gprs_connection_setting again is, if the value of the 3rd field gprs_connection_setting is 1, then judge that the current running status of mobile phone is that the SIM1 SIM2 that works is standby, this represents that the SIM card of current networking is the first SIM card SIM1; Show that the 3rd field gprs_connection_setting value is 2 if judge, then judge that the current running status of mobile phone is the standby SIM2 work of SIM1, this represents that the SIM card of current networking is the second SIM card SIM2.
Show that the second field dual_sim_mode_setting value is 1 if judge, then judge that the current running status of mobile phone is that SIM1 enables SIM2 and stops using, this represents that the SIM card of current networking is the first SIM card SIM1; Show that the second field dual_sim_mode_setting value is 2 if judge, then judge that the current running status of mobile phone is that the SIM1 SIM2 that stops using enables, this represents that the SIM card of current networking is the second SIM card SIM2.
By the embodiment that the application provides, utilize the judgement to field value, not only can realize the change quantitative statistics of the network traffics accurately distinguishing statistics first SIM card and the second SIM card, the running status identifying double card double standby mobile phone can also be realized.
As the optional scheme of one, shown in composition graphs 5, field comprises the first field, step S104, judges that SIM card that the value of field identifies current networking be the first SIM card is still the second SIM card, can also comprise:
S502, judges whether the value of the first field is the first value, if the value of the first field is the first value, then represent first SIM card current in running order, the second SIM card is current is in holding state, and judges that the SIM card of current networking is the first SIM card;
Such as, shown in associative list 2, show that the first field dual_sim_mode_setting value is the first value (such as, the first value is 1) if judge, the running status that then expression mobile phone is current is that SIM1 work SIM2 is standby, and the SIM card of current networking is the first SIM card SIM1.
S504, judges whether the value of the first field is the second value, if the value of the first field is the second value, then represents that the first SIM card is currently in holding state, the second SIM card is current in running order, and judges that the SIM card of current networking is the second SIM card;
Such as, shown in associative list 2, show that the first field dual_sim_mode_setting value is the second value (such as, the second value is 2) if judge, the running status that then expression mobile phone is current is the standby SIM2 work of SIM1, and the SIM card of current networking is the second SIM card SIM2.
S506, judges whether the value of the first field is the 3rd value, if the value of the first field is the 3rd value, then represents that the first SIM card is activated, the second SIM card is deactivated, and judge that the SIM card of current networking is the first SIM card;
Such as, shown in associative list 2, show that the first field dual_sim_mode_setting value is the 3rd value (such as, the 3rd value is 3) if judge, then represent that the current running status of mobile phone is that SIM1 enables SIM2 and stops using, and the SIM card of current networking is the first SIM card SIM1.
S508, judges whether the value of the first field is the 4th value, if the value of the first field is the 4th value, then represents that the first SIM card is deactivated, the second SIM card is activated, and judge that the SIM card of current networking is the second SIM card.
Such as, shown in associative list 2, show that the first field dual_sim_mode_setting value is the 4th value (such as, the 4th value is 4) if judge, then represent that the current running status of mobile phone is that the SIM1 SIM2 that stops using enables, and the SIM card of current networking is the second SIM card SIM2.
By the embodiment that the application provides, utilize the judgement to field value, not only can realize the change quantitative statistics of the network traffics accurately distinguishing statistics first SIM card and the second SIM card, the running status identifying double card double standby mobile phone can also be realized.
As the optional scheme of one, field comprises the second field and the 3rd field, step S104, judges that SIM card that the value of field identifies current networking be the first SIM card is still the second SIM card, can also comprise:
S1, whether the value judging the second field is the 5th value, if the value of the second field is the 5th value, then represent first SIM card current in running order, the second SIM card is current is in holding state, or the first SIM card is current is in holding state, the second SIM card is current in running order; When the value of the second field is the 5th value, judge that the value of the 3rd field be the 6th value is still the 7th value, if the value of the 3rd field is the 6th value, then judge that the SIM card of current networking is the first SIM card, if the value of the 3rd field is the 7th value, then judge that the SIM card of current networking is the second SIM card;
Such as, shown in associative list 3, if judge draw the second field dual_sim_mode_setting value be the 5th value (such as, 5th value is 3) time, then represent that the first SIM card SIM1 is current in running order, second SIM card SIM2 is current is in holding state, or, first SIM card SIM1 is current is in holding state, the current in running order SIM2 of second SIM card, based on the second field value be the 5th value (such as, 5th value is 3) when, which SIM card what judge current networking further by the 3rd field gprs_connection_setting again is, if the value of the 3rd field gprs_connection_setting be the 6th value (such as, 6th value is 1), then judge that the SIM card of current networking is the first SIM card, 3rd field gprs_connection_setting value is the 7th value (such as, the 7th value is 2), then judge that the SIM card of current networking is the second SIM card.
S2, judges whether the value of the second field is the 8th value, if the value of the second field is the 8th value, then represents that the first SIM card is activated, the second SIM card is deactivated, and judge that the SIM card of current networking is the first SIM card;
Such as, shown in associative list 3, judged by the value of the second field dual_sim_mode_setting, if the value of the second field dual_sim_mode_setting be the 8th value (such as, 8th value is 1), then represent that the current running status of mobile phone is that SIM1 enables SIM2 and stops using, and the SIM card of current networking is the first SIM card SIM1;
S3, judges whether the value of the second field is the 9th value, if the value of the second field is the 9th value, then represents that the first SIM card is deactivated, the second SIM card is activated, and judge that the SIM card of current networking is the second SIM card.
Such as, shown in associative list 3, judged by the value of the second field dual_sim_mode_setting, if the value of the second field dual_sim_mode_setting be the 9th value (such as, 9th value is 2), then represent that the current running status of mobile phone is that the SIM1 SIM2 that stops using enables, and the SIM card of current networking is the second SIM card SIM2.
By the embodiment that the application provides, utilize the judgement to field value, not only can realize the change quantitative statistics of the network traffics accurately distinguishing statistics first SIM card and the second SIM card, the running status identifying double card double standby mobile phone can also be realized.
As the optional scheme of one, step S106, use the web-based history flow of variable quantity to the first SIM card of the current network flow got to carry out renewal to comprise: S602, is updated to the web-based history flow of the first SIM card and the variable quantity sum of current network flow by the web-based history flow of the first SIM card;
Alternatively, in the present embodiment can the changes in flow rate of real-time monitoring terminal operational system, obtain the up-to-date network traffics variable quantity used.
Such as, for mobile phone A, the total web-based history flow supposing this mobile phone is historyData, wherein, also arrange one and replace variable tempData temporarily, the current network traffics used are newData, and the web-based history flow of the first SIM card SIM1 is card1Data, and the web-based history flow of the second SIM card SIM2 is card2Data.
When the network traffics monitoring mobile phone change, then by the variable quantity of following formulae discovery network traffics:
tempData=newData–historyData (1)
Wherein, historyData is total web-based history flow of mobile phone; NewData is the current network traffics used; TempData is for replace variable temporarily.
If be that the network traffics of the first SIM card SIM1 change through judging to learn, then by the network traffics after upgrading according to following formulae discovery first SIM card SIM1, and the web-based history flow of the first SIM card SIM1 is updated to the web-based history flow of the first SIM card SIM1 and the variable quantity sum of current network flow:
card1Data’=card1Data+tempData (2)
Wherein, card1Data ' is the web-based history flow after the first SIM card SIM1 upgrades, and card1Data is the web-based history flow before the first SIM card SIM1 upgrades, and tempData is for replace variable temporarily, and its value equals the variable quantity of network traffics.
Such as, the web-based history flow historyData of mobile phone is 20M, web-based history flow card1Data before first SIM card SIM1 upgrades is 15M, web-based history flow card2Data then before the second SIM card SIM2 renewal is 5M, the current network traffics newData used is 25M, interim replacement variable tempData is 25-20=5M, judge to learn that the SIM card of current networking is the first SIM card SIM1, web-based history flow then after the first SIM card SIM1 renewal is: 15+5=20M, and total web-based history flow historyData of mobile phone is updated to the current network traffics newData used, be 25M.
Step S108, use the web-based history flow of variable quantity to the second SIM card of the current network flow got to carry out renewal to comprise: S604, is updated to the web-based history flow of the second SIM card and the variable quantity sum of current network flow by the web-based history flow of the second SIM card.
If be that the network traffics of the second SIM card SIM2 change through judging to learn, then by the web-based history flow after upgrading according to following formulae discovery second SIM card SIM2, and the web-based history flow of the second SIM card SIM2 is updated to the web-based history flow of the second SIM card SIM2 and the variable quantity sum of current network flow:
Card2Data’=card2Data+tempData (3)
Wherein, card2Data ' is the web-based history flow after the second SIM card SIM2 upgrades, and card2Data is the web-based history flow before the second SIM card SIM2 upgrades, and tempData is for replace variable temporarily, and its value equals the variable quantity of network traffics.
Such as, total web-based history flow historyData of mobile phone is 20M, web-based history flow card1Data before first SIM card SIM1 upgrades is 15M, web-based history flow card2Data then before the second SIM card SIM2 renewal is 5M, the current network traffics newData used is 25M, interim replacement variable tempData is 25-20=5M, judge to learn that the SIM card of current networking is the second SIM card SIM2, web-based history flow then after the second SIM card SIM2 renewal is: 5+5=10M, and total web-based history flow historyData of mobile phone is updated to the current network traffics newData used, be 25M.
By the embodiment that the application provides, the variable quantity of the current network flow obtained is utilized to be added in the SIM card of the rear corresponding current networking of judgement, achieve in real time according to the corresponding field of different terminals, accurately distinguish the network traffics variable quantity that statistics double card double standby mobile phone respectively blocks.
It should be noted that, for aforesaid each embodiment of the method, in order to simple description, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not by the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in specification all belongs to preferred embodiment, and involved action and module might not be that the present invention is necessary.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that can add required general hardware platform by software according to the method for above-described embodiment and realize, hardware can certainly be passed through, but in a lot of situation, the former is better execution mode.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium (as ROM/RAM, magnetic disc, CD), comprising some instructions in order to make a station terminal equipment (can be mobile phone, computer, server, or the network equipment etc.) perform method described in each embodiment of the present invention.
Embodiment 2
According to the embodiment of the present invention, additionally provide a kind of for implementing the device that above-mentioned network traffics upgrade, as shown in Figure 7, this device comprises:
1) acquiring unit 702, for obtaining the value of the field of the SIM card for identifying current networking from the configuration file of terminal, wherein, is at least configured with the first SIM card and the second SIM card in terminal, the network card identification that the first SIM card is corresponding identical with the second SIM card;
Alternatively, above-mentioned network traffics update method is applied to various terminal in the present embodiment, such as, and mobile phone, panel computer.Certainly, the citing of above-mentioned terminal is a kind of example, and the application does not limit this.
Alternatively, the terminal in the present embodiment can comprise at least two SIM cards, and such as, two SIM cards or three SIM cards, the application does not limit this.
Alternatively, the running status of double card double standby mobile phone includes but not limited to following at least one in the present embodiment: SIM1 enables that SIM2 stops using, SIM1 stops using that SIM2 enables, SIM1 works, and SIM2 is standby, the standby SIM2 work of SIM1.Alternatively, which SIM card what above-mentioned different running status can indicate current networking is, such as, current networking that what running status " SIM1 enables SIM2 and stops using " indicated is be SIM1.
Describe for mobile phone, mobile phone is configured with the first SIM card and the second SIM card, the draw-in groove that two cards are corresponding has identical network card identification, obtains the value of the field of the SIM card for identifying current networking from the configuration file of mobile phone.Alternatively, include but not limited to for the field of the SIM card identifying current networking in the present embodiment: field, two fields or a plural field.
Such as, in composition graphs 2 shown in (a)-(b), describe for mobile phone A, the first SIM card SIM1 and the second SIM card SIM2(is configured with as shown in phantom in FIG.) in mobile phone A, two block corresponding identical network card identification (such as, mark is sim_logo), file in mobile phone includes but not limited to: configuration file (such as, file), audio file (such as, media), picture file (such as, picture), wherein, configuration file (such as, file) field dual_sim_mode_setting is comprised, its value can be but be not limited to: 1, 2, wherein, field dual_sim_mode_setting value is the SIM card of the current networking of 1 expression is the first SIM card SIM1, field dual_sim_mode_setting value is the SIM card of the current networking of 2 expression is the second SIM card SIM2.
2) judging unit 704, for judging that SIM card that the value of field identifies current networking be the first SIM card is still the second SIM card;
Such as, obtain the field of the SIM card for identifying current networking (such as, dual_sim_mode_setting) after value, judge that its value is 1 or 2, wherein, the SIM card of to be the first SIM card SIM1, field dual_sim_mode_setting value the be current networking of 2 expression that field dual_sim_mode_setting value is the SIM card of the current networking of 1 expression is the second SIM card SIM2.
3) the first updating block 706, when being the first SIM card for identifying the SIM card of current networking in the value of field, uses the web-based history flow of variable quantity to the first SIM card of the current network flow got to upgrade;
Alternatively, web-based history flow in the present embodiment includes but not limited to: total web-based history flow, the web-based history flow of the first SIM card, the web-based history flow of the second SIM card.Such as, total web-based history flow of mobile phone A is 20M, and the web-based history flow of the first SIM card is 15M, and the web-based history flow of the second SIM card is 5M.
Such as, judgement draws the field of SIM card (such as, dual_sim_mode_setting) value is 1, i.e. the SIM card of current networking is the first SIM card SIM1, then utilize the web-based history flow of the variable quantity of current network flow to the first SIM card SIM1 to upgrade.Such as, detect that the current network traffics used are 25M, then can judge that the variable quantity of current network flow is for 5M according to the current network traffics that used and total web-based history flow, judge to learn that the SIM card of current networking is the first SIM card SIM1, then use the web-based history flow of 5M variable quantity to the first SIM card SIM1 got to upgrade.Therefore, the web-based history flow of the first SIM card SIM1 of the mobile phone A after renewal is 20M, and the web-based history flow of the second SIM card SIM2 is 5M, and total web-based history flow of mobile phone A is updated to the current network traffics used, that is, 25M.
4) the second updating block 708, when being the second SIM card for identifying the SIM card of current networking in the value of field, uses the web-based history flow of variable quantity to the second SIM card of the current network flow got to upgrade.
Such as, judgement draws the field of SIM card (such as, dual_sim_mode_setting) value is 2, i.e. the SIM card of current networking is the second SIM card SIM2, then utilize the web-based history flow of the variable quantity of current network flow to the second SIM card SIM2 to upgrade.Such as, detect that the current network traffics used are 25M, then can judge that the variable quantity of current network flow is for 5M according to the current network traffics that used and total web-based history flow, judge to learn that the SIM card of current networking is the second SIM card SIM2, then use the web-based history flow of 5M variable quantity to the second SIM card SIM2 got to upgrade.Therefore, the web-based history flow of the first SIM card SIM1 of the mobile phone A after renewal is 15M, and the web-based history flow of the second SIM card SIM2 is 10M, and total web-based history flow of mobile phone A is updated to the current network traffics used, that is, 25M.
By the embodiment that the application provides, utilize in the configuration file of terminal for identifying the value of the field of the SIM card of current networking, judge the SIM card distinguishing current networking, and then utilize the web-based history flow of the variable quantity of network traffics to corresponding SIM card to upgrade, make double card double standby mobile phone can distinguish the variable quantity of the network traffics of adding up each card more accurately.
As the optional scheme of one, as shown in Figure 8, acquiring unit 702 comprises:
1) module 802 is searched, for searching the field of the SIM card for identify current networking corresponding with the operating system that the type of terminal and/or terminal are run from the adaptation file of installing in the terminal;
Alternatively, the type of terminal in the present embodiment can be, but not limited to divide according to production firm, and wherein, cell phone manufacturer includes but not limited to: Samsung, apple, Nokia.Alternatively, the system in the present embodiment terminal run includes but not limited to: apple IOS system, Android android system, Windows Phone system, Saipan Symbian system.
Such as, shown in associative list 4, the adaptation file of installing in the terminal can comprise following content:
Table 4
The type of terminal The system that terminal is run For identifying the field of the SIM card of current networking
Samsung Android android system dual_sim_mode_setting
Apple Apple IOS system dual_sim_mode_setting_ios
Nokia Saipan Symbian system dual_sim_mode_setting_symbian
As shown in table 4, the field of the SIM card for identify current networking corresponding with the operating system that the type of terminal and/or terminal are run can be found in the adaptation file in terminal.
Such as, mobile phone A is Samsung mobile phone, and the system of operation is Android android system, wherein, is dual_sim_mode_setting for identifying the field of the SIM card of current networking in the configuration file of this system.Under this scene, when obtaining the field of SIM card for identifying current networking, the field of the SIM card for identify current networking corresponding with the type of above-mentioned terminal and aforesaid operations system can be found in the adaptation file being arranged on mobile phone, such as, be dual_sim_mode_setting by searching the field of the SIM card that above-mentioned table 4 can find for identifying current networking.
2) acquisition module 804, for obtaining the value of field from the configuration file of terminal.
Such as, that Samsung mobile phone describes for mobile phone A, the system run is Android android system, be dual_sim_mode_setting according to finding this mobile phone for identifying the field of the SIM card of current networking in the adaptation file of mobile phone, then obtain the value of this field dual_sim_mode_setting to the configuration file of mobile phone.
By the embodiment that the application provides, the field of the SIM card for identify current networking corresponding with the operating system that the type of terminal and/or terminal are run is searched from the adaptation file of terminal, the value of this field is obtained again to the configuration file of terminal, can directly obtain different terminals type like this, SIM card in different operational system is for identifying the field of networking, achieve the field that Real-time Obtaining is according to demand different, and then the effect of the variable quantity of network flow calculation more accurately.
As the optional scheme of one, as shown in Figure 9, judging unit 704 comprise following one of at least:
1) the first judge module 902, the value for the first field comprised according to field judges that the SIM card of current networking be the first SIM card is still the second SIM card;
Alternatively, in the present embodiment for identify the field of the SIM card of current networking be a field (such as, first field: dual_sim_mode_setting), when the application is not limited only to this, the field for identifying the SIM card of current networking can also comprise two fields or plural field.
Such as, Samsung mobile phone for mobile phone A, the system run is Android android system, this mobile phone is dual_sim_mode_setting for identifying the first field of the SIM card of current networking, judges that the SIM card of current networking be the first SIM card SIM1 is still the second SIM card SIM2 according to the value of this field.
Shown in associative list 5, can judge that the SIM card of current networking be the first SIM card is still the second SIM card, also can be used for the running status judging current phone according to the value of the first field dual_sim_mode_setting:
Table 5
As seen from the above table, show that the first field dual_sim_mode_setting value is 1 if judge, then judge that the current running status of mobile phone is that the SIM1 SIM2 that works is standby, this represents that the SIM card of current networking is the first SIM card SIM1; Show that the first field dual_sim_mode_setting value is 2 if judge, then judge that the current running status of mobile phone is the standby SIM2 work of SIM1, this represents that the SIM card of current networking is the second SIM card SIM2; Show that the first field dual_sim_mode_setting value is 3 if judge, then judge that the current running status of mobile phone is that SIM1 enables SIM2 and stops using, this represents that the SIM card of current networking is the first SIM card SIM1; Show that the first field dual_sim_mode_setting value is 4 if judge, then judge that the current running status of mobile phone is that the SIM1 SIM2 that stops using enables, this represents that the SIM card of current networking is the second SIM card SIM2.
2) the second judge module 904, the value for the second field of at least comprising according to field and the 3rd field judges that the SIM card of current networking be the first SIM card is still the second SIM card.
Such as, mobile phone A is Samsung mobile phone is that example describes, the system run is Android android system, this mobile phone is dual_sim_mode_setting for identifying the second field of the SIM card of current networking, 3rd field is gprs_connection_setting, can judge that the SIM card of current networking be the first SIM card SIM1 is still the second SIM card SIM2 according to the value of above-mentioned two fields.
Shown in associative list 6, according to the second field dual_sim_mode_setting of mobile phone and the value of the 3rd field gprs_connection_setting, can judge that the SIM card of current networking be the first SIM card is still the second SIM card, also can be used for the running status judging current phone:
Table 6
As seen from the above table, when showing that the second field dual_sim_mode_setting value is 3 if judge, then the running status of mobile phone can be " SIM2 is standby in SIM1 work " or " the standby SIM2 work of SIM1 ", in this case, which SIM card what can judge current networking further by the 3rd field gprs_connection_setting again is, if the value of the 3rd field gprs_connection_setting is 1, then judge that the current running status of mobile phone is that the SIM1 SIM2 that works is standby, this represents that the SIM card of current networking is the first SIM card SIM1; Show that the 3rd field gprs_connection_setting value is 2 if judge, then judge that the current running status of mobile phone is the standby SIM2 work of SIM1, this represents that the SIM card of current networking is the second SIM card SIM2.
Show that the second field dual_sim_mode_setting value is 1 if judge, then judge that the current running status of mobile phone is that SIM1 enables SIM2 and stops using, this represents that the SIM card of current networking is the first SIM card SIM1; Show that the second field dual_sim_mode_setting value is 2 if judge, then judge that the current running status of mobile phone is that the SIM1 SIM2 that stops using enables, this represents that the SIM card of current networking is the second SIM card SIM2.
By the embodiment that the application provides, utilize the judgement to field value, not only can realize the change quantitative statistics of the network traffics accurately distinguishing statistics first SIM card and the second SIM card, the running status identifying double card double standby mobile phone can also be realized.
As the optional scheme of one, the field in this device comprises the first field, and wherein, judging unit 704 also comprises:
1) the 3rd judge module, for judging whether the value of the first field is the first value, if the value of the first field is the first value, then represent first SIM card current in running order, the second SIM card is current is in holding state, and judges that the SIM card of current networking is the first SIM card;
Such as, shown in associative list 5, show that the first field dual_sim_mode_setting value is the first value (such as, the first value is 1) if judge, the running status that then expression mobile phone is current is that SIM1 work SIM2 is standby, and the SIM card of current networking is the first SIM card SIM1.
2) the 4th judge module, for judging whether the value of the first field is the second value, if the value of the first field is the second value, then represents that the first SIM card is currently in holding state, the second SIM card is current in running order, and judge that the SIM card of current networking is the second SIM card;
Such as, shown in associative list 5, show that the first field dual_sim_mode_setting value is the second value (such as, the second value is 2) if judge, the running status that then expression mobile phone is current is the standby SIM2 work of SIM1, and the SIM card of current networking is the second SIM card SIM2.
3) the 5th judge module, for judging whether the value of the first field is the 3rd value, if the value of the first field is the 3rd value, then represents that the first SIM card is activated, the second SIM card is deactivated, and judges that the SIM card of current networking is the first SIM card;
Such as, shown in associative list 5, show that the first field dual_sim_mode_setting value is the 3rd value (such as, the 3rd value is 3) if judge, then represent that the current running status of mobile phone is that SIM1 enables SIM2 and stops using, and the SIM card of current networking is the first SIM card SIM1.
4) the 6th judge module, for judging whether the value of the first field is the 4th value, if the value of the first field is the 4th value, then represents that the first SIM card is deactivated, the second SIM card is activated, and judges that the SIM card of current networking is the second SIM card.
Such as, shown in associative list 5, show that the first field dual_sim_mode_setting value is the 4th value (such as, the 4th value is 4) if judge, then represent that the current running status of mobile phone is that the SIM1 SIM2 that stops using enables, and the SIM card of current networking is the second SIM card SIM2.
By the embodiment that the application provides, utilize the judgement to field value, not only can realize the change quantitative statistics of the network traffics accurately distinguishing statistics first SIM card and the second SIM card, the running status identifying double card double standby mobile phone can also be realized.
As the optional scheme of one, the field in this device comprises the second field and the 3rd field, and wherein, judging unit 704 comprises:
1) the 7th judge module, for judging whether the value of the second field is the 5th value, if the value of the second field is the 5th value, then represent first SIM card current in running order, the second SIM card is current is in holding state, or the first SIM card is current is in holding state, the second SIM card is current in running order; When the value of the second field is the 5th value, judge that the value of the 3rd field be the 6th value is still the 7th value, if the value of the 3rd field is the 6th value, then judge that the SIM card of current networking is the first SIM card, if the value of the 3rd field is the 7th value, then judge that the SIM card of current networking is the second SIM card;
Such as, shown in associative list 6, if judge draw the second field dual_sim_mode_setting value be the 5th value (such as, 5th value is 3) time, then represent that the first SIM card SIM1 is current in running order, second SIM card SIM2 is current is in holding state, or, first SIM card SIM1 is current is in holding state, the current in running order SIM2 of second SIM card, based on the second field value be the 5th value (such as, 5th value is 3) when, which SIM card what judge current networking further by the 3rd field gprs_connection_setting again is, if the value of the 3rd field gprs_connection_setting be the 6th value (such as, 6th value is 1), then judge that the SIM card of current networking is the first SIM card, 3rd field gprs_connection_setting value is the 7th value (such as, the 7th value is 2), then judge that the SIM card of current networking is the second SIM card.
2) the 8th judge module, for judging whether the value of the second field is the 8th value, if the value of the second field is the 8th value, then represents that the first SIM card is activated, the second SIM card is deactivated, and judges that the SIM card of current networking is the first SIM card;
Such as, shown in associative list 6, judged by the value of the second field dual_sim_mode_setting, if the value of the second field dual_sim_mode_setting be the 8th value (such as, 8th value is 1), then represent that the current running status of mobile phone is that SIM1 enables SIM2 and stops using, and the SIM card of current networking is the first SIM card SIM1;
3) the 9th judge module, for judging whether the value of the second field is the 9th value, if the value of the second field is the 9th value, then represents that the first SIM card is deactivated, the second SIM card is activated, and judges that the SIM card of current networking is the second SIM card.
Such as, shown in associative list 6, judged by the value of the second field dual_sim_mode_setting, if the value of the second field dual_sim_mode_setting be the 9th value (such as, 9th value is 2), then represent that the current running status of mobile phone is that the SIM1 SIM2 that stops using enables, and the SIM card of current networking is the second SIM card SIM2.
By the embodiment that the application provides, utilize the judgement to field value, not only can realize the change quantitative statistics of the network traffics accurately distinguishing statistics first SIM card and the second SIM card, the running status identifying double card double standby mobile phone can also be realized.
As the optional scheme of one, as shown in Figure 10, this device also comprises:
1) the first updating block 706 comprises: the first update module 1002, for the web-based history flow of the first SIM card is updated to the web-based history flow of the first SIM card and the variable quantity sum of current network flow;
Alternatively, in the present embodiment can the changes in flow rate of real-time monitoring terminal operational system, obtain the up-to-date network traffics variable quantity used.
Such as, for mobile phone A, the total web-based history flow supposing this mobile phone is historyData, wherein, also arrange one and replace variable tempData temporarily, the current network traffics used are newData, and the web-based history flow of the first SIM card SIM1 is card1Data, and the web-based history flow of the second SIM card SIM2 is card2Data.
When the network traffics monitoring mobile phone change, then by the variable quantity of following formulae discovery network traffics:
tempData=newData–historyData (4)
Wherein, historyData is total web-based history flow of mobile phone; NewData is the current network traffics used; TempData is for replace variable temporarily.
If be that the network traffics of the first SIM card SIM1 change through judging to learn, then by the network traffics after upgrading according to following formulae discovery first SIM card SIM1, and the web-based history flow of the first SIM card SIM1 is updated to the web-based history flow of the first SIM card SIM1 and the variable quantity sum of current network flow:
card1Data’=card1Data+tempData (5)
Wherein, card1Data ' is the web-based history flow after the first SIM card SIM1 upgrades, and card1Data is the web-based history flow before the first SIM card SIM1 upgrades, and tempData is for replace variable temporarily, and its value equals the variable quantity of network traffics.
Such as, the web-based history flow historyData of mobile phone is 20M, web-based history flow card1Data before first SIM card SIM1 upgrades is 15M, web-based history flow card2Data then before the second SIM card SIM2 renewal is 5M, the current network traffics newData used is 25M, interim replacement variable tempData is 25-20=5M, judge to learn that the SIM card of current networking is the first SIM card SIM1, web-based history flow then after the first SIM card SIM1 renewal is: 15+5=20M, and total web-based history flow historyData of mobile phone is updated to the current network traffics newData used, be 25M.
2) the second updating block 708 comprises: the second update module 1004, for the web-based history flow of the second SIM card is updated to the web-based history flow of the second SIM card and the variable quantity sum of current network flow.
If be that the network traffics of the second SIM card SIM2 change through judging to learn, then by the web-based history flow after upgrading according to following formulae discovery second SIM card SIM2, and the web-based history flow of the second SIM card SIM2 is updated to the web-based history flow of the second SIM card SIM2 and the variable quantity sum of current network flow:
Card2Data’=card2Data+tempData (6)
Wherein, card2Data ' is the web-based history flow after the second SIM card SIM2 upgrades, and card2Data is the web-based history flow before the second SIM card SIM2 upgrades, and tempData is for replace variable temporarily, and its value equals the variable quantity of network traffics.
Such as, total web-based history flow historyData of mobile phone is 20M, web-based history flow card1Data before first SIM card SIM1 upgrades is 15M, web-based history flow card2Data then before the second SIM card SIM2 renewal is 5M, the current network traffics newData used is 25M, interim replacement variable tempData is 25-20=5M, judge to learn that the SIM card of current networking is the second SIM card SIM2, then after the second SIM card SIM2 renewal, the network traffics of history are: 5+5=10M, and total web-based history flow historyData of mobile phone is updated to the current network traffics newData used, be 25M.
By the embodiment that the application provides, the variable quantity of the current network flow obtained is utilized to be added in the SIM card of the rear corresponding current networking of judgement, achieve in real time according to the corresponding field of different terminals, accurately distinguish the network traffics variable quantity that statistics double card double standby mobile phone respectively blocks.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
In the above embodiment of the present invention, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part described in detail, can see the associated description of other embodiments.
In several embodiments that the application provides, should be understood that, disclosed client, the mode by other realizes.Wherein, device embodiment described above is only schematic, the such as division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of unit or module or communication connection can be electrical or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form of SFU software functional unit also can be adopted to realize.
If described integrated unit using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computer read/write memory medium.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words or all or part of of this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprises all or part of step of some instructions in order to make a computer equipment (can be personal computer, server or the network equipment etc.) perform method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, read-only memory (ROM, Read-OnlyMemory), random access memory (RAM, Random Access Memory), portable hard drive, magnetic disc or CD etc. various can be program code stored medium.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (12)

1. a network traffics update method, is characterized in that, comprising:
From the configuration file of terminal, obtaining the value of the field of the SIM card for identifying current networking, wherein, in described terminal, being at least configured with the first SIM card and the second SIM card, the network card identification that described first SIM card is corresponding identical with described second SIM card;
Judge described field value mark described current networking SIM card be that described first SIM card is still as described second SIM card;
If the SIM card of the described current networking of value mark of described field is described first SIM card, then the web-based history flow of the variable quantity of the current network flow got to described first SIM card is used to upgrade;
If the SIM card of the described current networking of value mark of described field is described second SIM card, then the web-based history flow of the variable quantity of the described current network flow got to described second SIM card is used to upgrade.
2. method according to claim 1, is characterized in that, the described value obtaining the field of SIM card for identifying current networking from the configuration file of terminal comprises:
Search from the adaptation file be arranged on described terminal corresponding with the operating system that the type of described terminal and/or described terminal are run described in for identifying the field of the SIM card of current networking;
The value of described field is obtained from the configuration file of described terminal.
3. method according to claim 1, is characterized in that, the SIM card of the described described current networking of value mark judging described field be described first SIM card still as described second SIM card comprises:
The value of the first field comprised according to described field judges that the SIM card of described current networking is that described first SIM card is still as described second SIM card; Or
The value of the second field at least comprised according to described field and the 3rd field judges that the SIM card of described current networking is that described first SIM card is still as described second SIM card.
4. method according to claim 3, is characterized in that, described field comprises described first field, the SIM card of the described described current networking of value mark judging described field be described first SIM card still as described second SIM card comprises:
Whether the value judging described first field is the first value, if the value of described first field is described first value, then represent that current in running order, described second SIM card of described first SIM card is current and be in holding state, and judge that the SIM card of described current networking is described first SIM card;
Whether the value judging described first field is the second value, if the value of described first field is described second value, then represent that described first SIM card is currently in holding state, described second SIM card is current in running order, and judge that the SIM card of described current networking is described second SIM card;
Whether the value judging described first field is the 3rd value, if the value of described first field is described 3rd value, then represents that described first SIM card is activated, described second SIM card is deactivated, and judges that the SIM card of described current networking is described first SIM card;
Whether the value judging described first field is the 4th value, if the value of described first field is described 4th value, then represents that described first SIM card is deactivated, described second SIM card is activated, and judges that the SIM card of described current networking is described second SIM card.
5. method according to claim 3, it is characterized in that, described field comprises described second field and described 3rd field, the SIM card of the described described current networking of value mark judging described field be described first SIM card still as described second SIM card comprises:
Whether the value judging described second field is the 5th value, if the value of described second field is described 5th value, then represent that current in running order, described second SIM card of described first SIM card is current and be in holding state, or described first SIM card is current is in holding state, described second SIM card is current in running order; When the value of described second field is described 5th value, judge that the value of described 3rd field be the 6th value is still the 7th value, if the value of described 3rd field is described 6th value, then judge that the SIM card of described current networking is described first SIM card, if the value of described 3rd field is described 7th value, then judge that the SIM card of described current networking is described second SIM card;
Whether the value judging described second field is the 8th value, if the value of described second field is described 8th value, then represents that described first SIM card is activated, described second SIM card is deactivated, and judges that the SIM card of described current networking is described first SIM card;
Whether the value judging described second field is the 9th value, if the value of described second field is described 9th value, then represents that described first SIM card is deactivated, described second SIM card is activated, and judges that the SIM card of described current networking is described second SIM card.
6. method according to claim 1, is characterized in that,
The web-based history flow of variable quantity to described first SIM card of the current network flow that described use gets carries out renewal and comprises: the web-based history flow of described first SIM card is updated to the web-based history flow of described first SIM card and the variable quantity sum of described current network flow;
The web-based history flow of variable quantity to described second SIM card of the current network flow that described use gets carries out renewal and comprises: the web-based history flow of described second SIM card is updated to the web-based history flow of described second SIM card and the variable quantity sum of described current network flow.
7. a network traffics updating device, is characterized in that, comprising:
Acquiring unit, for obtaining the value of the field of the SIM card for identifying current networking from the configuration file of terminal, wherein, in described terminal, be at least configured with the first SIM card and the second SIM card, the network card identification that described first SIM card is corresponding identical with described second SIM card;
Judging unit, the SIM card for the described current networking of value mark judging described field is that described first SIM card is still as described second SIM card;
First updating block, when the SIM card for the described current networking of value mark in described field is described first SIM card, uses the web-based history flow of variable quantity to described first SIM card of the current network flow got to upgrade;
Second updating block, when the SIM card for the described current networking of value mark in described field is described second SIM card, uses the web-based history flow of variable quantity to described second SIM card of the described current network flow got to upgrade.
8. device according to claim 7, is characterized in that, described acquiring unit comprises:
Search module, for identifying the field of the SIM card of current networking described in corresponding for the operating system of searching from the adaptation file be arranged in described terminal with the type of described terminal and/or described terminal are run;
Acquisition module, for obtaining the value of described field in the configuration file from described terminal.
9. device according to claim 7, is characterized in that, described judging unit comprises:
First judge module, the value for the first field comprised according to described field judges that the SIM card of described current networking is that described first SIM card is still as described second SIM card; Or
Second judge module, the value for the second field of at least comprising according to described field and the 3rd field judges that the SIM card of described current networking is that described first SIM card is still as described second SIM card.
10. device according to claim 9, is characterized in that, described field comprises described first field, and described judging unit also comprises:
3rd judge module, for judging whether the value of described first field is the first value, if the value of described first field is described first value, then represent that current in running order, described second SIM card of described first SIM card is current and be in holding state, and judge that the SIM card of described current networking is described first SIM card;
4th judge module, for judging whether the value of described first field is the second value, if the value of described first field is described second value, then represent that described first SIM card is currently in holding state, described second SIM card is current in running order, and judge that the SIM card of described current networking is described second SIM card;
5th judge module, for judging whether the value of described first field is the 3rd value, if the value of described first field is described 3rd value, then represent that described first SIM card is activated, described second SIM card is deactivated, and judge that the SIM card of described current networking is described first SIM card;
6th judge module, for judging whether the value of described first field is the 4th value, if the value of described first field is described 4th value, then represent that described first SIM card is deactivated, described second SIM card is activated, and judge that the SIM card of described current networking is described second SIM card.
11. devices according to claim 9, is characterized in that, described field comprises described second field and described 3rd field, and described judging unit comprises:
7th judge module, for judging whether the value of described second field is the 5th value, if the value of described second field is described 5th value, then represent that current in running order, described second SIM card of described first SIM card is current and be in holding state, or described first SIM card is current is in holding state, described second SIM card is current in running order; When the value of described second field is described 5th value, judge that the value of described 3rd field be the 6th value is still the 7th value, if the value of described 3rd field is described 6th value, then judge that the SIM card of described current networking is described first SIM card, if the value of described 3rd field is described 7th value, then judge that the SIM card of described current networking is described second SIM card;
8th judge module, for judging whether the value of described second field is the 8th value, if the value of described second field is described 8th value, then represent that described first SIM card is activated, described second SIM card is deactivated, and judge that the SIM card of described current networking is described first SIM card;
9th judge module, for judging whether the value of described second field is the 9th value, if the value of described second field is described 9th value, then represent that described first SIM card is deactivated, described second SIM card is activated, and judge that the SIM card of described current networking is described second SIM card.
12. devices according to claim 7, is characterized in that, also comprise:
Described first updating block comprises: the first update module, for the web-based history flow of described first SIM card is updated to the web-based history flow of described first SIM card and the variable quantity sum of described current network flow;
Described second updating block comprises: the second update module, for the web-based history flow of described second SIM card is updated to the web-based history flow of described second SIM card and the variable quantity sum of described current network flow.
CN201410010629.4A 2014-01-09 2014-01-09 Network flow update method and device Active CN104780528B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410010629.4A CN104780528B (en) 2014-01-09 2014-01-09 Network flow update method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410010629.4A CN104780528B (en) 2014-01-09 2014-01-09 Network flow update method and device

Publications (2)

Publication Number Publication Date
CN104780528A true CN104780528A (en) 2015-07-15
CN104780528B CN104780528B (en) 2018-09-04

Family

ID=53621699

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410010629.4A Active CN104780528B (en) 2014-01-09 2014-01-09 Network flow update method and device

Country Status (1)

Country Link
CN (1) CN104780528B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113055836A (en) * 2015-12-31 2021-06-29 柏思科技有限公司 Method and system for using device with multiple SIM cards

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101800792A (en) * 2010-01-12 2010-08-11 华为终端有限公司 Mobile phone internet traffic counting and displaying method and device, and mobile phone
CN101883356A (en) * 2010-06-21 2010-11-10 华为终端有限公司 Traffic prompt method and traffic prompt device
WO2013075428A1 (en) * 2011-11-23 2013-05-30 中兴通讯股份有限公司 Network selection method and device for multi-mode terminal
CN103281687A (en) * 2013-05-30 2013-09-04 北京小米科技有限责任公司 Network flow management method and device of double-card terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101800792A (en) * 2010-01-12 2010-08-11 华为终端有限公司 Mobile phone internet traffic counting and displaying method and device, and mobile phone
CN101883356A (en) * 2010-06-21 2010-11-10 华为终端有限公司 Traffic prompt method and traffic prompt device
WO2013075428A1 (en) * 2011-11-23 2013-05-30 中兴通讯股份有限公司 Network selection method and device for multi-mode terminal
CN103281687A (en) * 2013-05-30 2013-09-04 北京小米科技有限责任公司 Network flow management method and device of double-card terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
段琳: "基于MTK Gemini平台的GPRS数据流量管家设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑 》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113055836A (en) * 2015-12-31 2021-06-29 柏思科技有限公司 Method and system for using device with multiple SIM cards
CN113055836B (en) * 2015-12-31 2022-12-27 柏思科技有限公司 Method and apparatus for using apparatus having multiple SIM cards

Also Published As

Publication number Publication date
CN104780528B (en) 2018-09-04

Similar Documents

Publication Publication Date Title
CN108427695A (en) Method and application server are recommended by enterprise
CN103108380A (en) Method and device for providing network connection
CN108495344B (en) Network switching method, device and terminal
CN104915306A (en) Data operation control method and device manager
CN104834674A (en) Method and device for collecting user behavior data and information recommendation
CN104852937A (en) Network access method and device for mobile application
CN103813356A (en) Flow management device and flow management method thereof
CN104185141A (en) Bluetooth beacon device based system and method for detecting stay time of user in area
CN104270204A (en) Testing method and testing equipment for wireless communication module
CN111510909A (en) Communication module configuration processing method and device, computer equipment and storage medium
CN108112010A (en) Access method, apparatus, terminal and the computer readable storage medium of network
CN104185139A (en) Fingerprint matching-based wireless positioning method and device
CN103813439A (en) Method for terminal register and terminal
CN110851334A (en) Flow statistical method, electronic device, system and medium
CN104780528A (en) Network traffic updating method and device
CN102272743A (en) Management method for information of universal integrated circuit card and device thereof
CN102868992B (en) Device and method for shielding terminal signal, device and method for removing shielding of terminal signal, and terminal signal management system
CN104601823B (en) Intelligent terminal double-card dual-standby function decision method and system based on Android system
CN102685716A (en) Time information obtaining method and mobile terminal
CN108268545B (en) Method and device for establishing hierarchical user label library
CN104536887A (en) Communication data detection method and device
CN104408138A (en) Data search method and device
CN104918301A (en) Method for adding equipment to MESH network and MESH network portal access device
CN110728138A (en) News text recognition method and device and storage medium
CN104933453A (en) Information management system and method of ring main unit (RMU)

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant