CN106484529B - The Memory adjustments method and terminal of terminal - Google Patents

The Memory adjustments method and terminal of terminal Download PDF

Info

Publication number
CN106484529B
CN106484529B CN201610818869.6A CN201610818869A CN106484529B CN 106484529 B CN106484529 B CN 106484529B CN 201610818869 A CN201610818869 A CN 201610818869A CN 106484529 B CN106484529 B CN 106484529B
Authority
CN
China
Prior art keywords
information
memory
specified
application
adjustment interface
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
CN201610818869.6A
Other languages
Chinese (zh)
Other versions
CN106484529A (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 Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610818869.6A priority Critical patent/CN106484529B/en
Publication of CN106484529A publication Critical patent/CN106484529A/en
Application granted granted Critical
Publication of CN106484529B publication Critical patent/CN106484529B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The present invention is suitable for adjusting performance field, provides the Memory adjustments method and terminal of a kind of terminal.The described method includes: detecting whether to receive the message comprising specify information;When receiving the message comprising specify information, Memory adjustments interface message is obtained;Call corresponding Memory adjustments interface adjustment is specified to apply corresponding virtual memory according to the Memory adjustments interface message of acquisition.The good experience of user is improved so that virtual memory terminal adjusted is more suitable for interacting with server by the above method.

Description

Memory adjustment method of terminal and terminal
Technical Field
The embodiment of the invention belongs to the field of performance adjustment, and particularly relates to a memory adjustment method for a terminal and the terminal.
Background
With the rapid development of terminal and network technologies, more and more interactions are implemented between each terminal and the server through the network. However, when a plurality of terminals interact with the server at the same time, because the network states, software settings and the like of the terminals themselves may be different, the actual interaction speeds of the plurality of terminals may be different although the plurality of terminals simultaneously request to interact with the server, thereby bringing poor experience to users.
Disclosure of Invention
The embodiment of the invention provides a memory adjustment method of a terminal and the terminal, aiming at solving the problem that the existing terminal can bring poorer experience to a user because the actual interaction speed is possibly different although the existing terminal simultaneously requests to interact with a server.
In a first aspect of the embodiments of the present invention, a method for adjusting a memory of a terminal is provided, where the method includes:
detecting whether a message containing specified information is received;
when receiving a message containing specified information, acquiring memory adjustment interface information;
and calling the corresponding memory adjustment interface to adjust the virtual memory corresponding to the appointed application according to the acquired memory adjustment interface information.
In a second aspect of the embodiments of the present invention, a terminal is provided, where the terminal includes:
a message detection unit for detecting whether a message containing the specified information is received;
the memory adjustment interface information acquisition unit is used for acquiring the memory adjustment interface information when receiving the message containing the specified information;
and the virtual memory adjusting unit is used for calling the corresponding memory adjusting interface to adjust the virtual memory corresponding to the appointed application according to the acquired memory adjusting interface information.
In a third aspect of the embodiments of the present invention, a terminal is provided, where the terminal includes:
a processor and an input device, wherein the processor is connected to the input device,
the processor is used for detecting whether a message containing the specified information is received or not through the input equipment, and acquiring the memory adjustment interface information when the message containing the specified information is received;
the processor is further configured to call a corresponding memory adjustment interface to adjust the virtual memory corresponding to the specified application according to the acquired memory adjustment interface information.
In the embodiment of the invention, the virtual memory corresponding to the designated application is adjusted when the message containing the designated information is received, so that the virtual memory of the terminal can be adjusted in time according to the actual condition, the terminal after the virtual memory is adjusted is more suitable for interacting with the server, and the good experience of a user is improved.
Drawings
Fig. 1 is a flowchart of a memory adjustment method for a terminal according to a first embodiment of the present invention;
fig. 2 is a block diagram of a terminal according to a second embodiment of the present invention;
fig. 3 is a block diagram of a part of the structure of a mobile phone related to a terminal according to a third embodiment of the present invention;
fig. 4 is a schematic block diagram of a terminal according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. 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 embodiment of the invention, whether a message containing the specified information is received or not is detected, when the message containing the specified information is received, the memory adjustment interface information is obtained, and the corresponding memory adjustment interface is called according to the obtained memory adjustment interface information to adjust the virtual memory corresponding to the specified application.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
The first embodiment is as follows:
fig. 1 shows a flowchart of a memory adjustment method for a terminal according to a first embodiment of the present invention, which is detailed as follows:
in step S11, it is detected whether a message containing the specification information is received.
In the step, the specified information includes information specifying an application, and when a message including the information specifying the application is received, it is determined that the terminal receives the message including the specified information; the designation information may also include information that designates Activity, or information that designates characters, or information that designates a process, or the like.
Specifically, whether a message containing the specification information is received is detected in the following manner.
(1) The system interface for network interaction is set for a specified application. When the application is started, the terminal judges whether the started application is the designated application, and if so, the started application is monitored. And when the specified information is the information of the specified character, monitoring whether the information transmitted by the started application comprises the information of the specified character, and if so, judging that the terminal receives the message containing the specified information.
(2) When application switching occurs, whether the application to be switched to the foreground is the designated application or not is judged, and if yes, monitoring is started. And when the Activity is switched, judging whether the Activity which is switched by the current specified application is related to the specified information, and if so, judging that the terminal receives a message containing the specified information.
(3) The interface message of the specified application is detected, specifically, whether the interface message of the specified application includes a specified character is detected, for example, if the message containing the specified information is related to a red packet, the specified character can be set to be the "red packet", that is, whether the interface message of the specified application includes the "red packet" is detected, and if the specified character includes the "red packet", the terminal is determined to receive the message containing the specified information.
(4) Starting a background process, monitoring whether a message containing the specified information is received or not through the started background process, and judging that the terminal receives the message containing the specified information when the message containing the specified information is received.
In addition to the above-mentioned determination of whether a message containing the specific information is received by the terminal itself, the determination may be performed by a base station, a gateway, or the like, and the result may be fed back to the terminal.
Optionally, before step S11, the method includes:
the time at which the message containing the specification information is to be received is predicted, so that when the predicted time arrives, step S11 is executed. Specifically, the time at which the message containing the specification information is to be received is predicted from the history of receiving the message containing the specification information. For example, assuming that the reception of a message containing specified information at 12 am in the history is a large-probability event, 12 am is taken as the predicted time. Or counting the messages received by the designated application, and when the received messages contain the information related to the designated information, acquiring the time information in the messages containing the information related to the designated information, and taking the acquired time information as the predicted time. For example, assuming that the chat record of the WeChat includes "to be red wrapped" and "red wrapped" is information related to the specified information, time information corresponding to "to be red wrapped" is acquired, for example, a time point at which the message "to be red wrapped" is received is taken as a predicted time. Of course, if the chat log of the WeChat includes "red packet to be sent at 12 noon" and "red packet" is information related to the specified information, "12 noon" is taken as the predicted time.
In step S12, when the message including the specifying information is received, the memory adjustment interface information is acquired.
The memory adjustment interface information includes the name of the memory adjustment interface, the storage path where the memory adjustment interface is located, and the like.
Specifically, the memory adjustment interface information may be obtained in a plurality of manners, where, in this case, the step S12 specifically includes:
and A1, when receiving the message containing the specified information, acquiring the memory adjustment interface information through a preset interface function. Specifically, if a developer presets an Interface function (e.g., an Application Programming Interface (API) function) at a terminal, for example, the Interface function presets memory adjustment Interface information to be acquired, and when the Interface function is called, the Interface function can directly acquire memory adjustment Interface information that is the same as the preset memory adjustment Interface information to be acquired.
Or,
and A2, when receiving the message containing the specified information, acquiring the memory adjustment interface information according to the plug-in downloaded by the user, wherein the plug-in comprises a function for acquiring the memory adjustment interface information. Specifically, the user downloads and installs a third-party plug-in advance, and the terminal operates the third-party plug-in to acquire the memory adjustment interface information. The third-party plug-in includes a function for acquiring the memory adjustment interface information, and the function for acquiring the memory adjustment interface information presets the memory adjustment interface information to be acquired.
Or,
and A3, when receiving the message containing the specified information, acquiring the memory adjustment interface information through the writing equipment node (through the writing file node). Specifically, when the memory adjustment interface information is acquired by writing a device node, the device may be opened by a code such as open ("/dev/xxx", O _ RDWR), and the driver provides various services to the application (application program) through such a node: such as read, write, etc.
Step S13, call the corresponding memory adjustment interface to adjust the virtual memory corresponding to the designated application according to the acquired memory adjustment interface information.
Specifically, adjusting the virtual memory corresponding to the specified application includes: increasing or decreasing the virtual memory corresponding to the designated application, for example, when the designated application is an application that the user wishes to use preferentially, increasing the virtual memory corresponding to the designated application to increase the running speed of the designated application and reduce the stuck phenomenon; and when the designated application is an application which the user does not want to use preferentially, reducing the virtual memory corresponding to the designated application.
Optionally, the step S13 includes:
b1, calling a corresponding memory adjustment interface to increase the virtual memory corresponding to the appointed application according to the acquired memory adjustment interface information, wherein the appointed application is related to the message containing the appointed information. Wherein the specifying the application in relation to the message containing the specifying information comprises: when the specified information needs to interact with the user through the specified application, the specified application is related to the message containing the specified information; when the specifying information includes information specifying the application, such as a name of the specified application or a description of the specified application, the specified application is associated with the message containing the specifying information.
And/or the presence of a gas in the gas,
b2, calling the corresponding memory adjustment interface to reduce the virtual memory corresponding to the non-specified application according to the acquired memory adjustment interface information. Specifically, the virtual memory corresponding to the non-specified application may be throttled down to ensure that the specified application has sufficient virtual memory.
Optionally, since the specified application may continuously use the virtual memory allocated to the specified application during the running process, in order to reduce the stuck phenomenon occurring when the specified application is subsequently used, the following steps are included after the B1:
and C1, in the running process of the specified application, counting the free virtual memory of the specified application. The free virtual memory refers to a virtual memory that is allocated to a specific application and is not used by the specific application. Specifically, after the specified application runs for a period of time, the free virtual memory of the specified application may be counted at intervals, or after it is detected that the specified application starts a certain function, the free virtual memory of the specified application is counted, it needs to be noted that when the certain function of the specified application is started, the virtual memory of the specified application is occupied more.
And C2, when the free virtual memory of the specified application is smaller than the specified threshold value, increasing the virtual memory corresponding to the specified application again.
Specifically, when the free virtual memory of the designated application is smaller than a designated threshold, or when the free virtual memory of the designated application is smaller than the designated threshold and it is determined that the designated application is still used (for example, when a certain function of the designated application is started, the certain function is started and then ends after lasting for a period of time), the virtual memory corresponding to the designated application is increased again, so as to improve the running continuity of the designated application.
Of course, besides adjusting the virtual memory corresponding to the specified application, other performances of the terminal may also be adjusted, including: CPU, GPU, memory, touch screen, antenna, adjustment of physical key functions, etc. Wherein, the terminal adjusting the corresponding performance comprises: the operation of increasing or decreasing the CPU operating frequency of the terminal, increasing or decreasing the GPU operating frequency of the terminal, increasing or decreasing the memory corresponding to the designated application, and controlling the touch screen through operations such as file nodes, so that the touch screen does not enter a sleep mode (the touch screen does not enter the sleep mode, and simultaneously the scanning frequency and the data reporting rate can also be increased to set values, it is pointed out that all the operations can be completed by setting a touch screen register, the scanning frequency determines whether the touch screen can recognize the motion of fingers as soon as possible, for example, the scanning frequency of the touch screen can be increased from 50HZ to 100HZ, and the data reporting rate of the touch screen determines whether the data can be reported to an upper layer as soon as possible, for example, the reporting speed of the touch screen can be increased from 80 points per second to 100 points per second, and by the setting, the operation of a user can be recognized more quickly, when the user executes the interactive event of 'snatching the red packet', the user can respond to the action of the user more quickly, thereby improving the probability of snatching the red packet by the user).
Optionally, after the step S13, the method includes:
and when the preset condition is reached, restoring the virtual memory corresponding to the adjusted specified application into the virtual memory corresponding to the specified application before adjustment. In this step, the virtual memory corresponding to the adjusted specified application is restored to the virtual memory corresponding to the specified application before adjustment, so as to maintain the running consistency of different applications of the terminal. The preset conditions here include: the preset action is completed, the preset time is reached, whether the designated application is switched to the background or not is judged, and the like. For example, when the preset action is an action of robbing a red packet by the user, the virtual memory corresponding to the adjusted specified application is restored to the virtual memory corresponding to the specified application before the adjustment after the user finishes robbing the red packet, for example, assuming that the virtual memory of a certain application of the terminal is increased before the action of robbing the red packet is executed, the virtual memory of the certain application of the terminal is decreased after the action of robbing the red packet is finished until the adjusted virtual memory of the certain application is equal to the virtual memory of the certain application before the increase. Wherein, the preset time can be determined by the following steps: determining the time length required for using a certain function of an application once according to the time length required for using the certain function of the application once by a user, for example, assuming that the user needs to use a WeChat red packet robbing function, the preset time length can be determined according to the time length required for using the red packet robbing function once; or, according to a certain function of the application used by the user, determining the time length required by the certain function of the application for multiple times, taking the red packet robbing function of the WeChat as an example, which is required by the user, collecting time data of red packet dispatching in a certain group, analyzing the relation between the semantic meaning of the red packet and the actual red packet dispatching action implied in the chat information when the red packet is dispatched, predicting the red packet dispatching mode of each group in the WeChat by combining the time data and the relation data, and when the record of continuous red packets exists in the certain group, such as: and determining the duration corresponding to the preset time according to the predicted red packet dispatching mode, for example, when it is predicted that a certain group prefers continuous red packets and the group is red packets, the preset time is set to be longer.
In the first embodiment of the present invention, whether a message including specifying information is received is detected, when the message including specifying information is received, memory adjustment interface information is acquired, and a corresponding memory adjustment interface is called according to the acquired memory adjustment interface information to adjust a virtual memory corresponding to a specified application. The virtual memory corresponding to the designated application is adjusted when the message containing the designated information is received, so that the virtual memory of the terminal can be adjusted in time according to the actual condition, the terminal after the virtual memory is adjusted is more suitable for interacting with the server, and the good experience of the user is improved.
It should be understood that, in the embodiment of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiment of the present invention.
Example two:
fig. 2 shows a block diagram of a terminal according to a second embodiment of the present invention, which may comprise user equipment, which may be a mobile telephone (or "cellular" telephone), a computer with mobile equipment, etc., communicating with one or more core networks via a radio access network RAN, for example, the user equipment may also be a portable, pocket, hand-held, computer-included or vehicle-mounted mobile device, which exchanges voice and/or data with the radio access network. Also for example, the mobile device may include a smartphone, a tablet computer, a Personal Digital Assistant (PDA), a point-of-sale (POS) or a vehicle-mounted computer, etc. For convenience of explanation, only portions related to the embodiments of the present invention are shown.
The terminal includes: a message detection unit 21, a memory adjustment interface information acquisition unit 22, and a virtual memory adjustment unit 23. Wherein:
a message detection unit 21 for detecting whether a message containing the specification information is received.
The terminal comprises a terminal body, a terminal body and a terminal, wherein the designated information comprises information for designating an application, and when a message containing the information for designating the application is received, the terminal body judges that the message containing the designated information is received; the designation information may also include information that designates Activity, or information that designates characters, or information that designates a process, or the like.
Specifically, whether a message containing the specification information is received is detected in the following manner.
(1) The system interface for network interaction is set for a specified application. When the application is started, the terminal judges whether the started application is the designated application, and if so, the started application is monitored. And when the specified information is the information of the specified character, monitoring whether the information transmitted by the started application comprises the information of the specified character, and if so, judging that the terminal receives the message containing the specified information.
(2) When application switching occurs, whether the application to be switched to the foreground is the designated application or not is judged, and if yes, monitoring is started. And when the Activity is switched, judging whether the Activity which is switched by the current specified application is related to the specified information, and if so, judging that the terminal receives a message containing the specified information.
(3) The interface message of the specified application is detected, specifically, whether the interface message of the specified application includes a specified character is detected, for example, if the message containing the specified information is related to a red packet, the specified character can be set to be the "red packet", that is, whether the interface message of the specified application includes the "red packet" is detected, and if the specified character includes the "red packet", the terminal is determined to receive the message containing the specified information.
(4) Starting a background process, monitoring whether a message containing the specified information is received or not through the started background process, and judging that the terminal receives the message containing the specified information when the message containing the specified information is received.
In addition to the above-mentioned determination of whether a message containing the specific information is received by the terminal itself, the determination may be performed by a base station, a gateway, or the like, and the result may be fed back to the terminal.
The memory adjustment interface information obtaining unit 22 is configured to obtain the memory adjustment interface information when receiving the message including the specification information.
The memory adjustment interface information includes the name of the memory adjustment interface, the storage path where the memory adjustment interface is located, and the like.
Optionally, the memory adjustment interface information obtaining unit 22 includes:
the first memory adjustment interface information acquisition module is used for acquiring the memory adjustment interface information through a preset interface function when receiving the message containing the specified information. Specifically, if a developer presets an interface function (e.g., an API function) at a terminal, for example, the interface function presets memory adjustment interface information to be acquired, and when the interface function is called, the interface function may directly acquire the memory adjustment interface information that is the same as the preset memory adjustment interface information to be acquired.
Or,
and the second memory adjustment interface information acquisition module is used for acquiring the memory adjustment interface information according to a plug-in downloaded by a user when receiving the message containing the specified information, wherein the plug-in comprises a function for acquiring the memory adjustment interface information. Specifically, the user downloads and installs a third-party plug-in advance, and the terminal operates the third-party plug-in to acquire the memory adjustment interface information. The third-party plug-in includes a function for acquiring the memory adjustment interface information, and the function for acquiring the memory adjustment interface information presets the memory adjustment interface information to be acquired.
Or,
and a third memory adjustment interface information obtaining module, configured to obtain, when receiving the message including the specified information, the memory adjustment interface information through the write device node (through the write file node). Specifically, when the memory adjustment interface information is acquired by writing a device node, the device may be opened by a code such as open ("/dev/xxx", O _ RDWR), and the driver provides various services to the application (application program) through such a node: such as read, write, etc.
The virtual memory adjusting unit 23 is configured to call a corresponding memory adjusting interface according to the acquired memory adjusting interface information to adjust a virtual memory corresponding to the specified application.
Specifically, adjusting the virtual memory corresponding to the specified application includes: increasing or decreasing the virtual memory corresponding to the designated application, for example, when the designated application is an application that the user wishes to use preferentially, increasing the virtual memory corresponding to the designated application to increase the running speed of the designated application and reduce the stuck phenomenon; and when the designated application is an application which the user does not want to use preferentially, reducing the virtual memory corresponding to the designated application.
Optionally, the virtual memory adjusting unit 23 includes:
and the virtual memory heightening module is used for calling a corresponding memory adjusting interface to heighten a virtual memory corresponding to the appointed application according to the acquired memory adjusting interface information, wherein the appointed application is related to the message containing the appointed information. Wherein the specifying the application in relation to the message containing the specifying information comprises: when the specified information needs to interact with the user through the specified application, the specified application is related to the message containing the specified information; when the specifying information includes information specifying the application, such as a name of the specified application or a description of the specified application, the specified application is associated with the message containing the specifying information.
And/or the presence of a gas in the gas,
and the virtual memory reducing module is used for calling the corresponding memory adjusting interface to reduce the virtual memory corresponding to the non-specified application according to the acquired memory adjusting interface information. Specifically, the virtual memory corresponding to the non-specified application may be throttled down to ensure that the specified application has sufficient virtual memory.
Optionally, since the specified application may continuously use the virtual memory allocated to the specified application during the running process, in order to reduce a stuck phenomenon occurring when the specified application is subsequently used, the terminal includes:
and the idle virtual memory counting unit is used for counting the idle virtual memory of the specified application in the running process of the specified application. Specifically, after the specified application runs for a period of time, the free virtual memory of the specified application may be counted at intervals, or after it is detected that the specified application starts a certain function, the free virtual memory of the specified application is counted, it needs to be noted that when the certain function of the specified application is started, the virtual memory of the specified application is occupied more.
And the virtual memory re-heightening unit is used for heightening the virtual memory corresponding to the specified application again when the idle virtual memory of the specified application is smaller than a specified threshold value. Specifically, when the free virtual memory of the designated application is smaller than a designated threshold, or when the free virtual memory of the designated application is smaller than the designated threshold and it is determined that the designated application is still used (for example, when a certain function of the designated application is started, the certain function is started and then ends after lasting for a period of time), the virtual memory corresponding to the designated application is increased again, so as to improve the running continuity of the designated application.
Optionally, of course, besides adjusting the virtual memory corresponding to the specified application, other performances of the terminal may also be adjusted, where the other performances of the terminal include: CPU, GPU, memory, touch screen, antenna, adjustment of physical key functions, etc. Wherein, the terminal adjusting the corresponding performance comprises: the operation of increasing or decreasing the CPU operating frequency of the terminal, increasing or decreasing the GPU operating frequency of the terminal, increasing or decreasing the memory corresponding to the designated application, and controlling the touch screen through operations such as file nodes, so that the touch screen does not enter a sleep mode (the touch screen does not enter the sleep mode, and simultaneously the scanning frequency and the data reporting rate can also be increased to set values, it is pointed out that all the operations can be completed by setting a touch screen register, the scanning frequency determines whether the touch screen can recognize the motion of fingers as soon as possible, for example, the scanning frequency of the touch screen can be increased from 50HZ to 100HZ, and the data reporting rate of the touch screen determines whether the data can be reported to an upper layer as soon as possible, for example, the reporting speed of the touch screen can be increased from 80 points per second to 100 points per second, and by the setting, the operation of a user can be recognized more quickly, when the user executes the interactive event of 'snatching the red packet', the user can respond to the action of the user more quickly, thereby improving the probability of snatching the red packet by the user).
Optionally, the terminal includes:
and the virtual memory restoring unit is used for restoring the virtual memory corresponding to the adjusted specified application into the virtual memory corresponding to the specified application before adjustment when the preset condition is reached.
The preset conditions here include: the preset action is completed, the preset time is reached, whether the designated application is switched to the background or not is judged, and the like. For example, when the preset action is an action of robbing a red packet by the user, the virtual memory corresponding to the adjusted specified application is restored to the virtual memory corresponding to the specified application before the adjustment after the user finishes robbing the red packet, for example, assuming that the virtual memory of a certain application of the terminal is increased before the action of robbing the red packet is executed, the virtual memory of the certain application of the terminal is decreased after the action of robbing the red packet is finished until the adjusted virtual memory of the certain application is equal to the virtual memory of the certain application before the increase.
In the second embodiment of the present invention, since the virtual memory corresponding to the designated application is adjusted when the message including the designation information is received, the virtual memory of the terminal can be adjusted in time according to the actual situation, so that the terminal after the virtual memory adjustment is more suitable for interacting with the server, and the good experience of the user is improved.
Example three:
fig. 3 is a block diagram showing a partial structure of a cellular phone related to a terminal provided in a third embodiment of the present invention. Referring to fig. 3, the cellular phone includes: radio Frequency (RF) circuitry 310, memory 320, input unit 330, display unit 340, sensor 350, audio circuitry 360, wireless module 370, processor 380, and power supply 390. Those skilled in the art will appreciate that the handset configuration shown in fig. 3 is not intended to be limiting and 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 phone in detail with reference to fig. 3:
the RF circuit 310 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information of a base station and then processes the received downlink information to the processor 380; in addition, the data for designing uplink is transmitted to the base station. Typically, the RF circuitry includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuit 310 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to global system for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
The memory 320 may be used to store software programs and modules, and the processor 380 executes various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 320. The memory 320 may mainly include a program storage area and a data storage area, wherein the program storage 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 320 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 input unit 330 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone 300. Specifically, the input unit 330 may include a touch panel 331 and other input devices 332. The touch panel 331, also referred to as a touch screen, can collect touch operations of a user (e.g., operations of the user on the touch panel 331 or near the touch panel 331 using any suitable object or accessory such as a finger, a stylus, etc.) on or near the touch panel 331, and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 331 may include two parts, 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 380, and can receive and execute commands sent by the processor 380. In addition, the touch panel 331 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 330 may include other input devices 332 in addition to the touch panel 331. In particular, other input devices 332 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 340 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 340 may include a display panel 341, and optionally, the display panel 341 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 331 can cover the display panel 341, and when the touch panel 331 detects a touch operation on or near the touch panel 331, the touch panel is transmitted to the processor 380 to determine the type of the touch event, and then the processor 880 provides a corresponding visual output on the display panel 341 according to the type of the touch event. Although in fig. 3, the touch panel 331 and the display panel 341 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 331 and the display panel 341 may be integrated to implement the input and output functions of the mobile phone.
The handset 300 may also include at least one sensor 350, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 341 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 341 and/or the backlight when the mobile phone 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 posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as 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.
Audio circuitry 360, speaker 361, microphone 362 may provide an audio interface between the user and the handset. The audio circuit 360 may transmit the electrical signal converted from the received audio data to the speaker 361, and the audio signal is converted by the speaker 361 and output; on the other hand, the microphone 362 converts the collected sound signals into electrical signals, which are received by the audio circuit 360 and converted into audio data, which are then processed by the audio data output processor 380 and then transmitted to, for example, another cellular phone via the RF circuit 310, or output to the memory 320 for further processing.
The wireless module is based on short-distance wireless transmission technology, and the mobile phone can help the user to receive and send e-mails, browse webpages, access streaming media and the like through the wireless module 370, and provides wireless broadband internet access for the user. Although fig. 3 shows the wireless module 370, it is understood that it does not belong to the essential constitution of the cellular phone 300, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 380 is a control center of the mobile phone, connects various parts of the whole mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 320 and calling data stored in the memory 320, thereby performing overall monitoring of the mobile phone. Optionally, processor 380 may include one or more processing units; preferably, the processor 380 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 380.
The handset 300 also includes a power supply 390 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 380 via a power management system to manage charging, discharging, and power consumption via the power management system.
Although not shown, the mobile phone 300 may further include a camera, a bluetooth module, etc., which will not be described herein.
In the embodiment of the present invention, the processor 380 included in the terminal further has the following functions: a memory adjustment method of a terminal comprises the following steps:
detecting whether a message containing specified information is received;
when receiving a message containing specified information, acquiring memory adjustment interface information;
and calling the corresponding memory adjustment interface to adjust the virtual memory corresponding to the appointed application according to the acquired memory adjustment interface information.
Further, the obtaining the memory adjustment interface information when receiving the message including the specific information specifically includes:
when receiving a message containing specified information, acquiring memory adjustment interface information through a preset interface function;
or,
when receiving a message containing specified information, acquiring memory adjustment interface information according to a plug-in downloaded by a user, wherein the plug-in comprises a function for acquiring the memory adjustment interface information;
or,
and when receiving the message containing the designated information, acquiring the memory adjustment interface information through the writing equipment node or the writing file node.
Further, the invoking a corresponding memory adjustment interface according to the obtained memory adjustment interface information to adjust a virtual memory corresponding to the specified application specifically includes:
calling a corresponding memory adjustment interface to increase a virtual memory corresponding to a designated application according to the acquired memory adjustment interface information, wherein the designated application is related to the message containing the designated information;
and/or the presence of a gas in the gas,
and calling the corresponding memory adjustment interface to reduce the virtual memory corresponding to the non-specified application according to the acquired memory adjustment interface information.
Further, after the calling the corresponding memory adjustment interface according to the obtained memory adjustment interface information to increase the virtual memory corresponding to the designated application, the method includes:
in the running process of the specified application, counting the idle virtual memory of the specified application;
and when the free virtual memory of the specified application is smaller than a specified threshold value, the virtual memory corresponding to the specified application is increased again.
Further, after the calling the corresponding memory adjustment interface according to the acquired memory adjustment interface information to adjust the virtual memory corresponding to the designated application, the method includes:
and when the preset condition is reached, restoring the virtual memory corresponding to the adjusted specified application into the virtual memory corresponding to the specified application before adjustment.
Example four:
fig. 4 is a schematic block diagram of a terminal according to a fourth embodiment of the present invention, where the terminal as shown in the figure may include: one or more processors 401 (only one shown); one or more input devices 402 (only one shown), one or more output devices 403 (only one shown), a memory 404, and a display 405. The processor 401, input device 402, output device 403, memory 404, and display 405 described above are connected by a bus 406. The memory 402 is used to store instructions and the processor 401 is used to execute instructions stored by the memory 402. Wherein:
the processor 401 is configured to detect whether a message including specified information is received through the input device 402, and acquire memory adjustment interface information when the message including the specified information is received; the processor 401 is further configured to call a corresponding memory adjustment interface according to the acquired memory adjustment interface information to adjust a virtual memory corresponding to the specified application.
It should be understood that, in the embodiment of the present invention, the Processor 401 may be a Central Processing Unit (CPU), and the Processor may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input device 402 may include a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of the fingerprint), a microphone, a data receiving interface, and the like. The output devices 403 may include a display (LCD, etc.), speakers, a data transmission interface, and the like.
The memory 404 may include a read-only memory and a random access memory, and provides instructions and data to the processor 401. A portion of the memory 404 may also include non-volatile random access memory. For example, the memory 404 may also store device type information.
The display 405 may be used to display information entered by the user or provided to the user, etc. The Display 405 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the display 405 may further include a touch panel, which may cover the display panel, and when the touch panel detects a touch operation on or near the touch panel, the touch panel transmits the touch operation to the processor 401 to determine the type of the touch event, and then the processor 401 provides a corresponding visual output on the display panel according to the type of the touch event.
In a specific implementation, the processor 401, the input device 402, the output device 403, the storage 404, and the display 405 described in this embodiment of the present invention may execute the implementation described in the embodiment of the memory adjustment method for a terminal provided in this embodiment of the present invention, or may execute the implementation described in the terminal described in the second embodiment, which is not described herein again.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (9)

