CN107608797B - File processing method and device, storage medium and electronic equipment - Google Patents
File processing method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN107608797B CN107608797B CN201710918821.7A CN201710918821A CN107608797B CN 107608797 B CN107608797 B CN 107608797B CN 201710918821 A CN201710918821 A CN 201710918821A CN 107608797 B CN107608797 B CN 107608797B
- Authority
- CN
- China
- Prior art keywords
- cpu
- task
- file processing
- core
- running
- 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.)
- Expired - Fee Related
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 23
- 238000012545 processing Methods 0.000 claims abstract description 137
- 238000000034 method Methods 0.000 claims description 24
- 238000004590 computer program Methods 0.000 claims description 10
- 230000008569 process Effects 0.000 description 12
- 239000002609 medium Substances 0.000 description 11
- 230000002093 peripheral effect Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 4
- 239000003999 initiator Substances 0.000 description 4
- 239000002699 waste material Substances 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 230000002452 interceptive effect Effects 0.000 description 3
- 238000012546 transfer Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000003780 insertion Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 239000012120 mounting media Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Landscapes
- Stored Programmes (AREA)
Abstract
According to the file processing method, the file processing device, the storage medium and the electronic equipment, when a starting instruction of a file processing task based on MTP is detected, the MTP drive is called to start a CPU multi-core and improve the performance output of the CPU; running a file processing task on a big core of a CPU, wherein the MTP driver continuously detects the file processing task; and when the MTP driver detects that the file processing task is ended, reducing the performance output of a CPU. By adopting the technical scheme, the speed of file processing operation can be improved.
Description
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a file processing method and device, a storage medium and electronic equipment.
Background
With the rapid development of the mobile internet, the popularization of electronic devices is becoming more and more widespread. The operation processing procedure of files between the electronic device and other external storage devices uses MTP (Media Transfer Protocol) as a main Transfer mode by default. The MTP is a custom extension Protocol based on a Picture Transfer Protocol (PTP), and belongs to a part of a Windows Media framework. However, the processing speed is slow when the MTP-based rule is used for processing files in the electronic device, especially when a plurality of files are processed, so a more optimized file processing method is required.
Disclosure of Invention
The embodiment of the application provides a file processing method and device, a storage medium and an electronic device, which can improve the speed of file processing.
In a first aspect, an embodiment of the present application provides a file processing method, including:
when a starting instruction of a file processing task based on MTP is detected, an MTP drive is called to start a CPU multi-core and improve the performance output of the CPU;
running a file processing task on a big core of a CPU, wherein the MTP driver continuously detects the file processing task;
and when the MTP driver detects that the file processing task is ended, reducing the performance output of a CPU.
In a second aspect, an embodiment of the present application provides a file processing apparatus, including:
the starting adjustment module is used for calling the MTP drive to start the CPU multi-core and improve the performance output of the CPU when a starting instruction of the MTP-based file processing task is detected;
the operation adjusting module is used for operating a file processing task on a big core of the CPU, wherein the MTP driver continuously detects the file processing task;
and the ending adjustment module is used for reducing the performance output of the CPU when the MTP driver detects that the file processing task is ended.
In a third aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements a file processing method according to the present application.
In a fourth aspect, an embodiment of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the file processing method according to the embodiment of the present application.
According to the file processing method provided by the embodiment of the application, when a starting instruction of a file processing task based on MTP is detected, the MTP drive is called to start the CPU multi-core and improve the performance output of the CPU; running a file processing task on a big core of a CPU, wherein the MTP driver continuously detects the file processing task; and when the MTP driver detects that the file processing task is ended, reducing the performance output of a CPU. By adopting the technical scheme, the speed of file processing operation can be improved.
Drawings
Fig. 1 is a schematic flowchart of a file processing method according to an embodiment of the present application;
fig. 2 is a scene schematic diagram of a file processing task based on MTP according to an embodiment of the present application;
FIG. 3 is a schematic flow chart diagram illustrating another document processing method according to an embodiment of the present application;
FIG. 4 is a schematic flow chart diagram illustrating another document processing method according to an embodiment of the present application;
fig. 5 is a block diagram of a file processing apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical scheme of the application is further explained by the specific implementation mode in combination with the attached drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
The file operation Processing procedure between the electronic device and other external terminal devices uses MTP as a main transmission mode by default, and file Processing operation based on MTP can only process one file or one folder each time, so that time consumption for Processing the whole process of a plurality of files is large when a plurality of files are processed, and therefore when the file Processing task based on MTP is run, the running condition of the file Processing task is optimized according to the running condition of a Central Processing Unit (CPU) of the electronic device, and the file Processing process speed of a user can be increased.
Fig. 1 is a flowchart of a file processing method provided in an embodiment of the present application, where the file processing method may be executed by a file processing apparatus, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in a terminal device. As shown in fig. 1, the method includes:
and step 110, when a starting instruction of the MTP-based file processing task is detected, calling an MTP drive to start the CPU multi-core and improving the performance output of the CPU.
Illustratively, as shown in fig. 2, the MTP-based file processing task is a file processing task between the electronic device and an external terminal device, and includes at least one of a file copy task, a file cut task, a file paste task, a file delete task, and a file rename task. The electronic device can be a smart phone, a tablet computer or other android system running devices, and the external terminal device can be a PC or other operable devices. Two roles are involved in the execution of the MTP-based file processing task, including an Initiator (Initiator) and a Responder (Responder); the external terminal equipment is used as an initiator, the electronic equipment is used as a responder, and the initiator and the responder are matched with each other for communication so as to complete the document processing task. For example, the smart phone is connected with an external computer, and a file or a folder in the smart phone is copied to a hard disk of the computer through computer operation, or the file or the folder in the smart phone is deleted through the computer, or the file or the folder in the smart phone is renamed through the computer, and the like.
Exemplarily, when MtpServer detects a start instruction of an MTP-based file processing task, an MTP driver is called by an ioctl command, and the MTP driver performs CPU scheduling, including: starting CPU multi-core and improving the performance output of the CPU. Boosting the performance output of the CPU may include boosting the frequency of the CPU, which may be adjusting the frequency of the CPU to a maximum. The frequency of the CPU, namely the clock frequency of the CPU, namely the working frequency of the CPU during operation is adjusted to the designed highest frequency of the CPU, so that the working performance of the CPU is maximized. The MTP driver is located in the kernel, and the ioctl command is a function for managing an I/O channel of the device in the device driver, and provides a way of obtaining device information and sending control parameters to the device. The MtpServer continuously detects whether a starting instruction of a file processing task exists, performs related processing on the corresponding instruction, and calls the MTP driver through an ioctl command when the starting instruction is detected so that the MTP driver executes the scheduling of the CPU.
Optionally, the frequency of the CPU is correspondingly adjusted according to the number of tasks in the file processing task and/or the size of task data, where the number of tasks is the total number of tasks in the file processing task, and the size of task data is the sum of the sizes of data of files processed in the file processing task. The more the number of the tasks is, the higher the frequency of correspondingly improving the CPU is, the larger the size of the task data is, and the higher the frequency of correspondingly improving the CPU is. For example, a file processing task includes one file copy task and two file delete tasks, where the task data size of the file copy task is 10 mbytes (megabytes), the task data size of one file delete task is 5 mbytes, and the task data size of the other file delete task is 13 mbytes, then the number of tasks for the file processing task is three, and the task data size of the file processing task is 28 mbytes.
If the frequency of the CPU is directly adjusted to the maximum under the condition that the number of the file processing tasks is small and/or the size of the task data is small, the CPU resource is wasted, and the electricity consumption of the electronic equipment is accelerated. The CPU frequency is correspondingly adjusted according to the number of the tasks with heavy file processing tasks and/or the size of the task data, so that the more suitable CPU frequency can be improved, the operation speed of the file processing tasks is increased, and meanwhile, redundant resource waste is avoided.
And step 120, running a file processing task on a big core of the CPU, wherein the MTP driver continuously detects the file processing task.
The CPU is a multi-core CPU, namely, a plurality of complete cores are integrated in one CPU, and the multi-core CPU can be a four-core CPU or an eight-core CPU. The multi-core CPU is provided with a plurality of cores, wherein the cores comprise a plurality of large cores and a plurality of small cores, the large cores have higher running performance, and the small cores have lower running performance. The file processing task is operated on the big core, so that the speed of the file processing task can be increased.
The MTP driver continuously detects the file processing task, i.e., continuously detects the progress of the file processing task. Since the number and size of the file processing tasks are unpredictable and the running time of the file processing tasks is not known. If the performance output of the CPU is adjusted to the maximum for a long time, the resource waste of the CPU and the power consumption may be caused after the file processing task is finished. If the performance output of the CPU is set to be increased for a time interval, it may happen that the time interval ends but the file processing task is still running, which may slow down the processing speed of the subsequent stage of the file processing task. Therefore, the MTP driver continuously detects the file processing task, the operation time of the file processing task can be accurately judged, and the performance output of the CPU is reduced when the end of the file processing task is detected. Therefore, the running speed of the file processing task can be improved, the waste of CPU resources can be reduced, and the power consumption can be reduced.
And step 130, when the MTP driver detects that the file processing task is finished, reducing the performance output of the CPU.
When the MTP driver detects that the file processing task is finished, the MTP driver performs CPU scheduling again, including: reducing the performance output of the CPU. Reducing the performance output of the CPU may be reducing the frequency of the CPU, and optionally reducing the frequency of the CPU to a frequency before invoking the MTP drive to turn on the CPU multi-core and improve the performance output operation of the CPU.
Before the performance output operation of the CPU is improved, the frequency of the CPU is the frequency which accords with the running condition of the CPU at the moment, the performance output of the CPU is reduced to the frequency, and the performance output which accords with the running condition of the CPU can be recovered after the file processing task is finished.
Optionally, the method further comprises, after reducing the performance output of the CPU: and determining whether to shut down the CPU multiple cores according to the current system load, and adjusting the frequency of the CPU.
The CPU multi-core is determined whether to be closed or not according to the current system load, and the frequency of the CPU is adjusted, so that the performance output of the CPU is more consistent with the current running state of the CPU. Since a user may start and run a new application using the electronic device during the running of the file processing task, the corresponding CPU runs a new task process during the running of the file processing task, resulting in a change in system load. Therefore, the performance output of the CPU is readjusted according to the system load, and whether the multi-core is closed or not is judged; the running state of the CPU after the file processing task is processed can be more stable, and no redundant resource waste is caused.
Because the system determines whether to close the CPU multi-core according to the actual system load after the file operation is finished, the frequency of the CPU is firstly reduced to the frequency before the MTP drive is called to open the CPU multi-core and the performance output operation of the CPU is improved. And when the system determines whether to close the CPU multi-core according to the actual system load after the file operation is finished, simultaneously, the frequency of the CPU is adjusted according to the actual system load. The frequency of the CPU is reduced, and then the frequency is adjusted according to the actual load of the system, so that the power consumption of the electronic equipment can be reduced.
Alternatively, as shown in fig. 3, running a file processing task on a large core of a CPU may be implemented by:
and step 121, judging whether the CPU has an idle large core, if so, executing step 1210, and if not, executing step 122.
and 1210, operating the file processing task on the big core of the CPU.
If the number of task processes running on the CPU is large, all the big cores have running tasks, and no idle big core exists, the running state of the tasks on the big cores on the CPU is continuously detected, and when the task currently running on any one big core is detected to be finished, the file processing task is run on the big core. So that the progress of the file processing task can be run on the big core as soon as possible. Optionally, if the CPU has neither an idle large core nor an idle small core, the task running states of the large core and the small core of the CPU are continuously detected until the idle large core or the idle small core occurs, and the file processing task is run on the idle large core or the idle small core. Optionally, before the task currently running on the big core of the CPU is finished, the file processing task is run on the idle small core; and when detecting that the task currently running on any one large core is finished, transferring the file processing task from the small core to the large core to run. And adjusting the operation of the file processing task according to the task operation state of the CPU, and placing the file processing task on a big core of the CPU to operate as much as possible.
In another embodiment, as shown in FIG. 4, running a file processing task on a large core of a CPU may also be implemented by:
and step 121, judging whether the CPU has an idle big core, if so, executing step 1210, and if not, executing step 123.
And 123, continuously detecting the task running state of the big core of the CPU, judging whether a queued task exists on the big core when detecting that the task currently running on the big core of the CPU is finished, if not, executing a step 1210, and if so, executing a step 124.
And step 124, judging whether the queued task is a target application operated in the foreground, if so, executing step 125, and if not, executing step 1210.
And 1210, operating the file processing task on the big core of the CPU.
The task process running on the CPU can have queued tasks in addition to the currently running task process, and the kernel can schedule the tasks of the CPU according to the system load. Under normal conditions, when a currently running task on a big core of the CPU is finished, the kernel can run the queued task on the big core. And when a file processing task exists, the file processing task is inserted to occupy a large core for running, namely the file processing task occupies the large core before the queued task, and the queued task runs on the large core until the progress of the file processing task is finished. However, if the queued task is a target application running in the foreground, the file processing task is queued to occupy a large kernel, which results in poor running status of the target application running in the foreground, and inconvenience is directly brought to the user.
The target application comprises an application with higher requirement on a running environment, an instant application or an application with time consistency of interactive presentation. The applications with higher requirements on the operating environment include applications occupying a CPU proportion higher than a set proportion, such as a 3D game application, a modeling simulation application or a picture processing application, which have higher requirements on the operating conditions of the CPU, and need to run on a large core to normally operate, otherwise, the applications are easily stuck or crashed, and the operating data of the user may be lost.
The instant applications include instant messaging applications or network games, which have high requirements on timeliness, such as FaceTime, and when video calls are carried out, if the running environment cannot meet the requirements of the instant messaging applications due to queue insertion, the quality of the video calls will be affected, and inconvenience is brought to the operation of users.
The application with time consistency of interactive presentation comprises a video application or a music application, namely the interactive presentation which needs time consistency in the application use process of a user. For example, when a video application plays a video, a continuous and stable playing condition is required, and if the running environment of the video application cannot be guaranteed, the video playing is jammed or the picture speed is not uniform, which may also greatly affect the use of the user.
Therefore, when the task queued on the big core of the CPU is the target application of foreground operation, the operation of inserting the file processing task to occupy the big core is not performed, but the queued task is run on the big core, and the task running state of the big core of the CPU is continuously detected. And running the file processing task on the idle large core until the next idle large core appears and no queued task exists on the idle large core or the queued task on the idle large core is not the target application of foreground operation. Therefore, the speed of the file processing task can be increased, and meanwhile, the use operation of the user in the foreground is not influenced.
Fig. 5 is a block diagram of a document processing apparatus according to an embodiment of the present application, where the apparatus may execute a document processing method. As shown in fig. 5, the apparatus includes:
the starting adjustment module 210 is configured to, when a starting instruction of the MTP-based file processing task is detected, invoke an MTP driver to start the CPU multi-core and improve the performance output of the CPU;
the operation adjusting module 220 is configured to operate a file processing task on a large core of a CPU, where the MTP driver continuously detects the file processing task;
and an end adjustment module 230, configured to reduce the performance output of the CPU when the MTP driver detects that the file processing task is ended.
When the file processing device provided by the embodiment of the application detects a starting instruction of a file processing task based on MTP, the MTP drive is called to start the CPU multi-core and improve the performance output of the CPU; running a file processing task on a big core of a CPU, wherein the MTP driver continuously detects the file processing task; and when the MTP driver detects that the file processing task is ended, reducing the performance output of a CPU. By adopting the technical scheme, the speed of file processing operation can be improved.
Optionally, the file processing task includes at least one of a file copying task, a file cutting task, a file pasting task, a file deleting task, and a file renaming task;
the start adjustment module is specifically configured to:
and calling an MTP drive to start the CPU multi-core, and correspondingly adjusting the frequency of the CPU according to the number of tasks and/or the size of task data in the file processing task.
Optionally, the operation adjusting module specifically includes:
the operation judging unit is used for judging whether an idle large core exists on the CPU, if so, executing a file processing task on the large core of the CPU, and if not, executing the operation queue-inserting unit;
and the running queue-inserting unit is used for continuously detecting the task running state of the big core of the CPU and running the file processing task on the big core of the CPU when detecting that the task currently running on the big core of the CPU is finished.
Optionally, the run queue-insertion unit is specifically configured to:
when detecting that the task currently running on the big core of the CPU is finished, judging whether a queued task exists on the big core, if not, running the file processing task on the big core of the CPU, and if so, judging whether the queued task is a target application running in the foreground;
when the queued task is a target application running in the foreground, running the queued task on the big core of the CPU, and returning to execute the operation of continuously detecting the task running state of the big core of the CPU;
and when the queued task is not the target application operated in the foreground, operating the file processing task on the big core of the CPU.
Optionally, the target application includes at least one of an application occupying a CPU ratio higher than a set ratio, an instant messaging application, a video application, and an online game application.
Optionally, the ending adjustment module is specifically configured to:
reducing the frequency of the CPU to the frequency before the MTP drive is called to start the multi-core of the CPU and improve the performance output operation of the CPU;
accordingly, the file processing apparatus further includes:
and the load adjusting module is used for determining whether to close the CPU multi-core according to the current system load and adjusting the frequency of the CPU.
The storage medium containing the computer-executable instructions provided by the embodiments of the present application is not limited to the above-mentioned file processing operations, and may also perform related operations in the file processing method provided by any embodiments of the present application.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
The embodiment of the application provides electronic equipment, and the file processing device provided by the embodiment of the application can be integrated in the electronic equipment. Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 6, the electronic device may include: a casing (not shown), a touch screen (not shown), touch keys (not shown), a memory 301, a Central Processing Unit (CPU) 302 (also called a processor, hereinafter referred to as CPU), a circuit board (not shown), and a power circuit (not shown). The circuit board is arranged in a space enclosed by the shell; the CPU302 and the memory 301 are disposed on the circuit board; the power supply circuit is used for supplying power to each circuit or device of the electronic equipment; the memory 301 is used for storing executable program codes; the CPU302 executes a computer program corresponding to the executable program code by reading the executable program code stored in the memory 301 to implement the steps of:
when a starting instruction of a file processing task based on MTP is detected, an MTP drive is called to start a CPU multi-core and improve the performance output of the CPU;
running a file processing task on a big core of a CPU, wherein the MTP driver continuously detects the file processing task;
and when the MTP driver detects that the file processing task is ended, reducing the performance output of a CPU.
The electronic device further includes: peripheral interface 303, RF (Radio Frequency) circuitry 305, audio circuitry 306, speakers 311, power management chip 308, input/output (I/O) subsystems 309, touch screen 312, other input/control devices 310, and external ports 304, which communicate via one or more communication buses or signal lines 307.
It should be understood that the illustrated electronic device 300 is merely one example of an electronic device, and that the electronic device 300 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The following describes in detail an electronic device for executing a file processing method provided in this embodiment, where the electronic device is a mobile phone as an example.
A memory 301, the memory 301 being accessible by a CPU302, a peripheral interface 303, or the like, the memory 301 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices.
A peripheral interface 303, said peripheral interface 303 being capable of connecting input and output peripherals of the device to the CPU302 and the memory 301.
I/O subsystem 309, the I/O subsystem 309 may connect input and output peripherals on the device, such as touch screen 312 and other input/control devices 310, to the peripheral interface 303. The I/O subsystem 309 may include a display controller 3091 and one or more input controllers 3092 for controlling other input/control devices 310. Where one or more input controllers 3092 receive electrical signals from or send electrical signals to other input/control devices 310, the other input/control devices 310 may include physical buttons (push buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels. It is noted that the input controller 3092 may be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
A touch screen 312, the touch screen 312 being an input interface and an output interface between the user electronic device and the user, displaying visual output to the user, which may include graphics, text, icons, video, and the like.
The display controller 3091 in the I/O subsystem 309 receives electrical signals from the touch screen 312 or transmits electrical signals to the touch screen 312. The touch screen 312 detects a contact on the touch screen, and the display controller 3091 converts the detected contact into an interaction with a user interface object displayed on the touch screen 312, i.e., implements a human-machine interaction, and the user interface object displayed on the touch screen 312 may be an icon for running a game, an icon networked to a corresponding network, or the like. It is worth mentioning that the device may also comprise a light mouse, which is a touch sensitive surface that does not show visual output, or an extension of the touch sensitive surface formed by the touch screen.
The RF circuit 305 is mainly used to establish communication between the mobile phone and the wireless network (i.e., the network side), and implement data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving short messages, e-mails, etc. In particular, the RF circuitry 305 receives and transmits RF signals, also referred to as electromagnetic signals, through which the RF circuitry 305 converts electrical signals to or from electromagnetic signals and communicates with communication networks and other devices. RF circuitry 305 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC (CODEC) chipset, a Subscriber Identity Module (SIM), and so forth.
The audio circuit 306 is mainly used to receive audio data from the peripheral interface 303, convert the audio data into an electric signal, and transmit the electric signal to the speaker 311.
And a speaker 311 for converting the voice signal received by the handset from the wireless network through the RF circuit 305 into sound and playing the sound to the user.
And the power management chip 308 is used for supplying power and managing power to the hardware connected with the CPU302, the I/O subsystem, and the peripheral interface.
The electronic equipment provided by the embodiment of the application can improve the speed of file processing operation.
The file processing device, the storage medium and the electronic device provided in the above embodiments may execute the file processing method provided in any embodiment of the present application, and have corresponding functional modules and beneficial effects for executing the method. For technical details that are not described in detail in the above embodiments, reference may be made to a file processing method provided in any embodiment of the present application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims (7)
1. A file processing method, comprising:
when a starting instruction of a file processing task based on MTP is detected, an MTP drive is called to start a CPU multi-core, and the frequency of the CPU is correspondingly adjusted according to the number of tasks and/or the size of task data in the file processing task;
judging whether a CPU has an idle big core, if so, executing a file processing task on the big core of the CPU, if not, continuously detecting the task running state of the big core of the CPU, judging whether a queued task exists on the big core when detecting that the task currently running on the big core of the CPU is finished, if not, running the file processing task on the big core of the CPU, and if so, judging whether the queued task is a target application running in the foreground;
when the queued task is a target application running in the foreground, running the queued task on the big core of the CPU, and returning to execute the operation of continuously detecting the task running state of the big core of the CPU;
when the queued task is not the target application operated by the foreground, operating a file processing task on a big core of the CPU, wherein the MTP driver continuously detects the file processing task;
and when the MTP driver detects that the file processing task is ended, reducing the performance output of a CPU.
2. The method of claim 1, wherein the file processing tasks include at least one of a file copy task, a file cut task, a file paste task, a file delete task, and a file rename task.
3. The method of claim 1, wherein the target application comprises at least one of an application occupying a CPU proportion higher than a set proportion, an instant messaging application, a video application, and a network game application.
4. The method of any of claims 1 to 3, wherein the reducing the performance output of the CPU comprises:
reducing the frequency of the CPU to the frequency before the MTP drive is called to start the multi-core of the CPU and improve the performance output operation of the CPU;
correspondingly, after the reducing the performance output of the CPU, the method further includes: and determining whether to shut down the CPU multiple cores according to the current system load, and adjusting the frequency of the CPU.
5. A document processing apparatus, characterized by comprising:
the starting adjustment module is used for calling the MTP drive to start the CPU multi-core when a starting instruction of the MTP-based file processing task is detected, and correspondingly adjusting the frequency of the CPU according to the number of tasks and/or the size of task data in the file processing task;
the operation adjusting module is used for judging whether an idle large core exists on the CPU or not, if so, executing a file processing task on the large core of the CPU, if not, continuously detecting the task operation state of the large core of the CPU, judging whether a queued task exists on the large core when detecting that the task currently running on the large core of the CPU is finished, if not, running the file processing task on the large core of the CPU, and if so, judging whether the queued task is a target application running in the foreground; when the queued task is a target application running in the foreground, running the queued task on the big core of the CPU, and returning to execute the operation of continuously detecting the task running state of the big core of the CPU; when the queued task is not the target application operated by the foreground, operating a file processing task on a big core of the CPU, wherein the MTP driver continuously detects the file processing task;
and the ending adjustment module is used for reducing the performance output of the CPU when the MTP driver detects that the file processing task is ended.
6. A computer-readable storage medium on which a computer program is stored, the program, when being executed by a processor, implementing a file processing method according to any one of claims 1 to 4.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the file processing method according to any one of claims 1 to 4 when executing the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710918821.7A CN107608797B (en) | 2017-09-30 | 2017-09-30 | File processing method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710918821.7A CN107608797B (en) | 2017-09-30 | 2017-09-30 | File processing method and device, storage medium and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107608797A CN107608797A (en) | 2018-01-19 |
CN107608797B true CN107608797B (en) | 2021-03-02 |
Family
ID=61068886
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710918821.7A Expired - Fee Related CN107608797B (en) | 2017-09-30 | 2017-09-30 | File processing method and device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107608797B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103955264A (en) * | 2014-05-15 | 2014-07-30 | 乐视致新电子科技(天津)有限公司 | Method and system for dynamically regulating working frequency of processor |
CN104346226A (en) * | 2013-08-09 | 2015-02-11 | 联想(北京)有限公司 | Processor frequency control method and electronic equipment |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100262966A1 (en) * | 2009-04-14 | 2010-10-14 | International Business Machines Corporation | Multiprocessor computing device |
CN102830785B (en) * | 2011-06-17 | 2016-11-09 | 上海掌门科技有限公司 | Equipment end inputs mutual quick response system and implementation method |
US9619282B2 (en) * | 2012-08-21 | 2017-04-11 | Lenovo (Singapore) Pte. Ltd. | Task scheduling in big and little cores |
CN104809090B (en) * | 2015-04-21 | 2018-01-26 | 广东欧珀移动通信有限公司 | A kind of method and apparatus for lifting mobile device data transmission speed |
WO2016195274A1 (en) * | 2015-06-01 | 2016-12-08 | Samsung Electronics Co., Ltd. | Method for scheduling entity in multi-core processor system |
CN106020957A (en) * | 2016-04-27 | 2016-10-12 | 青岛海信移动通信技术股份有限公司 | Process creation method for mobile communication terminal and mobile communication terminal |
CN107066326A (en) * | 2017-03-27 | 2017-08-18 | 深圳市金立通信设备有限公司 | The method and terminal of a kind of scheduler task |
-
2017
- 2017-09-30 CN CN201710918821.7A patent/CN107608797B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104346226A (en) * | 2013-08-09 | 2015-02-11 | 联想(北京)有限公司 | Processor frequency control method and electronic equipment |
CN103955264A (en) * | 2014-05-15 | 2014-07-30 | 乐视致新电子科技(天津)有限公司 | Method and system for dynamically regulating working frequency of processor |
Also Published As
Publication number | Publication date |
---|---|
CN107608797A (en) | 2018-01-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109101352B (en) | Image processing algorithm architecture, algorithm calling method, device, storage medium and mobile terminal | |
CN109064538B (en) | View rendering method and device, storage medium and intelligent terminal | |
CN107844342B (en) | Control method and device for keeping application program alive, storage medium and mobile terminal | |
US20220053068A1 (en) | Methods, apparatuses and computer storage media for applet state synchronization | |
CN108710515B (en) | Application preloading method and device, storage medium and terminal | |
KR102058465B1 (en) | Management system and method for remote controller of electronic device | |
CN107783803B (en) | System optimization method and device of intelligent terminal, storage medium and intelligent terminal | |
WO2018082412A1 (en) | Electronic equipment control method, device and electronic equipment | |
US9201814B2 (en) | Electronic devices and methods for sharing peripheral devices in dual operating systems | |
TW201135598A (en) | A system and method for controlling interruption of a process in electronic equipment based on priority of the process, and program | |
CN106817753B (en) | Method and device for saving electricity by switching background gray scales and mobile terminal | |
CN109284142A (en) | File preloads method, apparatus, electronic equipment and computer readable storage medium | |
CN109656719B (en) | Algorithm processing method and device, storage medium and terminal equipment | |
AU2019256257A1 (en) | Processor core scheduling method and apparatus, terminal, and storage medium | |
CN111713176B (en) | Data transmission method and terminal | |
CN108933968B (en) | Message format conversion method and device, storage medium and android terminal | |
CN111445331A (en) | Transaction matching method and device | |
CN106775445B (en) | Data migration method and device | |
CN108986187B (en) | Universal animation realization method and device, storage medium and android terminal | |
WO2018161955A1 (en) | Method and device for controlling broadcast recipient, and mobile terminal | |
WO2018161589A1 (en) | Control method, device, storage medium, and electronic apparatus for broadcast sending | |
EP3588991A1 (en) | Method and apparatus for generating broadcast queue, storage medium, and electronic device | |
CN107608797B (en) | File processing method and device, storage medium and electronic equipment | |
CN109614248B (en) | Message compression method, device, storage medium and terminal equipment | |
WO2023142494A1 (en) | Resource data processing method and system, editor, electronic device, and storage medium |
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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20210302 |