A kind of computational methods of memory model, device and computer readable storage medium
Technical field
The present invention relates to terminal system technical field, especially a kind of computational methods of memory model, device and computer
Readable storage medium storing program for executing.
Background technology
Android system is the open source operating system based on Iinux;Linux is the operation system developed using standard C language
System;Android bottom layer drivings and operating system nucleus use C language and compilation exploitation.Android operating systems itself are
It is developed using Java, and calls local C language library using JNI, realize the scheduling of operating system bottom.Android application programs
It is to be developed using Java;It can also be developed simultaneously using C/C++native;So be basically Java be standard development language
Speech.Android has used the JVM (Java Virtual Machine) changed to be called dalvik virtual machines, essence or Java Virtual Machine.
So each corresponding APP can create a dalvik virtual machines, that is, a linux process.Namely it is based under linux
Revision Java Virtual Machine, run java programs.Android system uses DalvikVirtualMachine (DVM) conduct
Its virtual machine, all application programs all operate in android system process, and it is virtual that each process corresponds to a Dalvik
Machine.Dalvik virtual machine both provide Object Life Cycle management, stack management, thread management, safety and exception management and
The critical functions such as garbage reclamation respectively possess the instruction system of complete set.
In the virtual machine of android system memory treatment mechanism need the technology used include internal storage data block label,
Increase etc. when movement, Insufficient memory.With the frequent use of application program, internal storage data block needs constantly from the Cenozoic
It is moved to old generation, when Insufficient memory, needs continuous de-duplicate internal storage data and increase memory headroom.Such Memory adjustments
Mechanism inefficiency, constantly mobile internal storage data block influence system performance;There may be Caton phenomena for application program operation;Application
Increase the case where memory headroom is possible to will appear Insufficient memory.Moreover, because memory movement and space increase action compared with
To be frequent, the power consumption of system operation will be increased.
Invention content
It is a primary object of the present invention to propose a kind of computational methods of memory model, device and computer-readable storage medium
Matter, it is intended to solve in the virtual machine of existing terminal system that Memory adjustments mechanism efficiency is low, cause application program interim card and system
The big technical problem of power consumption.
In order to solve the above technical problem, the present invention provides a kind of computational methods of memory model, are applied to server,
This approach includes the following steps:
The terminal system that terminal uploads is received, is installed by Android virtual machine and runs the terminal system;
The analog subscriber login application program in the terminal system, and according to the daily record document automatic running of the user
The application program;
Memory delta data is recorded using the Android virtual machine, is calculated according to the memory delta data and obtains the use
The adaptation memory model at family.
Further, the described the step of adaptation memory model for obtaining the user is calculated according to the memory delta data
Later, the method further includes:
The adaptation memory model is pushed to the terminal system of counterpart terminal so that the terminal system is according to institute
It states adaptation memory model and runs the application program after the user logs.
Further, the terminal system that will receive terminal upload, is installed by Android virtual machine and runs the terminal system
The step of system, specifically includes:
Multiple Android virtual machines are founded, the Android virtual machine is managed by a virtual machine management program;
A kind of terminal system of model is installed on each Android virtual machine, and is applied described in dry run one
The corresponding daily record document of program.
Further, described to found multiple Android virtual machines, the Android is managed by a virtual machine management program
The step of virtual machine further includes specifically:
The daily record document of each application server is extracted using concurrent thread pond mode by the virtual machine management program, it will
Automatic running behavior is submitted in thread pool, using the thread pool United Dispatching, ensures each Android virtual machine simultaneously
The operational motion of each user of saturation operation.
Further, the analog subscriber login application program in the terminal system, and according to the daily record of user text
The step of application program described in shelves automatic running, specifically includes:
Transfer and parse the daily record document in application server, extract be not logged in used in each logged-in user
Terminal models and operation note;
According to log-on message, terminal models and operation note, it is sent to the terminal system that the Android virtual machine corresponds to model
Automatic running is carried out in system.
Further, described to record memory delta data using the Android virtual machine, according to the memory delta data
The step of calculating the adaptation memory model for obtaining the user specifically includes:
Using the Android virtual machine record include call number, using duration, each area size of memory, space size,
Internal storage data block moves at least one of the memory delta data of number, memory headroom adjustment number;
An internal storage data block movement time is obtained according to the memory delta data in each history cycle of the user
Number with adjust number it is minimum be adapted to memory model.
Further, the terminal system that the adaptation memory model is pushed to counterpart terminal so that described
The step of terminal system runs the application program after the user logs according to the adaptation memory model specifically includes:
Be not logged in user and the logged-in user of each application program are calculated in real time in the adaptation of current history cycle
It deposits model and is pushed to the terminal system;So that the terminal system parses be applied name and the adaptation memory model,
The adaptation memory model set is used into corresponding application program.
Further, the method further includes:
According to the cyclically-varying of the daily record document, is calculated again for the user and obtain adaptation memory model, will become
The adaptation memory model after change is pushed to the terminal system.
Based on same inventive concept, another aspect of the present invention provides a kind of memory model computing device, the memory
Model computing device includes processor, memory and data/address bus;
The data/address bus is for realizing the connection communication between processor and memory;
The processor is for executing the memory model calculation procedure stored in memory, to realize following steps:
The terminal system that terminal uploads is received, is installed by Android virtual machine and runs the terminal system;
The analog subscriber login application program in the terminal system, and according to the daily record document automatic running of the user
The application program;
Memory delta data is recorded using the Android virtual machine, is calculated according to the memory delta data and obtains the use
The adaptation memory model at family;
The adaptation memory model is pushed to the terminal system of counterpart terminal so that the terminal system is according to institute
It states adaptation memory model and runs the application program after the user logs.
Based on same inventive concept, another aspect of the present invention provides a kind of computer readable storage medium, the meter
Memory model calculation procedure is stored on calculation machine readable storage medium storing program for executing, it is real when the memory model calculation procedure is executed by processor
The step of showing above-mentioned memory model computational methods.
The advantageous effect of technical solution of the present invention:
The method, apparatus and computer readable storage medium that the memory model of the application calculates, by a server end,
Multiple Android virtual machines and corresponding Virtual Machine Manager application program is arranged in server end, from the user journal of application server
Document parses user behavior, and United Dispatching Android virtual machine automatically, automatically in terminal system dry run user operation
Action calculates the adaptation memory model for analyzing each user and is pushed to terminal system used by a user, ensures that user makes
It is dropped at least with internal storage data block movement number when application program and memory headroom adjustment number, and then improves terminal system and answer
With the speed of service and fluency of program, mobile telephone power consumption is reduced, brings best application to experience to user.
Description of the drawings
Fig. 1 is a kind of hardware architecture diagram for the mobile terminal for realizing each embodiment of the present invention;
Fig. 2 is a kind of communications network system Organization Chart provided in an embodiment of the present invention;
Fig. 3 is the method flow block diagram that a kind of memory model provided in an embodiment of the present invention calculates;
Fig. 4 is the method flow block diagram that another memory model provided in an embodiment of the present invention calculates;
Fig. 5 is the apparatus structure block diagram that a kind of memory model provided in an embodiment of the present invention calculates;
Fig. 6 is a kind of memory model computing device operating status structural schematic diagram provided in an embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific implementation mode
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In subsequent description, using for indicating that the suffix of such as " module ", " component " or " unit " of element is only
The explanation for being conducive to the present invention, itself does not have a specific meaning.Therefore, " module ", " component " or " unit " can mix
Ground uses.
Terminal can be implemented in a variety of manners.For example, terminal described in the present invention may include such as mobile phone, tablet
Computer, laptop, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable
The shiftings such as media player (Portable Media Player, PMP), navigation device, wearable device, Intelligent bracelet, pedometer
The fixed terminals such as dynamic terminal, and number TV, desktop computer.
It will be illustrated by taking mobile terminal as an example in subsequent descriptions, it will be appreciated by those skilled in the art that in addition to special
Except element for moving purpose, construction according to the embodiment of the present invention can also apply to the terminal of fixed type.
Referring to Fig. 1, a kind of hardware architecture diagram of its mobile terminal of each embodiment to realize the present invention, the shifting
Moving terminal 100 may include:RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit
103, A/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit
108, the components such as memory 109, processor 110 and power supply 111.It will be understood by those skilled in the art that shown in Fig. 1
Mobile terminal structure does not constitute the restriction to mobile terminal, and mobile terminal may include components more more or fewer than diagram,
Either combine certain components or different components arrangement.
The all parts of mobile terminal are specifically introduced with reference to Fig. 1:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, signal sends and receivees, specifically, by base station
Downlink information receive after, to processor 110 handle;In addition, the data of uplink are sent to base station.In general, radio frequency unit 101
Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrating
Frequency unit 101 can also be communicated by public transport expense quick payment with network and other equipment.Above-mentioned public transport expense
Quick payment can use any communication standard or agreement, including but not limited to GSM (Global System of Mobile
Communication, global system for mobile communications), GPRS (General Packet Radio Service, general packet without
Line service), CDMA2000 (Code Division Multiple Access 2000, CDMA 2000), WCDMA
(Wideband Code Division Multiple Access, wideband code division multiple access), TD-SCDMA (Time Division-
Synchronous Code Division Multiple Access, TD SDMA), FDD-LTE (Frequency
Division Duplexing-Long Term Evolution, frequency division duplex long term evolution) and TDD-LTE (Time
Division Duplexing-Long Term Evolution, time division duplex long term evolution) etc..
WiFi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch electricity by WiFi module 102
Sub- mail, browsing webpage and access streaming video etc., it has provided wireless broadband internet to the user and has accessed.Although Fig. 1 shows
Go out WiFi module 102, but it is understood that, and it is not belonging to must be configured into for mobile terminal, it completely can be according to need
It to be omitted in the range for the essence for not changing invention.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100
When under the isotypes such as formula, speech recognition mode, broadcast reception mode, it is that radio frequency unit 101 or WiFi module 102 are received or
The audio data stored in memory 109 is converted into audio signal and exports to be sound.Moreover, audio output unit 103
The relevant audio output of specific function executed with mobile terminal 100 can also be provided (for example, call signal receives sound, disappears
Breath receives sound etc.).Audio output unit 103 may include loud speaker, buzzer etc..
A/V input units 104 are for receiving audio or video signal.A/V input units 104 may include graphics processor
(Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode
Or the image data of the static images or video obtained by image capture apparatus (such as camera) in image capture mode carries out
Reason.Treated, and picture frame may be displayed on display unit 106.Through graphics processor 1041, treated that picture frame can be deposited
Storage is sent in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike
Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042
Quiet down sound (audio data), and can be audio data by such acoustic processing.Audio that treated (voice) data can
To be converted to the format output that can be sent to mobile communication base station via radio frequency unit 101 in the case of telephone calling model.
Microphone 1042 can implement various types of noises elimination (or inhibition) algorithms and send and receive sound to eliminate (or inhibition)
The noise generated during frequency signal or interference.
Mobile terminal 100 further includes at least one sensor 105, such as optical sensor, motion sensor and other biographies
Sensor.Specifically, optical sensor includes 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 1061, and proximity sensor can close when mobile terminal 100 is moved in one's ear
Display panel 1061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (general
For three axis) size of acceleration, size and the direction of gravity are can detect that when static, can be used to identify the application of mobile phone posture
(such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.;
The fingerprint sensor that can also configure as mobile phone, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer,
The other sensors such as hygrometer, thermometer, infrared sensor, details are not described herein.
Display unit 106 is for showing information input by user or being supplied to the information of user.Display unit 106 can wrap
Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode may be used
Forms such as (0rganic Light-Emitting Diode, OLED) configure display panel 1061.
User input unit 107 can be used for receiving the number or character information of input, and generate the use with mobile terminal
Family is arranged and the related key signals input of function control.Specifically, user input unit 107 may include touch panel 1071 with
And other input equipments 1072.Touch panel 1071, also referred to as touch screen collect user on it or neighbouring touch operation
(for example user uses any suitable objects or attachment such as finger, stylus on touch panel 1071 or in touch panel 1071
Neighbouring operation), and corresponding attachment device is driven according to preset formula.Touch panel 1071 may include touch detection
Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band
The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it
It is converted into contact coordinate, then gives processor 110, and order that processor 110 is sent can be received and executed.In addition, can
To realize touch panel 1071 using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch panel
1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap
It includes but is not limited in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating lever etc.
It is one or more, do not limit herein specifically.
Further, touch panel 1071 can cover display panel 1061, when touch panel 1071 detect on it or
After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing
The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, touch panel 1071 and display panel
1061 be to realize the function that outputs and inputs of mobile terminal as two independent components, but in certain embodiments, can
The function that outputs and inputs of mobile terminal is realized so that touch panel 1071 and display panel 1061 is integrated, is not done herein specifically
It limits.
Interface unit 108 be used as at least one external device (ED) connect with mobile terminal 100 can by interface.For example,
External device (ED) may include wired or wireless headphone port, external power supply (or battery charger) port, wired or nothing
Line data port, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end
Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number
It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in mobile terminal 100 or can be with
For the transmission data between mobile terminal 100 and external device (ED).
Memory 109 can be used for storing software program and various data.Memory 109 can include mainly storing program area
And storage data field, wherein storing program area can storage program area, application program (such as the sound needed at least one function
Sound playing function, image player function etc.) etc.;Storage data field can store according to mobile phone use created data (such as
Audio data, phone directory etc.) etc..In addition, memory 109 may include high-speed random access memory, can also include non-easy
The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of mobile terminal, utilizes each of various interfaces and the entire mobile terminal of connection
A part by running or execute the software program and/or module that are stored in memory 109, and calls and is stored in storage
Data in device 109 execute the various functions and processing data of mobile terminal, to carry out integral monitoring to mobile terminal.Place
Reason device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated
Manage device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is main
Handle public transport expense quick payment.It is understood that above-mentioned modem processor can not also be integrated into processor
In 110.
Mobile terminal 100 can also include the power supply 111 (such as battery) powered to all parts, it is preferred that power supply 111
Can be logically contiguous by power-supply management system and processor 110, to realize management charging by power-supply management system, put
The functions such as electricity and power managed.
Although Fig. 1 is not shown, mobile terminal 100 can also be including bluetooth module etc., and details are not described herein.
Embodiment to facilitate the understanding of the present invention, below to the communications network system that is based on of mobile terminal of the present invention into
Row description.
Referring to Fig. 2, Fig. 2 is a kind of communications network system Organization Chart provided in an embodiment of the present invention, the communication network system
System is the LTE system of universal mobile communications technology, which includes communicating JE (User Equipment, the use of connection successively
Family equipment) (the lands Evolved UMTS Terrestrial Radio Access Network, evolved UMTS 201, E-UTRAN
Ground wireless access network) 202, EPC (Evolved Packet Core, evolved packet-based core networks) 203 and operator IP operation
204。
Specifically, UE201 can be above-mentioned terminal 100, and details are not described herein again.
E-UTRAN202 includes eNodeB2021 and other eNodeB2022 etc..Wherein, eNodeB2021 can be by returning
Journey (backhaul) (such as X2 interface) is connect with other eNodeB2022, and eNodeB2021 is connected to EPC203,
ENodeB2021 can provide the access of UE201 to EPC203.
EPC203 may include MME (Mobility Management Entity, mobility management entity) 2031, HSS
(Home Subscriber Server, home subscriber server) 2032, other MME2033, SGW (Serving Gate Way,
Gateway) 2034, PGW (PDN Gate Way, grouped data network gateway) 2035 and PCRF (Policy and
Charging Rules Function, policy and rate functional entity) 2036 etc..Wherein, MME2031 be processing UE201 and
The control node of signaling, provides carrying and connection management between EPC203.HSS2032 is all to manage for providing some registers
Such as the function of home location register (not shown) etc, and some are preserved in relation to use such as service features, data rates
The dedicated information in family.All customer data can be sent by SGW2034, and PGW2035 can provide the IP of UE 201
Address is distributed and other functions, and PCRF2036 is strategy and the charging control strategic decision-making of business data flow and IP bearing resources
Point, it selects and provides available strategy and charging control decision with charge execution function unit (not shown) for strategy.
IP operation 204 may include internet, Intranet, IMS (IP Multimedia Subsystem, IP multimedia
System) or other IP operations etc..
Although above-mentioned be described by taking LTE system as an example, those skilled in the art it is to be understood that the present invention not only
Suitable for LTE system, it is readily applicable to other public transport expense quick payment systems, such as GSM, CDMA2000,
WCDMA, TD-SCDMA and the following new network system etc., do not limit herein.
The each embodiment of the method for the present invention is proposed based on 100 hardware configuration of above-mentioned mobile terminal, communications network system.
Embodiment 1
As shown in figure 3, an embodiment of the present invention provides a kind of method that memory model calculates, it is applied to server, the party
Method includes the following steps:
S101, the terminal system that terminal uploads is received, is installed by Android virtual machine and runs the terminal system;
Specifically, multiple Android virtual machines are founded in server end, the Android is managed by a virtual machine management program
Virtual machine;A kind of terminal system of model is installed on each Android virtual machine, and applies journey described in dry run one
The corresponding daily record document of sequence.
Realize that a virtual machine management program is managed collectively each Android virtual machine in the server.Its administrative mechanism is root
The terminal models dispatched from the factory according to cell phone manufacturer install the terminal system of corresponding model in Android virtual machine, pass through virtual machine skill
Art ensures that its configuration is identical as the model terminal.Such as the check figure of CPU and dominant frequency, the size of memory etc..
Android virtual machine can allow you to simulate android system in the ends PC (on computer) installation and operation;And it can be in computer
End carries out the operation that can be carried out in substantially any terminal, or even computer can also be connected as mobile phone, and by mobile phone, assistant examines
It measures, the Android system of all official versions can be simulated.
S102, the analog subscriber login application program in the terminal system, and certainly according to the daily record document of the user
The dynamic operation application program;
The virtual machine management program extracts the daily record document of each application server using concurrent thread pond mode, will be automatic
Operation action is submitted in thread pool, by the thread pool United Dispatching, ensures that each Android virtual machine is saturated fortune simultaneously
The operational motion of each user of row.
The daily record document in application server is transferred and parsed to the server end, extracts to be not logged in and has been logged in each
Terminal models used by a user and operation note;According to log-on message, terminal models and operation note, it is sent to the peace
Tall and erect virtual machine corresponds in the terminal system of model and carries out automatic running.The operation note being not logged in directly is run, and has been logged in
Operation note realize that simulation logs in first, then automatic running, to ensure that the operation behavior that simulation logs in does not interfere with very
Real user calls the label that simulated operation can be added when application server interface, to ensure that the operation is nothing in operation
Trace is not saved in application server.Such as mobile phone model A-23, the account of logged-in user is nbj, then server
His all operation logs in the application server will be found according to this account, and its corresponding behaviour is parsed according to daily record
It acts, then finds the terminal system of the Android virtual machine where A-23 models, these operational motions are sent to the terminal
System, terminal system carry out automatic running according to the operational motion received.
To ensure that the terminal system efficiency of simulation, virtual machine management program extract each application by the way of concurrent thread pond
Be not logged in and the logged-in user operation note of server, the behavior of automatic running is submitted in thread pool, is united by thread pool
One scheduling, ensures the operational motion in each user of automatic running that each Android virtual machine can be saturated simultaneously.It services simultaneously
Device can be arranged the cycle of operation for each user, such as nearest 1 week or 1 month nearest.Server is run according to this
Period, the daily record in the correspondence time to extract the user in application server daily record parse.
Thread pool is a kind of multiple threads form, and task is added to queue in processing procedure, is then creating thread
Start these tasks automatically afterwards.Thread pool threads are all background threads.Per thread is all using the storehouse size of acquiescence, with acquiescence
Priority operation, and in the multiple thread units.If some thread is idle in Managed Code (as waited for some thing
Part), then thread pool will be inserted into another worker thread to make all processors keep busy.If all thread pool threads all begin
Eventually keep it is busy, but in queue comprising hang up work, then thread pool will create over time another worker thread but
The number of thread is more than never maximum value.Thread more than maximum value can be lined up, but they will wait until that other threads are complete
Cheng Houcai starts.Application program can have multiple threads, these threads need to take considerable time in dormant state to wait for
Event occurs.Other threads are only periodically waken up with repeating query change or more new state information, so possibly into sleep state
After be again introduced into dormant state.In order to simplify the management to these threads .NET frames provide a thread for each process
Pond, a thread pool have several to wait for mode of operation, and when the completion to be operated such as one, the worker thread in thread pool can be held
Row call back function.By system administration, programmer need not can concentrate one's energy to locate thread in thread pool arduously in thread management
Program task ought to be used.
S103, memory delta data is recorded using the Android virtual machine, is calculated and is obtained according to the memory delta data
The adaptation memory model of the user.
The Android virtual machine record includes call number, using duration, each area size of memory, space size, memory
Data block moves at least one of the memory delta data of number, memory headroom adjustment number;Server is according to the use
Data in each history cycle in family and find one with the data in the user's history period similar in user's use habit
Internal storage data block moves the number memory model minimum with number is adjusted, that is, is adapted to memory model.
As shown in figure 4, an embodiment of the present invention provides the method that another memory model calculates, this method includes following step
Suddenly:
S201, the terminal system that terminal uploads is received, is installed by Android virtual machine and runs the terminal system;
S202, the analog subscriber login application program in the terminal system, and certainly according to the daily record document of the user
The dynamic operation application program;
S203, memory delta data is recorded using the Android virtual machine, is calculated and is obtained according to the memory delta data
The adaptation memory model of the user;
S204, the terminal system that the adaptation memory model is pushed to counterpart terminal so that the terminal system
The application program is run after the user logs according to the adaptation memory model.
Server end is that be not logged in user and the logged-in user of each application program calculate current history cycle in real time
Adaptation memory model and be pushed to the terminal system;The terminal system parses be applied name and the adaptation memory mould
The adaptation memory model set is used corresponding application program by type.
Specifically, the format of push is { user name:XXX, application name:XXX, memory model:XXX }, client receives
After this data, be applied name and memory model are parsed, then will automatically be covered to memory model and use corresponding application, ensured
In the process of running, it is all minimum that internal storage data block, which moves number and memory headroom adjustment number, for the application.
Wherein, the method further includes:The server end is again institute according to the cyclically-varying of the daily record document
It states user and calculates acquisition adaptation memory model, the adaptation memory model after variation is pushed to the terminal system.
With the accumulation of application server daily record, the variation of user's operation behavior, server is calculated by each user
The adaptation memory model come may also can change, and when variation, which can be pushed to corresponding user by server in time,
Ensure that user can use at any time and arrive best memory model, obtains best application experience.
Embodiment 2
As shown in figure 5, a kind of memory model computing device hardware configuration provided in an embodiment of the present invention, specifically, described
Memory model computing device 30 includes at least processor 31, memory 32 and data/address bus 33.Data/address bus 33 for realizing
Connection communication between processor 31 and memory 32, memory 32 are used as a kind of computer readable storage medium, can store
At least one computer program, these computer programs read for processor 31, compile and execute, to realize corresponding place
Manage flow.In the present embodiment, memory 32 is used as a kind of computer readable storage medium, wherein being stored with memory model calculating
Program, which executes for processor 31, the step of to realize following memory model computational methods:
Terminal system is sent to server end, installed by Android virtual machine in the server end and runs the end
End system;
The analog subscriber login application program in the terminal system, and according to the daily record document automatic running of the user
The application program;
The Android virtual machine records memory delta data, and the server end is obtained according to memory delta data calculating
Obtain the adaptation memory model of the user;
The adaptation memory model is pushed to the corresponding terminal system by the server end, according in the adaptation
It deposits model and runs the application program after the user logs.
Wherein, the terminal system that will receive terminal upload, is installed by Android virtual machine and runs the terminal system
Step specifically includes:
Multiple Android virtual machines are founded, the Android virtual machine is managed by a virtual machine management program;
A kind of terminal system of model is installed on each Android virtual machine, and is applied described in dry run one
The corresponding daily record document of program.
Wherein, described to found multiple Android virtual machines, it is virtual that the Android is managed by a virtual machine management program
The step of machine further includes specifically:
The daily record document of each application server is extracted using concurrent thread pond mode by the virtual machine management program, it will
Automatic running behavior is submitted in thread pool, using the thread pool United Dispatching, ensures each Android virtual machine simultaneously
The operational motion of each user of saturation operation.
Wherein, the analog subscriber login application program in the terminal system, and certainly according to the daily record document of the user
Dynamic the step of running the application program, specifically includes:
Transfer and parse the daily record document in application server, extract be not logged in used in each logged-in user
Terminal models and operation note;
According to log-on message, terminal models and operation note, it is sent to the terminal system that the Android virtual machine corresponds to model
Automatic running is carried out in system.
Wherein, described to record memory delta data using the Android virtual machine, it is calculated according to the memory delta data
The step of adaptation memory model for obtaining the user, specifically includes:
Using the Android virtual machine record include call number, using duration, each area size of memory, space size,
Internal storage data block moves the memory delta data of number, memory headroom adjustment number;
An internal storage data block movement time is obtained according to the memory delta data in each history cycle of the user
Number with adjust number it is minimum be adapted to memory model.
Wherein, the terminal system that the adaptation memory model is pushed to counterpart terminal so that the terminal
The step of system runs the application program after the user logs according to the adaptation memory model specifically includes:
Be not logged in user and the logged-in user of each application program are calculated in real time in the adaptation of current history cycle
It deposits model and is pushed to the terminal system;So that the terminal system parses be applied name and the adaptation memory model,
The adaptation memory model set is used into corresponding application program.
Wherein, the method further includes:
According to the cyclically-varying of the daily record document, is calculated again for the user and obtain adaptation memory model, will become
The adaptation memory model after change is pushed to the terminal system.
Embodiment 3
Based on same inventive concept, another aspect of the present invention provides a kind of computer readable storage medium, the meter
Memory model calculation procedure is stored on calculation machine readable storage medium storing program for executing, it is real when the memory model calculation procedure is executed by processor
Now the step of following memory model computational methods:
Terminal system is sent to server end, installed by Android virtual machine in the server end and runs the end
End system;
The analog subscriber login application program in the terminal system, and according to the daily record document automatic running of the user
The application program;
The Android virtual machine records memory delta data, and the server end is obtained according to memory delta data calculating
Obtain the adaptation memory model of the user;
The adaptation memory model is pushed to the corresponding terminal system by the server end, according in the adaptation
It deposits model and runs the application program after the user logs.
Specifically, as shown in fig. 6, the detailed process of memory model calculation procedure is as follows:
It is established using virtualization software technologies in server end and executes one or more virtualization ring
Border so that multiple Android virtual machines are run on an end PC, so as to the Android system of the multiple terminals of dry run simultaneously;
Management for multiple Android virtual machine systems for convenience, is uniformly managed and is coordinated by a virtual machine management program;
Each terminal has the hardware environment difference such as different memory configurations, CPU processing capacities, used Android system
System also has different versions, moreover, be also equipped in each terminal multiple application programs such as apply A using B using C
Deng.What different application programs was still run by virtual machine technique on terminal installation system, it is carried out by virtual machine
The management of memory source, each application program all has different requirements for the calling of memory source.And same application
Program will also be called with different memory sources during different user's uses and be required, and therefore, memory model is to be directed to
Different terminals, different terminal systems, different application and different user.
The used terminal system of different terminals is installed in server end, simulates the behaviour of each user in different application
It acts, to obtain for the user in the adaptation memory mould using the application program in the terminal system of particular terminal
Type.For example, user 1 needs to obtain the corresponding adaptation memory models of application program A in terminal 1, need to pass through peace in server end
1 corresponding terminal system of tall and erect virtual machine android terminal, and application program A is run, it is right that user 1 is obtained from application server A
That answers applies daily record document, this can be the specific history cycle such as one week or one month using daily record document, from using day
Terminal models and the operational motion of user, on a virtual machine operation of the analog subscriber on application program A are obtained in will document
Action, by recording call number, moving number using duration, each area size of memory, space size, internal storage data block, interior
The memories delta data such as space allocation number is deposited, internal storage data block movement number is therefrom found and adjusts number at least interior
Deposit model, be exactly user 1 in terminal 1 using the adaptation memory model corresponding to application program A.
Server end need with each application server A B C establish data interaction, server end and each terminal
1,2,3 establish data interaction, application server A B the C and application program A in terminal 1,2,3 B C establish data friendship respectively
Mutually, the hardware parameters such as terminal models, memory, CPU and user in real day can be obtained to the virtual machine of server end
Will document, after user journal document changes, user can initiate new adaptation memory model request, to server end
Adaptation memory model is reacquired according to new user journal document, to ensure that user adopts when in terminal using application program
With adaptation memory model, user experience is promoted.
The method, apparatus and computer readable storage medium that the memory model of the application calculates, by a server end,
Multiple Android virtual machines and corresponding Virtual Machine Manager application program is arranged in server end, from the user journal of application server
Document parses user behavior, and United Dispatching Android virtual machine automatically, automatically in terminal system dry run user operation
Action calculates the adaptation memory model for analyzing each user and is pushed to terminal system used by a user, ensures that user makes
It is dropped at least with internal storage data block movement number when application program and memory headroom adjustment number, and then improves terminal system and answer
With the speed of service and fluency of program, mobile telephone power consumption is reduced, brings best application to experience to user.
It should be noted that herein, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that process, method, article or device including a series of elements include not only those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including this
There is also other identical elements in the process of element, method, article or device.
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical scheme of the present invention substantially in other words does the prior art
Going out the part of contribution can be expressed in the form of software products, which is stored in a storage medium
In (such as ROM/RAM, magnetic disc, CD), including some instructions are used so that a station terminal equipment (can be mobile phone, computer, clothes
Be engaged in device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
It these are only the preferred embodiment of the present invention, be not intended to limit the scope of the invention, it is every to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.