1. A memory adjustment method of a terminal is characterized by comprising the following steps:
detecting whether a message containing specified information is received; the message containing the designated information is information containing designated characters, information containing designated Activity or information containing designated processes; the specifying information includes information specifying an application;
when receiving a message containing specified information, acquiring memory adjustment interface information;
calling a corresponding memory adjustment interface to adjust the virtual memory corresponding to the appointed application according to the acquired memory adjustment interface information;
after the calling the corresponding memory adjustment interface according to the acquired memory adjustment interface information to adjust the virtual memory corresponding to the designated application, the method further includes:
and when the preset condition is reached, restoring the virtual memory corresponding to the adjusted specified application into the virtual memory corresponding to the specified application before adjustment.
2. The method according to claim 1, wherein the obtaining memory adjustment interface information when receiving the message including the specific information specifically comprises:
when receiving a message containing specified information, acquiring memory adjustment interface information through a preset interface function;
or,
when receiving a message containing specified information, acquiring memory adjustment interface information according to a plug-in downloaded by a user, wherein the plug-in comprises a function for acquiring the memory adjustment interface information;
or,
and when receiving the message containing the specified information, acquiring the memory adjustment interface information through the writing equipment node.
3. The method according to claim 1, wherein the calling the corresponding memory adjustment interface according to the acquired memory adjustment interface information to adjust the virtual memory corresponding to the designated application specifically includes:
calling a corresponding memory adjustment interface to increase a virtual memory corresponding to a designated application according to the acquired memory adjustment interface information, wherein the designated application is related to the message containing the designated information;
and/or the presence of a gas in the gas,
and calling the corresponding memory adjustment interface to reduce the virtual memory corresponding to the non-specified application according to the acquired memory adjustment interface information.
4. The method according to claim 3, wherein after the calling the corresponding memory adjustment interface to increase the virtual memory corresponding to the designated application according to the obtained memory adjustment interface information, the method comprises:
in the running process of the specified application, counting the idle virtual memory of the specified application;
and when the free virtual memory of the specified application is smaller than a specified threshold value, the virtual memory corresponding to the specified application is increased again.
5. A terminal, characterized in that the terminal comprises:
a message detection unit for detecting whether a message containing the specified information is received; the message containing the specified information is information containing specified characters, information containing specified Activity or information containing specified processes; the specifying information includes information specifying an application;
the memory adjustment interface information acquisition unit is used for acquiring the memory adjustment interface information when receiving the message containing the specified information;
the virtual memory adjusting unit is used for calling a corresponding memory adjusting interface to adjust a virtual memory corresponding to the appointed application according to the acquired memory adjusting interface information;
and the virtual memory restoring unit is used for restoring the virtual memory corresponding to the adjusted specified application into the virtual memory corresponding to the specified application before adjustment when the preset condition is reached.
6. The terminal according to claim 5, wherein the memory adjustment interface information obtaining unit comprises:
the first memory adjustment interface information acquisition module is used for acquiring memory adjustment interface information through a preset interface function when receiving a message containing specified information;
or,
the second memory adjustment interface information acquisition module is used for acquiring the memory adjustment interface information according to a plug-in downloaded by a user when receiving a message containing specified information, wherein the plug-in comprises a function for acquiring the memory adjustment interface information;
or,
and the third memory adjustment interface information acquisition module is used for acquiring the memory adjustment interface information through the writing equipment node or the writing file node when receiving the message containing the specified information.
7. The terminal of claim 5, wherein the virtual memory adjustment unit comprises:
the virtual memory heightening module is used for calling a corresponding memory adjusting interface to heighten a virtual memory corresponding to a designated application according to the acquired memory adjusting interface information, wherein the designated application is related to the message containing the designated information;
and/or the presence of a gas in the gas,
and the virtual memory reducing module is used for calling the corresponding memory adjusting interface to reduce the virtual memory corresponding to the non-specified application according to the acquired memory adjusting interface information.
8. The terminal according to claim 7, wherein the terminal comprises:
the idle virtual memory counting unit is used for counting the idle virtual memory of the specified application in the running process of the specified application;
and the virtual memory re-heightening unit is used for heightening the virtual memory corresponding to the specified application again when the idle virtual memory of the specified application is smaller than a specified threshold value.
9. A terminal, characterized in that the terminal comprises:
a processor and an input device, wherein the processor is connected to the input device,
the processor is configured to detect whether a message including specified information is received through the input device, and acquire memory adjustment interface information when the message including the specified information is received, where the message including the specified information is information including specified characters, information including specified Activity, or information including a specified process; the specifying information includes information specifying an application;
the processor is further configured to call a corresponding memory adjustment interface to adjust a virtual memory corresponding to the specified application according to the acquired memory adjustment interface information; after the calling the corresponding memory adjustment interface according to the acquired memory adjustment interface information to adjust the virtual memory corresponding to the designated application, the method further includes: and when the preset condition is reached, restoring the virtual memory corresponding to the adjusted specified application into the virtual memory corresponding to the specified application before adjustment.
CN201610818869.6A 2016-09-12 2016-09-12 The Memory adjustments method and terminal of terminal Active CN106484529B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610818869.6A CN106484529B (en) 2016-09-12 2016-09-12 The Memory adjustments method and terminal of terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610818869.6A CN106484529B (en) 2016-09-12 2016-09-12 The Memory adjustments method and terminal of terminal

