CN108549573B - Memory model calculation method and device and computer readable storage medium - Google Patents

Memory model calculation method and device and computer readable storage medium Download PDF

Info

Publication number
CN108549573B
CN108549573B CN201810310149.8A CN201810310149A CN108549573B CN 108549573 B CN108549573 B CN 108549573B CN 201810310149 A CN201810310149 A CN 201810310149A CN 108549573 B CN108549573 B CN 108549573B
Authority
CN
China
Prior art keywords
memory
user
terminal system
memory model
virtual machine
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
Application number
CN201810310149.8A
Other languages
Chinese (zh)
Other versions
CN108549573A (en
Inventor
倪秉炬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Changxing Semiconductor Technology Co ltd
Original Assignee
Guangdong Changxing Semiconductor Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Changxing Semiconductor Technology Co ltd filed Critical Guangdong Changxing Semiconductor Technology Co ltd
Priority to CN201810310149.8A priority Critical patent/CN108549573B/en
Publication of CN108549573A publication Critical patent/CN108549573A/en
Application granted granted Critical
Publication of CN108549573B publication Critical patent/CN108549573B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3608Software analysis for verifying properties of programs using formal methods, e.g. model checking, abstract interpretation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a memory model calculation method, a memory model calculation device and a computer readable storage medium, wherein the method comprises the following steps: receiving a terminal system uploaded by a terminal, and installing and operating the terminal system through an android virtual machine; simulating a user to log in an application program in the terminal system, and automatically operating the application program according to the log document of the user; recording memory change data by using the android virtual machine, and calculating to obtain an adaptive memory model of the user according to the memory change data; and pushing the adaptive memory model to the terminal system of the corresponding terminal, so that the terminal system runs the application program after the user logs in according to the adaptive memory model. The invention ensures that the moving times of the memory data blocks and the adjusting times of the memory space are reduced to the minimum when the user uses the application program, thereby improving the running speed and the smoothness of the terminal system and the application program, reducing the power consumption of the mobile phone and bringing the best application experience to the user.

Description

Memory model calculation method and device and computer readable storage medium
Technical Field
The present invention relates to the field of terminal system technologies, and in particular, to a method and an apparatus for computing a memory model, and a computer-readable storage medium.
Background
The Android system is an Iinux-based open source operating system; linux is an operating system developed using the standard C language; the android underlying driver and the operating system kernel are developed using C language and assembly. The android operating system is developed by using Java, and a local C language library is called by using JNI (Java native interface) to realize the bottom-layer scheduling of the operating system. android applications are developed using Java; meanwhile, C/C + + native development can be used; it is therefore essential that Java be the standard development language. android uses a modified JVM (Java virtual machine) called a Dalvik virtual machine, which is also a Java virtual machine in its nature. Therefore, a dalvik virtual machine, namely a linux process, is created for each APP. Namely, the Java program is operated based on a modified version of the Java virtual machine under linux. The Android system uses a DalvitualMachine (DVM) as a virtual machine, all application programs run in the Android system processes, and each process corresponds to a Dalvik virtual machine. The Dalvik virtual machines provide important functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like, and each has a complete instruction system.
Technologies required by a memory processing mechanism in a virtual machine of an Android system include marking and moving of memory data blocks, increase of insufficient memory space and the like. With the frequent use of the application programs, the memory data blocks need to be continuously moved from the new generation to the old generation, and when the memory space is insufficient, the memory data needs to be continuously copied and the memory space needs to be increased. Therefore, the efficiency of a memory adjusting mechanism is low, and the performance of the system is influenced by continuously moving memory data blocks; the application program may generate a stuck phenomenon; the situation that the memory space is insufficient may occur when the memory space is applied to be increased. Moreover, since the memory movement and the space increase are frequent, the power consumption of the system operation will be increased.
Disclosure of Invention
The invention mainly aims to provide a method and a device for calculating a memory model and a computer readable storage medium, and aims to solve the technical problems of unsmooth application program and high system power consumption caused by low efficiency of a memory adjusting mechanism in a virtual machine of the conventional terminal system.
In order to solve the above technical problem, the present invention provides a memory model calculation method, which is applied to a server, and comprises the following steps:
receiving a terminal system uploaded by a terminal, and installing and operating the terminal system through an android virtual machine;
simulating a user to log in an application program in the terminal system, and automatically operating the application program according to the log document of the user;
and recording memory change data by using the android virtual machine, and calculating to obtain the adaptive memory model of the user according to the memory change data.
Further, after the step of obtaining the adapted memory model of the user by calculating according to the memory change data, the method further includes:
and pushing the adaptive memory model to the terminal system of the corresponding terminal, so that the terminal system runs the application program after the user logs in according to the adaptive memory model.
Further, the step of installing and operating the terminal system uploaded by the receiving terminal through the android virtual machine specifically includes:
creating a plurality of android virtual machines, and managing the android virtual machines through a virtual machine management program;
and installing the terminal system with one type on each android virtual machine, and simulating and running a log document corresponding to the application program.
Further, the creating a plurality of the android virtual machines, and the step of managing the android virtual machines through a virtual machine management program specifically further includes:
extracting log documents of each application server by the virtual machine management program in a concurrent thread pool mode, submitting automatic operation behaviors to the thread pool, and uniformly scheduling by using the thread pool, and ensuring that the android virtual machines synchronously and saturation-run the operation actions of the users.
Further, the step of simulating a user to log in an application program in the terminal system and automatically running the application program according to the log document of the user specifically comprises:
calling and analyzing a log document in an application server, and extracting terminal models and operation records used by unregistered users and logged users;
and sending the login information, the terminal model and the operation record to a terminal system with a corresponding model of the android virtual machine for automatic operation.
Further, the step of recording memory change data by using the android virtual machine and obtaining the adaptive memory model of the user by calculating according to the memory change data specifically includes:
recording at least one of memory change data comprising calling times, using time, the size of each region of a memory, space size, memory data block moving times and memory space adjusting times by using the android virtual machine;
and obtaining an adaptive memory model with the least memory data block moving times and adjusting times according to the memory change data in each history period of the user.
Further, the step of pushing the adapted memory model to the terminal system of the corresponding terminal so that the terminal system runs the application program after the user logs in according to the adapted memory model specifically includes:
calculating an adaptive memory model of the current historical period in real time for the unregistered user and the logged user of each application program and pushing the adaptive memory model to the terminal system; so that the terminal system can analyze the application name and the adaptive memory model and apply the adaptive memory model to the corresponding application program.
Further, the method further comprises:
and according to the periodic change of the log document, calculating again for the user to obtain an adaptive memory model, and pushing the changed adaptive memory model to the terminal system.
Based on the same inventive concept, in another aspect of the present invention, a memory model calculation apparatus is provided, which includes a processor, a memory, and a data bus;
the data bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute a memory model calculation program stored in the memory to implement the following steps:
receiving a terminal system uploaded by a terminal, and installing and operating the terminal system through an android virtual machine;
simulating a user to log in an application program in the terminal system, and automatically operating the application program according to the log document of the user;
recording memory change data by using the android virtual machine, and calculating to obtain an adaptive memory model of the user according to the memory change data;
and pushing the adaptive memory model to the terminal system of the corresponding terminal, so that the terminal system runs the application program after the user logs in according to the adaptive memory model.
Based on the same inventive concept, another aspect of the present invention provides a computer-readable storage medium, on which a memory model calculation program is stored, and the memory model calculation program, when executed by a processor, implements the steps of the memory model calculation method described above.
The technical scheme of the invention has the beneficial effects that:
according to the memory model calculation method, the memory model calculation device and the computer readable storage medium, a plurality of android virtual machines and corresponding virtual machine management application programs are arranged at a server side through a server side, user behaviors are automatically analyzed from user log files of an application server, the android virtual machines are uniformly scheduled, operation actions of running users are automatically simulated in a terminal system, an adaptive memory model of each user is calculated and analyzed and pushed to the terminal system used by the user, the memory data block moving times and the memory space adjusting times are reduced to the minimum when the user uses the application programs, the running speed and the smoothness of the terminal system and the application programs are further improved, the power consumption of a mobile phone is reduced, and the best application experience is brought to the user.
Drawings
Fig. 1 is a schematic hardware configuration diagram of a mobile terminal implementing various embodiments of the present invention;
fig. 2 is a communication network system architecture diagram provided by an embodiment of the present invention;
fig. 3 is a flowchart of a memory model calculation method according to an embodiment of the present invention;
FIG. 4 is a block diagram of a flow chart of another memory model calculation method according to an embodiment of the present invention;
fig. 5 is a block diagram of an apparatus for calculating a memory model according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an operating state of a memory model computing device according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "part", or "unit" used to indicate elements are used only for facilitating the description of the present invention, and have no particular meaning in themselves. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (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, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with the network and other devices through quick payment of public transportation fees. The above-mentioned rapid payment of public transportation cost may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000 ), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex-Long Term Evolution), and TDD-LTE (Time Division duplex-Long Term Evolution), etc.
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the gesture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby integrally monitoring the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly processes an operating system, a user interface, an application program, etc., and a modem processor, which mainly processes a quick payment for public transportation fees. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module and the like, which will not be described in detail herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based is described below.
Referring to fig. 2, fig. 2 is an architecture diagram of a communication Network system according to an embodiment of the present invention, the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a JE (User Equipment) 201, an e-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an epc (Evolved Packet Core) 203, and an IP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 and other eNodeBs 2022, among others. Among them, the eNodeB2021 may be connected with other eNodeB2022 through backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 with access to the EPC 203.
The EPC203 may include an MME (Mobility Management Entity) 2031, an hss (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving gateway) 2034, a pgw (PDN gateway) 2035, and a PCRF (Policy and Charging Rules Function) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address allocation and other functions for UE201, PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present invention is not limited to the LTE system, but may also be applied to other quick payment systems for public transportation fees, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems, and the like.
The embodiments of the method of the present invention are proposed based on the hardware structure of the mobile terminal 100 and the communication network system.
Example 1
As shown in fig. 3, an embodiment of the present invention provides a memory model calculation method, applied to a server, where the method includes the following steps:
s101, receiving a terminal system uploaded by a terminal, and installing and operating the terminal system through an android virtual machine;
specifically, a plurality of android virtual machines are created at a server side, and the android virtual machines are managed through a virtual machine management program; and installing the terminal system of one type on each android virtual machine, and simulating to run a log document corresponding to the application program.
And a virtual machine management program is realized in the server to uniformly manage all the android virtual machines. The management mechanism is that according to the terminal model of a mobile phone manufacturer, a terminal system with a corresponding model is installed in an android virtual machine, and the configuration of the terminal system is ensured to be the same as that of the terminal with the model through the virtual machine technology. Such as the core number and main frequency of the CPU, the size of the memory, etc.
The Android virtual machine can enable a user to install and operate an Android simulation system on a PC (personal computer); the android system can be operated on almost any terminal at a computer end, and even can be connected with a computer like a mobile phone and detected by a mobile phone assistant, so that android systems of all official versions can be simulated.
S102, simulating a user to log in an application program in the terminal system, and automatically operating the application program according to a log document of the user;
the virtual machine management program extracts log files of all application servers in a concurrent thread pool mode, submits automatic operation behaviors to the thread pool, and the thread pool uniformly schedules the automatic operation behaviors to ensure that all the android virtual machines synchronously and saturation operate operation actions of all users.
The server side calls and analyzes log files in the application server and extracts terminal models and operation records used by unregistered users and logged users; and sending the login information, the terminal model and the operation record to a terminal system with a corresponding model of the android virtual machine for automatic operation. The method comprises the steps that the operation records which are not logged in are directly operated, the logged operation records are firstly subjected to simulated logging and then automatically operated, and in order to ensure that the operation behaviors of the simulated logging do not affect real users, a mark of the simulated operation is added when an application server interface is called in the operation process, so that the operation is traceless and is not stored in an application server. For example, the model of a mobile phone is A-23, the account number of a logged-in user is nbj, the server finds all operation logs of the logged-in user in the application server according to the account number, analyzes corresponding operation actions according to the logs, finds a terminal system of an android virtual machine where the model of A-23 is located, sends the operation actions to the terminal system, and the terminal system automatically runs according to the received operation actions.
In order to ensure the efficiency of a simulated terminal system, the virtual machine management program extracts the operation records of the unregistered users and the logged users of each application server in a concurrent thread pool mode, submits the automatically operated behaviors to the thread pool, and is uniformly scheduled by the thread pool, so that the operation actions of each user in the automatic operation, which can be saturated by each android virtual machine, can be ensured simultaneously. While the server may set a run period for each user, e.g. the last 1 week or the last 1 month. And the server extracts the logs in the corresponding time of the user in the application server logs according to the running period and analyzes the logs.
Thread pools are a form of multi-threaded processing in which tasks are added to a queue and then automatically started after a thread is created. The thread pool threads are all background threads. Each thread uses a default stack size, runs at a default priority, and is in a multi-threaded unit. If a thread is idle in managed code (e.g., is waiting for an event), the thread pool will insert another helper thread to keep all processors busy. If all thread pool threads remain busy all the time, but pending work is contained in the queue, the thread pool will create another helper thread after a period of time but the number of threads never exceeds the maximum. Threads that exceed the maximum value may be queued, but they wait until other threads are completed before starting. An application may have multiple threads that take a significant amount of time in a sleep state waiting for an event to occur. Other threads may enter a sleep state and only wake up periodically to round-robin changes or update state information and then enter a sleep state again. To simplify the management of these threads, the. NET framework provides a thread pool for each process, a thread pool having several wait states, and when a wait is completed, the helper thread in the thread pool executes the callback function. The threads in the thread pool are managed by the system, and a programmer does not need to be arduous with thread management and can concentrate on processing application tasks.
S103, recording memory change data by using the android virtual machine, and calculating to obtain an adaptive memory model of the user according to the memory change data.
The android virtual machine records at least one of the memory change data comprising calling times, using time, the size of each area of the memory, space size, memory data block moving times and memory space adjusting times; the server finds a memory model with the least memory data block moving times and adjusting times according to the data in each history period of the user and the data in the history period of the user similar to the using habit of the user, namely, the memory model is adapted.
As shown in fig. 4, an embodiment of the present invention provides another memory model calculation method, where the method includes the following steps:
s201, receiving a terminal system uploaded by a terminal, and installing and operating the terminal system through an android virtual machine;
s202, simulating a user to log in an application program in the terminal system, and automatically running the application program according to a log document of the user;
s203, recording memory change data by using the android virtual machine, and calculating to obtain an adaptive memory model of the user according to the memory change data;
s204, pushing the adaptive memory model to the terminal system of the corresponding terminal, so that the terminal system runs the application program after the user logs in according to the adaptive memory model.
The server side calculates an adaptive memory model of the current historical period in real time for the unregistered user and the logged user of each application program and pushes the adaptive memory model to the terminal system; and the terminal system analyzes the application name and the adaptive memory model to obtain the application name and the adaptive memory model, and applies the adaptive memory model to the corresponding application program.
Specifically, the format of the push is { user name: XXX, application name: XXX, memory model: XXX, after receiving the data, the client analyzes the data to obtain an application name and a memory model, and then automatically applies the memory model to the corresponding application, so that the number of times of moving the memory data block and the number of times of adjusting the memory space are minimum in the operation process of the application.
Wherein the method further comprises: and the server calculates again to obtain an adaptive memory model for the user according to the periodic change of the log document, and pushes the changed adaptive memory model to the terminal system.
Along with the accumulation of application server logs and the change of user operation behaviors, the adaptive memory model calculated by the server for each user may also change, and when the adaptive memory model changes, the server can push the model to the corresponding user in time, so that the user can use the optimal memory model at any time, and the optimal application experience is obtained.
Example 2
As shown in fig. 5, the hardware structure of the memory model calculating device 30 according to the embodiment of the present invention specifically includes at least a processor 31, a storage 32, and a data bus 33. The data bus 33 is used for implementing connection communication between the processor 31 and the memory 32, and the memory 32 is a computer-readable storage medium that can store at least one computer program, which can be read, compiled and executed by the processor 31, so as to implement the corresponding processing flow. In the present embodiment, the storage 32 is used as a computer-readable storage medium, in which a memory model calculation program is stored, and the program is executable by the processor 31, so as to implement the following steps of the memory model calculation method:
the method comprises the steps that a terminal system is sent to a server side, and the terminal system is installed and operated on the server side through an android virtual machine;
simulating a user to log in an application program in the terminal system, and automatically operating the application program according to the log document of the user;
the android virtual machine records memory change data, and the server side calculates and obtains an adaptive memory model of the user according to the memory change data;
and the server side pushes the adaptive memory model to the corresponding terminal system, and runs the application program after the user logs in according to the adaptive memory model.
The method specifically comprises the following steps of installing and operating a terminal system uploaded by a receiving terminal through an android virtual machine:
creating a plurality of android virtual machines, and managing the android virtual machines through a virtual machine management program;
and installing the terminal system with one type on each android virtual machine, and simulating and running a log document corresponding to the application program.
The creating a plurality of android virtual machines, and the step of managing the android virtual machines through a virtual machine management program specifically further includes:
and extracting log documents of each application server by the virtual machine management program in a concurrent thread pool mode, submitting automatic operation behaviors to the thread pool, and uniformly scheduling by using the thread pool to ensure that each android virtual machine simultaneously and saturation-operates the operation actions of each user.
The method comprises the following steps of simulating a user to log in an application program in the terminal system, and automatically running the application program according to a log document of the user:
calling and analyzing a log document in an application server, and extracting a terminal model and an operation record used by a user who does not log in and each logged in user;
and sending the login information, the terminal model and the operation record to a terminal system with a corresponding model of the android virtual machine for automatic operation.
The steps of recording memory change data by using the android virtual machine and obtaining the adaptive memory model of the user according to the memory change data through calculation specifically comprise:
recording the memory change data comprising calling times, using time, the size of each region of the memory, space size, the moving times of the memory data blocks and the adjusting times of the memory space by using the android virtual machine;
and obtaining an adaptive memory model with the least memory data block moving times and adjusting times according to the memory change data in each history period of the user.
The step of pushing the adapted memory model to the terminal system of the corresponding terminal so that the terminal system runs the application program after the user logs in according to the adapted memory model specifically includes:
calculating an adaptive memory model of the current historical period in real time for the unregistered user and the logged user of each application program and pushing the adaptive memory model to the terminal system; so that the terminal system can analyze the application name and the adaptive memory model and apply the adaptive memory model to the corresponding application program.
Wherein the method further comprises:
and according to the periodic change of the log document, calculating again for the user to obtain an adaptive memory model, and pushing the changed adaptive memory model to the terminal system.
Example 3
Based on the same inventive concept, another aspect of the present invention provides a computer-readable storage medium having a memory model calculation program stored thereon, the memory model calculation program, when executed by a processor, implementing the steps of the memory model calculation method as follows:
the method comprises the steps that a terminal system is sent to a server side, and the terminal system is installed and operated on the server side through an android virtual machine;
simulating a user to log in an application program in the terminal system, and automatically operating the application program according to the log document of the user;
the android virtual machine records memory change data, and the server side calculates and obtains an adaptive memory model of the user according to the memory change data;
and the server side pushes the adaptive memory model to the corresponding terminal system, and runs the application program after the user logs in according to the adaptive memory model.
Specifically, as shown in fig. 6, the specific process of the memory model calculation program is as follows:
establishing and executing one to more virtualization environments at a server side by adopting a virtualisation software technology, so that a plurality of android virtual machines are operated on one PC side, and an android system of a plurality of terminals can be simulated and operated at the same time; in order to facilitate the management of a plurality of android virtual machine systems, the management and coordination are uniformly carried out through a virtual machine management program;
each terminal has different hardware environment differences such as memory configuration, CPU processing capacity and the like, the adopted android system also has different versions, and each terminal is also provided with a plurality of application programs such as application A \ application B \ application C and the like. Different application programs are operated on a terminal installation system through a virtual machine technology, memory resources are managed through the virtual machine, and each application program has different requirements for calling the memory resources. And the same application program has different memory resource calling requirements in the use process of different users, so that the memory model is specific to different terminals, different terminal systems, different application programs and different users.
And installing terminal systems adopted by different terminals at a server end, and simulating the operation action of each user in different application programs so as to obtain an adaptive memory model of the user in the terminal system of a specific terminal by using the application program. For example, a user 1 in a terminal 1 needs to obtain an adaptive memory model corresponding to an application program a, needs to obtain an application log document corresponding to the user 1 from an application server a through a terminal system corresponding to an android terminal 1 of an android virtual machine at a server side and run the application program a, where the application log document may be a specific historical period such as a week or a month, obtains a terminal model and an operation action of the user from the application log document, simulates the operation action of the user on the application program a on the virtual machine, and finds a memory model with the minimum memory data block moving times and adjustment times by recording memory change data such as call times, use duration, sizes of regions of a memory, space sizes, memory data block moving times, memory space adjustment times and the like, that is, the user 1 uses the adaptive memory model corresponding to the application program a in the terminal 1.
The method comprises the steps that a server needs to establish data interaction with each application server A \ B \ C, the server establishes data interaction with each terminal 1, 2 and 3, the application server A \ B \ C and application programs A \ B \ C in the terminals 1, 2 and 3 respectively establish data interaction, so that a virtual machine of the server can acquire hardware parameters such as terminal models, memories and CPUs and acquire user log documents in real time, after the user log documents change, a user can initiate a new adaptive memory model request, the server acquires an adaptive memory model again according to the new user log documents, the user is guaranteed to adopt the adaptive memory model when using the application programs on the terminals, and user experience is improved.
According to the memory model calculation method, the memory model calculation device and the computer readable storage medium, a plurality of android virtual machines and corresponding virtual machine management application programs are arranged at a server side through the server side, user behaviors are automatically analyzed from user log files of the application server, the android virtual machines are uniformly scheduled, operation actions of running users are automatically simulated in a terminal system, adaptive memory models of all the users are calculated and analyzed, the adaptive memory models are pushed to the terminal system used by the users, the memory data block moving times and the memory space adjusting times are reduced to the minimum when the users use the application programs, the running speed and the smoothness of the terminal system and the application programs are further improved, the power consumption of a mobile phone is reduced, and the best application experience is brought to the users.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A memory model calculation method is applied to a server and is characterized by comprising the following steps:
receiving a terminal system uploaded by a terminal, and installing and operating the terminal system through an android virtual machine; creating a plurality of android virtual machines, and managing the android virtual machines through a virtual machine management program; installing the terminal system of one type on each android virtual machine, and simulating to run a log document corresponding to an application program; extracting log documents of each application server by the virtual machine management program in a concurrent thread pool mode, submitting automatic operation behaviors to the thread pool, and uniformly scheduling by using the thread pool to ensure that each android virtual machine simultaneously and saturation-operates operation actions of each user;
simulating a user to log in an application program in the terminal system, and automatically operating the application program according to the log document of the user;
and recording memory change data by using the android virtual machine, and calculating to obtain the adaptive memory model of the user according to the memory change data.
2. The method for computing a memory model according to claim 1, wherein after the step of computing and obtaining the adapted memory model of the user according to the memory change data, the method further comprises:
and pushing the adaptive memory model to the terminal system of the corresponding terminal, so that the terminal system runs the application program after the user logs in according to the adaptive memory model.
3. The method according to claim 1, wherein the step of simulating a user to log in an application program in the terminal system and automatically running the application program according to the user log file specifically comprises:
calling and analyzing a log document in an application server, and extracting terminal models and operation records used by unregistered users and logged users;
and sending the login information, the terminal model and the operation record to a terminal system with a corresponding model of the android virtual machine for automatic operation.
4. The method according to claim 1, wherein the step of recording memory change data by using the android virtual machine and obtaining the memory model adapted to the user by calculation according to the memory change data specifically comprises:
recording at least one of memory change data comprising calling times, using time, the size of each region of a memory, space size, memory data block moving times and memory space adjusting times by using the android virtual machine;
and obtaining an adaptive memory model with the least memory data block moving times and adjusting times according to the memory change data in each history period of the user.
5. The method according to claim 2, wherein the step of pushing the adapted memory model to the terminal system of the corresponding terminal so that the terminal system runs the application program after the user logs in according to the adapted memory model specifically comprises:
calculating an adaptive memory model of the current historical period in real time for the unregistered user and the logged user of each application program and pushing the adaptive memory model to the terminal system; so that the terminal system can analyze the application name and the adaptive memory model and apply the adaptive memory model to the corresponding application program.
6. The method of claim 1, further comprising:
and according to the periodic change of the log document, calculating again for the user to obtain an adaptive memory model, and pushing the changed adaptive memory model to the terminal system.
7. The memory model calculation device is characterized by comprising a processor, a memory and a data bus;
the data bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute a memory model calculation program stored in the memory to implement the following steps:
receiving a terminal system uploaded by a terminal, and installing and operating the terminal system through an android virtual machine; creating a plurality of android virtual machines, and managing the android virtual machines through a virtual machine management program; installing the terminal system of one type on each android virtual machine, and simulating to run a log document corresponding to an application program; extracting log documents of each application server by the virtual machine management program in a concurrent thread pool mode, submitting automatic operation behaviors to the thread pool, and uniformly scheduling by using the thread pool to ensure that each android virtual machine simultaneously and saturation-operates operation actions of each user;
simulating a user to log in an application program in the terminal system, and automatically operating the application program according to the log document of the user;
recording memory change data by using the android virtual machine, and calculating to obtain an adaptive memory model of the user according to the memory change data;
and pushing the adaptive memory model to the terminal system of the corresponding terminal, so that the terminal system runs the application program after the user logs in according to the adaptive memory model.
8. A computer-readable storage medium, having stored thereon a memory model calculation program, which when executed by a processor implements the steps of the memory model calculation method according to any one of claims 1 to 6.
CN201810310149.8A 2018-04-09 2018-04-09 Memory model calculation method and device and computer readable storage medium Active CN108549573B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810310149.8A CN108549573B (en) 2018-04-09 2018-04-09 Memory model calculation method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810310149.8A CN108549573B (en) 2018-04-09 2018-04-09 Memory model calculation method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108549573A CN108549573A (en) 2018-09-18
CN108549573B true CN108549573B (en) 2022-10-25

Family

ID=63514284

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810310149.8A Active CN108549573B (en) 2018-04-09 2018-04-09 Memory model calculation method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108549573B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109697090B (en) * 2018-12-27 2022-10-11 Oppo广东移动通信有限公司 Method for controlling terminal equipment, terminal equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331372A (en) * 2014-11-27 2015-02-04 北京奇艺世纪科技有限公司 Method and device for performing remote problem positioning on application program
CN104753996A (en) * 2013-12-30 2015-07-01 比亚迪股份有限公司 Remote hosting system, method and device for mobile terminal
CN106502768A (en) * 2016-09-22 2017-03-15 南京酷派软件技术有限公司 A kind of applied program processing method, device, terminal and server
CN106528216A (en) * 2016-10-26 2017-03-22 深圳市金立通信设备有限公司 Method for starting application and terminal
CN107357656A (en) * 2017-06-27 2017-11-17 努比亚技术有限公司 A kind of memory allocation method, mobile terminal and computer-readable recording medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11082490B2 (en) * 2012-11-28 2021-08-03 Nvidia Corporation Method and apparatus for execution of applications in a cloud system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104753996A (en) * 2013-12-30 2015-07-01 比亚迪股份有限公司 Remote hosting system, method and device for mobile terminal
CN104331372A (en) * 2014-11-27 2015-02-04 北京奇艺世纪科技有限公司 Method and device for performing remote problem positioning on application program
CN106502768A (en) * 2016-09-22 2017-03-15 南京酷派软件技术有限公司 A kind of applied program processing method, device, terminal and server
CN106528216A (en) * 2016-10-26 2017-03-22 深圳市金立通信设备有限公司 Method for starting application and terminal
CN107357656A (en) * 2017-06-27 2017-11-17 努比亚技术有限公司 A kind of memory allocation method, mobile terminal and computer-readable recording medium

Also Published As

Publication number Publication date
CN108549573A (en) 2018-09-18

Similar Documents

Publication Publication Date Title
CN107276789B (en) Log uploading method and device and computer readable storage medium
CN107357656B (en) Memory allocation method, mobile terminal and computer readable storage medium
CN107153583B (en) Cross-process interaction processing method, mobile terminal and computer readable storage medium
CN107861817B (en) Thread blocking-based memory optimization method, mobile terminal and readable storage medium
CN107590057B (en) Screen freezing monitoring and solving method, mobile terminal and computer readable storage medium
CN107179950B (en) Application process processing method, mobile terminal and computer readable storage medium
CN109857403B (en) Page updating method and device, page processing method and device
WO2015035870A1 (en) Multiple cpu scheduling method and device
WO2018077041A1 (en) Method and apparatus for running application
CN107729125B (en) Management method for resident application program in background and mobile terminal
CN107402813B (en) Resource allocation method, mobile terminal and computer readable storage medium
WO2017206915A1 (en) Method for determining kernel running configuration in processor and related product
CN111143727A (en) Page loading method and electronic equipment
CN107911418B (en) Application trial control method, server and computer readable storage medium
CN107247617B (en) Virtual machine resource allocation method, trial platform and readable storage medium
CN109165651A (en) A kind of identification code recognition methods, terminal and computer readable storage medium
CN107688497B (en) Memory regulation and control method, equipment and computer readable storage medium
CN107229470B (en) System font switching method, mobile terminal and computer readable storage medium
CN110418004A (en) Screenshot processing method, terminal and computer readable storage medium
CN111338745A (en) Deployment method and device of virtual machine and intelligent equipment
CN107818036B (en) Black screen detection method, mobile terminal and computer readable storage medium
CN108549573B (en) Memory model calculation method and device and computer readable storage medium
CN107153551B (en) Font switching method, mobile terminal and computer readable storage medium
US11150913B2 (en) Method, device, and terminal for accelerating startup of application
CN106919458B (en) Method and device for Hook target kernel function

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20220929

Address after: 523000 rooms 101, 201 and 301, building 2, No. 2, Keji 9 Road, Songshanhu Park, Dongguan City, Guangdong Province

Applicant after: Guangdong Changxing Semiconductor Technology Co.,Ltd.

Address before: 518000 6-8 / F, 10-11 / F, 6 / F, 6-10 / F, C zone, Han's innovation building, No. 9018, Beihuan Avenue, high tech Zone, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: NUBIA TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A calculation method, device, and computer-readable storage medium for a memory model

Granted publication date: 20221025

Pledgee: China Co. truction Bank Corp Dongguan branch

Pledgor: Guangdong Changxing Semiconductor Technology Co.,Ltd.

Registration number: Y2024980010986