File processing method and electronic equipment
By preprocessing and hibernating the application before the user opens the file, the electronic device can quickly display the file interface, solving the problem of slow opening of complex or large data files and achieving fast file opening.
Patent Information
- Application Number
- CN202510926650.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-05-19
- Filing Date
- 2025-07-04
- Publication Date
- 2025-10-17
AI Technical Summary
When electronic devices process complex or large-scale files, the files open slowly, affecting the user experience.
Before a user opens a file, the electronic device automatically runs the corresponding application, preprocesses the file's raw data and parses it into the data required for the display interface, then stores the data and controls the application to enter a sleep state. Subsequently, when the user operates, the application is quickly woken up to display the file interface.
It reduces the data reading and parsing time during the file opening process, improves file opening speed, and provides a fast user experience.
Smart Images

Figure CN120805845A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electronics, and more particularly, to a file processing method and an electronic device. BACKGROUND
[0002] When a user opens a file in an electronic device, the electronic device needs to run an application program capable of opening the file, which can read and parse the original data of the file, and finally display the display interface of the file in the display interface. However, for some relatively complex files or files with more data content, the electronic device needs to spend a long time to complete the processing of the file and display the display interface of the file in the display interface.
[0003] Therefore, how to process the file to improve the opening speed of the file becomes a technical problem to be solved. SUMMARY
[0004] Embodiments of the present application provide a file processing method and an electronic device to improve the opening speed of the file.
[0005] In a first aspect, a file processing method is provided, applied to an electronic device including an operating system, the method comprising: automatically running, by the operating system, a first application program capable of opening a first file; notifying, by the operating system, the first application program to read original data of the first file from a hard disk of the electronic device to a memory of the electronic device; parsing, by the first application program, the original data to obtain first data, wherein the first data is data used to support a display interface of the first file; storing, by the operating system, the first data from the memory to the hard disk; and controlling, by the operating system, the first application program to enter a hibernation state.
[0006] Exemplarily, the operating system can automatically run the first application program in the background of the electronic device.
[0007] Exemplarily, the first file is a video file, and the first application program can be a video playback application program. For example, the file 1 is a.docx format file, and the application program can be WPS or other application programs capable of opening the.docx format file.
[0008] In some examples, the first application program can be a default application program capable of opening the first file.
[0009] The original data can be data stored in the hard disk in a preset format.
[0010] The first data is data used to support the display interface of the first file, and a graphics processing unit (GPU) of the electronic device can directly draw the display interface of the first file according to the first data.
[0011] Based on the embodiments of the present application, the operating system of the electronic device can automatically run the first application capable of opening the first file, and notify the first application to read the original data of the first file and parse to obtain the first data for supporting the display interface of the first file. The operating system stores the first data to the hard disk, and controls the first application to enter the hibernation state, so that the first application does not occupy the hardware resources of the electronic device.
[0012] In this way, when the user opens the first file subsequently, the electronic device does not need to perform the original data reading and parsing process of the first file, but can quickly wake up the first application in the hibernation state, and display the display interface of the first file according to the first data, thereby facilitating the electronic device to quickly open the file.
[0013] In some implementations, the method further includes: in response to the operation of the user opening the first file, the operating system controls the first application to enter the running state from the hibernation state; the operating system notifies the first application to read the first data from the hard disk; and the display interface of the first file is displayed according to the first data.
[0014] Exemplarily, the first application enters the running state from the hibernation state, at which time the first application can be running in the foreground of the electronic device.
[0015] Based on the embodiments of the present application, when the user opens the first file, the electronic device can wake up the first application to directly obtain the first data capable of supporting the display interface of the first file from the hard disk, and the electronic device can quickly display the display interface of the first file according to the first data. Therefore, when the first file is relatively complex or occupies a large storage space, the electronic device can also quickly open the first file, bringing the user the experience of quickly opening the file.
[0016] When the operation of the user opening the first file is detected, the electronic device does not need to perform the original data reading and parsing process, but can quickly wake up the application in the hibernation state, and display the display interface of the first file according to the first data, thereby facilitating the electronic device to quickly open the file.
[0017] In some implementations, in the hibernation state, the first application does not occupy the hardware resources of the electronic device.
[0018] Exemplarily, the hardware resources can include CPU resources, GPU resources, etc.
[0019] Based on the embodiments of the present application, the first application does not occupy the hardware resources of the electronic device in the hibernation state, thereby saving the resource consumption of the electronic device.
[0020] In some implementations, the operating system maintains a process index of the first application, and the first application does not interact with other applications.
[0021] For example, in the sleep state, the process index of the first application can be maintained in the task manager of the electronic device, so that the electronic device can determine which applications are in the sleep state.
[0022] For example, in the sleep state, the first application cannot communicate with other applications, nor can it receive information or messages sent by other applications.
[0023] In some implementations, in response to the user opening the first file, the operating system controls the first application to enter the running state from the sleep state, including: in response to the user opening the first file, determining the state of the first application; in the case that the first application is in the sleep state and the operating system maintains a process index of the first application, the operating system controls the first application to enter the running state from the sleep state.
[0024] Based on the embodiments of the present application, when the user opens the first file, the electronic device needs to first determine the state of the first application, and when it is determined that the first application is in the sleep state and the system maintains a process index of the first application, the first application is controlled to enter the running state from the sleep state. In this way, when the first file is opened, the electronic device can determine that the first application is in the sleep state, avoiding reopening the first application.
[0025] In some implementations, before responding to the user opening the first file, the method further includes: the operating system controls the first application to enter the background running state from the sleep state; the operating system notifies the first application to read the original data of the second file from the hard disk of the electronic device to the memory of the electronic device, wherein the type of the second file is the same as that of the first file; the first application parses the original data of the second file to obtain second data, wherein the second data is data used to support the display interface of the second file; the operating system stores the second data from the memory to the hard disk; the operating system controls the first application to enter the sleep state.
[0026] For example, the first file is a video file, and the second file is also a video file.
[0027] Based on the embodiments of the present application, after the first file is preprocessed by the electronic device, the first application is in the hibernation state, when the electronic device needs to preprocess a second file of the same type as the first file again, the first application in the hibernation state needs to be woken up again, and the first application is run in the background, and the original data of the second file is read and parsed to obtain the second data for supporting the display interface of the second file, and the second data is also stored in the hard disk, and then the first application is controlled to enter the hibernation state again, so that the first application does not occupy the hardware resources of the electronic device.
[0028] In this way, when the user opens the second file subsequently, the electronic device does not need to perform the original data reading and parsing process, but can quickly wake up the first application in the hibernation state, and display the display interface of the second file according to the second data, thereby facilitating the electronic device to quickly open the file.
[0029] In some implementations, the method further includes: in response to the operation of opening the second file, the operating system notifies the first application to read the second data from the hard disk; and displaying the display interface of the second file according to the second data.
[0030] Based on the embodiments of the present application, when the electronic device detects the operation of opening the second file by the user, the electronic device does not need to perform the original data reading and parsing process of the second file, but can quickly wake up the application in the hibernation state, and display the display interface of the second file according to the second data, thereby facilitating the electronic device to quickly open the second file.
[0031] In some implementations, the method further includes: the electronic device maintains a list of applications in the hibernation state.
[0032] Based on the embodiments of the present application, the electronic device maintains a list of applications in the hibernation state, so that the user can determine which applications are in the hibernation state.
[0033] In some implementations, the method further includes: the electronic device displays the identification of the application in the hibernation state in a specific area.
[0034] It should be understood that the embodiments of the present application do not limit the specific position of the specific area. For example, the specific position can be located in the middle, side or bottom corner of the display screen.
[0035] The technical solution can enable the user to determine which applications are in the hibernation state.
[0036] In some embodiments, the operating system automatically runs the first application capable of opening the first file, including: determining to automatically run the first application capable of opening the first file according to preset parameters of the first application.
[0037] For example, the preset parameters can indicate that the first application supports the preprocessing process.
[0038] In other examples, if the preset parameters indicate that the first application does not support the preprocessing process, the electronic device needs to open the first file according to the normal process.
[0039] In some embodiments, the operating system controls the first application to enter the dormant state, including: the operating system controls the first application to enter the dormant state at a running stage indicated by preset parameters of the first application.
[0040] For example, the preset parameters can indicate that the first application needs to enter the dormant state before displaying the final interface, and the operating system can control the first application to enter the dormant state before displaying the display interface of the file.
[0041] In other examples, the preset parameters can indicate that the first application needs to enter the dormant state before parsing the original data, and the operating system can control the first application to enter the dormant state before parsing the original data.
[0042] Based on the embodiments of the present application, the electronic device can provide multiple ways for the application to enter the dormant state at different running stages, so that the application developer can choose according to the needs.
[0043] In some embodiments, before the operating system automatically runs the first application capable of opening the first file, the method further includes: determining that a preprocessing operation needs to be performed on the first file, the preprocessing operation being reading and parsing operations on the original data of the stored first file before the user opens the first file.
[0044] For example, the electronic device can determine which files to preprocess. For example, the electronic device preprocesses files with a storage space greater than a preset storage space. Or, the electronic device preprocesses files of a preset application. Or, the electronic device preprocesses recently opened files. Or, the electronic device preprocesses recently downloaded or received files. Or, the electronic device preprocesses files received from other devices of the same account.
[0045] Based on the embodiments of the present application, the electronic device can determine which files need to be preprocessed.
[0046] In a second aspect, a method for file processing is provided, including modules for implementing the method as described in the first aspect and any possible implementation thereof.
[0047] In a third aspect, an electronic device is provided, including one or more processors; one or more memories; the one or more memories storing one or more programs, when the one or more programs are executed by the one or more processors, causing the method as described in the first aspect and any possible implementation thereof to be performed.
[0048] In a fourth aspect, a chip is provided, including a processor and a communication interface, the communication interface being configured to receive a signal and transmit the signal to the processor, the processor processing the signal, causing the method as described in the first aspect and any possible implementation thereof to be performed.
[0049] In a fifth aspect, a readable storage medium is provided, the readable storage medium storing instructions, when the instructions are run on an electronic device, causing the method as described in the first aspect and any possible implementation thereof to be performed.
[0050] In a sixth aspect, a program product is provided, the program product including program code, when the program code is run on an electronic device, causing the method as described in the first aspect and any possible implementation thereof to be performed. BRIEF DESCRIPTION OF DRAWINGS
[0051] Figure 1 The structure of the electronic device 100 is shown.
[0052] Figure 2 The flow of opening a file is shown.
[0053] Figure 3 is an architectural diagram of an electronic device provided by an embodiment of the present application.
[0054] Figure 4 is a schematic flowchart of file processing provided by an embodiment of the present application.
[0055] Figure 5 is a schematic flowchart of another file processing provided by an embodiment of the present application.
[0056] Figure 6 is a schematic of a GUI provided by an embodiment of the present application.
[0057] Figure 7 is a schematic flowchart of file processing provided by an embodiment of the present application.
[0058] Figure 8 is a schematic block diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0059] The technical solutions in the embodiments of the present application will be described below with reference to the drawings.
[0060] The method in the embodiments of the present application can be applied to a smart phone, a wearable device, a smart television, a tablet computer, a notebook computer, a personal computer (PC), an ultra-mobile personal computer (UMPC), a netbook, a vehicle-mounted device, a foldable device, an internet of things (IOT) device, an augmented reality device, a virtual reality device, and the like.
[0061] Figure 1 A structural schematic diagram of an electronic device 100 is shown. The electronic device 100 can include a processor 110, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, a display screen 194, and an internal memory 121, an external memory interface 122, and the like.
[0062] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0063] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), and the like. Among them, different processing units can be independent devices, or can be integrated in one or more processors.
[0064] Among them, the controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals to complete the control of fetching instructions and executing instructions.
[0065] The processor 110 can also have internal memory for storing instructions and data. In some embodiments, the internal memory of the processor 110 is a cache memory. The cache memory can hold instructions or data that the processor 110 has recently used or has used frequently. If the processor 110 needs to use the instructions or data again, it can be called directly from the cache memory. This avoids repeated access and reduces the latency of the processor 110, thereby improving the efficiency of the system.
[0066] The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 performs various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc. The data storage area can store data created during use of the electronic device 100 (such as file data, audio data, a phone book, etc.), etc. In addition, the internal memory can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0067] It should be understood that the disk storage device can be referred to simply as a "disk". The disk can include a hard disk, a floppy disk, an optical disk, etc. In embodiments of the present application, the original data of a file can be stored in a disk storage device (such as a hard disk), or data obtained by parsing the original data by the electronic device to support a display interface of the display file can also be stored in a disk storage device (such as a hard disk).
[0068] The external memory interface 122 can be used to connect an external memory card, such as a Micro SD card, to achieve the expansion of the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 122 to achieve a data storage function. For example, files such as music and videos are saved in the external memory card.
[0069] The wireless communication module 160 can provide solutions for wireless communication applied on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), Bluetooth low energy (BLE), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, ultra wideband (UWB) technology, star flash, and the like.
[0070] In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology.
[0071] The electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor, and the like. The GPU is a microprocessor for image processing, connected with the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.
[0072] The display screen 194 is used to display images, videos, files, and the like.
[0073] Before introducing the technical solutions of the embodiments of the present application, first, the professional terms that may be involved in the present application are simply introduced as follows.
[0074] In the embodiments of the present application, the application program in the hibernation state can be understood as that the application program does not occupy the hardware resources of the electronic device, such as CPU resources and GPU resources. Moreover, the application program cannot interact with other application programs, such as cannot receive communication messages of other electronic devices. However, the index of the process of the application program can be displayed in the process list of the electronic device, and the operating system of the electronic device can wake up the application program when needed, such as entering the running state from the hibernation state.
[0075] In the embodiments of the present application, the application program in the background or the background running application program can be understood as that the application program is in the running state, but the display interface of the application program is not presented to the user on the display screen of the electronic device, and the user cannot perceive the display interface of the application program.
[0076] When a user opens a file in an electronic device, the electronic device needs to run an application program capable of opening the file, which can read and parse the original data of the file, and finally display the display interface of the file in the display interface. However, for some relatively complex files or files occupying a large storage space, the electronic device needs to spend a long time to display the display interface of the file in the display interface.
[0077] Therefore, embodiments of the present application provide a file processing method and an electronic device. In the technical solution, the electronic device can automatically open the corresponding application program to preprocess the file before the user opens the file, so as to read the original data of the file in advance and parse the original data into target data supporting the display interface of the file. Then, the electronic device can store the target data in the disk and control the application program to enter the sleep state, so as to facilitate subsequent awakening of the application program to enter the running state to read the target data and quickly display the display interface of the file when detecting the user's operation of opening the file. In this way, when the user opens the file, the electronic device does not need to read the original data and parse the original data, and the above process is a time-consuming operation of opening the file, so the electronic device can quickly open the file and display the display interface of the file.
[0078] The technical solutions in the embodiments of the present application will be described below in conjunction with Figures 2-7 The technical solutions in the embodiments of the present application will be described below in conjunction with
[0079] Exemplarily, Figure 2 The flow of opening a file is shown. As Figure 2 shown, the general flow of opening a file by the electronic device includes the following steps.
[0080] Step 11: The user opens a file 1.
[0081] For example, the user can open the file 1 by double-clicking the file 1 with a mouse, or the user can open the file 1 by right-clicking and selecting the open operation.
[0082] Step 12: The electronic device runs an application program 1 associated with the file 1 in response to the user's operation of opening the file 1.
[0083] The application program associated with the file can be an application program capable of opening the file.
[0084] For example, the file 1 is a.docx format file, and the application program can be WPS or other application programs capable of opening the.docx format file.
[0085] Step 13: The application program 1 reads the original data of the file 1 from the hard disk.
[0086] In some examples, the original data can be data that is compressed and stored in a certain format for file 1. For example, the file 1 is a file in.docx format.
[0087] In some examples, the original data can also be data that is stored in a certain format for file 1 without compression for file 1. For example, the file 1 is a file in.doc format.
[0088] It should be understood that whether the original data of the file 1 is compressed data depends on the specific application program that can open the file 1.
[0089] The application program 1 can read the original data from the hard disk to the memory of the electronic device.
[0090] Step 14: The application program 1 parses the original data to obtain data 2.
[0091] For example, the application program 1 can parse the original data in the memory to obtain data 2 that can support the display interface of the file 1.
[0092] Step 15: Display the display interface of the file 1 according to the data 2.
[0093] For example, the application program 1 can call a system interface to make the GPU of the electronic device draw the display window of the file 1 according to the data 2, and after the drawing is completed, the electronic device can display the display interface of the file 1.
[0094] It should be understood that the above steps 13 to 14 are time-consuming processes of the electronic device, so for relatively complex files or files occupying a large amount of storage space, the electronic device may take a long time to execute the above steps 13 to 14.
[0095] When the file loading time is long, the user may always see the loading interface, thereby affecting the user's experience.
[0096] The technical solution of the embodiment of the application can execute the above time-consuming steps 13 to 14 before the user opens the file, thereby speeding up the opening of the file.
[0097] Exemplarily, the technical solution of the embodiment of the application can include a preprocessing phase and a display phase. The preprocessing phase can include steps 21 to 25. The display phase can include steps 26 to 28.
[0098] Step 21: The electronic device automatically runs the application program 1 associated with the file 1.
[0099] For example, the electronic device can determine which files to pre-process. For example, the electronic device pre-processes files occupying more than a preset storage space. Or, the electronic device pre-processes files of a preset application. Or, the electronic device pre-processes recently opened files. Or, the electronic device pre-processes recently downloaded or received files. Or, the electronic device pre-processes files received from other devices of the same account.
[0100] For such files, the electronic device can automatically run the application 1 associated with the file 1 to perform the pre-processing process.
[0101] Step 22: The application 1 reads the original data of the file 1 from the hard disk.
[0102] For example, the operating system of the electronic device can notify the application 1 to read the original data of the file 1 from the hard disk. The application 1 can read the original data of the file 1 from the hard disk to the memory.
[0103] It can be understood that the original data can refer to the description in the foregoing.
[0104] It should also be understood that what format the original data of the file 1 is stored in the hard disk and whether it is compressed depends on the application that can open the file 1. In the embodiment of the present application, before the electronic device pre-processes the file 1, the original data of the file 1 has been stored in the hard disk in the manner specified by the application.
[0105] Step 23: The application 1 parses the original data to obtain data 2.
[0106] For example, the operating system of the electronic device can notify the application 1 to parse the original data to obtain data 2. The data 2 is data used to support the display interface of the file 1.
[0107] For example, the GPU of the electronic device can directly draw the display interface according to the data 2.
[0108] In other examples, the operating system of the electronic device can also notify the application 1 to read the original data of the file 1 from the hard disk and parse.
[0109] Step 24: The electronic device stores the data 2 to the hard disk.
[0110] For example, the electronic device stores the data 2 from the memory to the hard disk.
[0111] This step 24 can be understood as the electronic device swapping out all the data 2 in the memory to the disk, at this time, the memory of the electronic device will not include the data of the file 1.
[0112] Step 25: The electronic device controls the application 1 to enter the hibernation state.
[0113] It should be understood that in the hibernation state, the application 1 will not occupy the hardware resources of the electronic device, such as CPU resources, GPU resources. And the application 1 cannot interact with other applications, such as receiving communication messages from other electronic devices. But the index of the process of the application 1 can be displayed in the process list of the electronic device, and the operating system of the electronic device can wake up the application 1 when needed, such as entering the running state from the hibernation state.
[0114] In the embodiment of the application, in the automatic preprocessing phase of the operating system of the electronic device, the application 1 has not completed complete startup, but enters the hibernation state before displaying the final display interface, and releases all occupied runtime resources such as CPU resources, GPU resources, memory resources, etc.
[0115] In this way, in the preprocessing phase, the electronic device can perform the time-consuming steps 22-23 in advance, and the electronic device can also obtain data 2 that can support the display of the display interface of the file 1, so that when the user needs to open the file 1 later, the electronic device does not need to perform the above steps 22-23, and the electronic device can notify the application to directly read the data 2 from the disk and display the corresponding display interface, thereby speeding up the opening speed of the electronic device to open the file 1.
[0116] It can be understood that when the user needs to open the file 1, the electronic device can perform steps 26-28 of the display phase.
[0117] Step 26: In response to the user's operation of opening the file 1, the electronic device controls the application 1 to enter the running state from the hibernation state.
[0118] Exemplarily, since the application 1 is in the hibernation state after preprocessing the file 1, when the electronic device detects the user's operation of opening the file 1, the electronic device can control the application 1 to enter the running state from the previous hibernation state.
[0119] Step 27: The electronic device notifies the application 1 to read the data 2 from the hard disk.
[0120] After the application 1 enters the running state, the electronic device can notify the application 1 to read the data 2 from the hard disk.
[0121] Step 28: The electronic device displays the display interface of the file 1 according to the data 2.
[0122] Exemplarily, after reading the data 2, the application 1 can call the interface of the GPU to make the GPU of the electronic device draw the display window of the file 1 according to the data 2, and after the drawing is completed, the electronic device can display the display interface of the file 1.
[0123] In this way, when the user opens the file 1, the electronic device can wake up the application to directly obtain the data 2 capable of supporting the display interface of the file 1 from the hard disk, and the electronic device can quickly display the display interface of the file 1 according to the data 2. Therefore, when the file 1 is relatively complex or occupies a large storage space, the electronic device can also quickly open the file 1, and bring the user the experience of quickly opening the file.
[0124] Exemplarily, Figure 3 is a schematic architecture diagram of an electronic device provided in an embodiment of the present application. As shown in Figure 3 , the electronic device 200 can at least include a file recommendation apparatus, a life cycle scheduling apparatus, and a system resource management and control apparatus.
[0125] The file recommendation apparatus can be configured to recommend to the operating system of the electronic device which files need to be preprocessed. It can be understood that the manner in which the file recommendation apparatus determines which files need to be recommended for preprocessing can refer to the related description in the foregoing, and for brevity, will not be described again here.
[0126] In some examples, the file recommendation apparatus can be a task manager.
[0127] The life cycle scheduling apparatus can be configured to control the life cycle of the application. For example, control the running of the application, control the application to enter the sleep state, or from the sleep state to the running state, etc.
[0128] The system resource management and control apparatus can interact with the life cycle scheduling apparatus to perceive whether the application is in the sleep state, the running state, etc. The system resource management and control apparatus can also schedule the resources occupied by the application, such as stopping the CPU or GPU scheduling of the application in the sleep state.
[0129] The system resource management and control apparatus can also store all the data of the application in the memory to the disk in the preprocessing stage.
[0130] The system resource management and control apparatus can also detect the overall resource usage state of the electronic device, and send the overall resource usage state to the file recommendation apparatus for adjusting the recommendation strategy.
[0131] The process in which the electronic device processes the file in the embodiment of the present application will be introduced below. Figures 4-5
[0132] Exemplarily,Figure 4 is a schematic flowchart of a file processing provided by an embodiment of the present application. As shown in Figure 4 the electronic device can at least include an application A, a file recommendation apparatus, a lifecycle scheduling apparatus, and a system resource management and control apparatus.
[0133] The method 300 can include steps 301-308.
[0134] 301. The file recommendation apparatus determines a file A that needs preprocessing.
[0135] It should be understood that the step 301 can refer to the relevant description in the step 21 above.
[0136] 302. The file recommendation apparatus sends the file A that needs preprocessing to the lifecycle scheduling apparatus.
[0137] It should be understood that the steps 301-302 can also be optional steps. In other examples, the steps 301-302 can also not be performed, in which case the method can start from step 303, in which the electronic device has determined that the file A needs preprocessing. Alternatively, the electronic device has preset information about which files need preprocessing in the system. Alternatively, the electronic device can also preprocess all files.
[0138] 303. The lifecycle scheduling apparatus automatically runs the application A associated with the file A.
[0139] For example, the lifecycle scheduling apparatus can control the running of the application A, which is an application capable of opening the file A.
[0140] The application A can be a default application for opening the file A. For example, the file A is a.docx format file, and the application can be WPS or other application capable of opening the.docx format file, etc. For another example, the file A is a video file, and the application can be a video playback application.
[0141] For example, the application A can run in the background of the electronic device, and the running process is not presented to the user.
[0142] In some examples, the developer of the application A can configure whether to support preprocessing when developing the application A. When the electronic device determines that the application A supports preprocessing according to the preset parameter of the application A, the step 303 is performed. Alternatively, the electronic device can also default that each application supports the preprocessing process. Alternatively, when the application A does not have the above-mentioned preset parameter, the electronic device can also consider that the application supports the preprocessing process.
[0143] 304, the application A acquires the original data A of the file A.
[0144] For example, the application A can read the original data A of the file A from the disk according to the notification message of the system resource management device. The original data A can be stored in the disk according to a preset format.
[0145] The application A can read the original data A of the file A from the disk to the memory of the electronic device.
[0146] 305, the application A parses the original data A to obtain data B.
[0147] The data B is data used to support the display interface of the file A. Subsequently, the GPU of the electronic device can directly draw the display interface of the file A according to the data B.
[0148] The application A can parse the original data A in the memory of the electronic device to obtain the data B.
[0149] 306, the system resource management device stores the data B to the hard disk.
[0150] The system resource management device can store the data B from the memory to the hard disk. It can also be understood that the system resource management device swaps out all the memory of the application A to the hard disk.
[0151] 307, the system resource management device sends a control message 1 to the application A, which is used to control the application A to enter the hibernation state.
[0152] 308, the application A enters the hibernation state.
[0153] The steps 307 to 308 can be understood as the operating system of the electronic device can control the application A to enter the hibernation state.
[0154] In some examples, the developer of the application A can also indicate which running stage it needs to enter the hibernation state through a preset parameter 2 when developing the application A.
[0155] For example, when the preset parameter 2 indicates that it needs to enter the hibernation state before display in the preprocessing process, the electronic device can control it to enter the hibernation state before display.
[0156] In other examples, the preset parameter 2 can also indicate that it needs to enter the hibernation state after reading the original data of the file in the preprocessing process, and the electronic device can control it to enter the hibernation state after step 304.
[0157] It can be understood that after the application A enters the hibernation state, the system resource management device can stop all CPU or GPU access scheduling of the application A, so that the application A does not occupy the hardware resources of the electronic device.
[0158] It should also be understood that after the application A enters the hibernation state, the application A will not be able to interact with other applications. For example, the application A cannot receive communication messages from other applications.
[0159] It should also be understood that after the application A enters the hibernation state, the electronic device can also maintain an index of the processes of the application A. For example, in the task manager of the electronic device, the index of the processes of the application A can be maintained, so that when the user manually opens the file, the electronic device can determine that the application A is in the hibernation state.
[0160] Based on the embodiments of the present application, before the user opens the file A, the electronic device can pre-run the application of the file A in the background, and notify the application to read the original data of the file A from the hard disk and perform the parsing process. After the parsing is completed, the obtained data B is stored in the hard disk. Then, the electronic device controls the application A to enter the hibernation state, so that the application A does not occupy the hardware resources of the electronic device. In this way, when the user opens the file A subsequently, the electronic device does not need to perform the original data reading and parsing process, but can quickly wake up the application in the hibernation state, and display the display interface of the file A according to the data B, thereby facilitating the electronic device to quickly open the file.
[0161] In some cases, the user has the demand to open the file A. Therefore, the method 300 can further include steps 309 to 313.
[0162] 309, the life cycle scheduling state sends a control message 2 to the system resource management device when detecting that the user opens the file A.
[0163] 310, the system resource management device sends a control message 2 to the application, and the control message 2 is used to control the application A to enter the running state from the hibernation state.
[0164] 311, the application A enters the running state from the hibernation state.
[0165] The system resource management device controls the application A to enter the running state from the hibernation state, at this time, the display interface of the application A running is in the foreground of the electronic device, and the display interface is visible to the user.
[0166] 312, the application A reads data B from the hard disk.
[0167] Exemplarily, after entering the running state, the application A can read the data B for supporting the display interface of the file A from the hard disk according to the indication of the system resource management device.
[0168] For example, the application A reads the data B from the hard disk to the memory of the electronic device.
[0169] 313. The application A displays the display interface A of the file A according to the data B.
[0170] Exemplarily, the application A can call the interface of the GPU to make the GPU of the electronic device draw the display window of the file A according to the data B, and after the drawing is completed, the application A can display the first page display interface of the file A.
[0171] Based on the embodiments of the present application, when the user opens the file A, the electronic device can wake up the application A to directly obtain the data B for supporting the display interface of the file A from the hard disk, and the electronic device can quickly display the display interface of the file A according to the data B. Therefore, when the file A is relatively complex or occupies a large storage space, the electronic device can also quickly open the file A, bringing the user the experience of quickly opening the file.
[0172] When detecting the operation of the user opening the file A, the electronic device does not need to perform the original data reading and parsing process, but can quickly wake up the application A in the dormant state and display the display interface of the file A according to the data B, thereby facilitating the electronic device to quickly open the file.
[0173] In some cases, a possible scenario is that after the electronic device pre-processes the file A, the application A is in a dormant state, at this time, the electronic device needs to pre-process the file B (such as downloading or receiving the file B), and the file B is of the same type as the file A. In this case, the electronic device needs to temporarily wake up the application A in the dormant state to make it continue to pre-process the file B in the background, and then enter the dormant state again after the pre-processing is completed. Hereinafter, the technical solutions will be introduced in combination with Figure 5 .
[0174] Exemplarily, Figure 5 is another schematic flowchart of file processing provided by the embodiments of the present application. As shown in Figure 5 , the method 400 can include steps 401 to 407.
[0175] It should be understood that in the method 400, the electronic device can start to perform from determining that the file B needs to be pre-processed. The file B is of the same type as the file A.
[0176] For example, file A is a video file, and file B is also a video file. Or, file A is a.docx format file, and file B is also a.docx format file.
[0177] 401. The system resource management and control device sends a control message 3 to the application A, which is used to control the application A to enter the background running state from the hibernation state.
[0178] When it is determined that the file B needs to be preprocessed, since the application A is already in the hibernation state, the system resource management and control device needs to control the application A to re-enter the background running state.
[0179] 402. The application A enters the background running state from the hibernation state.
[0180] The system resource management and control device controls the application A to enter the background running state from the hibernation state, at this time, the display interface of the application A is in the background of the electronic device, and the display interface is invisible to the user.
[0181] 403. The application A obtains the original data 2 of the file B.
[0182] For example, the application A can read the original data 2 of the file B from the disk according to the notification message of the system resource management and control device. The original data 2 can be stored in the disk in a preset format.
[0183] The application A can read the original data 2 of the file B from the disk to the memory of the electronic device.
[0184] 404. The application A parses the original data 2 to obtain data C. The data C is data used to support the display interface of the file B.
[0185] Subsequently, the GPU of the electronic device can directly draw the display interface of the file B according to the data C.
[0186] The application A can parse the original data 2 in the memory of the electronic device to obtain the data C.
[0187] 405. The system resource management and control device stores the data C to the hard disk.
[0188] The system resource management and control device can store the data C from the memory to the hard disk. It can also be understood that the system resource management and control device swaps out all the memory of the application A to the hard disk.
[0189] 406. The system resource management and control device sends a control message 4 to the application A, which is used to control the application A to enter the hibernation state.
[0190] 407: Application A enters dormant state.
[0191] From step 406 to step 407 , it can be understood that the operating system of the electronic device can control the application program A to re-enter the dormant state.
[0192] It should be understood that the dormant state can be described in detail in step 308 above, and will not be repeated here.
[0193] Based on the embodiment of the present application, after the electronic device pre-processes file A, application A is already in a dormant state. When the electronic device needs to pre-process file B of the same type as file A again, it is necessary to reawaken the dormant application A, run application A in the background, and perform reading of the original data of file B and parsing operations to obtain data C for supporting the display interface of file B, and store the data C in the hard disk. Afterwards, the electronic device controls application A to enter a dormant state again so that application A does not occupy the hardware resources of the electronic device.
[0194] In this way, when the user opens file B later, the electronic device does not need to perform the original data reading and parsing process, but can quickly wake up application A in the dormant state and display the display interface of file B according to data C, which is conducive to the electronic device to quickly open the file.
[0195] In some cases, the user has a need to open file A. Therefore, the method 400 may further include steps 408 to 412 .
[0196] 408. When the lifecycle scheduling state detects the user opening operation of file B, it sends a message to the system resource management and control device indicating that there is a user opening operation of file B.
[0197] 409 , the system resource management and control device sends a control message 5 to the application program. The control message 5 is used to control the application program A to enter a running state from a dormant state.
[0198] 410, application A enters running state from dormant state.
[0199] The system resource management and control device controls the application A to enter the running state from the dormant state. At this time, the display interface of the running application A is in the foreground of the electronic device, and its display interface is visible to the user.
[0200] 411, application A reads data C from the hard disk.
[0201] For example, after entering the running state, application A can read the data C for supporting the display interface of file B from the hard disk according to the instruction of the system resource management and control device.
[0202] For example, the application A reads the data C from the hard disk to the memory of the electronic device.
[0203] 412, the application A displays the display interface B of the file B according to the data C.
[0204] For example, the application A can call the interface of the GPU to make the GPU of the electronic device draw the display window of the file A according to the data C, and after the drawing is completed, the application A can display the first page display interface of the file B.
[0205] Based on the embodiments of the present application, when the user opens the file B, the electronic device can wake up the application A to directly obtain the data C supporting the display interface of the file B from the hard disk, and the electronic device can quickly display the display interface of the file B according to the data C. Therefore, when the file B is relatively complex or occupies a large storage space, the electronic device can also quickly open the file B, and bring the user the experience of quickly opening the file.
[0206] When detecting the operation of opening the file B by the user, the electronic device does not need to perform the original data reading and parsing process, but can quickly wake up the application in the sleep state, and display the display interface of the file B according to the data C, thereby facilitating the electronic device to quickly open the file.
[0207] In some cases, after the electronic device pre-processes some different types of files, there can be multiple applications in the sleep state, and the electronic device can also maintain a list of the multiple applications, or the electronic device can also display the identifiers of the multiple applications in a specific area of the display screen. The technical solutions will be described below in combination with the graphical user interface (GUI) shown in the following figures. Figure 6
[0208] For example, Figure 6 is a schematic diagram of a GUI provided by an embodiment of the present application. Referring to Figure 6 , the GUI can be a display interface 510 of the electronic device 500. The display interface 510 can be the desktop of the electronic device 500.
[0209] After the electronic device pre-processes different types of files, there can be multiple applications in the sleep state in the electronic device.
[0210] For example, the electronic device pre-processes the file 1, the file 2 and the file 3. Among them, the application associated with the file 1 is App1, the application associated with the file 2 is App2, and the application associated with the file 3 is App3. In this case, the App1, the App2 and the App3 are all in the sleep state.
[0211] Referring to Figure 6 In the display interface 510 of the electronic device, a prompt window 511 can be included, which can include the identification of the App1, App2 and App3 in the hibernation state, for example, the identification can be the icon of the application and the name of the application.
[0212] In other examples, the prompt window 511 can also include a pre-processed identification 2, for example, the identification 2 can be a small rocket identification, or a text identification "has accelerated" and the like.
[0213] It can be understood that the embodiments of the present application do not limit the position of the prompt window 511. For example, the prompt window 511 can be located in a specific area of the display screen, which can be the lower right corner, the lower left corner, the upper left corner, the upper right corner of the display screen, or the central area of the display screen, etc.
[0214] In other examples, the prompt window 511 can also be folded in the sidebar or displayed in the taskbar.
[0215] In some examples, after the electronic device 500 detects the operation of the user clicking the prompt window 511, another window B can be displayed, which can include the information (such as the file name, type, size, etc.) of the multiple files that have been pre-processed. For example, the window B can include the information 1 of the App1 and the file 1 that can be opened by the App1, the information 2 of the App2 and the file 2 that can be opened by the App2, and the information 3 of the App3 and the file 3 that can be opened by the App3.
[0216] In other examples, the sidebar or the display in the taskbar can also include a function control for indicating the hibernation state. When the user clicks the function control, the electronic device can display the above-mentioned window B.
[0217] In other examples, the electronic device can also directly display the information of the multiple files that have been pre-processed in the prompt window 511.
[0218] Exemplarily, Figure 7 is a schematic flowchart of a method for processing files provided by the embodiments of the present application. As Figure 7 shown, the method 700 can be applied to an electronic device, which can include an operating system, and the method 700 can include steps 710 to 750.
[0219] 710, the operating system automatically runs a first application capable of opening a first file.
[0220] For example, the first file can be the file A in the foregoing, and the first application can be the application A in the foregoing.
[0221] The first application can be a system application or a third-party application.
[0222] For example, the operating system can automatically run the first application in the background of the electronic device.
[0223] For example, the first file is a video file, and the first application can be a video playing application. For another example, the first file is a.docx file, and the first application can be a WPS or other application capable of opening the.docx file.
[0224] In some examples, the first application can be a default application capable of opening the first file.
[0225] 720, the operating system notifies the first application to read the original data of the first file from the hard disk of the electronic device to the memory of the electronic device.
[0226] The original data can be data stored in the hard disk in a preset format. For example, the original data is data encoded and compressed for the first file and stored in the hard disk in a certain format.
[0227] After the operating system runs the first application in the background, the operating system can notify the first application to read the original data of the first file from the hard disk to the memory of the electronic device.
[0228] 730, the first application parses the original data to obtain first data, wherein the first data is data used to support the display interface of the first file.
[0229] It should be understood that the embodiments of the present application do not limit the specific means of how the first application parses the original data. The parsing method can be predefined by the first application, which can parse the original data according to the predefined parsing method to obtain the first data.
[0230] The first data is data used to support the display interface of the first file, and the GPU of the electronic device can directly draw the display interface of the first file according to the first data.
[0231] 740, the operating system stores the first data from the memory to the hard disk.
[0232] The operating system swaps out all the first data in the memory to the hard disk, i.e., the first application does not occupy any memory resource of the electronic device.
[0233] 750, the operating system controls the first application to enter a hibernation state.
[0234] Based on the embodiments of the present application, the operating system of the electronic device can automatically run the first application capable of opening the first file, and notify the first application to read the original data of the first file and parse to obtain the first data for supporting the display interface of the first file. The operating system stores the first data to the hard disk, and controls the first application to enter the hibernation state, so that the first application does not occupy the hardware resources of the electronic device.
[0235] In this way, when the user opens the first file subsequently, the electronic device does not need to perform the original data reading and parsing process of the first file, but can quickly wake up the first application in the hibernation state, and display the display interface of the first file according to the first data, thereby facilitating the electronic device to quickly open the file.
[0236] In steps 710 to 750, the electronic device can be executed in the background, so that the user cannot perceive the running of the first application.
[0237] In some implementations, the method 700 further includes:
[0238] In response to the operation of the user opening the first file, the operating system controls the first application to enter the running state from the hibernation state;
[0239] The operating system notifies the first application to read the first data from the hard disk;
[0240] Display the display interface of the first file according to the first data.
[0241] Exemplarily, the first application enters the running state from the hibernation state, and at this time, the first application can be running in the foreground of the electronic device.
[0242] Based on the embodiments of the present application, when the user opens the first file, the electronic device can wake up the first application to directly obtain the first data capable of supporting the display interface of the first file from the hard disk. The electronic device can quickly display the display interface of the first file according to the first data. Therefore, when the first file is relatively complex or occupies a large storage space, the electronic device can also quickly open the first file, and bring the user the experience of quickly opening the file.
[0243] When detecting the operation of the user opening the first file, the electronic device does not need to perform the original data reading and parsing process, but can quickly wake up the application in the hibernation state, and display the display interface of the first file according to the first data, thereby facilitating the electronic device to quickly open the file.
[0244] In some implementations, in the hibernation state, the first application does not occupy the hardware resources of the electronic device.
[0245] Exemplarily, the hardware resource can include a CPU resource, a GPU resource, etc.
[0246] According to the embodiments of the present application, the first application does not occupy the hardware resource of the electronic device in the hibernation state, so that the resource consumption of the electronic device can be saved.
[0247] In some implementations, the operating system maintains the process index of the first application, and the first application does not interact with other applications.
[0248] Exemplarily, in the hibernation state, the process index of the first application can be maintained in the task manager of the electronic device, so that the electronic device can determine which applications are in the hibernation state.
[0249] Exemplarily, in the hibernation state, the first application cannot communicate with other applications, nor can it receive information or messages sent by other applications.
[0250] In some implementations, in response to the operation of the user opening the first file, the operating system controls the first application to enter the running state from the hibernation state, including:
[0251] In response to the operation of the user opening the first file, the operating system determines the state of the first application;
[0252] In the case that the first application is in the hibernation state and the operating system maintains the process index of the first application, the operating system controls the first application to enter the running state from the hibernation state.
[0253] Based on the embodiments of the present application, when the user opens the first file, the electronic device needs to first determine the state of the first application, and when it is determined that the first application is in the hibernation state and the system maintains the process index of the first application, the first application is controlled to enter the running state from the hibernation state. In this way, when the first file is opened, the electronic device can explicitly determine that the first application is in the hibernation state, avoiding reopening of the first application.
[0254] In some implementations, before responding to the operation of the user opening the first file, the method 700 further includes:
[0255] The operating system controls the first application to enter the background running state from the hibernation state;
[0256] The operating system notifies the first application to read the original data of the second file from the hard disk of the electronic device to the memory of the electronic device, wherein the type of the second file is the same as that of the first file;
[0257] The first application program parses original data of the second file to obtain second data, wherein the second data is data used to support a display interface of the second file;
[0258] The operating system stores the second data from the memory to the hard disk;
[0259] The operating system controls the first application program to enter the hibernation state.
[0260] Exemplarily, the first file is a video file, and the second file is also a video file.
[0261] Referring to Figure 4 and Figure 5 , the first file can be file A, and the second file can be file B. The second data can be data C.
[0262] Based on the embodiments of the present application, after the electronic device pre-processes the first file, the first application program is already in the hibernation state. When the electronic device needs to pre-process a second file of the same type as the first file again, the first application program that has been hibernated needs to be woken up again, and the first application program needs to be run in the background and perform operations of reading original data of the second file and parsing to obtain second data used to support a display interface of the second file, and the second data also needs to be stored in the hard disk. Then, the electronic device controls the first application program to enter the hibernation state again, so that the first application program does not occupy hardware resources of the electronic device.
[0263] In this way, when the user opens the second file subsequently, the electronic device does not need to perform the original data reading and parsing process, but can quickly wake up the first application program in the hibernation state and display the display interface of the second file according to the second data, thereby facilitating the electronic device to quickly open the file.
[0264] In some implementations, the method 700 further includes:
[0265] In response to the operation of opening the second file, the operating system notifies the first application program to read the second data from the hard disk;
[0266] Displaying the display interface of the second file according to the second data.
[0267] Based on the embodiments of the present application, when the electronic device detects the operation of opening the second file by the user, the electronic device does not need to perform the original data reading and parsing process of the second file, but can quickly wake up the application program in the hibernation state and display the display interface of the second file according to the second data, thereby facilitating the electronic device to quickly open the second file.
[0268] In some embodiments, the method 700 further includes that the electronic device maintains a list of applications in the hibernation state.
[0269] Based on the embodiments of the present application, the electronic device maintains a list of applications in the hibernation state, so that the user can determine which applications are in the hibernation state.
[0270] In some embodiments, the method 700 further includes that:
[0271] The electronic device displays the identification of the application in the hibernation state in a specific area.
[0272] It should be understood that the embodiments of the present application are not limited to the specific position of the specific area. For example, the specific position can be in the middle, side or bottom corner of the display screen.
[0273] For example, referring to Figure 6 The specific area can be the lower right corner of the display screen, and the prompt window 511 can include the identification of multiple applications.
[0274] The technical solution can enable the user to determine which applications are in the hibernation state.
[0275] In some embodiments, the operating system automatically runs the first application capable of opening the first file, including:
[0276] The preset parameter of the first application determines that the first application capable of opening the first file is automatically run.
[0277] For example, the preset parameter can indicate that the first application supports the preprocessing process described above.
[0278] In other examples, if the preset parameter indicates that the first application does not support the preprocessing process described above, the electronic device needs to open the first file according to the normal process.
[0279] In some embodiments, the operating system controls the first application to enter the hibernation state, including:
[0280] The operating system controls the first application to enter the hibernation state at the running stage indicated by the preset parameter of the first application.
[0281] For example, the preset parameter can indicate that it needs to enter the hibernation state before displaying the final interface, and the operating system can control the application to enter the hibernation state before displaying the display interface of the file.
[0282] In other examples, the preset parameter can indicate that it needs to enter the hibernation state before parsing the original data, and the operating system can control the application to enter the hibernation state before parsing the original data.
[0283] Based on the embodiments of the present application, the electronic device can open multiple ways for the application to enter the sleep state in different running stages, so that the application developer can select according to the needs.
[0284] In some implementations, before the operating system automatically runs the first application capable of opening the first file, the method 700 further includes:
[0285] The operating system determines that a preprocessing operation needs to be performed on the first file, and the preprocessing operation is a reading and parsing operation on the original data of the stored first file before the user opens the first file.
[0286] For example, the electronic device can determine which files to preprocess. For example, the electronic device preprocesses files whose occupied storage space is greater than a preset storage space. Or, the electronic device preprocesses files of a preset application. Or, the electronic device preprocesses recently opened files. Or, the electronic device preprocesses recently downloaded or received files. Or, the electronic device preprocesses files received from other devices of the same account.
[0287] Based on the embodiments of the present application, the electronic device can determine which files need to be preprocessed.
[0288] For example, Figure 8 is a schematic block diagram of an electronic device provided by an embodiment of the present application. As Figure 8 shown, the electronic device 800 includes one or more processors 810, one or more memories 820, and one or more instructions stored in the one or more memories 820, when the instructions are executed by the one or more processors 810, the method as described in any of the possible implementation manners in the foregoing is executed.
[0289] For example, the electronic device 800 can be the electronic device 100, the electronic device 200, the electronic device 500, and the electronic device in the embodiments in the foregoing.
[0290] The electronic device 800 can be used to execute the method 300, the method 400, the method 700, etc. in the foregoing.
[0291] The embodiments of the present application also provide an electronic device, including a processor, a memory and a communication interface, wherein the communication interface is used to receive a signal, the memory is used to store the signal, the communication receiver is also used to transmit the signal to the processor, and the processor processes the signal, so that the method of file processing as described in any of the possible implementation manners in the foregoing is executed.
[0292] The embodiment of the present application further provides a device for file processing, comprising a processor and a communication interface, the communication interface is used for receiving a signal and transmitting the signal to the processor, and the processor processes the signal, so that the method for file processing described in any possible implementation manner is executed.
[0293] The device can be a chip. For example, the chip can be a chip system or a single chip, etc.
[0294] The embodiment of the present application further provides a readable storage medium (also referred to as a computer readable storage medium), which stores instructions, when the instructions run on an electronic device, the electronic device executes the related method steps to realize the method for file processing in the above embodiment.
[0295] The embodiment of the present application further provides a program product (also referred to as a computer program product), when the program product runs on an electronic device, the electronic device executes the related steps to realize the method for file processing in the above embodiment.
[0296] The embodiment of the present application further provides a device, which comprises modules for realizing the method for file processing in any of the above embodiments.
[0297] In addition, the embodiment of the present application further provides a device, which can be a chip, a component or a module. The device can comprise a processor and a memory connected to each other. The memory is used for storing instructions, and when the device runs, the processor can execute the instructions stored in the memory to make the device execute the method for file processing in the above method embodiments.
[0298] The device, readable storage medium, program product or apparatus provided by the embodiment can be used to execute the corresponding method provided above, and thus the beneficial effects thereof can refer to the beneficial effects of the corresponding method provided above, which will not be described herein again.
[0299] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0300] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the above method embodiments, which will not be described herein again.
[0301] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the described device embodiments are merely illustrative. For example, the division of the units is only a logical function division. There can be another division manner for the actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In this way, the actual implementation can be divided into other forms.
[0302] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can 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 embodiments.
[0303] In addition, each functional unit in the various embodiments of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.
[0304] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art that contributes to the technical solutions or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk, and various program code storage media.
[0305] The above is merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for file processing, characterized in that: The method is applied to an electronic device, the electronic device including an operating system, and the method includes: The operating system automatically runs a first application capable of opening the first file; The operating system notifies the first application to read the original data of the first file from the hard disk of the electronic device to the memory of the electronic device; The first application parses the original data to obtain first data, wherein the first data is data for supporting a display interface for displaying the first file; The operating system stores the first data from the memory to the hard disk; The operating system controls the first application to enter a dormant state.
2. The method according to claim 1, characterized in that The method further comprises: In response to a user operation of opening the first file, the operating system controls the first application program to enter a running state from the dormant state; The operating system notifies the first application to read the first data from the hard disk; A display interface of the first file is displayed according to the first data.
3. The method according to claim 1 or 2, characterized in that In the dormant state, the first application does not occupy hardware resources of the electronic device.
4. The method according to claim 3, characterized in that The operating system maintains a process index of the first application, and the first application does not interact with other applications.
5. The method according to claim 2, characterized in that In response to a user opening operation of the first file, the operating system controls the first application program to enter a running state from the dormant state, including: In response to a user operation of opening the first file, determining a state of the first application; When the first application is in the dormant state and the operating system maintains a process index of the first application, the operating system controls the first application to enter a running state from the dormant state.
6. The method according to any one of claims 1 to 5, characterized in that Before responding to the user's operation of opening the first file, the method further includes: The operating system controls the first application to enter a background running state from the dormant state; The operating system notifies the first application to read original data of a second file from the hard disk of the electronic device into the memory of the electronic device, wherein the type of the second file is the same as the type of the first file; The first application parses original data of the second file to obtain second data, wherein the second data is data for supporting a display interface for displaying the second file; The operating system stores the second data from the memory to the hard disk; The operating system controls the first application to enter a dormant state.
7. The method according to claim 6, characterized in that The method further comprises: In response to the operation of opening the second file, the operating system notifies the first application to read the second data from the hard disk; A display interface of the second file is displayed according to the second data.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: The electronic device maintains a list of applications in a dormant state.
9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: Displays the logo of dormant applications in a specific area.
10. The method according to any one of claims 1 to 9, characterized in that The operating system automatically runs a first application capable of opening a first file, including: The operating system determines to automatically run a first application program capable of opening a first file according to preset parameters of the first application program.
11. The method according to any one of claims 1 to 9, characterized in that The operating system controls the first application to enter a dormant state, including: The operating system controls the first application to enter the dormant state during a running phase indicated by preset parameters of the first application.
12. An electronic device, characterized in that: include: one or more processors; One or more memories; the one or more memories store one or more programs, and when the one or more programs are executed by one or more processors, the method according to any one of claims 1 to 11 is executed.
13. A chip, characterized in that: The chip includes a processor and a communication interface, wherein the communication interface is used to receive a signal and transmit the signal to the processor, and the processor processes the signal so that the method according to any one of claims 1 to 11 is executed.
14. A readable storage medium, characterized in that The readable storage medium stores instructions, and when the instructions are executed on the electronic device, the method according to any one of claims 1 to 11 is executed.
15. A program product, characterized in that The program product comprises a program code, and when the program code is run on an electronic device, the method according to any one of claims 1 to 11 is executed.
Citation Information
Patent Citations
Application preloading method, device, storage medium and mobile terminal
CN108664285A
Electronic equipment system processing method and device and electronic equipment
CN111796882A
Quick starting method and device for intelligent wearable equipment and storage medium
CN114595006A
Application preloading method, application starting method and electronic equipment
CN116048648A
Guiding method for speeding up operation system
CN1530796A