Publications (2)

Publication Number Publication Date
CN106484529A CN106484529A (en) 2017-03-08
CN106484529B true CN106484529B (en) 2019-05-14

Family

ID=58273461

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610818869.6A Active CN106484529B (en) 2016-09-12 2016-09-12 The Memory adjustments method and terminal of terminal

Country Status (1)

Country Link
CN (1) CN106484529B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110134454B (en) * 2018-02-09 2022-06-14 聚好看科技股份有限公司 Method and device for starting application program
CN109669913B (en) * 2018-12-25 2021-03-19 杭州达现科技有限公司 Storage space distribution method and device based on display interface

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521054B (en) * 2011-12-15 2013-07-17 中国人民解放军国防科学技术大学 DMA (direct memory access) resource allocation method for virtual machine under sun4v architecture
CN103514043B (en) * 2012-06-29 2017-09-29 华为技术有限公司 The data processing method of multicomputer system and the system
CN103888492A (en) * 2012-12-20 2014-06-25 鸿富锦精密工业(深圳)有限公司 Memory management system and method
US9361215B2 (en) * 2013-05-31 2016-06-07 Apple Inc. Memory allocation improvements
CN103605613B (en) * 2013-11-21 2016-09-21 中标软件有限公司 Cloud computing environment dynamically adjusts the method and system of virutal machine memory
CN104750557B (en) * 2013-12-27 2018-07-03 华为技术有限公司 A kind of EMS memory management process and memory management device
CN104216835B (en) * 2014-08-25 2017-04-05 杨立群 A kind of method and device for realizing internal memory fusion

