CN107708092B - Flow information update method and device, terminal, computer readable storage medium - Google Patents
Flow information update method and device, terminal, computer readable storage medium Download PDFInfo
- Publication number
- CN107708092B CN107708092B CN201710924592.XA CN201710924592A CN107708092B CN 107708092 B CN107708092 B CN 107708092B CN 201710924592 A CN201710924592 A CN 201710924592A CN 107708092 B CN107708092 B CN 107708092B
- Authority
- CN
- China
- Prior art keywords
- flow
- flow information
- sim card
- virtual sim
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W8/00—Network data management
- H04W8/18—Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data
- H04W8/20—Transfer of user or subscriber data
- H04W8/205—Transfer to or from user equipment or user record carrier
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2457—Query processing with adaptation to user needs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/248—Presentation of query results
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
This application involves a kind of flow information update method and device, terminal, computer readable storage mediums.The described method includes: receiving flow shows request;Show that request generates flow inquiry instruction according to the flow, the flow inquiry instruction is used to inquire the flow status of virtual SIM card;The flow inquiry instruction is sent to virtual SIM card operating system, the flow information in local data base is read by virtual SIM card operating system, the flow information is obtained according to the second flow information recorded in the first flow information and cache module recorded in file system;The flow query result that virtual SIM card operating system returns is received, the flow status page is shown according to the flow query result;When the flow information updates, updated flow information is obtained, and show the updated flow status page.The time for reducing system queries flow reduces the consumption of system, keeps flow inquiry more acurrate, the user experience is improved.
Description
Technical field
This application involves fields of communication technology, more particularly to a kind of flow information update method and device, terminal, calculating
Machine readable storage medium storing program for executing.
Background technique
Flow refers to that Internet Service Provider is supplied to user terminal whithin a period of time using come the data that access network
Amount.With the development of internet, user is to the use demand of mobile data traffic also towards diversified development.After user has arrived overseas
It needs to realize function of surfing the Net by way of flow package pre-purchase using flow function of surfing the Net.User needs real-time
Understand the flow service condition and flow residue usage amount in set meal, traditional reading discharge process needs to force to refresh every time
Entire flow list, the operation is very time-consuming and big to the consumption of system, is easy to cause flow inquiry inaccuracy.User cannot be quasi-
The use information in set meal is really obtained, flow excess is easy to appear, generates extra charge.
Summary of the invention
The embodiment of the present application provides a kind of flow information update method and device, terminal, computer readable storage medium, can
To optimize flow information query process.
A kind of flow information update method is applied to terminal, and terminal includes file system and cache module, the method packet
It includes:
It receives flow and shows request;
Show that request generates flow inquiry instruction according to the flow, the flow inquiry instruction is for inquiring virtual SIM
The flow status of card;
The flow inquiry instruction is sent to virtual SIM card operating system, is read by virtual SIM card operating system local
Flow information in database, the flow information are remembered according in the first flow information and cache module recorded in file system
The second flow information of record obtains;
The flow query result that virtual SIM card operating system returns is received, flow is shown according to the flow query result
Status page;
When the flow query result updates, updated flow query result is obtained, and show updated flow
Status page.
A kind of flow information updating device, described device include:
Request receiving module shows request for receiving flow;
Directive generation module, for showing that request generates flow inquiry instruction according to the flow, the flow inquiry refers to
Enable the flow status for inquiring virtual SIM card;
Instruction sending module passes through virtual SIM for sending the flow inquiry instruction to virtual SIM card operating system
Card operation system reads the flow information in local data base, and the flow information is according to the first flow recorded in file system
The second flow information recorded in information and cache module obtains;
Display module is inquired for receiving the flow query result of virtual SIM card operating system return according to the flow
As a result the flow status page is shown;
Update module, for obtaining updated flow query result, and show when the flow query result updates
The updated flow status page.
A kind of terminal, including memory and processor store computer program, the computer journey in the memory
When sequence is executed by the processor, so that the step of realizing the flow information update method when processor executes.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
The step of flow information update method is realized when row.
Above-mentioned flow information update method and device, terminal, computer readable storage medium are asked by receiving flow displaying
It asks, shows that request generates flow inquiry instruction according to the flow, to virtual SIM card operating system transmitted traffic inquiry instruction,
The flow information in local data base is read by virtual SIM card operating system, the flow information is remembered according in file system
The second flow information recorded in the first flow information and cache module of record obtains, and according to the flow information more new flow
Status page.The time for reducing system queries flow reduces the consumption of system, keeps flow inquiry more acurrate, improves use
Family experience.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is the applied environment figure of flow information update method in one embodiment;
Fig. 2 is the part architecture diagram of terminal in one embodiment;
Fig. 3 is the flow diagram of flow information update method in one embodiment;
Fig. 4 is the flow diagram of flow information update method in another embodiment;
Fig. 5 is the flow diagram of flow information update method in further embodiment;
Fig. 6 is the structural block diagram of flow information updating device in one embodiment;
Fig. 7 is the schematic diagram of internal structure of terminal in one embodiment;
Fig. 8 is the schematic diagram of internal structure of server in one embodiment;
Fig. 9 is the block diagram of the part-structure of mobile phone relevant to terminal provided by the embodiments of the present application.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and
It is not used in restriction the application.
It is appreciated that term " first " used in this application, " second " etc. can be used to describe various elements herein,
But these elements should not be limited by these terms.These terms are only used to distinguish the first element from the other element.Citing comes
It says, in the case where not departing from scope of the present application, the first client can be known as the second client, and similarly, can incite somebody to action
Second client is known as the first client.The first client and the second client both client, but it is not same visitor
Family end.
Fig. 1 is the applied environment figure of network communication processing method in one embodiment.As shown in Figure 1, the application environment packet
Include server 110 and terminal 120.Server 110 is that Virtual Network Operator is used to provide the service of network flow to terminal 120
Device can be Cloud Server.Server 110 can provide Virtual User identification module (Subscriber to terminal 120
Identity Module, SIM) card data and using the virtual SIM card realize network communication service.Virtual SIM card refers to
There is no physical SIM card entity carrier, virtual SIM card.It may be provided with virtual SIM card application program in terminal 110
(Application, APP) 121, virtual SIM card operating system 122 and virtual SIM card adaptation layer 123.The virtual SIM card
APP 121, virtual SIM card operating system 122 and virtual SIM card adaptation layer 123 may be disposed at the application in terminal 120
It manages in device (Application Processor, AP).The server 110 can be by virtual SIM card APP 121, to virtual SIM
Card operation system 122 sends virtual SIM card data;Virtual SIM card operating system 122 can by virtual SIM card adaptation layer 123,
It realizes and is communicated with the radio-frequency communication control software being arranged in baseband processor (Baseband Processor, BP), with
It realizes and carries out network communication using virtual SIM card.
Wherein, server 110 can be supplied to 121 relevant interface of virtual SIM card APP of terminal 120, pass through the interface
Realize the communication between terminal 120.The interface may include user and equipment management, set meal and order management, SIM resource plus
The interfaces such as close transmission.Server 110 can be with REST ful application programming interface (Application Programming
Interface, API) mode to virtual SIM card APP 121 provide relevant interface.That is realized is carried out using virtual SIM card
The content of network communication includes but is not limited to realize the interactive maintenance of virtual SIM card data, the dynamic update of state and flow
Statistics and speed limit etc., for example can realize and the storage of virtual SIM card data be deleted and the enabling of virtual SIM card is closed etc..
Fig. 2 is the part architecture diagram of terminal in one embodiment, and the module for including in the architecture diagram is and virtual SIM card phase
The module of pass.As shown in Fig. 2, may be provided with virtual SIM card operating system, virtual SIM card adaptation layer, void in the application layer of terminal
Quasi- SIM card APP and phone directory/information module.Ccf layer (Framework layers) may be provided with Telephony interface layer and
Java layers of radio interface layer (Radio Interface Layer, RIL).Modem (Modem module) can be for by including base
One module of the compositions such as provided with processor, radio frequency and other peripheral chips is GSM/GPRS Modem module.Wherein,
Telephony interface layer passes through Telephony interface layer and Modem for providing general interface, virtual SIM card operating system
Module carries out Socket interaction, it can be achieved that judge whether there is virtual SIM card, the groove position etc. of virtual SIM card.Virtual SIM card
Operating system carries out Socket with the Modem module for switching to virtual SIM card channel by virtual SIM card adaptation layer and interacts, can
It realizes the activation to virtual SIM card, close, and carry out the functions such as network communicating function and traffic monitoring using virtual SIM card.
It should be understood that structure shown in Figure 2, only part of module relevant to application scheme, is not constituted to the application
The restriction for the terminal that scheme is applied thereon, specific terminal may include than more or fewer modules as shown in the figure, or
Person combines certain module, or with different module arrangements.For example double card management module, this pair can be also set on ccf layer
Card management module can be communicated with Telephony interface layer.
In one embodiment, terminal can provide a user the management operation circle of virtual SIM card by virtual SIM card APP
Face, and detect act on relevant operation in the management operation interface when, generate corresponding virtual SIM card process instruction, and
The process instruction is sent to virtual SIM card operating system.The system of the true SIM card of virtual SIM card operating system analog
Logic realizes agreement and file system for related specifications needed for carrying out network communication.Virtual SIM card operating system can
The process instruction from virtual SIM card App is received, is sent and the process instruction pair through virtual SIM card adaptation layer to Modem module
The message answered, instruction Modem module carry out corresponding processing to virtual SIM card basic data, and can receive Modem module and make
Response message, common realize carry out network communicating function using virtual SIM card.Wherein, the agreement of above-mentioned related specifications can
Including International Organization for standardization (International Organization for Standardization, ISO) 7816 with
And 3 generation collaborative project (3rd Generation Partnership Project, 3GPP) about Universal Integrated Circuit Card
(Universal Integrated Circuit Card, UICC) and Universal Subscriber Identity identification module (Universal
Subscriber Identity Module, USIM) etc. specifications agreement.
In one embodiment, corresponding weight can be arranged to virtual SIM card adaptation layer in advance, so that can be by virtual
SIM card adaptation layer is communicated with RIL layers.For example virtual SIM card adaptation layer can be arranged with phone process same levels
Permission.
In one embodiment, which may include to the set meal purchase of respective virtual SIM card instructs, enabling refers to
It enables, fail instruction and out code etc..Realized using virtual SIM card carry out network communication content include but is not limited to
Realize the interactive maintenance of virtual SIM card information, the dynamic of state updates and the statistics of flow and speed limit etc., for example can realize pair
The storage of virtual SIM card information is deleted and the enabling of virtual SIM card is closed etc..
As shown in figure 3, in one embodiment, providing a kind of flow information update method, the present embodiment is with the flow
Information updating method is applied to the terminal 120 of the application environment in above-mentioned Fig. 1 to illustrate.Terminal includes that file system is gentle
Storing module, the flow information update method specifically comprise the following steps:
Step 302: receiving flow and show request.
Specifically, application program is installed in terminal, the application rollouts flow status page can be passed through.Terminal receives
User shows request to the flow that application triggers generate, which shows that request can pass through touch control operation, gesture operation
With the triggering of at least one of acoustic control operation.Optionally, the detectable user of terminal passes through the triggerings application journeys such as key, touch screen
Inquiry button in sequence, triggering flow show request;Or terminal detects the gesture operation of user, identifies that the gesture operation is
Flow shows instruction, and triggering flow shows request;Or terminal receives voice signal, identifies the voice signal for flow displaying
Instruction, triggering flow show request.
Step 304: showing that request generates flow inquiry instruction according to the flow, the flow inquiry instruction is for inquiring
The flow status of virtual SIM card.
Wherein, the application program in terminal generates flow inquiry instruction, and flow inquiry instruction is for inquiring virtual SIM card
Flow status, after receiving Client-initiated flow and showing request, application program obtains the by virtual SIM card operating system
Flow information.
In one embodiment, terminal shows the flow status page by virtual SIM card APP, and user is by operating the void
Quasi- SIM card APP initiates flow and shows request, to occur the virtual SIM card flow of real-time update on virtual SIM card APP
The page of state.
Step 306: sending the flow inquiry instruction to virtual SIM card operating system, pass through virtual SIM card operating system
The flow information in local data base is read, the flow information is according to the first flow information and caching recorded in file system
The second flow information recorded in module obtains.
Specifically, virtual SIM card operating system reads flow information from local data base, and by the flow information of reading
Return to the application program in terminal.Wherein, the traffic statistics interface in service framework is called to obtain by double card management module
The flow information of virtual SIM card, and calculate the flow buffering module in predetermined time interval, save in the local database for
Virtual SIM card is read.
Wherein, file system refers in the kernel of terminal for storing the memory space of flow information for a long time.File system
It is middle to record the flow information for having write-in.Cache module refers to the memory space for temporarily storing flow information.In cache module
It is stored with the flow information of preset duration.The flow information recorded in cache module can be spaced to schedule and be written to file
In system.For example, the flow information recorded in cache module can be written in file system at interval of half an hour, that is,
It says, record has the flow information collected in half an hour in cache module.For example, 10 points of 10 minutes flows that will be recorded in cache module
After information is written to file system, 10: 10, which separately begin, can be first stored in cache module to the flow information of 10 points of collections in 40 minutes
In, in 10: 40 timesharing, the flow information recorded in cache module is written in file system.It is understood that predetermined
Time interval can be set as needed, such as 10 minutes, 20 minutes.
Step 308: the flow query result that virtual SIM card operating system returns is received, according to the flow query result
Show the flow status page.
Specifically, the application program in terminal shows flow status according to current traffic information after obtaining flow information
The page.
In one embodiment, it during inquiring the data on flows in kernel by virtual SIM card operating system, obtains
The corresponding flow information of data on flows divided is identified in kernel traffic statistics file according to different application, wherein system
In each application program have a UID (User Identification, user identifier), according to UID inquire different application journey
The data on flows of sequence.According to the flow information for having different UID, the corresponding flow status of different UID is shown in displayed page.
In one embodiment, at least one of broken line graph, bar shaped statistical chart, fan-shaped statistical chart shape can be passed through
Formula shows the corresponding flow status page of different UID.
Step 310: when the flow information updates, obtaining updated flow information, and show updated flow
Status page.
Wherein, the flow information real-time update flow that the application program in terminal is returned according to virtual SIM card operating system
Status page.
In one embodiment, the application program in terminal shows that data on flows accounts for total flow according to flow information
The ratio of data allows users to intuitively find out and has used flow and residue can for example, showing the progress that total flow data are nibbled
With the comparison of flow.Application program in terminal can also count the subitem flow status of different application, for example, being united by broken line
It counts at least one of figure, bar shaped statistical chart, fan-shaped statistical chart form and shows that different application identifies corresponding flow status, use
Family can intuitively contrast the flow accounting that different application uses.
Above-mentioned flow information update method, by receiving from this to virtual SIM card operating system transmitted traffic inquiry instruction
What is returned in ground database believes according to the second flow recorded in the first flow information and cache module recorded in file system
Obtained flow information is ceased, and according to the flow information more new order page.Reduce the time of system queries flow, reduces
The consumption of system keeps flow inquiry more acurrate, and the user experience is improved.
As shown in figure 4, in one embodiment, the flow information update method is further comprising the steps of.
Step 402: obtaining the first flow information recorded in file system, the first flow information expression is written to text
Flow information in part system.
Specifically, first flow information indicates the total flow information being written in file system.For example, 10 points are written for 10 minutes
To the flow information of file system, then first flow information indicates to be written to total stream in file system by the end of 10: 10 timesharing
Measure information.
Step 404: calculating the second flow information recorded in cache module, the second flow information presentation system is pre-
If the flow information of deposit cache module in the period.
Specifically, second flow information indicates the first moment recorded in cache module to the flow letter between current time
Breath.First moment was that span the last time at current time will be at the time of flow information be written to file system in cache module.
In one embodiment, the second flow information recorded in cache module is calculated by double card management module, and in real time
It is stored in local data base for the reading of virtual SIM card operating system.
Step 406: current traffic information being obtained according to the first flow information and second flow information and is stored to this
In ground database.
Specifically, it sums first flow information and second flow information to obtain current total flow information, then output is worked as
Preceding total flow information.Current total flow information refers to the total flow letter by the end of the current time for receiving flow inquiry instruction
Breath.
In the present embodiment, second in the first flow information recorded in file system, and acquisition cache module is obtained
Flow information can be obtained current total flow information in conjunction with first flow information and second flow information, not need every time according to stream
It measures inquiry instruction and write operation is carried out to system kernel, reduce the resource consumption to system kernel.Virtual opetrating system is directly read
The flow information stored in local data base is taken, the time of system queries flow is accelerated.
As shown in figure 5, in one embodiment, the flow information update method is further comprising the steps of.
Step 502: obtaining third flow information of the terminal from booting moment to current time.
Specifically, the booting moment refers at the time of be switched on after terminal is restarted.Current time, which refers to, receives traffic statistics request
At the time of.Third flow information of the terminal from booting moment to current time, it may include the flow letter being written in file system
The flow information for ceasing and being not written in file system.
Step 504: fourth flow of the terminal that acquisition is recorded from the file system from booting moment to current time
Information.
Specifically, what is recorded in file system is terminal from the booting moment into the flow information generated current time
Have been written into the flow information in file system.
Step 506: the second flow information is obtained according to the third flow information and the 4th flow information.
Specifically, the 4th flow information will be excluded in third flow information, then available second flow information, that is, store
Flow information in cache module.In the present embodiment, by reading the booting moment to current time recorded in file system
Flow information, and from booting moment to current time total flow information, to obtain the flow stored in cache module
Flow information in cache module is written in file system, subtracts when not needing to receive traffic statistics request every time by information
Lack the write operation to system kernel, reduces system resource consuming.
In one embodiment, described to obtain third flow information of the terminal from booting moment to current time, comprising: logical
It crosses first flow statistics interface and obtains third flow information of the terminal from booting moment to current time, the first flow statistics
Interface is used to count flow information of the terminal from booting moment to current time.
GetincrementForNetwork (NetworkTemplate can be used in first flow statistics interface
Template) interface.GetincrementForNetwork interface polls system/proc/net/xt qtaguid/iface_
Stat_fmt interface obtains the flow snapshot xtSnapshot from booting moment to current time.
In one embodiment, the terminal that record is obtained from the file system from booting the moment to current time
The 4th flow information, comprising: interface is counted by second flow and reads the terminal of record from the file system from booting
4th flow information at moment to current time, the second flow statistics interface have been written into file system for extracting
Flow information.
Second flow statistics interface can be used TrafficMonitor and obtain text by performPollLocked () interface
The present flow rate snapshot mNetworkStats recorded in part system.
In one embodiment, the flow statistical method, which may also include that, is spaced to schedule by the caching mould
The second flow information recorded in block is written in the file system.
Predetermined time interval can be set as needed, such as 10 minutes, 20 minutes, 30 minutes.By to schedule
The second flow information recorded in cache module is written in file system by interval, can be to avoid frequently to system kernel progress
Write operation consumes system resource.
In one embodiment, the flow statistical method may also include that the first flow letter in the file system
Breath is divided according to network type, obtains flow information corresponding with the network type.
Specifically, the first flow information stored in file system, can be divided according to network type, such as 2G network
Flow, 3G network flow, 4G network flow, 5G network flow, roaming network flow etc..Flow information is divided according to network type
More comprehensive flow service condition can be provided.
In one embodiment, the flow statistical method may also include that the second flow letter in the cache module
Breath is divided according to network type, obtains flow information corresponding with the network type;It will be corresponding with the network type
Flow information be spaced be written in the file system to schedule.
Specifically, after the second flow information counted in cache module is divided according to network type, it is written to file
When system, it can quickly be added in the flow information of corresponding network type, improve the efficiency of classification.
As shown in fig. 6, in one embodiment, providing a kind of flow information updating device, which includes that request receives
Module 601, obtains module 603, display module 604, update module 605 at request sending module 602.
Request receiving module 601 shows request for receiving flow;
Request sending module 602, for showing that request generates flow inquiry instruction, the flow inquiry according to the flow
Instruct the flow status for inquiring virtual SIM card;
Module 603 is obtained, for sending the flow inquiry instruction to virtual SIM card operating system, passes through virtual SIM card
Operating system reads the flow information in local data base, and the flow information is believed according to the first flow recorded in file system
The second flow information recorded in breath and cache module obtains;
Display module 604, for receiving the flow query result of virtual SIM card operating system return, according to the flow
Query result shows the flow status page;
Update module 605, for obtaining updated flow information, and show update when the flow information updates
The flow status page afterwards.
In one embodiment, display module 604 is also used to through broken line graph, bar shaped statistical chart, fan-shaped statistical chart
At least one of form show that different application identifies the corresponding flow status page.
In one embodiment, display module 604 is also used to show that data on flows accounts for according to the flow information
The ratio of total flow data.
In one embodiment, flow shows that request passes through at least one in touch control operation, gesture operation and acoustic control operation
Kind triggering.
Above-mentioned flow information updating device, by receiving from this to virtual SIM card operating system transmitted traffic inquiry instruction
What is returned in ground database believes according to the second flow recorded in the first flow information and cache module recorded in file system
Obtained flow information is ceased, and according to the flow information more new order page.Reduce the time of system queries flow, reduces
The consumption of system keeps flow inquiry more acurrate, and the user experience is improved.
The division of modules is only used for for example, in other embodiments in above-mentioned flow information updating device, can
Flow information updating device is divided into different modules as required, with complete above-mentioned flow information updating device whole or
Partial function.
Fig. 7 is the schematic diagram of internal structure of terminal (or electronic equipment etc.) in one embodiment.As shown in fig. 7, the terminal
Including the processor, memory and network interface connected by system bus.Wherein, which calculates and controls for providing
Ability supports the operation of entire terminal.Memory for storing data, program etc., at least one computer is stored on memory
Program, the computer program can be executed by processor, to realize the data processing method provided in the embodiment of the present application.Memory
It may include the non-volatile memory mediums such as magnetic disk, CD, read-only memory (Read-Only Memory, ROM), or random
Storage memory (Random-Access-Memory, RAM) etc..For example, in one embodiment, memory includes non-volatile
Storage medium and built-in storage.Non-volatile memory medium be stored with operating system and and be stored with for realizing with the application
The relevant data of flow information update method suitable for terminal provided in embodiment, for example can be stored with and the void in terminal
Interface data that quasi- SIM card APP and SDK are communicated and relevant virtual SIM card information etc..Built-in storage is non-volatile
Property storage medium in operating system and suitable for terminal data processing method provide cache module running environment.
Network interface can be Ethernet card or wireless network card etc., for being communicated with external terminal.The terminal can be mobile phone,
Tablet computer or personal digital assistant or wearable device etc..
Fig. 8 is the schematic diagram of internal structure of server (or cloud etc.) in one embodiment.As shown in figure 8, the server
Including processor, non-volatile memory medium, built-in storage and the network interface connected by system bus.Wherein, the processing
Device supports the operation of entire terminal for providing calculating and control ability.Memory for storing data, program etc..Memory
It may include the non-volatile memory mediums such as magnetic disk, CD, read-only memory (Read-Only Memory, ROM), or random
Storage memory (Random-Access-Memory, RAM) etc..For example, in one embodiment, memory includes non-volatile
Storage medium and built-in storage.Non-volatile memory medium is stored with operating system and is stored with for realizing real with the application
The relevant data of flow information update method suitable for terminal provided in example are provided, for example, can be stored with it is virtual in terminal
Interface data that SIM card APP and SDK are communicated and relevant virtual SIM card information etc..Built-in storage is non-volatile
Operating system in storage medium and the data processing method suitable for terminal provide the running environment of cache module.Net
Network interface can be Ethernet card or wireless network card etc., for being communicated with external terminal.Server can be with independent
The server cluster of server either multiple servers composition is realized.It will be understood by those skilled in the art that being shown in Fig. 8
Structure, only the block diagram of part-structure relevant to application scheme, does not constitute and is applied to it to application scheme
On server restriction, specific server may include more certain than more or fewer components as shown in the figure, or combination
Component, or with different component layouts.
The embodiment of the present application also provides a kind of computer readable storage mediums.One or more is executable comprising computer
The non-volatile computer readable storage medium storing program for executing of instruction, when the computer executable instructions are executed by one or more processors
When, so that the processor executes the flow information update method as described in the various embodiments described above.
The embodiment of the present application also provides a kind of computer program products.A kind of computer program product comprising instruction,
When run on a computer, so that computer executes flow information update method described in the various embodiments described above.
The embodiment of the present application also provides a kind of terminals.As shown in figure 9, for ease of description, illustrate only and the application
The relevant part of embodiment, it is disclosed by specific technical details, please refer to the embodiment of the present application method part.The terminal can be
Including mobile phone, tablet computer, PDA (Personal Digital Assistant, personal digital assistant), POS (Point of
Sales, point-of-sale terminal), vehicle-mounted computer, any terminal device such as wearable device, taking the terminal as an example:
Fig. 9 is the block diagram of the part-structure of mobile phone relevant to terminal provided by the embodiments of the present application.With reference to Fig. 9, mobile phone
It include: radio frequency (Radio Frequency, RF) circuit 910, memory 920, input unit 930, display unit 940, sensor
950, voicefrequency circuit 960, Wireless Fidelity (wireless fidelity, WiFi) module 970, processor 980 and power supply 990
Equal components.It will be understood by those skilled in the art that handset structure shown in Fig. 9 does not constitute the restriction to mobile phone, may include
Than illustrating more or fewer components, certain components or different component layouts are perhaps combined.
Wherein, RF circuit 910 can be used for receiving and sending messages or communication process in, signal sends and receivees, can be by base station
After downlink information receives, handled to processor 980;The data of uplink can also be sent to base station.In general, RF circuit include but
Be not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier (Low Noise Amplifier,
LNA), duplexer etc..In addition, RF circuit 910 can also be communicated with network and other equipment by wireless communication.Above-mentioned channel radio
Any communication standard or agreement, including but not limited to global system for mobile communications (Global System of can be used in letter
Mobile communication, GSM), general packet radio service (General Packet Radio Service,
GPRS), CDMA (Code Division Multiple Access, CDMA), wideband code division multiple access (Wideband Code
Division Multiple Access, WCDMA), long term evolution (Long Term Evolution, LTE)), Email,
Short message service (Short Messaging Service, SMS) etc..
Memory 920 can be used for storing software program and module, and processor 980 is stored in memory 920 by operation
Software program and module, thereby executing the various function application and data processing of mobile phone.Memory 920 can mainly include
Program storage area and data storage area, wherein program storage area can application journey needed for storage program area, at least one function
Sequence (such as application program, application program of image player function of sound-playing function etc.) etc.;Data storage area can store root
Created data (such as audio data, address list etc.) etc. are used according to mobile phone.In addition, memory 920 may include high speed
Random access memory, can also include nonvolatile memory, a for example, at least disk memory, flush memory device or
Other volatile solid-state parts.
Input unit 930 can be used for receiving the number or character information of input, and generate the user setting with mobile phone 900
And the related key signals input of function control.Specifically, input unit 930 may include touch panel 931 and other inputs
Equipment 932.Touch panel 931, alternatively referred to as touch screen collect touch operation (such as the user of user on it or nearby
Use the operation of any suitable object or attachment such as finger, stylus on touch panel 931 or near touch panel 931),
And corresponding attachment device is driven according to preset formula.In one embodiment, touch panel 931 may include touching inspection
Survey two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation
Bring signal, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and will
It is converted into contact coordinate, then gives processor 980, and can receive order that processor 980 is sent and be executed.In addition,
Touch panel 931 can be realized using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch surface
Plate 931, input unit 930 can also include other input equipments 932.Specifically, other input equipments 932 may include but not
It is limited to one of physical keyboard, function key (such as volume control button, switch key etc.) etc. or a variety of.
Display unit 940 can be used for showing information input by user or be supplied to user information and mobile phone it is various
Menu.Display unit 940 may include display panel 941.In one embodiment, liquid crystal display (Liquid can be used
Crystal Display, LCD), the forms such as Organic Light Emitting Diode (Organic Light-Emitting Diode, OLED)
To configure display panel 941.In one embodiment, touch panel 931 can cover display panel 941, when touch panel 931 is examined
After measuring touch operation on it or nearby, processor 980 is sent to determine the type of touch event, is followed by subsequent processing device
980 provide corresponding visual output according to the type of touch event on display panel 941.Although in Fig. 9, touch panel
931 and display panel 941 are the input and input function for realizing mobile phone as two independent components, but in certain implementations
In example, can be integrated by touch panel 931 and display panel 941 and that realizes mobile phone output and input function.
Mobile phone 900 may also include at least one sensor 950, such as optical sensor, motion sensor and other sensings
Device.Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment
The light and shade of light adjusts the brightness of display panel 941, and proximity sensor can close display panel when mobile phone is moved in one's ear
941 and/or backlight.Motion sensor may include acceleration transducer, can detect by acceleration transducer and adds in all directions
The size of speed can detect that size and the direction of gravity when static, can be used to identify application (such as the horizontal/vertical screen of mobile phone posture
Switching), Vibration identification correlation function (such as pedometer, tap) etc.;In addition, mobile phone can also configure gyroscope, barometer, humidity
Other sensors such as meter, thermometer, infrared sensor etc..
Voicefrequency circuit 960, loudspeaker 961 and microphone 962 can provide the audio interface between user and mobile phone.Audio-frequency electric
Electric signal after the audio data received conversion can be transferred to loudspeaker 961, be converted to sound by loudspeaker 961 by road 960
Signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 962, is turned after being received by voicefrequency circuit 960
It is changed to audio data, then by after the processing of audio data output processor 980, another mobile phone can be sent to through RF circuit 910, or
Person exports audio data to memory 920 so as to subsequent processing.
WiFi belongs to short range wireless transmission technology, and mobile phone can help user's transceiver electronics postal by WiFi module 970
Part, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 9 is shown
WiFi module 970, but it is understood that, and it is not belonging to must be configured into for mobile phone 900, it can according to need and omit.
Processor 980 is the control centre of mobile phone, using the various pieces of various interfaces and connection whole mobile phone, is led to
It crosses operation or executes the software program and/or module being stored in memory 920, and call and be stored in memory 920
Data execute the various functions and processing data of mobile phone, to carry out integral monitoring to mobile phone.In one embodiment, it handles
Device 980 may include one or more processing units.In one embodiment, processor 980 can integrate application processor and modulation
Demodulator, wherein the main processing operation system of application processor, user interface and application program etc.;Modem is mainly located
Reason wireless communication.It is understood that above-mentioned modem can not also be integrated into processor 980.For example, the processor
980 can integrate application processor and baseband processor, baseband processor with and the composable modem such as other peripheral chips.
Mobile phone 900 further includes the power supply 990 (such as battery) powered to all parts, it is preferred that power supply can pass through power management system
It unites logically contiguous with processor 980, to realize the function such as management charging, electric discharge and power managed by power-supply management system
Energy.
In one embodiment, mobile phone 900 can also include camera, bluetooth module etc..
In the embodiment of the present application, when processor included by the mobile phone executes the computer program of storage on a memory
Realize flow information update method described in the various embodiments described above.
Any reference to memory, storage, database or other media used in this application may include non-volatile
And/or volatile memory.Suitable nonvolatile memory may include read-only memory (ROM), programming ROM (PROM),
Electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include arbitrary access
Memory (RAM), it is used as external cache.By way of illustration and not limitation, RAM is available in many forms, such as
It is static RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDR SDRAM), enhanced
SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM).
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
The limitation to the application the scope of the patents therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art
For, without departing from the concept of this application, various modifications and improvements can be made, these belong to the guarantor of the application
Protect range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.
Claims (10)
1. a kind of flow information update method is applied to terminal, terminal includes file system and cache module, the method packet
It includes:
It receives flow and shows request;
Show that request generates flow inquiry instruction according to the flow, the flow inquiry instruction is for inquiring virtual SIM card
Flow status;
The flow inquiry instruction is sent to virtual SIM card operating system, local data is read by virtual SIM card operating system
Flow information in library, the flow information is according to recording in the first flow information and cache module recorded in file system
Second flow information obtains;
The flow query result that virtual SIM card operating system returns is received, flow status is shown according to the flow query result
The page;
When the flow query result updates, updated flow query result is obtained, and show updated flow status
The page;
The file system refers to that the memory space for storing flow information for a long time, the cache module refer to for temporarily depositing
The memory space of flow information is stored up, the flow information recorded in the cache module can be written to file according to regulation time interval
In system;
Wherein, the file system and the cache module are all set in local data base.
2. flow information update method according to claim 1, which is characterized in that the flow information is according to file system
The second flow information recorded in the first flow information and cache module of middle record obtains, comprising:
The first flow information recorded in file system is obtained, the first flow information indicates the stream being written in file system
Measure information;
The second flow information recorded in cache module is calculated, the second flow information presentation system is deposited within a preset period of time
Enter the flow information of cache module;
Current traffic information is obtained according to the first flow information and second flow information and is stored into local data base.
3. flow information update method according to claim 2, which is characterized in that recorded in the calculating cache module
Second flow information, comprising:
Obtain third flow information of the terminal from booting moment to current time;
Fourth flow information of the terminal that acquisition is recorded from the file system from booting moment to current time;
The second flow information is obtained according to the third flow information and the 4th flow information.
4. flow information update method according to claim 1, which is characterized in that the method also includes:
It obtains in local data base and identifies the flow information divided according to different application;
Different application is updated in the flow status page according to the flow information and identifies corresponding flow status.
5. flow information update method according to claim 4, which is characterized in that described to be flowed according to the flow information
It measures and updates the corresponding flow status of different application mark in status page, comprising:
Difference is updated in displayed page by least one of broken line graph, bar shaped statistical chart, fan-shaped statistical chart form
The corresponding flow status of application identities.
6. flow information update method according to claim 1, which is characterized in that described to show updated flow status
The page includes:
Total flow data are accounted for according to the data on flows that the updated flow information updates in the flow status page
Ratio.
7. flow information update method according to claim 1, which is characterized in that the flow shows that request passes through touch-control
The triggering of at least one of operation, gesture operation and acoustic control operation.
8. a kind of flow information updating device, which is characterized in that described device includes:
Request receiving module shows request for receiving flow;
Directive generation module, for showing that request generates flow inquiry instruction according to the flow, the flow inquiry instruction is used
In the flow status of inquiry virtual SIM card;
Instruction sending module is grasped for sending the flow inquiry instruction to virtual SIM card operating system by virtual SIM card
Make the flow information in system reading local data base, the flow information is according to the first flow information recorded in file system
It is obtained with the second flow information recorded in cache module;
Display module, for receiving the flow query result of virtual SIM card operating system return, according to the flow query result
Show the flow status page;
Update module, for obtaining updated flow query result, and show update when the flow query result updates
The flow status page afterwards;
Wherein, the file system refers to the memory space for storing flow information for a long time, and the cache module, which refers to, to be used for
The memory space of flow information is temporarily stored, the flow information recorded in the cache module can be written according to regulation time interval
Into file system;
The file system and the cache module are all set in local data base.
9. a kind of terminal, including memory and processor, computer program, the computer program are stored in the memory
When being executed by the processor, so that realizing the flow letter as described in any one of claims 1 to 7 when the processor executes
The step of ceasing update method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of flow information update method as described in any one of claims 1 to 7 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710924592.XA CN107708092B (en) | 2017-09-30 | 2017-09-30 | Flow information update method and device, terminal, computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710924592.XA CN107708092B (en) | 2017-09-30 | 2017-09-30 | Flow information update method and device, terminal, computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107708092A CN107708092A (en) | 2018-02-16 |
CN107708092B true CN107708092B (en) | 2019-09-17 |
Family
ID=61184528
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710924592.XA Active CN107708092B (en) | 2017-09-30 | 2017-09-30 | Flow information update method and device, terminal, computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107708092B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111628902B (en) * | 2019-02-28 | 2022-10-04 | 腾讯科技(深圳)有限公司 | Rate testing method and apparatus, electronic device, and computer-readable storage medium |
CN112148512B (en) * | 2019-06-27 | 2024-07-12 | 腾讯科技(深圳)有限公司 | Content library management method, device, equipment and storage medium |
CN117041931A (en) * | 2020-03-20 | 2023-11-10 | 北京小米移动软件有限公司 | SIM card information display method, SIM card information display device and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103379461A (en) * | 2012-04-26 | 2013-10-30 | 华为终端有限公司 | Data service traffic statistical method and terminal |
CN104486138A (en) * | 2014-11-25 | 2015-04-01 | 北京奇虎科技有限公司 | Flow monitoring method and device and monitoring server |
CN105578450A (en) * | 2014-10-17 | 2016-05-11 | 中兴通讯股份有限公司 | Flow control method and apparatus thereof |
CN106855775A (en) * | 2016-12-30 | 2017-06-16 | 深圳天珑无线科技有限公司 | Using display methods and device using flow |
-
2017
- 2017-09-30 CN CN201710924592.XA patent/CN107708092B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103379461A (en) * | 2012-04-26 | 2013-10-30 | 华为终端有限公司 | Data service traffic statistical method and terminal |
CN105578450A (en) * | 2014-10-17 | 2016-05-11 | 中兴通讯股份有限公司 | Flow control method and apparatus thereof |
CN104486138A (en) * | 2014-11-25 | 2015-04-01 | 北京奇虎科技有限公司 | Flow monitoring method and device and monitoring server |
CN106855775A (en) * | 2016-12-30 | 2017-06-16 | 深圳天珑无线科技有限公司 | Using display methods and device using flow |
Also Published As
Publication number | Publication date |
---|---|
CN107708092A (en) | 2018-02-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107770746B (en) | Data processing method and device, computer equipment and computer readable storage medium | |
CN107708084B (en) | Data processing method and device, computer equipment and computer readable storage medium | |
CN107707369A (en) | The method and apparatus of flow order management, computer equipment, readable storage medium storing program for executing | |
CN110008008A (en) | Applied program processing method and device, electronic equipment, computer readable storage medium | |
CN107690131A (en) | Information processing method, device, mobile terminal and computer-readable recording medium | |
CN107708092B (en) | Flow information update method and device, terminal, computer readable storage medium | |
CN107682851A (en) | Information processing method, device, mobile terminal and computer-readable recording medium | |
CN107682910A (en) | Floating resources sharing method, device, mobile terminal and storage medium | |
CN104424211A (en) | Microblog-based service data release method, device and system | |
CN108616653A (en) | Information processing method, device, mobile terminal and computer readable storage medium | |
CN107682833A (en) | Method, apparatus, mobile terminal and the storage medium that control flow uses | |
CN107734495A (en) | Information processing method, device, storage medium and terminal | |
CN110032321A (en) | Applied program processing method and device, electronic equipment, computer readable storage medium | |
CN107623612B (en) | Flow display method and device, computer equipment and computer readable storage medium | |
CN107635220A (en) | Network service processing method, device, storage medium and terminal | |
CN107484201A (en) | Flow statistical method and device, terminal, computer-readable recording medium | |
CN106980654B (en) | Road condition updating method, device and computer equipment | |
CN109992380A (en) | Applied program processing method and device, electronic equipment, computer readable storage medium | |
CN108055383A (en) | Acquisition methods, device and the mobile terminal of screenshot picture | |
CN107743080B (en) | Flow statistical method and device, computer equipment, computer readable storage medium | |
CN107566398B (en) | Flow control methods and device, computer equipment, computer readable storage medium | |
CN106020945A (en) | Shortcut item adding method and device | |
CN109992360A (en) | Process handling method and device, electronic equipment, computer readable storage medium | |
CN109992309A (en) | Applied program processing method and device, electronic equipment, computer readable storage medium | |
CN107682832A (en) | Data processing method and device, computer equipment, computer-readable recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after: OPPO Guangdong Mobile Communications Co., Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before: Guangdong OPPO Mobile Communications Co., Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |