CN107145392A - A kind of method and apparatus of memory optimization - Google Patents

A kind of method and apparatus of memory optimization Download PDF

Info

Publication number
CN107145392A
CN107145392A CN201710284009.3A CN201710284009A CN107145392A CN 107145392 A CN107145392 A CN 107145392A CN 201710284009 A CN201710284009 A CN 201710284009A CN 107145392 A CN107145392 A CN 107145392A
Authority
CN
China
Prior art keywords
application
class
destination
dereferenced
target
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.)
Pending
Application number
CN201710284009.3A
Other languages
Chinese (zh)
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.)
Nubia Technology Co Ltd
Original Assignee
Nubia 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201710284009.3A priority Critical patent/CN107145392A/en
Publication of CN107145392A publication Critical patent/CN107145392A/en
Pending legal-status Critical Current

Links

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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources

Abstract

The invention discloses a kind of method of memory optimization, applied to mobile terminal, object listing is previously stored with the mobile terminal, methods described includes:According to the object listing, the dereferenced application of intended application is obtained;According to first object resource utilization in the destination OS, remove the second target resource of the application of dereferenced described in the destination OS, wherein, the one or more that the first object resource includes but is not limited in the CPU in the destination OS, internal memory, disk input and output, network request, second target resource is the resource produced by the dereferenced application is operated in the destination OS.The invention also discloses a kind of equipment of memory optimization and a kind of computer-readable recording medium, it is purged the resource that dereferenced application takes, so as to optimize the internal memory of mobile terminal, the response speed of mobile terminal is improved, so as to improve the Consumer's Experience of mobile terminal.

Description

A kind of method and apparatus of memory optimization
Technical field
The present invention relates to internal memory optimization technical field, more particularly to a kind of method and apparatus of memory optimization.
Background technology
At present, with the development of the communications industry, increasing people uses mobile terminal, and has turned into people live one Part, for example, mobile phone, flat board etc., because user is very high using viscosity, so the sound that general user applies to mobile terminal Answer rate request all relatively good, it is desirable to application energy real-time response, but generally user is mounted with more application on mobile terminals Or more application is opened simultaneously, at this moment it is likely to occur in the case of limited internal memory and is asked using toggle speed is slack-off etc. Topic.
If improving the speed of service of mobile terminal, to optimize its internal memory, often by manual mode deletion portion Divide application;And the shortcoming of prior art is, gone again when user thinks that running of mobile terminal goes wrong in progress manually Deposit cleaning, the very big reaction that mobile terminal now occurs is slower, and period of reservation of number is longer, cause the experience of user compared with Difference.
Therefore, it is necessary to provide a kind of automatic technology for optimizing internal memory, to optimize the internal memory of mobile terminal, improve and move The response speed of dynamic terminal, so as to improve the user experience of mobile terminal.
The content of the invention
It is a primary object of the present invention to propose a kind of method and apparatus of memory optimization, it is intended to solve existing mobile terminal Cause terminal operating slower because operation application is more, and the topic of automatic cleaning internal memory can not be carried out.
To achieve the above object, the present invention proposes a kind of method of memory optimization, applied to mobile terminal, described mobile whole Object listing is previously stored with end, wherein, record has the non-pass of intended application in the mobile terminal in the object listing Connection application, methods described includes:
According to the object listing, the dereferenced application of intended application is obtained, wherein, the dereferenced, which is applied, is:It is described The application that intended application can not be called in destination OS running, the destination OS is the mobile terminal The system of operation;
According to first object resource utilization in the destination OS, remove non-described in the destination OS Second target resource of associated application, wherein, the first object resource includes but is not limited in the destination OS One or more in CPU, internal memory, disk input and output, network request, second target resource should for the dereferenced With the resource produced by operating in the destination OS.
Optionally, the dereferenced application of the intended application is determined, including:
Obtain the class that the intended application is loaded in the destination OS, and the corresponding target of each class Data, wherein, the target data is the corresponding code segment of each class and data segment;
According to the class and the corresponding target data of each class loaded, obtain unconnected to the intended application non- Associated application;
By dereferenced application record in the object listing.
Optionally, it is described according to the class loaded and the corresponding target data of each class, obtain and the intended application Unconnected dereferenced application, including:
, should by scanning destination application component and target according to the target data of each class in the class loaded Program assembly return value is used, first object component class is obtained;
By the destination application component and destination application that scan the first application in the destination OS Component return value, obtain the second target element class, wherein, it is described first application in addition to the intended application it is any should With;
Judge whether the first object component class and the second target element class are identical;
If not, determining dereferenced application of first application for the intended application;
Or,
According to the target data of each class in the class loaded, taken by scanning destination application component and binding Business, obtains the 3rd target element class;
By scanning the destination application component of the second application and binding service in the destination OS, obtain The 4th target element class is taken, wherein, second application is any application in addition to the intended application;
Judge whether the 3rd target element class and the 3rd target element class are identical, and second application is The no system service for the destination OS;
If not, determining dereferenced application of second application for the intended application;
Or,
According to the target data of each class in the class loaded, have by scanning the unordered broadcast of intended application, application program Sequence is broadcasted and application program viscosity broadcast, obtains the 5th target element class;
Scan in the destination OS the unordered broadcast of application program of the 3rd application, application program ordered broadcast, with And application program viscosity broadcast, the 6th target element class is obtained, wherein, the 3rd application is in addition to the intended application Any application;
Judge whether the 5th target element class and the 6th target element class are identical;
If not, determining the described 3rd with the dereferenced application for the intended application;
Or,
According to the target data of each class in the class loaded, by scanning the Context resolution object of the intended application, Distinguish corresponding first parameter URL in acquisition inquiry, deletion, increase, renewal;
By scanning the scans content analysis object of the 4th application in the destination OS, inquiry is obtained, deletes, increase Plus, update in respectively corresponding second parameter URL, wherein, it is described 3rd application in addition to the intended application it is any should With;
Judge whether the first parameter URL and the second parameter URL are identical;
If not, determining dereferenced application of the 4th application for the intended application.
Optionally, the object listing is:Hash map structural table.
Optionally, methods described also includes:
Recorded in the hash map structural table and mark second target resource.
A kind of method of the memory optimization provided compared to prior art, the present invention, it is non-by what is recorded in object listing Associated application, in the first object utilization rate in destination OS, removes the second target resource of dereferenced application, from And reach the resource utilization automatically according to destination OS to clear up dereferenced using shared resource, so as to optimize shifting The internal memory of dynamic terminal, improves the response speed of mobile terminal, so as to improve the Consumer's Experience of mobile terminal.Therefore, it is possible to solve In the prior art when user artificially realize destination OS operation relatively it is slow go to carry out application program manually again to clear up can cause use The problem of family experience is poor.
In addition, to achieve the above object, the present invention also proposes a kind of equipment of memory optimization, applied to mobile terminal, institute Stating the equipment of memory optimization includes:Memory, processor and communication bus;
The communication bus is used to realize the connection communication between processor and memory;
The processor is used to perform memory optimization program, to realize following steps:
According to the object listing, the dereferenced application of intended application is obtained, the dereferenced, which is applied, is:The target should The application that can not be called in destination OS running;
According to first object resource utilization in the destination OS, remove non-described in the destination OS Second target resource of associated application, wherein, the first object resource includes but is not limited in the destination OS One or more in CPU, internal memory, disk input and output, network request, second target resource should for the dereferenced With the resource produced by operating in the destination OS.
Optionally, the processor is used to perform memory optimization program, to realize following steps:
Obtain the class that the intended application is loaded in the destination OS, and the corresponding target of each class Data, wherein, the target data is the corresponding code segment of each class and data segment;
According to the class and the corresponding target data of each class loaded, obtain unconnected to the intended application non- Associated application;
By dereferenced application record in the object listing.
Optionally, the processor is used to perform memory optimization program, to realize following steps:
, should by scanning destination application component and target according to the target data of each class in the class loaded Program assembly return value is used, first object component class is obtained;
By the destination application component and destination application that scan the first application in the destination OS Component return value, obtain the second target element class, wherein, it is described first application in addition to the intended application it is any should With;
Judge whether the first object component class and the second target element class are identical;
If not, determining dereferenced application of first application for the intended application;
Or,
According to the target data of each class in the class loaded, taken by scanning destination application component and binding Business, obtains the 3rd target element class;
By scanning the destination application component of the second application and binding service in the destination OS, obtain The 4th target element class is taken, wherein, second application is any application in addition to the intended application;
Judge whether the 3rd target element class and the 3rd target element class are identical, and second application is The no system service for the destination OS;
If not, determining dereferenced application of second application for the intended application;
Or,
According to the target data of each class in the class loaded, have by scanning the unordered broadcast of intended application, application program Sequence is broadcasted and application program viscosity broadcast, obtains the 5th target element class;
Scan in the destination OS the unordered broadcast of application program of the 3rd application, application program ordered broadcast, with And application program viscosity broadcast, the 6th target element class is obtained, wherein, the 3rd application is in addition to the intended application Any application;
Judge whether the 5th target element class and the 6th target element class are identical;
If not, determining the described 3rd with the dereferenced application for the intended application;
Or,
According to the target data of each class in the class loaded, by scanning the Context resolution object of the intended application, Distinguish corresponding first parameter URL in acquisition inquiry, deletion, increase, renewal;
By scanning the scans content analysis object of the 4th application in the destination OS, inquiry is obtained, deletes, increase Plus, update in respectively corresponding second parameter URL, wherein, it is described 3rd application in addition to the intended application it is any should With;
Judge whether the first parameter URL and the second parameter URL are identical;
If not, determining dereferenced application of the 4th application for the intended application.
Optionally, the object listing is:Hash map structural table.
Optionally, the processor is additionally operable to perform memory optimization program, to realize following steps:
Recorded in the hash map structural table and mark second target resource.
A kind of equipment of the memory optimization provided compared to prior art, the present invention, it is non-by what is recorded in object listing Associated application, in the first object utilization rate in destination OS, removes the second target resource of dereferenced application, from And reach the resource utilization automatically according to destination OS to clear up dereferenced using shared resource, so as to optimize shifting The internal memory of dynamic terminal, improves the response speed of mobile terminal, so as to improve the Consumer's Experience of mobile terminal.Therefore, it is possible to solve In the prior art when user artificially realize destination OS operation relatively it is slow go to carry out application program manually again to clear up can cause use The problem of family experience is poor.
In addition, to achieve the above object, the present invention also proposes a kind of computer-readable recording medium, applied to mobile whole End, the computer-readable recording medium storage has one or more program, and one or more of programs can be by one Or multiple computing devices, to realize following steps:
According to the object listing, the dereferenced application of intended application is obtained, wherein, the dereferenced, which is applied, is:It is described The application that intended application can not be called in destination OS running, the destination OS is the mobile terminal The system of operation;
According to first object resource utilization in the destination OS, remove non-described in the destination OS Second target resource of associated application, wherein, the first object resource includes but is not limited in the destination OS One or more in CPU, internal memory, disk input and output, network request, second target resource should for the dereferenced With the resource produced by operating in the destination OS.
Optionally, one or more of programs are by one or more of computing devices, to realize following step Suddenly:
Obtain the class that the intended application is loaded in the destination OS, and the corresponding target of each class Data, wherein, the target data is the corresponding code segment of each class and data segment;
According to the class and the corresponding target data of each class loaded, obtain unconnected to the intended application non- Associated application;
By dereferenced application record in the object listing.
Optionally, one or more of programs are by one or more of computing devices, to realize following step Suddenly
, should by scanning destination application component and target according to the target data of each class in the class loaded Program assembly return value is used, first object component class is obtained;
By the destination application component and destination application that scan the first application in the destination OS Component return value, obtain the second target element class, wherein, it is described first application in addition to the intended application it is any should With;
Judge whether the first object component class and the second target element class are identical;
If not, determining dereferenced application of first application for the intended application;
Or,
According to the target data of each class in the class loaded, taken by scanning destination application component and binding Business, obtains the 3rd target element class;
By scanning the destination application component of the second application and binding service in the destination OS, obtain The 4th target element class is taken, wherein, second application is any application in addition to the intended application;
Judge whether the 3rd target element class and the 3rd target element class are identical, and second application is The no system service for the destination OS;
If not, determining dereferenced application of second application for the intended application;
Or,
According to the target data of each class in the class loaded, have by scanning the unordered broadcast of intended application, application program Sequence is broadcasted and application program viscosity broadcast, obtains the 5th target element class;
Scan in the destination OS the unordered broadcast of application program of the 3rd application, application program ordered broadcast, with And application program viscosity broadcast, the 6th target element class is obtained, wherein, the 3rd application is in addition to the intended application Any application;
Judge whether the 5th target element class and the 6th target element class are identical;
If not, determining the described 3rd with the dereferenced application for the intended application;
Or,
According to the target data of each class in the class loaded, by scanning the Context resolution object of the intended application, Distinguish corresponding first parameter URL in acquisition inquiry, deletion, increase, renewal;
By scanning the scans content analysis object of the 4th application in the destination OS, inquiry is obtained, deletes, increase Plus, update in respectively corresponding second parameter URL, wherein, it is described 3rd application in addition to the intended application it is any should With;
Judge whether the first parameter URL and the second parameter URL are identical;
If not, determining dereferenced application of the 4th application for the intended application.
Optionally, the object listing is:Hash map structural table.
Optionally, one or more of programs are following to realize also by one or more of computing devices Step
Recorded in the hash map structural table and mark second target resource.
A kind of computer-readable recording medium provided compared to prior art, the present invention, by being recorded in object listing Dereferenced application, in the first object utilization rate in destination OS, remove the second target money of dereferenced application Source, so that reach the resource utilization automatically according to destination OS to clear up dereferenced using shared resource, so that Optimize the internal memory of mobile terminal, the response speed of mobile terminal is improved, so as to improve the Consumer's Experience of mobile terminal.Accordingly, it is capable to It is enough to solve to go to carry out application program cleaning meeting manually again when user artificially realizes that destination OS operation is relatively slow in the prior art Cause the problem of Consumer's Experience is poor.
Brief description of the drawings
Fig. 1 is the hardware architecture diagram for an optional mobile terminal for realizing each embodiment of the invention;
Fig. 2 is the wireless communication system schematic diagram of mobile terminal as shown in Figure 1;
Fig. 3 is the schematic flow sheet of memory optimization method of the present invention;
Fig. 4 is dereferenced application resource removing prompting figure in mobile terminal of the present invention;
Fig. 5 is one embodiment of Memory Optimize Method provided in an embodiment of the present invention;
Fig. 6 is the module diagram of memory optimization equipment of the present invention;
Fig. 7 is computer-readable recording medium module diagram of the present invention.
Reference:
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
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 follow-up description, the suffix using such as " module ", " part " or " unit " for representing element is only Be conducive to the explanation of the present invention, itself there is no a specific meaning.Therefore, " module ", " part " or " unit " can be mixed Ground is used.
Terminal can be implemented in a variety of manners.For example, the terminal described in the present invention can include such as mobile phone, flat board Computer, notebook computer, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable Media player (Portable Media Player, PMP), guider, wearable device, Intelligent bracelet, pedometer etc. are moved Move the fixed terminals such as terminal, and numeral TV, desktop computer.
It will be illustrated in subsequent descriptions by taking mobile terminal as an example, it will be appreciated by those skilled in the art that except special Outside 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, its hardware architecture diagram for a kind of mobile terminal of realization each embodiment of the invention, the shifting Dynamic terminal 100 can include:RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit 103rd, A/V (audio/video) input block 104, sensor 105, display unit 106, user input unit 107, interface unit 108th, the part 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 can be included than illustrating more or less parts, Either combine some parts or different parts 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, the reception and transmission of signal, specifically, by base station Downlink information receive after, handled to processor 110;In addition, up data are sent into base station.Generally, 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 radio communication with network and other equipment.Above-mentioned radio communication can use any communication Standard or agreement, including but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code Division Multiple Access 2000, CDMA 2000), WCDMA (Wideband Code Division Multiple Access, WCDMA), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, FDD 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's transmitting-receiving electricity by WiFi module 102 Sub- mail, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and accessed.Although Fig. 1 shows Go out WiFi module 102, but it is understood that, it is simultaneously not belonging to must be configured into for mobile terminal, completely can be according to need To be omitted in the essential scope for do not change invention.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 1 00 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 voice data stored in memory 109 is converted into audio signal and is output as sound.Moreover, audio output unit 103 The audio output related to the specific function that mobile terminal 1 00 is performed can also be provided (for example, call signal receives sound, disappeared Breath receives sound etc.).Audio output unit 103 can include loudspeaker, buzzer etc..
A/V input blocks 104 are used to receive audio or video signal.A/V input blocks 104 can include graphics processor (Graphics Processing Unit, GPU) 1041 and microphone 1042,1041 pairs of graphics processor is in video acquisition mode Or the view data progress of the static images or video obtained in image capture mode by image capture apparatus (such as camera) Reason.Picture frame after processing may be displayed on display unit 106.Picture frame after being handled through graphics processor 1041 can be deposited Storage is transmitted 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 (voice data), and can be voice data by such acoustic processing.Audio (voice) data after processing can To be converted to the form output that mobile communication base station can be sent to via radio frequency unit 101 in the case of telephone calling model. Microphone 1042 can implement various types of noises and eliminate (or suppression) algorithm to eliminate (or suppression) in reception and send sound The noise produced during frequency signal or interference.
Mobile terminal 1 00 also 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 transducer, wherein, ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 1061, and proximity transducer can close when mobile terminal 1 00 is moved in one's ear Display panel 1061 and/or backlight.As one kind of motion sensor, accelerometer sensor can detect in all directions (general For three axles) size of acceleration, size and the direction of gravity are can detect that when static, the application available for identification 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 ray sensor, will not be repeated here.
Display unit 106 is used for the information for showing the information inputted by user or being supplied to user.Display unit 106 can be wrapped Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configures display panel 1061.
User input unit 107 can be used for the numeral or character information for receiving input, and produce the use with mobile terminal The key signals input that family is set and function control is relevant.Specifically, user input unit 107 may include contact panel 1071 with And other input equipments 1072.Contact panel 1071, also referred to as touch-screen, collect touch operation of the user on or near it (such as user is using any suitable objects such as finger, stylus or annex on contact panel 1071 or in contact panel 1071 Neighbouring operation), and corresponding attachment means are driven according to formula set in advance.Contact panel 1071 may include touch detection Two parts of device and touch controller.Wherein, touch detecting apparatus detects the touch orientation of user, and detects 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 the order sent of reception processing device 110 and can be performed.In addition, can To realize contact panel 1071 using polytypes such as resistance-type, condenser type, infrared ray and surface acoustic waves.Except contact panel 1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can be wrapped Include but be not limited to physical keyboard, in function key (such as volume control button, switch key etc.), trace ball, mouse, action bars etc. One or more, do not limit herein specifically.
Further, contact panel 1071 can cover display panel 1061, detect thereon when contact panel 1071 or After neighbouring touch operation, processor 110 is sent to determine the type of touch event, with preprocessor 110 according to touch thing The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, contact panel 1071 and display panel 1061 be input and the output function that mobile terminal is realized as two independent parts, but in certain embodiments, can By contact panel 1071 and the input that is integrated and realizing mobile terminal of display panel 1061 and output function, not do specifically herein Limit.
Interface unit 108 is connected the interface that can pass through as at least one external device (ED) with mobile terminal 1 00.For example, External device (ED) can include wired or wireless head-band earphone port, external power source (or battery charger) port, wired or nothing Line FPDP, 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 1 00 or can be with For transmitting data between mobile terminal 1 00 and external device (ED).
Memory 109 can be used for storage software program and various data.Memory 109 can mainly include storing program area And storage data field, wherein, application program (the such as sound that storing program area can be needed for storage program area, at least one function Sound playing function, image player function etc.) etc.;Storage data field can be stored uses created data (such as according to mobile phone Voice data, phone directory etc.) etc..In addition, memory 109 can include high-speed random access memory, it can also include non-easy The property lost memory, for example, at least one 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 whole mobile terminal of connection Individual part, by operation or performs and is stored in software program and/or module in memory 109, and calls and be stored in storage Data in device 109, perform the various functions and processing data of mobile terminal, so as to carry out integral monitoring to mobile terminal.Place Reason device 110 may include one or more processing units;It is preferred that, processor 110 can integrated application processor and modulatedemodulate mediate Device is managed, wherein, application processor mainly handles operating system, user interface and application program etc., and modem processor is main Handle radio communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Mobile terminal 1 00 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, so as to realize management charging by power-supply management system, put The function such as electricity and power managed.
Although Fig. 1 is not shown, mobile terminal 1 00 can also will not be repeated here including bluetooth module etc..
For the ease of understanding the embodiment of the present invention, the communications network system that the mobile terminal of the present invention is based on is entered below 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 Unite as the LTE system of universal mobile communications technology, UE (User Equipment, use of the LTE system including communicating connection successively Family equipment) 201, E-UTRAN (Evolved UMTS Terrestrial Radio Access Network, evolved UMTS lands 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 here is omitted.
E-UTRAN202 includes eNodeB2021 and other eNodeB2022 etc..Wherein, eNodeB2021 can be by returning Journey (backhaul) (such as X2 interface) is connected with other eNodeB2022, and eNodeB2021 is connected to EPC203, ENodeB2021 can provide UE201 to EPC203 access.
EPC203 can 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 There is provided carrying and connection management for the control node of signaling between EPC203.HSS2032 is all to manage for providing some registers Such as function of attaching position register (not shown) etc, and some are preserved about the use such as service features, data rate The special information in family.All customer data can be transmitted by SGW2034, and PGW2035 can provide UE 201 IP 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 provided available strategy and charging control decision-making with charge execution function unit (not shown) for strategy.
IP operation 204 can 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, be readily applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA with And following new network system etc., do not limit herein.
Based on above-mentioned mobile terminal hardware configuration and communications network system, each embodiment of the inventive method is proposed.
Based on above-mentioned mobile terminal hardware configuration and communication system, each embodiment of present system is proposed.
First, the present invention proposes a kind of method of memory optimization.
As shown in figure 3, in the present embodiment, object listing is previously stored with the terminal, wherein, the target column Record has the dereferenced application of intended application in the mobile terminal in table, and the method for the memory optimization can be divided into following step Suddenly:Step S310 is obtaining step:According to the object listing, the dereferenced application of intended application is obtained;Step S320 is clear Except step:According to first object resource utilization in the destination OS, remove non-described in the destination OS Second target resource of associated application, wherein, the first object resource includes but is not limited in the destination OS One or more in CPU, internal memory, disk input and output, network request, second target resource should for the dereferenced With the resource produced by operating in the destination OS.These above-mentioned steps according to different demand adjustment orders, or Person omits some steps.Or the step of other can also be supplemented according to demand.
S310, according to the object listing, obtains the dereferenced application of intended application, wherein, the dereferenced, which is applied, is: The application that the intended application can not be called in destination OS running, the destination OS is the movement The system of terminal operating.
It should be noted that object listing is previously stored with mobile terminal, wherein, recorded in the object listing The dereferenced application of intended application in mobile terminal is stated, the dereferenced, which is applied, is:The intended application is in destination OS The application that can not be called in running.
It is understood that mobile terminal is the smart machine for being provided with destination OS, object run is being mounted with Mobile terminal can enter the interaction of row information based on the destination OS after system.In the prior art, when mobile terminal is hand During machine, destination OS can be Android operation system, IOS, Saipan operating system.The hand of different manufacturers Machine can use different operating system, as long as the scheme of the embodiment of the present invention can be realized, not to object run system The type of system is limited.
In addition, by taking mobile phone as an example, being mounted with to be also based on after destination OS to pacify under the destination OS Dress applies (i.e. application program), exemplary, such as chat software, Games Software, the software for watching video, news application. Often open one application, in the internal memory of mobile phone will this application operation resource.
An object listing can be pre-set in mobile terminal, specifically, can be configured and deposit manually by personnel Storage, can also generate object listing during running of mobile terminal by default rule, and inventive embodiments are not herein It is specifically limited.
Exemplary, it is previously stored with mobile terminal using A, distinguishes corresponding dereferenced application using B and application C, As shown in table 1, it is respectively application D1, using D2, using D3, using D4, using D5 using the corresponding dereferenced applications of A;Using B Corresponding dereferenced application is respectively application E1, using E2, using E3, using E4, using E5;Should using the corresponding dereferenceds of C With respectively application F1, using F2, using F, using F4, using F5.The dereferenced application of table 1 of embodiment illustrated in fig. 3 of the present invention Quantity be merely exemplary, specifically, dereferenced quantity of each application can be 0, can be 1, can be 2 It is individual, can be 5, can be 10, can be 20, etc., the embodiment of the present invention is not limited specifically it herein.
Table 1
It should be noted that dereferenced is applied is:The intended application can not be adjusted in destination OS running Application.It is understood that an application is run in systems, the scene for calling other application may be produced.
For example, in chat software, video playback is carried out after receiving the video that a side sends, now in chat software Need to call is the software for video playback, is specifically as follows video player.Because video player can be chatted Software transfer, so the video player can be referred to as the associated application of chat software.Conversely, being not present in two applications Above-mentioned call relation, then referred to as dereferenced application.
, can also be according to the target currently run in destination OS in another implementation of the embodiment of the present invention Program, determines the corresponding dereferenced application of target program, and store it in object listing.It is specific to determine dereferenced application Present invention embodiment do not limit, as long as can determine intended application dereferenced application.
S320, according to first object resource utilization in the destination OS, is removed in the destination OS Second target resource of the dereferenced application, wherein, the first object resource includes but is not limited to the object run system The one or more in CPU, internal memory, disk input and output, network request in system, second target resource is described non- Associated application operates in resource produced in the destination OS.
Explanation is needed, in the prior art, when user using mobile terminal the phenomenons such as the relatively slow, interim card of the speed of service occurs When, the system data cleaning of terminal can be moved, that is, moves the internal memory optimization of terminal.And the speed of service is relatively slow or blocks Etc. phenomenon, just indicating mobile terminal destination OS it is current resource utilization is higher or even excess load, such as work as CPU When utilization rate is more than 85%, system occurs that the speed of service is slower;When free memory is less than 500M, there is the phenomenon of interim card.
Based on this, the embodiment of the present invention obtains the resource utilization in destination OS, and grasp according to target first Make the resource utilization of system, it is determined whether to carry out the optimization processing of resource.
, can be by obtaining the resource utilization of current goal operating system in a kind of implementation of the present invention Afterwards, in the resource utilization threshold of each class resource according to setting, so that resource utilization and resource utilization threshold be entered Row compares, when at least one of resource utilization exceedes predetermined threshold value, it is determined that carrying out internal memory optimization.
Exemplary, CPU utilization rate is that 60%, memory usage is that 70%, disk is defeated in current goal operating system It is 60% to enter to export the utilization rate that utilization rate is 50%, network request;Default CPU utilization rate threshold value is 70%, internal memory profit It is 60% with the utilization rate threshold value that rate threshold value is 70%, disk input and output utilization rate threshold value is 60%, network request, wherein, CPU utilization rate, disk input and output utilization rate is all higher than predetermined threshold value, so meeting " at least one in resource utilization Kind exceed predetermined threshold value when, it is determined that carry out internal memory optimization " condition, therefore, carry out internal memory optimization.
In another implementation of the present invention, it is not less than a certain pre-value in the resource utilization of destination OS When, carry out the optimization of internal memory.
Exemplary, CPU utilization rate is that 60%, memory usage is that 70%, disk is defeated in current goal operating system It is 60% to enter to export the utilization rate that utilization rate is 50%, network request;When CPU utilization rate, memory usage, disk input is defeated When going out utilization rate, the utilization rate of network request and being all higher than 50%, carry out the optimization of internal memory because CPU utilization rate be 60%, it is interior The utilization rate that utilization rate is 70%, disk input and output utilization rate is 50%, network request utilization rate is 60% is deposited to be all higher than 50%, accordingly, it would be desirable to carry out the optimization of internal memory.
Above according to the resource utilization of destination OS, carry out what the optimization of internal memory was merely exemplary, do not constitute In specific restriction to the embodiment of the present invention, practical application, the combination that can carry out multiple resources utilization rate determines whether to carry out Internal memory optimization, can also be determined whether to carry out internal memory optimization with the utilization rate of one of resource.
Specifically, carrying out the scheme of internal memory optimization, Ke Yiwei:Remove dereferenced application described in the destination OS The second target resource, wherein, the second target resource is operated in by the dereferenced application and produced in the destination OS Raw resource.
Corresponding second target resource is applied by the dereferenced of intended application, the same of terminal internal memory optimization is being moved When, the startup of the associated application of intended application is not interfered with, the number to having operated in the associated application in destination OS According to being retained.
Exemplary, the corresponding dereferenceds of chat software A, which are applied, is:Using X, using Y, using Z, directly remove application X, The resource being had to rely on using Y, using Z in destination OS is operated in, i.e., correspond to respectively using X, using Y, using Z The target resource of resource composition second.
Using the embodiment shown in Fig. 3 of the present invention, by the dereferenced application recorded in object listing, grasped according to target Make the first object utilization rate in system, remove the second target resource of dereferenced application, so as to reach automatically according to target behaviour Make the resource utilization of system to clear up dereferenced using shared resource, so as to optimize the internal memory of mobile terminal, improve and move The response speed of dynamic terminal, so as to improve the Consumer's Experience of mobile terminal.Therefore, it is possible to solve in the prior art when user is artificial Realize destination OS operation compared with it is slow go to carry out application program manually again to clear up can cause the problem of Consumer's Experience is poor.
In another implementation of the present invention, the specific reality that the dereferenced application of the intended application is used is determined Now mode can be:Obtain the class that the intended application is loaded in the destination OS, and each class correspondence Target data, wherein, the target data be the corresponding code segment of each class and data segment;According to the class loaded and The corresponding target data of each class, obtains the dereferenced application unconnected to the intended application;By the dereferenced application Record is in the object listing.
It is understood that by taking Android operation system as an example, i.e., when destination OS is android system, when should During with operation, the progress of application is existed in the form of java virtual machines in Android operation system.Open when the program is run When opening a certain operation, a class may be loaded in this applies corresponding java virtual machines.Those skilled in the art can manage Each class can correspond to specific code segment and data in the internal memory of destination OS in solution, Java Virtual Machine Section, by detecting such code segment and data segment, i.e. target data, results in the dereferenced application with such, i.e., with this The dereferenced application of the corresponding application of class.
Further, the embodiment of the present invention additionally provides a kind of according to the class loaded and the corresponding number of targets of each class According to the specific implementation of the acquisition dereferenced application unconnected to the intended application can include:
Implementation A:
, should by scanning destination application component and target according to the target data of each class in the class loaded Program assembly return value is used, first object component class is obtained;
By the destination application component and destination application that scan the first application in the destination OS Component return value, obtain the second target element class, wherein, it is described first application in addition to the intended application it is any should With;
Judge whether the first object component class and the second target element class are identical;
If not, determining dereferenced application of first application for the intended application;
Or,
Implementation B:
According to the target data of each class in the class loaded, taken by scanning destination application component and binding Business, obtains the 3rd target element class;
By scanning the destination application component of the second application and binding service in the destination OS, obtain The 4th target element class is taken, wherein, second application is any application in addition to the intended application;
Judge whether the 3rd target element class and the 3rd target element class are identical, and second application is The no system service for the destination OS;
If not, determining dereferenced application of second application for the intended application;
Or,
Implementation C:
According to the target data of each class in the class loaded, have by scanning the unordered broadcast of intended application, application program Sequence is broadcasted and application program viscosity broadcast, obtains the 5th target element class;
Scan in the destination OS the unordered broadcast of application program of the 3rd application, application program ordered broadcast, with And application program viscosity broadcast, the 6th target element class is obtained, wherein, the 3rd application is in addition to the intended application Any application;
Judge whether the 5th target element class and the 6th target element class are identical;
If not, determining the described 3rd with the dereferenced application for the intended application;
Or,
Implementation D:
According to the target data of each class in the class loaded, by scanning the Context resolution object of the intended application, Distinguish corresponding first parameter URL in acquisition inquiry, deletion, increase, renewal;
By scanning the scans content analysis object of the 4th application in the destination OS, inquiry is obtained, deletes, increase Plus, update in respectively corresponding second parameter URL, wherein, it is described 3rd application in addition to the intended application it is any should With;
Judge whether the first parameter URL and the second parameter URL are identical;
If not, determining dereferenced application of the 4th application for the intended application.
In the present embodiment, usually, in android application programs, an application starts, and typically passes through following four Mode, what the destination application component Actvitvy for starting its application, the service Service for starting application, startup were applied carries Donor Provider, by way of broadcast.It is described by scan class file detect the presence of call other application rule it is as follows: Option A:Scan the startActivity and startActivityForResult (intended applications of intended application and the first application Program assembly and destination application component return value), detect the component for checking parameter intent in the two Component values, if incomplete same, the first application is added in the list of dereferenced application;Option b:Scan target Using the startService and bindService (destination application component and binding service) with the second application, detection The component values of parameter intent in the two, if it is incomplete same, and the second application would be nor system Service is serviced, then the second application is added in the list of dereferenced application;Scheme C:Scan intended application and the 3rd application SendBroadcast, sendOrderedBroadcast and sendStickyBroadcast (unordered broadcast, application program have Sequence is broadcasted and the broadcast of application program viscosity), the component values of the parameter intent in these three methods are detected, if not It is identical, then the 3rd application is added in the list of dereferenced application;(4), scanning password protection application and the 4th application it is interior Query, insert, delete, the update held in analysis object ContentResolver (is inquired about, increased, deleting, more 4th application, if not the class for pointing to intended application, is then added to non-by the newly) value of the parameter Uri in four method calls In associated application list;According to this four rules it is scanned to each class file after, it is possible to set up the non-pass of the application Join applied statistics table.
Further, the object listing is:Hash map structural table.
It should be noted that hash map structural table can be looked into by the data to current application in statistics list Inquiry, which is compiled, obtains all dereferenced applications and the dereferenced using relied on resource, unified to delete, and is easy to disposable management And disposably remove, the effect of global optimization is reached, so as to further improve Consumer's Experience.
Further, methods described also includes:S330, wherein,
S330, records in the hash map structural table and marks second target resource.
It will be appreciated that being applied and described for the dereferenced that current application is inquired according to the hash map structural table Dereferenced applies relied on resource and mark.In the present embodiment, all application messages in first query procedure, then with currently The corresponding data in dereferenced applied statistics list are applied to be compared, every application and resource data in the list is equal Mark, is stored in HashMap, it is to be done to the statistics table data traversal relatively after, by the application of the dereferenced of mark and Its resource relied on is unified to be removed.You need to add is that all application messages in first query procedure, then exist with current application Corresponding data are compared in associated application statistics list, and every application and resource data not in the list is all first marked Be stored in HashMap, it is to be done to associated application data traversal relatively after, the dereferenced of mark is applied and its relied on Resource is unified to delete.
By detecting that the dereferenced of intended application is applied and the dereferenced applies relied on resource, by removing These dereferenceds are applied and the dereferenced applies relied on resource, to optimize the internal memory of mobile terminal, so as to improve movement The response speed of terminal, while improving the Consumer's Experience of mobile terminal.
Referring to Fig. 4, Fig. 4 is dereferenced application resource removing prompting figure in mobile terminal, exemplary, is in intended application Chat software A, chat software A dereferenced apply the relied on resource of operation in destination OS to be 800M.
Referring to Fig. 5, Fig. 5 is one embodiment of Memory Optimize Method provided in an embodiment of the present invention.
It is any in S510, acquisition destination OS to apply corresponding dereferenced application, and obtain dereferenced application correspondence Object listing.
It is understood that the corresponding dereferenced application of application all in destination OS is stored in into target column In table, it is easy to directly be obtained when subsequently use, further improves efficiency.
S520, according to the object listing, obtains the dereferenced application of intended application.
S530, according to first object resource utilization in the destination OS and each class resource set in advance Resource utilization threshold, it is determined whether reach the condition for removing mobile terminal internal memory.
S540, if it is, removing the second target resource of the application of dereferenced described in the destination OS.
Referring to Fig. 6, Fig. 6 is a kind of equipment 600 of memory optimization, applied to mobile terminal, the equipment of the memory optimization Including:Memory 109, processor 110 and communication bus 610;
The communication bus 610 is used to realize the connection communication between processor 110 and memory 109;
The processor 109 is used to perform memory optimization program, to realize following steps:
According to the object listing, the dereferenced application of intended application is obtained, wherein, the dereferenced, which is applied, is:It is described The application that intended application can not be called in destination OS running, the destination OS is the mobile terminal The system of operation;
According to first object resource utilization in the destination OS, remove non-described in the destination OS Second target resource of associated application, wherein, the first object resource includes but is not limited in the destination OS One or more in CPU, internal memory, disk input and output, network request, second target resource should for the dereferenced With the resource produced by operating in the destination OS.
Further, the processor 110 is used to perform memory optimization program, to realize following steps:
Obtain the class that the intended application is loaded in the destination OS, and the corresponding target of each class Data, wherein, the target data is the corresponding code segment of each class and data segment;
According to the class and the corresponding target data of each class loaded, obtain unconnected to the intended application non- Associated application;
By dereferenced application record in the object listing.
Further, the processor 110 is used to perform memory optimization program, to realize following steps:
, should by scanning destination application component and target according to the target data of each class in the class loaded Program assembly return value is used, first object component class is obtained;
By the destination application component and destination application that scan the first application in the destination OS Component return value, obtain the second target element class, wherein, it is described first application in addition to the intended application it is any should With;
Judge whether the first object component class and the second target element class are identical;
If not, determining dereferenced application of first application for the intended application;
Or,
According to the target data of each class in the class loaded, taken by scanning destination application component and binding Business, obtains the 3rd target element class;
By scanning the destination application component of the second application and binding service in the destination OS, obtain The 4th target element class is taken, wherein, second application is any application in addition to the intended application;
Judge whether the 3rd target element class and the 3rd target element class are identical, and second application is The no system service for the destination OS;
If not, determining dereferenced application of second application for the intended application;
Or,
According to the target data of each class in the class loaded, have by scanning the unordered broadcast of intended application, application program Sequence is broadcasted and application program viscosity broadcast, obtains the 5th target element class;
Scan in the destination OS the unordered broadcast of application program of the 3rd application, application program ordered broadcast, with And application program viscosity broadcast, the 6th target element class is obtained, wherein, the 3rd application is in addition to the intended application Any application;
Judge whether the 5th target element class and the 6th target element class are identical;
If not, determining the described 3rd with the dereferenced application for the intended application;
Or,
According to the target data of each class in the class loaded, by scanning the Context resolution object of the intended application, Distinguish corresponding first parameter URL in acquisition inquiry, deletion, increase, renewal;
By scanning the scans content analysis object of the 4th application in the destination OS, inquiry is obtained, deletes, increase Plus, update in respectively corresponding second parameter URL, wherein, it is described 3rd application in addition to the intended application it is any should With;
Judge whether the first parameter URL and the second parameter URL are identical;
If not, determining dereferenced application of the 4th application for the intended application.
Further, the object listing is:Hash map structural table.
Further, the processor 110 is additionally operable to perform memory optimization program, to realize following steps:
Recorded in the hash map structural table and mark second target resource.
Using the embodiment shown in Fig. 6 of the present invention, by the dereferenced application recorded in object listing, grasped according to target Make the first object utilization rate in system, remove the second target resource of dereferenced application, so as to reach automatically according to target behaviour Make the resource utilization of system to clear up dereferenced using shared resource, so as to optimize the internal memory of mobile terminal, improve and move The response speed of dynamic terminal, so as to improve the Consumer's Experience of mobile terminal.Therefore, it is possible to solve in the prior art when user is artificial Realize destination OS operation compared with it is slow go to carry out application program manually again to clear up can cause the problem of Consumer's Experience is poor.
Further, present invention also offers a kind of computer-readable recording medium 700, referring to Fig. 7, applied to mobile whole End, the computer-readable recording medium storage has one or more program 710, and one or more of programs 710 can Performed by one or more processor 720, to realize following steps:
According to the object listing, the dereferenced application of intended application is obtained, wherein, the dereferenced, which is applied, is:It is described The application that intended application can not be called in destination OS running, the destination OS is the mobile terminal The system of operation;
According to first object resource utilization in the destination OS, remove non-described in the destination OS Second target resource of associated application, wherein, the first object resource includes but is not limited in the destination OS One or more in CPU, internal memory, disk input and output, network request, second target resource should for the dereferenced With the resource produced by operating in the destination OS.
Further, one or more of programs 710 are performed by one or more of processors 720, with reality Existing following steps:
Obtain the class that the intended application is loaded in the destination OS, and the corresponding target of each class Data, wherein, the target data is the corresponding code segment of each class and data segment;
According to the class and the corresponding target data of each class loaded, obtain unconnected to the intended application non- Associated application;
By dereferenced application record in the object listing.
Further, one or more of programs 710 are performed by one or more of processors 720, with reality Existing following steps
, should by scanning destination application component and target according to the target data of each class in the class loaded Program assembly return value is used, first object component class is obtained;
By the destination application component and destination application that scan the first application in the destination OS Component return value, obtain the second target element class, wherein, it is described first application in addition to the intended application it is any should With;
Judge whether the first object component class and the second target element class are identical;
If not, determining dereferenced application of first application for the intended application;
Or,
According to the target data of each class in the class loaded, taken by scanning destination application component and binding Business, obtains the 3rd target element class;
By scanning the destination application component of the second application and binding service in the destination OS, obtain The 4th target element class is taken, wherein, second application is any application in addition to the intended application;
Judge whether the 3rd target element class and the 3rd target element class are identical, and second application is The no system service for the destination OS;
If not, determining dereferenced application of second application for the intended application;
Or, according to the target data of each class in the class loaded, by scanning the unordered broadcast of intended application, application program Ordered broadcast and application program viscosity broadcast, obtain the 5th target element class;
Scan in the destination OS the unordered broadcast of application program of the 3rd application, application program ordered broadcast, with And application program viscosity broadcast, the 6th target element class is obtained, wherein, the 3rd application is in addition to the intended application Any application;
Judge whether the 5th target element class and the 6th target element class are identical;
If not, determining the described 3rd with the dereferenced application for the intended application;
Or, according to the target data of each class in the class loaded, by the Context resolution pair for scanning the intended application As distinguishing corresponding first parameter URL in acquisition inquiry, deletion, increase, renewal;
By scanning the scans content analysis object of the 4th application in the destination OS, inquiry is obtained, deletes, increase Plus, update in respectively corresponding second parameter URL, wherein, it is described 3rd application in addition to the intended application it is any should With;
Judge whether the first parameter URL and the second parameter URL are identical;
If not, determining dereferenced application of the 4th application for the intended application.
Further, the object listing is:Hash map structural table.
Further, one or more of programs 710 are also performed by one or more of processors 720, with Realize following steps
Recorded in the hash map structural table and mark second target resource.
Using the embodiment shown in Fig. 7 of the present invention, by the dereferenced application recorded in object listing, grasped according to target Make the first object utilization rate in system, remove the second target resource of dereferenced application, so as to reach automatically according to target behaviour Make the resource utilization of system to clear up dereferenced using shared resource, so as to optimize the internal memory of mobile terminal, improve and move The response speed of dynamic terminal, so as to improve the Consumer's Experience of mobile terminal.Therefore, it is possible to solve in the prior art when user is artificial Realize destination OS operation compared with it is slow go to carry out application program manually again to clear up can cause the problem of Consumer's Experience is poor.
The embodiments of the present invention are for illustration only, and the quality of embodiment is not represented.
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.Understood based on such, technical scheme is substantially done to prior art in other words Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), including some instructions are to cause a station terminal equipment (can be mobile phone, computer, clothes It is engaged in device, air conditioner, or network equipment etc.) perform method described in each embodiment of the invention.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every to utilize this hair Equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of method of memory optimization, applied to mobile terminal, it is characterised in that be previously stored with mesh in the mobile terminal List is marked, wherein, record has the dereferenced application of intended application in the mobile terminal, methods described bag in the object listing Include:
According to the object listing, the dereferenced application of intended application is obtained, wherein, the dereferenced, which is applied, is:The target The application that can not be called in destination OS running is applied, the destination OS is the running of mobile terminal System;
According to first object resource utilization in the destination OS, dereferenced described in the destination OS is removed Second target resource of application, wherein, CPU that the first object resource includes but is not limited in the destination OS, One or more in internal memory, disk input and output, network request, second target resource is dereferenced application fortune Resource of the row produced by the destination OS.
2. the method for memory optimization according to claim 1, it is characterised in that determine that the dereferenced of the intended application should With, including:
Obtain the class that the intended application is loaded in the destination OS, and the corresponding number of targets of each class According to, wherein, the target data is the corresponding code segment of each class and data segment;
According to the class and the corresponding target data of each class loaded, the dereferenced unconnected to the intended application is obtained Using;
By dereferenced application record in the object listing.
3. the method for memory optimization according to claim 2, it is characterised in that described according to the class loaded and each The corresponding target data of class, obtains the dereferenced application unconnected to the intended application, including:
According to the target data of each class in the class loaded, by scanning destination application component and intended application journey Sequence component return value, obtains first object component class;
By the destination application component and destination application component that scan the first application in the destination OS Return value, obtains the second target element class, wherein, first application is any application in addition to the intended application;
Judge whether the first object component class and the second target element class are identical;
If not, determining dereferenced application of first application for the intended application;
Or,
According to the target data of each class in the class loaded, serviced, obtained by scanning destination application component and binding Take the 3rd target element class;
By scanning in the destination OS destination application component and the binding service of the second application, the is obtained Four target element classes, wherein, second application is any application in addition to the intended application;
Judge whether the 3rd target element class and the 3rd target element class identical, and it is described second application whether be The system service of the destination OS;
If not, determining dereferenced application of second application for the intended application;
Or,
It is wide in order by scanning the unordered broadcast of intended application, application program according to the target data of each class in the class loaded Broadcast and application program viscosity broadcast, obtain the 5th target element class;
Scan the unordered broadcast of application program of the 3rd application, application program ordered broadcast, Yi Jiying in the destination OS Broadcasted with program viscosity, obtain the 6th target element class, wherein, the 3rd application is any in addition to the intended application Using;
Judge whether the 5th target element class and the 6th target element class are identical;
If not, determining the described 3rd with the dereferenced application for the intended application;
Or,
According to the target data of each class in the class loaded, by scanning the Context resolution object of the intended application, obtain Distinguish corresponding first parameter URL in inquiry, deletion, increase, renewal;
By scanning in the destination OS scans content analysis object of the 4th application, obtain inquiry, delete, increase, Corresponding second parameter URL is distinguished in renewal, wherein, the 3rd application is any application in addition to the intended application;
Judge whether the first parameter URL and the second parameter URL are identical;
If not, determining dereferenced application of the 4th application for the intended application.
4. the method for the memory optimization according to claim any one of 1-3, it is characterised in that be in the object listing: During hash map structural table;Methods described also includes:
Recorded in the hash map structural table and mark second target resource.
5. a kind of equipment of memory optimization, applied to mobile terminal, it is characterised in that the equipment of the memory optimization includes:Deposit Reservoir, processor and communication bus;
The communication bus is used to realize the connection communication between processor and memory;
The processor is used to perform memory optimization program, to realize following steps:
According to the object listing, the dereferenced application of intended application is obtained, wherein, the dereferenced, which is applied, is:The target The application that can not be called in destination OS running is applied, the destination OS is the running of mobile terminal System;
According to first object resource utilization in the destination OS, dereferenced described in the destination OS is removed Second target resource of application, wherein, CPU that the first object resource includes but is not limited in the destination OS, One or more in internal memory, disk input and output, network request, second target resource is dereferenced application fortune Resource of the row produced by the destination OS.
6. the equipment of memory optimization according to claim 5, it is characterised in that the processor is used to perform memory optimization Program, to realize following steps:
Obtain the class that the intended application is loaded in the destination OS, and the corresponding number of targets of each class According to, wherein, the target data is the corresponding code segment of each class and data segment;
According to the class and the corresponding target data of each class loaded, the dereferenced unconnected to the intended application is obtained Using;
By dereferenced application record in the object listing.
7. the equipment of memory optimization according to claim 6, it is characterised in that the processor is used to perform memory optimization Program, to realize following steps:
According to the target data of each class in the class loaded, by scanning destination application component and intended application journey Sequence component return value, obtains first object component class;
By the destination application component and destination application component that scan the first application in the destination OS Return value, obtains the second target element class, wherein, first application is any application in addition to the intended application;
Judge whether the first object component class and the second target element class are identical;
If not, determining dereferenced application of first application for the intended application;
Or,
According to the target data of each class in the class loaded, serviced, obtained by scanning destination application component and binding Take the 3rd target element class;
By scanning in the destination OS destination application component and the binding service of the second application, the is obtained Four target element classes, wherein, second application is any application in addition to the intended application;
Judge whether the 3rd target element class and the 3rd target element class identical, and it is described second application whether be The system service of the destination OS;
If not, determining dereferenced application of second application for the intended application;
Or,
It is wide in order by scanning the unordered broadcast of intended application, application program according to the target data of each class in the class loaded Broadcast and application program viscosity broadcast, obtain the 5th target element class;
Scan the unordered broadcast of application program of the 3rd application, application program ordered broadcast, Yi Jiying in the destination OS Broadcasted with program viscosity, obtain the 6th target element class, wherein, the 3rd application is any in addition to the intended application Using;
Judge whether the 5th target element class and the 6th target element class are identical;
If not, determining the described 3rd with the dereferenced application for the intended application;
Or,
According to the target data of each class in the class loaded, by scanning the Context resolution object of the intended application, obtain Distinguish corresponding first parameter URL in inquiry, deletion, increase, renewal;
By scanning in the destination OS scans content analysis object of the 4th application, obtain inquiry, delete, increase, Corresponding second parameter URL is distinguished in renewal, wherein, the 3rd application is any application in addition to the intended application;
Judge whether the first parameter URL and the second parameter URL are identical;
If not, determining dereferenced application of the 4th application for the intended application.
8. the equipment of the memory optimization according to claim any one of 5-7, it is characterised in that the object listing is:Breathe out Uncommon map structure table.
9. the equipment of the memory optimization described in any one according to claim 8, it is characterised in that the processor is also used In performing memory optimization program, to realize following steps:
Recorded in the hash map structural table and mark second target resource.
10. a kind of computer-readable recording medium, applied to mobile terminal, it is characterised in that the computer-readable storage medium Matter is stored with one or more program, so that one or more of computing devices such as any one of claim 1-4 institutes The method and step for the memory optimization stated.
CN201710284009.3A 2017-04-26 2017-04-26 A kind of method and apparatus of memory optimization Pending CN107145392A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710284009.3A CN107145392A (en) 2017-04-26 2017-04-26 A kind of method and apparatus of memory optimization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710284009.3A CN107145392A (en) 2017-04-26 2017-04-26 A kind of method and apparatus of memory optimization

Publications (1)

Publication Number Publication Date
CN107145392A true CN107145392A (en) 2017-09-08

Family

ID=59775352

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710284009.3A Pending CN107145392A (en) 2017-04-26 2017-04-26 A kind of method and apparatus of memory optimization

Country Status (1)

Country Link
CN (1) CN107145392A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766211A (en) * 2017-10-31 2018-03-06 努比亚技术有限公司 Freeze screen prevention method, mobile terminal and computer-readable recording medium
CN107797858A (en) * 2017-10-31 2018-03-13 努比亚技术有限公司 Disk space optimization method, mobile terminal and computer-readable recording medium
CN107943590A (en) * 2017-11-30 2018-04-20 努比亚技术有限公司 Start Memory Optimize Method, mobile terminal and the storage medium of application based on association
CN110134655A (en) * 2019-04-30 2019-08-16 华为技术有限公司 A kind of method for managing resource, device and equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7203941B2 (en) * 2002-11-14 2007-04-10 Microsoft Corporation Associating a native resource with an application
CN104714874A (en) * 2015-02-28 2015-06-17 深圳市中兴移动通信有限公司 Method for intelligently optimizing internal storage of mobile terminal and mobile terminal
CN105116991A (en) * 2015-08-26 2015-12-02 广东欧珀移动通信有限公司 Terminal power saving method and apparatus
CN105279098A (en) * 2014-07-22 2016-01-27 中兴通讯股份有限公司 Memory cleaning method and device
CN105389193A (en) * 2015-12-25 2016-03-09 北京奇虎科技有限公司 Accelerating processing method, device and system for application, and server
CN106155790A (en) * 2016-06-30 2016-11-23 宇龙计算机通信科技(深圳)有限公司 The management method of application program, managing device and terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7203941B2 (en) * 2002-11-14 2007-04-10 Microsoft Corporation Associating a native resource with an application
CN105279098A (en) * 2014-07-22 2016-01-27 中兴通讯股份有限公司 Memory cleaning method and device
CN104714874A (en) * 2015-02-28 2015-06-17 深圳市中兴移动通信有限公司 Method for intelligently optimizing internal storage of mobile terminal and mobile terminal
CN105116991A (en) * 2015-08-26 2015-12-02 广东欧珀移动通信有限公司 Terminal power saving method and apparatus
CN105389193A (en) * 2015-12-25 2016-03-09 北京奇虎科技有限公司 Accelerating processing method, device and system for application, and server
CN106155790A (en) * 2016-06-30 2016-11-23 宇龙计算机通信科技(深圳)有限公司 The management method of application program, managing device and terminal

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766211A (en) * 2017-10-31 2018-03-06 努比亚技术有限公司 Freeze screen prevention method, mobile terminal and computer-readable recording medium
CN107797858A (en) * 2017-10-31 2018-03-13 努比亚技术有限公司 Disk space optimization method, mobile terminal and computer-readable recording medium
CN107766211B (en) * 2017-10-31 2021-06-15 努比亚技术有限公司 Screen freezing prevention method, mobile terminal and computer readable storage medium
CN107943590A (en) * 2017-11-30 2018-04-20 努比亚技术有限公司 Start Memory Optimize Method, mobile terminal and the storage medium of application based on association
CN107943590B (en) * 2017-11-30 2022-03-18 努比亚技术有限公司 Memory optimization method based on associated starting application, mobile terminal and storage medium
CN110134655A (en) * 2019-04-30 2019-08-16 华为技术有限公司 A kind of method for managing resource, device and equipment

Similar Documents

Publication Publication Date Title
CN107688607A (en) The method and mobile terminal of a kind of database access, computer-readable recording medium
CN107463481A (en) Data interactive method, mobile terminal and storage medium
CN107704571A (en) Information intelligent recommends method, apparatus and computer-readable recording medium
CN107861688A (en) A kind of data-erasure method, terminal and readable storage medium storing program for executing
CN107436779A (en) A kind of application management method, equipment and computer-readable recording medium
CN107967322A (en) Document classification display methods, mobile terminal and computer-readable recording medium
CN107343083A (en) One kind lifting game experiencing method, apparatus and computer-readable recording medium
CN107145385A (en) A kind of multitask interface display methods, mobile terminal and computer-readable storage medium
CN107329682A (en) Edge exchange method and mobile terminal
CN107959795A (en) A kind of information collecting method, equipment and computer-readable recording medium
CN107181700A (en) Control method, mobile terminal and the storage medium of application program for mobile terminal
CN107229390A (en) A kind of desktop icons aligning method, mobile terminal and computer-readable recording medium
CN107181865A (en) Processing method, terminal and the computer-readable recording medium of unread short messages
CN107145392A (en) A kind of method and apparatus of memory optimization
CN107229410A (en) Interactive operation method, mobile terminal and computer-readable recording medium
CN107678698A (en) Data cached method for cleaning, server, terminal and computer-readable recording medium
CN107749947A (en) Photographic method, mobile terminal and computer-readable recording medium
CN107172282A (en) Screen locking wallpaper displaying method, mobile terminal and computer-readable recording medium
CN107273433A (en) A kind of file scanning method, equipment and computer-readable recording medium
CN109299039A (en) A kind of file management method, equipment and computer readable storage medium
CN108011937A (en) Information push method, server, intelligent terminal and computer-readable recording medium
CN107450796A (en) A kind of image processing method, mobile terminal and computer-readable recording medium
CN107566608A (en) A kind of system air navigation aid, equipment and computer-readable recording medium
CN109445945A (en) Memory allocation method, mobile terminal, server and the storage medium of application program
CN107423065A (en) Method, mobile terminal and the computer-readable recording medium that a kind of application is attended to anything else

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20170908

RJ01 Rejection of invention patent application after publication