Also Published As

Publication number Publication date
CN106484529A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
CN104383681B (en) Method for controlling game program, device and mobile terminal
CN106453840B (en) The method for adjusting performance and mobile terminal of mobile terminal
WO2016150331A1 (en) Method and device for operating game client
WO2017008569A1 (en) Message updating method, apparatus, and terminal
CN108900231B (en) Dynamic antenna adjustment method and related product
US20180063046A1 (en) Method and apparatus for downloading and displaying pictures
WO2018120905A1 (en) Message reminding method for terminal, and terminal
CN106445596B (en) Method and device for managing setting items
CN108834132B (en) Data transmission method and equipment and related medium product
CN106170034B (en) A kind of sound effect treatment method and mobile terminal
CN106940997B (en) Method and device for sending voice signal to voice recognition system
CN107219951B (en) Touch screen control method and device, storage medium and terminal equipment
CN111371705B (en) Download task execution method and electronic device
CN108334345B (en) Application processing method and device, readable storage medium and mobile terminal
CN107317918B (en) Parameter setting method and related product
CN109714476B (en) Data processing method and device, mobile terminal and storage medium
CN109788423B (en) Voice receiving method, device and computer readable storage medium
CN108833683B (en) Dynamic antenna adjustment implementation method and related product
CN112612598A (en) Anti-addiction method, mobile terminal and computer-readable storage medium
CN107634940B (en) Flow use control method, terminal, server and readable storage medium
CN110691168B (en) Screen control method and device of mobile terminal and storage medium
CN109688611B (en) Frequency band parameter configuration method, device, terminal and storage medium
WO2015078349A1 (en) Microphone sound-reception status switching method and apparatus
CN108810261B (en) Antenna switching method in call and related product
CN106484529B (en) The Memory adjustments method and terminal of terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: 523841 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant