CN107992334B - Startup optimization method and terminal - Google Patents

Startup optimization method and terminal Download PDF

Info

Publication number
CN107992334B
CN107992334B CN201610956461.5A CN201610956461A CN107992334B CN 107992334 B CN107992334 B CN 107992334B CN 201610956461 A CN201610956461 A CN 201610956461A CN 107992334 B CN107992334 B CN 107992334B
Authority
CN
China
Prior art keywords
started
instruction
processes
process set
terminal
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
CN201610956461.5A
Other languages
Chinese (zh)
Other versions
CN107992334A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201610956461.5A priority Critical patent/CN107992334B/en
Publication of CN107992334A publication Critical patent/CN107992334A/en
Application granted granted Critical
Publication of CN107992334B publication Critical patent/CN107992334B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a startup optimization method and a terminal, which are used for unloading target processes in a process set of background processes to be started when the next startup is carried out to obtain an updated process set, wherein the background processes started when the next startup is carried out are the updated process set, and the target processes are fewer in the updated process set, so that the startup time is reduced. The method provided by the embodiment of the invention comprises the following steps: acquiring a process set of background processes to be started when the computer is started; acquiring an unloading instruction of a target process in the process set; and executing the uninstalling instruction, uninstalling the target process to obtain an updated process set, wherein the processes in the updated process set are started when the system is started next time.

Description

Startup optimization method and terminal
Technical Field
The invention relates to the field of computers, in particular to a startup optimization method and a terminal.
Background
The computer is commonly called computer, and is a modern electronic computing machine for high-speed computation, which can perform numerical computation, logic computation and memory function. The intelligent electronic device can be operated according to a program, and can automatically process mass data at a high speed.
MacOSX is a suite of operating systems running on the apple Macintosh family of computers. The Mac system is a graphical operating system based on the Unix kernel, developed by apple inc. In recent years, apple computers have been increasing in market share due to their excellent performance, excellent interface and user experience, and the usage of MacOSX has been rising. The steps from starting up of the Mac system to establishing of the user environment are as follows:
(1) activating mac firmware, initializing hardware, and loading a BootX bootstrap;
(2) boot guiding;
(3) loading a kernel and a kernel extension (kext);
(4) the kernel starts a launchd process;
(5) starting Daemon by the launch process according to the system configuration;
(6) establishing and logging in a user environment;
(7) and the launch process starts the Agent according to the user environment configuration.
In the process of starting up, the time spent on the user is still a little longer, in the prior art, in order to reduce the time spent on starting up, some processes can be set, namely, the option of starting up and logging in is removed from the system setting or the program setting. However, the coverage of the method to the startup item is very low, and the startup item can only be cancelled according to the user process; this approach does not enable the disabling and offloading of some background processes that are useless to the user, time consuming and resource consuming.
Disclosure of Invention
The embodiment of the invention provides a startup optimization method and a terminal, which are used for unloading target processes in a process set of background processes to be started when next startup is carried out to obtain an updated process set, wherein the background processes started when next startup are the updated process set, and the target processes are omitted in the updated process set, so that the startup time is reduced.
In view of this, a first aspect of the embodiments of the present invention provides a method for boot optimization, which may include:
acquiring a process set of background processes to be started when the computer is started;
acquiring an unloading instruction of a target process in the process set;
and executing the uninstalling instruction, uninstalling the target process to obtain an updated process set, wherein the processes in the updated process set are started when the system is started next time.
A second aspect of an embodiment of the present invention provides a terminal, which may include:
the first acquisition module is used for acquiring a process set of a background process to be started during the starting;
the second acquisition module is used for acquiring an uninstalling instruction of the target process in the process set;
and the unloading module is used for executing the unloading instruction, unloading the target process to obtain an updated process set, and starting the processes in the updated process set when the system is started next time.
According to the technical scheme, the embodiment of the invention has the following advantages:
in the embodiment of the invention, the terminal acquires a process set of background processes to be started when the terminal is started; then acquiring an unloading instruction of a target process in the process set; and executing the uninstalling instruction, uninstalling the target process to obtain an updated process set, wherein the processes in the updated process set are started when the system is started next time. In the process of the terminal running, some background target processes can be unloaded, so that in the process of the terminal starting next time, the terminal can be started faster than before because some target processes are less in running, and the starting time is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the embodiments and the drawings used in the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a diagram of an application program provided in an embodiment of the present invention configured to open at login;
FIG. 2 is a schematic diagram of a system setup provided in an embodiment of the present invention with entries removed;
FIG. 3 is a diagram of an embodiment of a method for boot optimization according to an embodiment of the invention;
FIG. 4(a) is a schematic diagram of a configuration file of a system daemon provided by an administrator in the embodiment of the present invention;
FIG. 4(b) is a diagram illustrating an example of an unload instruction;
fig. 5 is a schematic diagram of an embodiment of a terminal in an embodiment of the invention;
fig. 6 is a schematic diagram of another embodiment of the terminal according to the embodiment of the present invention;
fig. 7 is a schematic diagram of another embodiment of the terminal in the embodiment of the present invention;
fig. 8 is a schematic diagram of another embodiment of the terminal in the embodiment of the present invention;
fig. 9 is a schematic diagram of another embodiment of the terminal in the embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a startup optimization method and a terminal, which are used for unloading target processes in a process set of background processes to be started when next startup is carried out to obtain an updated process set, wherein the background processes started when next startup are the updated process set, and the target processes are omitted in the updated process set, so that the startup time is reduced.
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The 21 st century is a society with rapid development of information, the development speed of informatization is faster and faster, the demand of people on networks is larger and larger, the daily life, work and study of people are affected by the networks to generate various changes, and the development of the networks causes various information to break through the regional limitation and be widely spread.
MacOSX is a suite of operating systems running on the apple Macintosh family of computers. The Mac system is a graphical operating system based on the Unix kernel, developed by apple inc. In recent years, apple computers have been increasing in market share due to their excellent performance, excellent interface and user experience, and the usage of MacOSX has been rising.
Some terms that may appear in the embodiments of the present invention are first briefly described as follows:
launch: a general process manager under a Mac system is a process which is resident in a background.
Daemon: the task executed in the Mac system background is not directly controlled by the user, provides functional service for front-end application, and coordinates access to resources.
Agent: the task executed in the Mac system user environment can access user resources, and similar to the Daemon function, the task provides functional service for the front end and coordinates access to the resources.
In the prior art, if a user selects an option of "open at login" for setting some application programs of the Mac computer in the process of using the Mac computer, as shown in fig. 1, the user may remove the option, and the application program will not run in the next startup process of the Mac computer, which may be used to reduce the startup time of the Mac computer. Or, the option of "open at login" is selected for the setting of some application programs, and the user may remove the login item in the system setting, that is, remove the hook before the project, as shown in fig. 2, if the itunes helper application program, the RTX application program, the Foxmail application program, and the enterprise cloud disk application program are not selected, the Mac computer will not start these application programs in the process of starting up, and therefore, the start-up time of the Mac computer can be reduced.
The prior art is simple to operate, and Mac users are familiar with the prior art. However, the technology has very low coverage on the startup item, and only an application program with the startup item is cancelled. The method is usually suitable for an application program which is set to be opened when a user logs in, the user can remove the option of opening when logging in without starting the application program, and a system process which is useless for the user, consumes time and resources or a background process developed by a third party can not be cancelled, so that the starting time of the Mac computer is still to be reduced.
The invention mainly aims to optimize the starting time of the Mac system and accelerate the starting speed. The start-up of the Mac system to the establishment of the user environment is divided into a series of steps, and as shown below, the optimization of any one of these steps can achieve the purpose of optimizing the system start-up time. The invention starts from the launch process in the starting step, and reduces the time for the launch process to start the Daemon and the Agent by unloading the Daemon process and the Agent process which are useless for the user, thereby reducing the starting time of the Mac system.
The steps from starting up of the Mac system to establishing of the user environment are as follows:
(1) activating mac firmware, initializing hardware, and loading a BootX bootstrap;
(2) boot guiding;
(3) loading a kernel and a kernel extension (kext);
(4) the kernel starts a launchd process;
(5) starting Daemon by the launch process according to the system configuration;
(6) establishing and logging in a user environment;
(7) and the launch process starts the Agent according to the user environment configuration.
Optimized in the technical scheme of the invention is that Daemon is started according to system configuration in the launch process in the step (5) and Agent is started according to user environment configuration in the launch process in the step (7).
Launch is a system level process that manages Daemon and agents on a Mac system. Launchd cannot be directly accessed and called and needs to be operated by launchctl command. The invention uses the launchctl command to unload the background process which is not needed on the specific computer according to the requirement, thereby achieving the purpose of improving the starting speed.
The technical solution of the present invention is further described below by way of an embodiment, and as shown in fig. 3, an embodiment of the method for power-on optimization in an embodiment of the present invention is schematically illustrated, which includes:
301. acquiring a process set of background processes to be started when the computer is started;
the execution subject in the embodiment of the present invention may be a terminal, and the terminal may include a computer (desktop, notebook) on which a MacOSX operating system is installed. Taking a notebook as an example to explain, the notebook is already started up and is in a working state, if a user wants to uninstall some background processes, an inquiry operation is performed on the notebook first, and the notebook can obtain a process set of the background processes to be started up during this startup. It should be understood that, in the process set to be started up at this time of startup, there are 5 directories where the process set managed by launch is located in general, as shown in table 1 below:
Figure BDA0001143572760000051
Figure BDA0001143572760000061
TABLE 1
302. Acquiring a stop instruction of a target process;
in the embodiment of the present invention, if a target process is to be uninstalled, the target process is first stopped, that is, a stop instruction for the target process in the process set is first obtained. As mentioned above, Launchd is a system-level process that cannot be directly accessed and invoked and needs to be operated through launchctl commands. Therefore, the stop instruction herein may be referred to as a launchctl stop instruction for short.
For example, in practical applications, the launchctl command has the following 4 types, as shown in table 2 below:
launchctl load com.katiewang.mydaemond.plist loading
launchctl unload com.katiewang.mydaemond.plist Unloading
launchctl start com.katiewang.mydaemond.plist Starting up
launchctl stop com.katiewang.mydaemond.plist Stop
TABLE 2
Launch not com.katiewang.mydaemond. plist, as in the table, representing the use of the launch command to unload a background process named mydaemond;
launchctl stop com. katiewang. mydaemond. plist, representing the use of the launchctl command to stop a background process named mydaemond;
launchctl stop com. katiewang. mydaemond. plist, representing the use of the launchctl command to stop a background process named mydaemond;
launchctl load com, katiewang, mydaemond, plist, represents the use of the launchctl command to load a background process named mydaemond;
launchctl start com. katiewang. mydaemond. plist, represents the use of the launchctl command to start a background process named mydaemond.
It should be noted that com, katiewang, mydaemond, plist represents a configuration file of the background process under the launched directory, and the configuration file under the launched directory is as shown in table 1 above, and is not described herein again.
303. Executing a stop instruction, and stopping the target process;
in the embodiment of the invention, after the notebook computer obtains the stop instruction of the target process in the process set, the operating system in the notebook computer executes the stop instruction to stop the target process. It should be understood that stopping the target process is not a necessary step and the stop instruction may stop the background process directly on the running Mac computer, i.e. steps 302 and 303 are optional steps.
304. Acquiring an unloading instruction of a target process in a process set;
in the embodiment of the invention, a computer acquires an unloading instruction of a target process in a process set; it should be understood that in practice, the following are several possible implementations:
(1) after determining the process set of the processes to be started when starting up next time, the method further comprises: displaying a process set of processes to be started when starting up the next time; obtaining an uninstall instruction for a target process in a process set may include: and receiving an uninstalling instruction of a user for a selected process in the process set of the process to be started through the display interface.
(2) Acquiring an uninstalling instruction of a target process in a process set, comprising the following steps: determining the process allowed to be unloaded according to the importance degree of each process in the process set of the process to be started; an offload instruction is generated for the process that is allowed to be offloaded.
It should be noted that, in the implementation manner (1), the user selects the target process to be uninstalled according to the own requirement, and the computer may receive an uninstalling instruction generated by the operation of the user through the display interface. The method comprises the steps that a user starts a terminal app application program in a Mac system, enters and views a directory of a background process configuration file, determines a background process set needing to be unloaded according to the use habit of the user, executes unloading operation on a target process to be unloaded, generates an unloading instruction by a notebook computer and executes the unloading instruction; in the implementation manner of (2), the client is similar to a computer housekeeper, and the priority of each process in the process set of the processes to be started can be determined after extensive research by a software vendor, and the process with the priority lower than the preset threshold can be determined as the process allowed to be uninstalled, and then an uninstall instruction is generated for the process allowed to be uninstalled. The method is characterized in that a software provider determines a background process set suitable for being unloaded by a user according to research of the background process and using habits of the user, an unloading instruction is packaged and executed, and the method is a mode of replacing manual command input by the user through software operation.
The above-mentioned implementation scheme is to automatically obtain and execute the uninstalling instruction, and the implementation scheme is to perform operation according to the user's own requirements to generate and execute the uninstalling instruction, which provides feasibility for the embodiment of the present invention.
305. And according to the unloading instruction, unloading the target process to obtain an updated process set, wherein the process in the updated process set is started when the system is started next time.
In the embodiment of the invention, after the notebook computer obtains the uninstalling instruction of the target process in the process set, the target process is uninstalled according to the uninstalling instruction to obtain the updated process set, and the process in the updated process set is started when the notebook computer is started next time. It should be understood that in the practical application of the unload instruction, it may be simply called launchctl unload instruction.
In an alternative implementation, executing the offload instruction to offload the target process includes: when the configuration file of the target process is located in the background process under the system directory, increasing the authority to the uninstalling instruction by modifying the uninstalling instruction; and executing the uninstalling instruction after the authority is added, and uninstalling the target process.
Illustratively, on the basis of the above table 1, the directory/Library/LaunchDaemons/, and the configuration file of the system daemon provided by the administrator can be observed, as shown in fig. 4 (a). Using the launchctl command described above, a process that does not need to be started with the system, for example, com. launch not load com, google.
Further, when the operating system directory (non-user directory, directory with "/" as prefix in the table provided in the embodiment of the present invention) is operated, a sudo command is required to be added before the command to raise the authority. The directory with the-' prefix is used as the user directory. For example: com. applet. metadata. mds. plist is a system process that is to be unloaded, the normal launchctl unload instruction is: launchctl unload com.app.metadata.mds.plist, because the system level directory is operated, the unload instruction needs to be modified, sudo command is added to promote the authority, and the modified unload instruction is as follows: andd launchctl unloadcom.applet.metadata.mds.plist, and then unloading according to the sudo launchctl unloadcom.applet.metadata.mds.plist.
Some common services that do not require random startup are described below, such as software for a user or boot assistant, a computer administrator, etc., that can stop or uninstall the following services as appropriate, as shown in table 3:
Figure BDA0001143572760000091
TABLE 3
In the embodiment of the invention, a computer determines a process set of processes to be started when the computer is started next time; acquiring an unloading instruction of a target process in a process set; and according to the unloading instruction, unloading the target process to obtain an updated process set, wherein the process in the updated process set is started when the system is started next time. In the running process of the computer, some background target processes can be unloaded, so that in the next starting process of the computer, the running of some target processes is reduced, and the starting time is faster than before, thereby improving the starting speed and reducing the starting time.
In practical application, the technical scheme of the invention can optimize the starting time of the Mac system, is particularly obvious for household Mac computers with older models and focused functions, and enhances the use experience. The following description is given by taking a practical application scenario as an example, so as to facilitate understanding of the technical solution of the present invention.
Plum is a clerk working in a paperwork, and his apple computer has been used for two years, and for economic reasons, it has not been possible to replace it with a new one. However, the work is still done normally, sometimes the computer compares the cards, the starting speed is extremely slow, and the starting speed exceeds one minute each time, although the plumes also cancel some starting processes in the system setting, some processes are useless, mainly some processes under the system catalog, and cannot be cancelled in the system setting.
The existing computer of the littlefruit is in a starting state, the littlefruit uses the technical scheme of the invention, firstly, a directory where a background process configuration file is located in the table 1 or the table 3 is opened, the littlefruit determines which processes are to be unloaded according to the displayed background processes, and the littlefruit does not need the automatic updating function of a product provided by google corporation, the unloading can be realized through the scheme of the invention, the operation method of the littlefruit is to input a command in a terminal app application, and the input unloading command is as follows: launchctl unloaded com. google. keystone. agent. plist. As shown in fig. 4(b), a schematic diagram of the input of the offload command to the duet is shown, and the offload command input to the duet is automatically activated next time the boot is started.
The more processes the plumes are unloaded, the faster the boot-up speed is, and the corresponding boot-up time is reduced. If some processes are unloaded carelessly, a loading instruction can be input into the terminal, and the loading instruction is automatically effective when the terminal is started next time. That is, in practical applications, the offloaded background process can be resumed at any time.
The method of the scheme has important implementation significance for certain software for managing the computer, such as boot assistant software, computer housekeeper software and the like. For example, a computer manager can integrate the scheme, a program is used for automatically running a launchctl command, and the user only needs to select which items need to be unloaded and can complete optimization by clicking a mouse.
The method for power-on optimization in the embodiment of the present invention is described above, and the terminal provided in the embodiment of the present invention is specifically described below. As shown in fig. 5, which is a schematic diagram of an embodiment of a terminal in the embodiment of the present invention, the schematic diagram includes:
a first obtaining module 501, configured to obtain a process set of a background process to be started when starting up the computer;
a second obtaining module 502, configured to obtain an uninstall instruction for a target process in a process set;
the uninstalling module 503 is configured to execute an uninstalling instruction, uninstall the target process to obtain an updated process set, where the processes in the updated process set are started when the computer is started next time.
Optionally, in some embodiments of the present invention, on the basis shown in fig. 5 and as shown in fig. 6, which is a schematic view of another embodiment of the terminal in the embodiments of the present invention, the uninstalling module 503 includes:
a modifying unit 5031, configured to add, when the configuration file of the target process is located in the system directory, a right to the uninstall instruction by modifying the uninstall instruction;
the uninstalling unit 5032 is configured to execute the uninstalling instruction with the added authority to uninstall the target process.
Optionally, in some embodiments of the present invention, on the basis of the illustration in fig. 5, as shown in fig. 7, is a schematic diagram of another embodiment of the terminal in the embodiments of the present invention,
a second obtaining module 502, configured to obtain a stop instruction for the target process;
the terminal further includes: a stop module 504, configured to execute a stop instruction to stop the target process.
Optionally, in some embodiments of the present invention, on the basis shown in fig. 5, as shown in fig. 8, which is a schematic view of another embodiment of the terminal in the embodiments of the present invention, the terminal further includes:
a display module 505, configured to display a process set of processes to be started when the computer is started next time;
the second obtaining module 502 is specifically configured to receive, through the display interface, an uninstall instruction of a user for a process selected from the process set of processes to be started.
Alternatively, in some embodiments of the present invention,
a second obtaining module 502, configured to determine, according to the importance degree of each process in the process set of the processes to be started, a process that is allowed to be uninstalled; an offload instruction is generated for the process that is allowed to be offloaded.
As shown in fig. 9, for convenience of description, only the parts related to the embodiment of the present invention are shown, and details of the specific technology are not disclosed, please refer to the method part of the embodiment of the present invention. The terminal can be integrated with the terminal and connected with the terminal through a wired communication interface or a wireless communication interface.
Fig. 9 is a block diagram illustrating a partial structure related to a terminal provided in an embodiment of the present invention. Referring to fig. 9, the terminal includes: radio Frequency (RF) circuit 910, memory 920, input unit 930, display unit 940, sensor 950, audio circuit 960, wireless fidelity (WiFi) module 970, processor 980, and power supply 990. Those skilled in the art will appreciate that the terminal structure shown in fig. 9 does not constitute a limitation of the terminal, 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 constituent element of the terminal in detail with reference to fig. 9:
the RF circuit 910 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, for receiving downlink information of a base station and then processing the received downlink information to the processor 980; in addition, the data for designing uplink is transmitted to the base station. In general, the RF circuit 910 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, the RF circuit 910 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 communication (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), and the like.
The memory 920 may be used to store software programs and modules, and the processor 980 performs various functional applications of the terminal and data processing by operating the software programs and modules stored in the memory 920. The memory 920 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 terminal, etc. Further, the memory 920 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 930 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal. Specifically, the input unit 930 may include a touch panel 931 and other input devices 932. The touch panel 931, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 931 (e.g., a user's operation on or near the touch panel 931 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a preset program. Alternatively, the touch panel 931 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 980, and can receive and execute commands sent by the processor 980. In addition, the touch panel 931 may be implemented by various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 930 may include other input devices 932 in addition to the touch panel 931. In particular, other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 940 may be used to display information input by the user or information provided to the user and various menus of the terminal. The Display unit 940 may include a Display panel 941, and optionally, the Display panel 941 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 931 may cover the display panel 941, and when the touch panel 931 detects a touch operation on or near the touch panel 931, the touch panel transmits the touch operation to the processor 980 to determine the type of the touch event, and then the processor 980 provides a corresponding visual output on the display panel 941 according to the type of the touch event. Although in fig. 9, the touch panel 931 and the display panel 941 are implemented as two independent components to implement the input and output functions of the terminal, in some embodiments, the touch panel 931 and the display panel 941 may be integrated to implement the input and output functions of the terminal.
The terminal may also include at least one sensor 950, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 941 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 941 and/or a backlight when the terminal is moved to the ear. As one of the motion sensors, the accelerometer sensor may detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when stationary, and may be used for applications (such as horizontal and vertical screen switching, related interactive applications, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping) and the like for recognizing the attitude of the terminal, and the terminal may be further configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
The audio circuitry 960, speaker 961, microphone 962 may provide an audio interface between the user and the terminal. The audio circuit 960 may transmit the electrical signal converted from the received audio data to the speaker 961, and convert the electrical signal into a sound signal for output by the speaker 961; on the other hand, the microphone 962 converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 960, and outputs the audio data to the processor 980 for processing, and then transmits the audio data to another terminal via the RF circuit 910, or outputs the audio data to the memory 920 for further processing.
WiFi belongs to a short-distance wireless transmission technology, and the terminal can help a user to send and receive e-mails, browse webpages, access streaming media and the like through the WiFi module 970, which provides wireless broadband internet access for the user. Although fig. 9 shows the WiFi module 970, it is understood that it does not belong to the essential constitution of the terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 980 is a control center of the terminal, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal and processes data by running or executing software programs and/or modules stored in the memory 920 and calling data stored in the memory 920, thereby integrally monitoring the terminal. Alternatively, processor 980 may include one or more processing units; preferably, the processor 980 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 the processor 980.
The terminal also includes a power supply 990 (e.g., a battery) for supplying power to the various components, which may be logically connected to the processor 980 via a power management system, for managing charging, discharging, and power consumption via the power management system.
Although not shown, the terminal may further include a camera, a bluetooth module, and the like, which will not be described herein.
In the embodiment of the present invention, the processor 980 included in the terminal further has the following functions: acquiring a process set of background processes to be started when the computer is started; and executing the uninstalling instruction, uninstalling the target process to obtain an updated process set, wherein the process in the updated process set is started when the computer is started next time.
The input unit 930 included in the terminal also has the following functions: and acquiring an unloading instruction of a target process in the process set.
Optionally, in some embodiments of the invention, the processor 980 also has the following functionality: when the configuration file of the target process is located under the system directory, increasing the authority to the uninstalling instruction by modifying the uninstalling instruction; and executing the uninstalling instruction after the authority is added, and uninstalling the target process.
Optionally, in some embodiments of the present invention, the input unit 930 further has the following functions: acquiring a stop instruction of a target process;
the processor 980 also has the following functions: and executing a stop instruction to stop the target process.
Optionally, in some embodiments of the invention, the processor 980 also has the following functionality: displaying a process set of processes to be started when starting up the next time; and receiving an uninstalling instruction of a user for a selected process in the process set of the process to be started through the display interface.
Optionally, in some embodiments of the invention, the processor 980 also has the following functionality: determining the process allowed to be unloaded according to the importance degree of each process in the process set of the process to be started; an offload instruction is generated for the process that is allowed to be offloaded.
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 manners. 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 integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit 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-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for boot optimization, comprising:
starting an application program in a system to obtain a process set of a background process to be started when starting the system, wherein the process set comprises a process managed by a launch, and the launch is a system-level process which cannot be directly accessed and called;
acquiring an uninstalling instruction of a target process in the process set, wherein the uninstalling instruction comprises the following steps: determining the priority of each process in the process set of the background processes to be started, determining the background processes to be started with the priority lower than a preset threshold value as the processes allowed to be unloaded, and generating unloading instructions for the processes allowed to be unloaded;
and executing the uninstalling instruction through a launchctl command, uninstalling the target process to obtain an updated process set, wherein the processes in the updated process set are started when the computer is started next time.
2. The method of claim 1, wherein offloading the target process according to the offload instruction comprises:
when the configuration file of the target process is located under a system directory, adding permission to the uninstalling instruction by modifying the uninstalling instruction;
and executing the uninstalling instruction after the authority is added, and uninstalling the target process.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
acquiring a stop instruction of the target process;
and executing the stop instruction to stop the target process.
4. The method of claim 1 or 2, wherein after determining a process set of processes to be started at next boot, the method further comprises:
and displaying the process set of the process to be started when the computer is started next time.
5. A terminal, comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for starting an application program in the system so as to acquire a process set of a background process to be started when the system is started, the process set comprises a process managed by a launch, and the launch is a system level process which cannot be directly accessed and called;
a second obtaining module, configured to obtain an uninstall instruction for a target process in the process set, where the obtaining module is configured to: determining the priority of each process in the process set of the background processes to be started, determining the background processes to be started with the priority lower than a preset threshold value as the processes allowed to be unloaded, and generating unloading instructions for the processes allowed to be unloaded;
and the unloading module is used for executing the unloading instruction through a launchctl command, unloading the target process to obtain an updated process set, and starting the processes in the updated process set when starting up next time.
6. The terminal of claim 5, wherein the offload module comprises:
the modifying unit is used for adding the authority to the uninstalling instruction by modifying the uninstalling instruction when the configuration file of the target process is positioned under a system directory;
and the unloading unit is used for executing the unloading instruction after the authority is added and unloading the target process.
7. The terminal according to claim 5 or 6,
the second obtaining module is further configured to obtain a stop instruction for the target process;
the terminal further comprises:
and the stopping module is used for executing the stopping instruction and stopping the target process.
8. The terminal according to claim 5 or 6, characterized in that the terminal further comprises:
and the display module is used for displaying the process set of the process to be started when the computer is started next time.
9. A computer-readable storage medium, in which a program is stored which, when executed by a computer device comprising a processor, causes the computer device to carry out the steps of the method for boot optimization according to any one of claims 1 to 4.
10. A terminal device comprising a processor and a memory;
the memory is used for storing a software program;
the processor is configured to execute the software program stored in the memory to cause the terminal device to perform the boot-strap optimization method according to any one of claims 1-4.
CN201610956461.5A 2016-10-27 2016-10-27 Startup optimization method and terminal Active CN107992334B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610956461.5A CN107992334B (en) 2016-10-27 2016-10-27 Startup optimization method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610956461.5A CN107992334B (en) 2016-10-27 2016-10-27 Startup optimization method and terminal

Publications (2)

Publication Number Publication Date
CN107992334A CN107992334A (en) 2018-05-04
CN107992334B true CN107992334B (en) 2021-06-01

Family

ID=62028452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610956461.5A Active CN107992334B (en) 2016-10-27 2016-10-27 Startup optimization method and terminal

Country Status (1)

Country Link
CN (1) CN107992334B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102163150A (en) * 2010-02-24 2011-08-24 腾讯科技(深圳)有限公司 System starting method and apparatus
CN102981863A (en) * 2011-09-07 2013-03-20 奇智软件(北京)有限公司 Management method and device of starting up projects
CN103345408A (en) * 2013-06-26 2013-10-09 深圳市金立通信设备有限公司 Terminal starting-up accelerating method and terminal
CN105468480A (en) * 2014-08-13 2016-04-06 腾讯科技(深圳)有限公司 Startup management method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103150248B (en) * 2013-03-22 2015-03-18 腾讯科技(深圳)有限公司 Method and device for measuring and calculating startup time consumption
CN105094280A (en) * 2015-07-07 2015-11-25 北京奇虎科技有限公司 Method, apparatus and system for improving standby performance of intelligent terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102163150A (en) * 2010-02-24 2011-08-24 腾讯科技(深圳)有限公司 System starting method and apparatus
CN102981863A (en) * 2011-09-07 2013-03-20 奇智软件(北京)有限公司 Management method and device of starting up projects
CN103345408A (en) * 2013-06-26 2013-10-09 深圳市金立通信设备有限公司 Terminal starting-up accelerating method and terminal
CN105468480A (en) * 2014-08-13 2016-04-06 腾讯科技(深圳)有限公司 Startup management method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Mac OS启动服务优化高级篇(转);龙铳让刃_662;《http://blog.sina.com.cn/s/blog_54447c900101b47x.html》;20120910;第1-3页 *

Also Published As

Publication number Publication date
CN107992334A (en) 2018-05-04

Similar Documents

Publication Publication Date Title
US10635449B2 (en) Method and apparatus for running game client
CN103544033B (en) Method, device and associated equipment for rolling back application program
CN104965721A (en) Method and apparatus for updating an application
CN106775833B (en) Device driver loading method, terminal and system
CN106502703B (en) Function calling method and device
CN106843868B (en) Multi-account login method and device and mobile terminal
JP6492184B2 (en) Method, device, and system for managing information recommendations
CN105278937A (en) Method and device for displaying pop-up box messages
CN106713608B (en) Application function state modification method and device and terminal
US9588757B2 (en) Data update method, user terminal, and data update system
CN105227598A (en) A kind of resource sharing method, device and system stored based on cloud
CN104253870A (en) Method and device for controlling data access period
CN106095423B (en) Method, terminal and server for providing browsing service
CN106919458B (en) Method and device for Hook target kernel function
US9928134B2 (en) Method and apparatus for repairing dynamic link library file
CN105278942B (en) Component management method and device
US11150913B2 (en) Method, device, and terminal for accelerating startup of application
CN107766351B (en) File directory identification method and device
WO2017206851A1 (en) Method for assigning installation task and mobile terminal
CN113039517B (en) Audio resource calling method and device and electronic equipment
CN104866288A (en) Method, device and terminal for accessing application program
CN106933626B (en) Application association method and device
CN107122204B (en) Application unloading state detection method and device
CN107992334B (en) Startup optimization method and terminal
CN106445594B (en) System application installation method and device and terminal equipment

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
GR01 Patent grant
GR01 Patent grant