File processing method and electronic device

By preprocessing files before users open them, reading and parsing data, and storing the results, the problem of slow processing speed of complex files on electronic devices is solved, enabling fast file opening.

WO2026242232A1PCT designated stage Publication Date: 2026-11-26HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/120237
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-07-04
Filing Date
2025-09-10
Publication Date
2026-11-26

AI Technical Summary

Technical Problem

Electronic devices are slow to open complex or large files, which affects the user experience.

Method used

Before the user opens the file, the application automatically runs to preprocess the file, reads and parses the raw data and stores the results on the hard drive. Then, the application is put into a hibernation state and is woken up by the user to directly display the file interface.

Benefits of technology

It reduces the data reading and parsing time when opening files, improves file opening speed, and provides a fast user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025120237_26112026_PF_FP_ABST
    Figure CN2025120237_26112026_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a file processing method and an electronic device. The electronic device comprises an operating system. The method comprises: the operating system automatically runs a first application capable of opening a first file; the operating system notifies the first application to read original data of the first file from a hard disk of the electronic device into a memory of the electronic device; the first application parses the original data to obtain first data, wherein the first data is data used for supporting the display of a display interface of 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 sleep state. The file processing mode in the technical solution helps an electronic device to quickly open a file.
Need to check novelty before this filing date? Find Prior Art

Description

Document processing methods and electronic devices

[0001] This application claims priority to two Chinese patent applications filed on May 19, 2025, with application number 202510641955.3 and entitled "Method and Electronic Device for Document Processing", and filed on July 4, 2025, with application number 202510926650.7 and entitled "Method and Electronic Device for Document Processing", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of electronic technology, and more specifically, to a method and electronic device for document processing. Background Technology

[0003] When a user opens a file on an electronic device, the device needs to run an application capable of opening that file. This application reads and parses the file's raw data, ultimately displaying the file on the screen. However, for some complex files or files with a large amount of data, the electronic device may take a considerable amount of time to process the file and display it on the screen.

[0004] Therefore, how to process files to improve their opening speed has become a technical problem that needs to be solved. Summary of the Invention

[0005] This application provides a file processing method and an electronic device to improve file opening speed.

[0006] In a first aspect, a file processing method is provided, applied to an electronic device, the electronic device including an operating system, the method comprising: the operating system automatically running a first application capable of opening a first file; the operating system instructing the first application to read the raw data of the first file from the hard disk of the electronic device into the memory of the electronic device; the first application parsing the raw data to obtain first data, wherein the first data is data used to support the display interface for displaying the first file; the operating system storing the first data from memory to the hard disk; and the operating system controlling the first application to enter a hibernation state.

[0007] For example, the operating system can automatically run the first application in the background of the electronic device.

[0008] For example, if the first file is a video file, then the first application could be a video playback application. Similarly, if file 1 is a .docx file, then the application could be WPS or another application capable of opening .docx files.

[0009] In some examples, the first application could be the default application that can open the first file.

[0010] The raw data can be data stored on the hard drive in a preset format.

[0011] The first data is used to support the display interface of the first file. The graphics processing unit (GPU) of the electronic device can directly draw the display interface of the first file based on the first data.

[0012] Based on the embodiments of this application, the operating system of the electronic device can automatically run a first application that can open a first file, and notify the first application to read and parse the original data of the first file to obtain 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 a hibernation state so that the first application does not occupy the hardware resources of the electronic device.

[0013] In this way, when the user opens the first file later, the electronic device does not need to perform the original data reading and parsing process of the first file. Instead, it can quickly wake up the first application in the dormant state and display the first file's interface based on the first data, which helps the electronic device to open the file quickly.

[0014] In some implementations, the method further includes: in response to a user opening a first file, the operating system controls a first application to enter a running state from a hibernation state; the operating system notifies the first application to read first data from the hard disk; and the first data is displayed on the interface of the first file.

[0015] For example, the first application enters the running state from the hibernation state, at which time the first application may be running in the foreground of the electronic device.

[0016] Based on the embodiments of this application, when a user opens the first file, the electronic device can wake up the first application, enabling it to directly retrieve first data from the hard drive that supports the display interface of the first file. The electronic device can then quickly display the display interface of the first file based on this first data. Therefore, even when the first file is complex or occupies a large amount of storage space, the electronic device can still quickly open the first file, providing the user with a fast file opening experience.

[0017] When the electronic device detects that the user has opened the first file, it does not need to perform the original data reading and parsing process. Instead, it can quickly wake up the application in the dormant state and display the first file's interface based on the first data, which helps the electronic device to open the file quickly.

[0018] In some implementations, the first application does not consume the hardware resources of the electronic device while in hibernation mode.

[0019] For example, the hardware resources may include CPU resources, GPU resources, etc.

[0020] Based on the embodiments of this application, the first application does not occupy the hardware resources of the electronic device when in hibernation mode, thereby saving the resource consumption of the electronic device.

[0021] In some implementations, the operating system maintains a process index for the first application, and the first application does not interact with other applications.

[0022] For example, in hibernation mode, the task manager of the electronic device can maintain a process index of the first application, thereby enabling the electronic device to determine which applications are in hibernation mode.

[0023] For example, in hibernation mode, the first application cannot communicate with other applications, nor can it receive information or messages sent by other applications.

[0024] In some implementations, in response to a user opening a first file, the operating system controls the first application to enter the running state from a dormant state, including: in response to a user opening a first file, determining the state of the first application; and if the first application is in a dormant 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 dormant state.

[0025] Based on the embodiments of this application, when a user opens the first file, the electronic device needs to first determine the state of the first application. If it determines that the first application is in a dormant state and the system maintains the process index of the first application, it controls the first application to enter the running state from the dormant state. In this way, when the electronic device opens the first file, it can clearly know that the first application is in a dormant state, avoiding the need to reopen the first application.

[0026] In some implementations, before responding to the user's operation of opening the first file, the method further includes: the operating system controlling the first application to enter a background running state from a hibernation state; the operating system instructing the first application to read the raw data of the second file from the hard drive of the electronic device into 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 parsing the raw data of the second file to obtain second data, wherein the second data is data used to support the display interface for displaying the second file; the operating system storing the second data from memory to the hard drive; and the operating system controlling the first application to enter a hibernation state.

[0027] For example, if the first file is a video file, then the second file is also a video file.

[0028] Based on the embodiments of this application, after the electronic device preprocesses the first file, the first application is in a dormant state. When the electronic device needs to preprocess a second file of the same type as the first file again, it needs to wake up the dormant first application and run it in the background. The first application will then read the original data of the second file and perform parsing operations to obtain the second data used to support the display interface of the second file. The second data will also be stored in the hard disk. After that, the electronic device will control the first application to enter the dormant state again so that the first application does not occupy the hardware resources of the electronic device.

[0029] In this way, when the user opens the second file later, the electronic device does not need to perform the original data reading and parsing process. Instead, it can quickly wake up the first application in the dormant state and display the second file's interface based on the second data, which helps the electronic device to open the file quickly.

[0030] In some implementations, the method further includes: in response to the operation of opening the second file, the operating system instructs the first application to read the second data from the hard disk; and displays the second file based on the second data.

[0031] Based on the embodiments of this application, when the electronic device detects that a user has opened a second file, the electronic device does not need to perform the original data reading and parsing process of the second file. Instead, it can quickly wake up the application in the dormant state and display the second file's interface according to the second data, thereby facilitating the electronic device to quickly open the second file.

[0032] In some implementations, the method also includes: the electronic device maintaining a list of applications in a dormant state.

[0033] Based on embodiments of this application, electronic devices maintain a list of applications in a dormant state, thereby enabling users to determine which applications are in a dormant state.

[0034] In some implementations, the method also includes: the electronic device displaying an identifier of an application in a dormant state in a specific area.

[0035] It should be understood that the specific location of this particular area is not limited in the embodiments of this application. For example, the particular location may be located in the middle, side, or bottom corner of the display screen.

[0036] This technical solution allows users to determine which applications are in a dormant state.

[0037] In some implementations, the operating system automatically runs a first application that can open the first file, including: determining the first application that can open the first file to run automatically based on preset parameters of the first application.

[0038] For example, the preset parameter can instruct the first application to support the above preprocessing procedure.

[0039] In other examples, if the preset parameter indicates that the first application does not support the above preprocessing, the electronic device needs to open the first file according to the normal procedure.

[0040] In some implementations, the operating system controls the first application to enter a hibernation state, including: the operating system controls the first application to enter a hibernation state during the running phase indicated by the preset parameters of the first application.

[0041] For example, the preset parameter can indicate that it needs to enter a hibernation state before displaying the final interface, so the operating system can control the application to enter a hibernation state before displaying the file's display interface.

[0042] In other examples, this preset parameter can indicate that the application needs to enter a sleep state before parsing the raw data, so the operating system can control the application to enter a sleep state before parsing the raw data.

[0043] Based on the embodiments of this application, electronic devices can provide applications with multiple ways to enter a sleep state at different operating stages, so that application developers can choose according to their needs.

[0044] In some implementations, before the operating system automatically runs a 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, wherein the preprocessing operation is to read and parse the raw data of the stored first file before the user opens the first file.

[0045] For example, an electronic device can determine which files to preprocess. For instance, the electronic device may preprocess files whose storage space exceeds a preset storage space. Alternatively, the electronic device may preprocess files from a preset application. Or, the electronic device may preprocess recently opened files. Or, the electronic device may preprocess recently downloaded or received files. Or, the electronic device may preprocess files received from other devices using the same account.

[0046] Based on the embodiments of this application, the electronic device can clearly identify which files need to be preprocessed.

[0047] 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.

[0048] Thirdly, an electronic device is provided, comprising: one or more processors; one or more memories; said one or more memories storing one or more programs that, when executed by said one or more processors, cause the method described in the first aspect and any possible implementation thereof to be performed.

[0049] Fourthly, a chip is provided, the chip including a processor and a communication interface, the communication interface being used to receive a signal and transmit the signal to the processor, the processor processing the signal such that the method described in the first aspect and any possible implementation thereof is performed.

[0050] Fifthly, a readable storage medium is provided, wherein instructions are stored therein, which, when executed on an electronic device, cause the method described in the first aspect and any possible implementation thereof to be performed.

[0051] In a sixth aspect, a program product is provided, the program product comprising program code that, when run on an electronic device, causes the method described in the first aspect and any possible implementation thereof to be executed. Attached Figure Description

[0052] Figure 1 shows the structure of the electronic device 100.

[0053] Figure 2 illustrates the process of opening a file.

[0054] Figure 3 is an architecture diagram of an electronic device provided in an embodiment of this application.

[0055] Figure 4 is a schematic flowchart of a document processing method provided in an embodiment of this application.

[0056] Figure 5 is a schematic flowchart of another document processing method provided in an embodiment of this application.

[0057] Figure 6 is a schematic diagram of a GUI provided in an embodiment of this application.

[0058] Figure 7 is a schematic flowchart of a document processing method provided in an embodiment of this application.

[0059] Figure 8 is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0060] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0061] The methods described in this application embodiment can be applied to smartphones, wearable devices, smart TVs, tablets, laptops, personal computers (PCs), ultra-mobile personal computers (UMPCs), netbooks, in-vehicle devices, foldable devices, Internet of Things (IoT) devices, augmented reality devices, virtual reality devices, etc.

[0062] Figure 1 shows a schematic diagram of the structure of electronic device 100. Electronic device 100 may include processor 110, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, display screen 194, internal memory 121, external memory interface 122, etc.

[0063] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0064] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0065] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0066] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0067] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as file data, audio data, phonebook, etc.). Furthermore, internal memory may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0068] It should be understood that the disk storage device can be simply referred to as a "disk". The disk can include hard disks, floppy disks, optical disks, etc. In the embodiments of this application, the original data of the file can be stored in a disk storage device (such as a hard disk), or the data obtained by the electronic device from parsing the original data to support the display interface for displaying the file can also be stored in a disk storage device (such as a hard disk).

[0069] The external storage interface 122 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 122 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0070] The wireless communication module 160 can provide solutions for wireless communication applications 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), ultra-wideband (UWB) technology, and star flash, etc.

[0071] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.

[0072] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0073] Display screen 194 is used to display images, videos, documents, etc.

[0074] Before introducing the technical solutions of the embodiments of this application, the technical terms that may be involved in this application will be briefly introduced as follows.

[0075] In this embodiment, the application being in a dormant state can be understood as the application not occupying the hardware resources of the electronic device, such as CPU resources or GPU resources. Furthermore, the application cannot interact with other applications, such as receiving communication messages from other electronic devices. However, the process index of the application can be displayed in the process list of the electronic device, and the operating system of the electronic device can wake up the application when needed, such as bringing the application from a dormant state to a running state.

[0076] In this embodiment of the application, the application is in the background, or the application is running in the background. This can be understood as the application being in a running state, but the application's display interface is not presented to the user on the electronic device's screen, and the user cannot perceive the application's display interface.

[0077] When a user opens a file on an electronic device, the device needs to run an application capable of opening that file. This application reads and parses the file's raw data, ultimately displaying the file on the screen. However, for some complex files or files that occupy a large amount of storage space, the electronic device may take a considerable amount of time to display the file on the screen.

[0078] In view of this, embodiments of this application provide a file processing method and an electronic device. In this technical solution, the electronic device can automatically open the corresponding application to preprocess the file before the user opens it, thereby reading the original data of the file in advance and parsing it into target data that ultimately supports the display interface of the file. Afterwards, the electronic device can store the target data on a disk and control the application to enter a sleep state. This facilitates the subsequent wake-up of the application when the user's file opening operation is detected, allowing it to read the target data and quickly display the file's display interface. Thus, when the user opens the file, the electronic device does not need to read and parse the original data, a process that is relatively time-consuming. Therefore, the electronic device can quickly open the file and display its display interface.

[0079] The technical solutions in the embodiments of this application will be described below with reference to Figures 2-7.

[0080] For example, Figure 2 illustrates the process of opening a file. As shown in Figure 2, the general process of opening a file on a current electronic device includes the following steps.

[0081] Step 11: The user opens file 1.

[0082] For example, a user can open file 1 on an electronic device by double-clicking it with the mouse, or by right-clicking and selecting "Open".

[0083] Step 12: In response to the user's action of opening file 1, the electronic device runs application 1 associated with file 1.

[0084] The application associated with this file can be any application that can open the file.

[0085] For example, if file 1 is a .docx file, then the application can be WPS or other applications that can open .docx files.

[0086] Step 13: Application 1 reads the raw data of file 1 from the hard drive.

[0087] In some examples, the original data can be compressed from file 1 and stored in a specific format. For example, file 1 is a .docx file.

[0088] In some examples, the raw data may also be data stored in a certain format for file 1 without compression. For example, file 1 is a .doc file.

[0089] It should be understood that whether the original data in file 1 is compressed depends on the specific application that can open file 1.

[0090] Application 1 can read the raw data from the hard drive into the memory of the electronic device.

[0091] Step 14: Application 1 parses the original data to obtain data 2.

[0092] For example, application 1 can parse the raw data in memory to obtain data 2 that can support the display interface of file 1.

[0093] Step 15: Display the interface of file 1 based on data 2.

[0094] For example, application 1 can call the system interface to enable the GPU of the electronic device to draw the display window of file 1 based on the data 2. After the drawing is completed, the electronic device can display the display interface of file 1.

[0095] It should be understood that steps 13 to 14 above are relatively time-consuming processes for electronic devices. Therefore, for more complex files or files that occupy a large amount of storage space, it may take a long time for electronic devices to execute steps 13 to 14 above.

[0096] When a file takes a long time to load, the user may be constantly seeing the loading screen, which can negatively impact the user experience.

[0097] In the technical solution of this application embodiment, the electronic device performs a preprocessing process before the user opens the file, so as to execute the more time-consuming steps 13 to 14 before the user opens the file, thereby speeding up the file opening speed.

[0098] For example, the technical solution of this application embodiment may include a preprocessing stage and a display stage. The preprocessing stage may include steps 21 to 25. The display stage may include steps 26 to 28.

[0099] Step 21: The electronic device automatically runs the application associated with file 1.

[0100] For example, an electronic device can determine which files to preprocess. For instance, the electronic device might preprocess files that occupy more storage space than a preset storage space. Alternatively, the electronic device might preprocess files from a preset application. Or, the electronic device might preprocess recently opened files. Or, the electronic device might preprocess recently downloaded or received files. Or, the electronic device might preprocess files received from other devices on the same account.

[0101] For this type of file, the electronic device can automatically run the application associated with file 1 to perform a preprocessing procedure.

[0102] Step 22: Application 1 reads the raw data of file 1 from the hard drive.

[0103] For example, the operating system of an electronic device can instruct application 1 to read the raw data of file 1 from the hard drive. Application 1 can then read the raw data of file 1 from the hard drive into memory.

[0104] As you can understand, the original data can be found in the description above.

[0105] It should also be understood that the format in which the original data of file 1 is stored on the hard drive, and whether it has been compressed, depends on the application that can open file 1. In this embodiment of the application, the original data of file 1 is already stored on the hard drive in accordance with the method specified by the application before the electronic device preprocesses file 1.

[0106] Step 23: Application 1 parses the original data to obtain data 2.

[0107] For example, the operating system of an electronic device can instruct application 1 to parse the raw data to obtain data 2. This data 2 is the data used to support the display interface of file 1.

[0108] For example, the GPU of an electronic device can directly draw the display interface based on this data 2.

[0109] In other examples, the operating system of an electronic device may also instruct application 1 to read and parse the raw data of file 1 from the hard drive.

[0110] Step 24: The electronic device stores data 2 to the hard drive.

[0111] For example, the electronic device stores data 2 from memory to the hard drive.

[0112] Step 24 can be understood as the electronic device swapping all the data 2 in memory to the disk. At this point, the memory of the electronic device will no longer contain the data of file 1.

[0113] Step 25: Electronic device control application 1 enters sleep mode.

[0114] It should be understood that when application 1 is in hibernation mode, it will not consume the hardware resources of the electronic device, such as CPU or GPU resources. Furthermore, application 1 cannot interact with other applications, such as receiving communication messages from other electronic devices. However, the process index of application 1 can be displayed in the process list of the electronic device, and the operating system of the electronic device can wake up application 1 when needed, such as bringing it from hibernation mode to running mode.

[0115] In this embodiment of the application, during the automatic preprocessing stage of the electronic device's operating system, application 1 does not fully start up, but enters a hibernation state before displaying the final display interface, and releases all runtime resources it occupies, such as CPU resources, GPU resources, memory resources, etc.

[0116] In this way, during the preprocessing stage, the electronic device can perform the time-consuming steps 22 to 23 in advance, and the electronic device can also obtain data 2 that can support the display interface of file 1. Therefore, when the user needs to open file 1 later, the electronic device does not need to perform the above steps 22 to 23. The electronic device can instruct the application to directly read the data 2 from the disk and display the corresponding display interface, thereby speeding up the opening speed of file 1.

[0117] Understandably, when a user needs to open file 1, the electronic device can execute steps 26 to 28 of the display phase.

[0118] Step 26: In response to the user's operation of opening file 1, the electronic device control application 1 enters the running state from the sleep state.

[0119] For example, since application 1 is in a dormant state after preprocessing the aforementioned file 1, when the electronic device detects that the user has opened file 1, the electronic device can control application 1 to enter the running state from the previous dormant state.

[0120] Step 27: The electronic device notifies application 1 to read data 2 from the hard drive.

[0121] After application 1 enters the running state, the electronic device can instruct application 1 to read data 2 from the hard drive.

[0122] Step 28: The electronic device displays the display interface of file 1 based on data 2.

[0123] For example, after reading data 2, application 1 can call the GPU's interface to make the GPU of the electronic device draw the display window of file 1 based on the data 2. After the drawing is completed, the electronic device can display the display interface of file 1.

[0124] In this way, when a user opens file 1, the electronic device can wake up the application, which can directly retrieve data 2 from the hard drive to support the display interface of file 1. Based on this data 2, the electronic device can quickly display the display interface of file 1. Therefore, even if file 1 is relatively complex or occupies a large amount of storage space, the electronic device can still open file 1 quickly, providing the user with a fast file opening experience.

[0125] For example, FIG3 is a schematic architecture diagram of an electronic device provided in an embodiment of this application. As shown in FIG3, the electronic device 200 may include at least a file recommendation device, a lifecycle scheduling device, and a system resource management device.

[0126] The file recommendation device can be used to recommend which files need to be preprocessed to the operating system of an electronic device. It is understood that the method by which the file recommendation device determines which files need to be recommended for preprocessing can be found in the relevant description above, and will not be repeated here for the sake of brevity.

[0127] In some examples, the recommended device for this file could be Task Manager.

[0128] This lifecycle scheduling mechanism can be used to control the lifecycle of an application. For example, it can control the running of the application, control the application to enter a dormant state, or control the application to enter a running state from a dormant state.

[0129] The system's resource management device can interact with the lifecycle scheduling device to detect whether an application is in a dormant or running state. The system's resource management device can also schedule the resources used by applications, such as stopping CPU or GPU scheduling for applications in a dormant state.

[0130] The system's resource management device can also store all the application's data in memory to the disk during the preprocessing stage.

[0131] The system's resource management device can also detect the overall resource usage status of electronic devices and send this status to the file recommendation device so that it can adjust its recommendation strategy.

[0132] The following section will describe, with reference to Figures 4 and 5, the process by which the electronic device processes files in the embodiments of this application.

[0133] For example, Figure 4 is a schematic flowchart of a file processing embodiment provided in this application. As shown in Figure 4, the electronic device may include at least an application A, a file recommendation device, a lifecycle scheduling device, and a system resource management device.

[0134] The method 300 may include steps 301 to 308.

[0135] 301, The document recommendation device determines that document A needs to be preprocessed.

[0136] It should be understood that step 301 can be found in the relevant description in step 21 above.

[0137] 302, The file recommendation device sends file A, which needs to be preprocessed, to the lifecycle scheduling device.

[0138] It should be understood that steps 301 to 302 can also be optional. In other examples, steps 301 to 302 may not be performed, in which case the electronic device has already determined that file A needs to be preprocessed, and the method can start running from step 303. Alternatively, the electronic device's system may have pre-defined information on which files need to be preprocessed. Or, the electronic device may preprocess all files.

[0139] 303, The lifecycle scheduling device automatically runs application A associated with file A.

[0140] For example, the lifecycle scheduling device can control the running of application A, which is an application capable of opening file A.

[0141] Application A can be the default application for opening file A. For example, if file A is a .docx file, then the application could be WPS or another application capable of opening .docx files. Similarly, if file A is a video file, the application could be a video playback application.

[0142] For example, application A can run in the background of an electronic device, and its operation is not presented to the user.

[0143] In some examples, the developer of application A can configure parameters to indicate whether preprocessing is supported during application A's development. Step 303 is executed only when the electronic device determines that application A supports preprocessing based on these preset parameters. Alternatively, the electronic device can assume that every application supports preprocessing by default. Or, the electronic device may assume that application A supports preprocessing even when the aforementioned preset parameters are not present.

[0144] 304, Application A retrieves the raw data A of file A.

[0145] For example, application A can read the raw data A of file A from the disk based on a notification message from the system resource management device. This raw data A may be stored on the disk in a preset format.

[0146] Application A can read the raw data A of file A from the disk into the memory of the electronic device.

[0147] 305. Application A parses the original data A and obtains data B.

[0148] Here, data B is the data used to support the display interface of file A. Subsequently, the GPU of the electronic device can directly draw the display interface of file A based on data B.

[0149] Application A can parse raw data A in the memory of an electronic device to obtain data B.

[0150] 306, The system resource management device stores data B to the hard disk.

[0151] The system resource management device can store data B from memory to the hard drive. Alternatively, it can be understood that the system resource management device swaps all of application A's memory to the hard drive.

[0152] 307. The system resource management device sends control message 1 to application A. This control message 1 is used to control application A to enter a hibernation state.

[0153] 308, Application A has entered hibernation mode.

[0154] Steps 307 to 308 can be understood as the electronic device's operating system controlling application A to enter a sleep state.

[0155] In some examples, the developers of application A can also specify, through a preset parameter 2, which indicates at which stage of operation the application needs to enter a hibernation state.

[0156] For example, when the preset parameter 2 indicates that it needs to enter a sleep state before display during the preprocessing process, the electronic device can control it to enter a sleep state before display.

[0157] In other examples, the preset parameter 2 can also indicate that the device needs to enter a sleep state after reading the original data of the file during the preprocessing process, so the electronic device can control it to enter a sleep state after step 304.

[0158] Understandably, after application A enters a hibernation state, the system resource management device can stop all CPU or GPU access scheduling for application A, so that application A does not occupy the hardware resources of the electronic device.

[0159] It should also be understood that after application A enters a dormant state, application A will be unable to interact with other applications. For example, application A will not be able to receive communication messages from other applications.

[0160] It should also be understood that even after application A enters a dormant state, the electronic device can still maintain an index of the process of application A. For example, the task manager of the electronic device can maintain an index of the process of application A, so that when the user manually opens a file, the electronic device can determine that application A is in a dormant state.

[0161] Based on the embodiments of this application, before a user opens file A, the electronic device can pre-run the application for file A in the background and instruct the application to read the original data of file A from the hard drive and perform a parsing process. After the parsing is completed, the obtained data B is stored in the hard drive. Then, the electronic device controls application A to enter a sleep state so that application A does not occupy the hardware resources of the electronic device. In this way, when the user opens file A later, 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 file A according to data B, thereby facilitating the electronic device to open the file quickly.

[0162] In some cases, users may need to open file A. Therefore, method 300 may also include steps 309 to 313.

[0163] 309. When the lifecycle scheduling state detects that a user has opened file A, it sends a message to the system resource management device indicating that a user has opened file A.

[0164] 310. The system resource management device sends control message 2 to the application program. This control message 2 is used to control application program A to enter the running state from the hibernation state.

[0165] 311, Application A enters running state from hibernation state.

[0166] The system resource management device controls application A to enter the running state from the hibernation state. At this time, the display interface of application A is in the foreground of the electronic device and is visible to the user.

[0167] 312, Application A reads data B from the hard drive.

[0168] For example, after application A enters the running state, it can read the data B used to support the display interface of display file A from the hard disk according to the instructions of the system resource management device.

[0169] For example, application A reads the data B from the hard drive into the memory of the electronic device.

[0170] 313. Application A displays the display interface A of file A based on data B.

[0171] For example, application A can call the GPU's interface to make the GPU of the electronic device draw the display window of file A based on the data B. After the drawing is completed, application A can display the homepage of file A.

[0172] Based on the embodiments of this application, when a user opens file A, the electronic device can wake up application A, which can directly retrieve data B from the hard drive that supports the display interface of file A. The electronic device can then quickly display the display interface of file A based on this data B. Therefore, even when file A is complex or occupies a large amount of storage space, the electronic device can still quickly open file A, providing the user with a fast file opening experience.

[0173] When the electronic device detects that the user has opened file A, it does not need to perform the original data reading and parsing process. Instead, it can quickly wake up the application in the dormant state and display the display interface of file A based on data B, which helps the electronic device to open the file quickly.

[0174] In some scenarios, after an electronic device has preprocessed file A, application A may be in a dormant state. At this point, the electronic device may need to preprocess file B (e.g., file B has been downloaded or received), and file B is of the same type as file A. In this case, the electronic device needs to temporarily wake up application A from its dormant state, allowing it to run in the background to continue preprocessing file B, and then return to a dormant state after preprocessing is complete. This technical solution will be described below with reference to Figure 5.

[0175] For example, FIG5 is a schematic flowchart of another file processing method provided in an embodiment of the present application. As shown in FIG5, the method 400 may include steps 401 to 407.

[0176] It should be understood that in method 400, the electronic device can begin execution from determining that preprocessing of file B is required. File B is of the same type as file A.

[0177] For example, file A is a video file, and file B is also a video file. Or, file A is a .docx file, and file B is also a .docx file.

[0178] 401, The system resource management device sends control message 3 to application A. This control message 3 is used to control application A to enter the background running state from the hibernation state.

[0179] When it is determined that file B needs to be preprocessed, since application A is already in a dormant state, the system resource management device needs to control application A to re-enter the background running state.

[0180] 402, Application A has entered background running state from hibernation state.

[0181] The system resource management device controls application A to enter the background running state from the hibernation state. At this time, the display interface of application A is in the background of the electronic device and its display interface is not visible to the user.

[0182] 403, Application A obtains the raw data 2 of file B.

[0183] For example, application A can read the raw data 2 of file B from the disk based on a notification message from the system resource management device. This raw data 2 may be stored on the disk in a preset format.

[0184] Application A can read the raw data 2 of file B from the disk into the memory of the electronic device.

[0185] 404. Application A parses the original data 2 and obtains data C. Data C is the data used to support the display interface of file B.

[0186] Subsequently, the GPU of the electronic device can directly draw the display interface of file B based on this data C.

[0187] Application A can parse the original data 2 in the memory of the electronic device to obtain data C.

[0188] 405, The system resource management device stores data C to the hard disk.

[0189] The system resource management device can store this data C from memory to the hard drive. Alternatively, it can be understood that the system resource management device swaps all of application A's memory to the hard drive.

[0190] 406. The system resource management device sends control message 4 to application A. This control message 4 is used to control application A to enter a hibernation state.

[0191] 407, Application A has entered hibernation mode.

[0192] Steps 406 to 407 can be understood as the electronic device's operating system controlling application A to re-enter a sleep state.

[0193] It should be understood that this hibernation state can be referred to in the relevant description in step 308 above, and will not be repeated here.

[0194] Based on the embodiments of this application, after the electronic device preprocesses file A, application A is already in a dormant state. When the electronic device needs to preprocess file B of the same type as file A again, it needs to wake up the dormant application A and run the application A in the background to perform reading and parsing operations on the original data of file B, obtain data C used to support the display interface of file B, and store the data C in the hard disk. After that, the electronic device controls application A to enter the dormant state again so that application A does not occupy the hardware resources of the electronic device.

[0195] 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. Instead, it can quickly wake up application A, which is in a dormant state, and display the display interface of file B based on data C, thus facilitating the electronic device to open the file quickly.

[0196] In some cases, users have a need to open file A. Therefore, method 400 may also include steps 408 to 412.

[0197] 408. When the lifecycle scheduling state detects that a user has opened file B, it sends a message to the system resource management device indicating that a user has opened file B.

[0198] 409. The system resource management device sends control message 5 to the application program. This control message 5 is used to control application program A to enter the running state from the hibernation state.

[0199] 410, Application A enters running state from hibernation state.

[0200] The system resource management device controls application A to enter the running state from the hibernation state. At this time, the display interface of application A is in the foreground of the electronic device and is visible to the user.

[0201] 411. Application A reads data C from the hard drive.

[0202] For example, after application A enters the running state, it can read the data C used to support the display interface of the display file B from the hard disk according to the instructions of the system resource management device.

[0203] For example, application A reads the data C from the hard drive into the memory of the electronic device.

[0204] 412. Application A displays the display interface B of file B based on data C.

[0205] For example, application A can call the GPU's interface to make the GPU of the electronic device draw the display window of file A based on the data C. After the drawing is completed, application A can display the homepage of file B.

[0206] Based on the embodiments of this application, when a user opens file B, the electronic device can wake up application A, which can directly retrieve data C from the hard drive that supports the display interface of file B. The electronic device can then quickly display the display interface of file B based on this data C. Therefore, even when file B is complex or occupies a large amount of storage space, the electronic device can still open file B quickly, providing the user with a fast file opening experience.

[0207] When the electronic device detects that the user has opened file B, it does not need to perform the original data reading and parsing process. Instead, it can quickly wake up the application in the dormant state and display the display interface of file B based on data C, which helps the electronic device to open the file quickly.

[0208] In some cases, after preprocessing several different types of files, an electronic device may have multiple applications in a dormant state. In such cases, the electronic device can maintain a list of these applications, or it can display the identifiers of these applications in a specific area of ​​the display screen. This technical solution will be described below with reference to the graphical user interface (GUI) shown in Figure 6.

[0209] For example, FIG6 is a schematic diagram of a GUI provided in an embodiment of this application. Referring to FIG6, the GUI may be the display interface 510 of the electronic device 500. The display interface 510 may be the desktop of the electronic device 500.

[0210] After an electronic device preprocesses different types of files, multiple applications on the device may be in a dormant state.

[0211] For example, an electronic device preprocesses files 1, 2, and 3. File 1 is associated with application App1, file 2 with application App2, and file 3 with application App3. In this case, App1, App2, and App3 are all in a dormant state.

[0212] Referring to Figure 6, the display interface 510 of the electronic device may include a prompt window 511, which may include the identifiers of App1, App2 and App3 in sleep mode. For example, the identifier may be the icon of the application and the name of the application.

[0213] In other examples, the prompt window 511 may also include a pre-processed identifier 2, for example, the identifier 2 may be a small rocket identifier, or the text identifier "accelerated", etc.

[0214] It is understood that the location of the prompt window 511 is not limited in the embodiments of this application. For example, the prompt window 511 may be located in a specific area of ​​the display screen, such as the lower right corner, lower left corner, upper left corner, upper right corner, etc., or the specific area may be the center area of ​​the display screen.

[0215] In other examples, the prompt window 511 can also be collapsed into the sidebar or displayed in the taskbar.

[0216] In some examples, after the electronic device 500 detects that the user clicked the prompt window 511, it can display another window B, which may include information about multiple pre-processed files (such as filename, type, size, etc.). For example, window B may include information 1 about App1 and the file 1 that App1 can open, information 2 about App2 and the file 2 that App2 can open, and information 3 about App3 and the file 3 that App3 can open.

[0217] In other examples, the sidebar or display in the taskbar may also include a function control indicating whether the device is in a dormant state. When the user clicks this function control, the electronic device may display window B as described above.

[0218] In other examples, the electronic device can also display information about multiple pre-processed files directly in prompt window 511.

[0219] For example, FIG7 is a schematic flowchart of a file processing method provided in an embodiment of this application. As shown in FIG7, the method 700 can be applied to an electronic device, which may include an operating system, and the method 700 may include steps 710 to 750.

[0220] 710, the operating system automatically runs the first application that can open the first file.

[0221] For example, the first file could be file A mentioned above, and the first application could be application A mentioned above.

[0222] The first application can be a system application or a third-party application.

[0223] For example, the operating system can automatically run the first application in the background of the electronic device.

[0224] For example, if the first file is a video file, then the first application could be a video playback application. Similarly, if file 1 is a .docx file, then the application could be WPS or another application capable of opening .docx files.

[0225] In some examples, the first application could be the default application that can open the first file.

[0226] 720, The operating system instructs the first application to read the raw data of the first file from the hard drive of the electronic device into the memory of the electronic device.

[0227] The raw data can be data stored on the hard drive according to a preset format. For example, the raw data is data that has been encoded and compressed from the first file and stored on the hard drive according to a certain format.

[0228] After the operating system runs the first application in the background, it can instruct the first application to read the raw data of the first file from the hard drive into the memory of the electronic device.

[0229] 730, The first application parses the raw data to obtain the first data, wherein the first data is the data used to support the display interface of the first file.

[0230] It should be understood that the embodiments of this application do not limit the specific means by which 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.

[0231] The first data is used to support the display interface of the first file. The graphics processing unit (GPU) of the electronic device can directly draw the display interface of the first file based on the first data.

[0232] 740, the operating system stores the first data from memory to the hard drive.

[0233] The operating system swaps all the first data in memory to the hard drive, meaning the first application does not occupy any memory resources of the electronic device.

[0234] 750, the operating system controls the first application to enter hibernation mode.

[0235] Based on the embodiments of this application, the operating system of the electronic device can automatically run a first application that can open a first file, and notify the first application to read and parse the original data of the first file to obtain 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 a hibernation state so that the first application does not occupy the hardware resources of the electronic device.

[0236] In this way, when the user opens the first file later, the electronic device does not need to perform the original data reading and parsing process of the first file. Instead, it can quickly wake up the first application in the dormant state and display the first file's interface based on the first data, which helps the electronic device to open the file quickly.

[0237] In steps 710 to 750, the electronic devices can all run in the background, so that the user is unaware of the operation of the first application.

[0238] In some implementations, method 700 also includes:

[0239] In response to the user opening the first file, the operating system controls the first application to enter the running state from the hibernation state;

[0240] The operating system instructs the first application to read the first data from the hard drive;

[0241] The first data shows the display interface of the first file.

[0242] For example, the first application enters the running state from the hibernation state, at which time the first application may be running in the foreground of the electronic device.

[0243] Based on the embodiments of this application, when a user opens the first file, the electronic device can wake up the first application, enabling it to directly retrieve first data from the hard drive that supports the display interface of the first file. The electronic device can then quickly display the display interface of the first file based on this first data. Therefore, even when the first file is complex or occupies a large amount of storage space, the electronic device can still quickly open the first file, providing the user with a fast file opening experience.

[0244] When the electronic device detects that the user has opened the first file, it does not need to perform the original data reading and parsing process. Instead, it can quickly wake up the application in the dormant state and display the first file's interface based on the first data, which helps the electronic device to open the file quickly.

[0245] In some implementations, the first application does not consume the hardware resources of the electronic device while in hibernation mode.

[0246] For example, the hardware resources may include CPU resources, GPU resources, etc.

[0247] Based on the embodiments of this application, the first application does not occupy the hardware resources of the electronic device when in hibernation mode, thereby saving the resource consumption of the electronic device.

[0248] In some implementations, the operating system maintains a process index for the first application, and the first application does not interact with other applications.

[0249] For example, in hibernation mode, the task manager of the electronic device can maintain a process index of the first application, thereby enabling the electronic device to determine which applications are in hibernation mode.

[0250] For example, in hibernation mode, the first application cannot communicate with other applications, nor can it receive information or messages sent by other applications.

[0251] In some implementations, in response to a user opening a first file, the operating system controls the first application to enter a running state from a dormant state, including:

[0252] In response to the user opening the first file, the operating system determines the state of the first application.

[0253] When the first application is in a dormant 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 dormant state.

[0254] Based on the embodiments of this application, when a user opens the first file, the electronic device needs to first determine the state of the first application. If it determines that the first application is in a dormant state and the system maintains the process index of the first application, it controls the first application to enter the running state from the dormant state. In this way, when the electronic device opens the first file, it can clearly know that the first application is in a dormant state, avoiding the need to reopen the first application.

[0255] In some implementations, prior to responding to the user's action of opening the first file, method 700 further includes:

[0256] The operating system controls the first application to enter the background running state from the hibernation state.

[0257] The operating system instructs the first application to read the raw data of the second file from the hard drive of the electronic device into the memory of the electronic device, wherein the type of the second file is the same as that of the first file;

[0258] The first application parses the original data of the second file to obtain the second data, which is the data used to support the display interface of the second file;

[0259] The operating system stores the second data from memory to the hard drive;

[0260] The operating system controls the first application to enter a hibernation state.

[0261] For example, if the first file is a video file, then the second file is also a video file.

[0262] Referring to Figures 4 and 5, the first file can be file A, the second file can be file B, and the second data can be data C.

[0263] Based on the embodiments of this application, after the electronic device preprocesses the first file, the first application is in a dormant state. When the electronic device needs to preprocess a second file of the same type as the first file again, it needs to wake up the dormant first application and run it in the background. The first application will then read the original data of the second file and perform parsing operations to obtain the second data used to support the display interface of the second file. The second data will also be stored in the hard disk. After that, the electronic device will control the first application to enter the dormant state again so that the first application does not occupy the hardware resources of the electronic device.

[0264] In this way, when the user opens the second file later, the electronic device does not need to perform the original data reading and parsing process. Instead, it can quickly wake up the first application in the dormant state and display the second file's interface based on the second data, which helps the electronic device to open the file quickly.

[0265] In some implementations, method 700 also includes:

[0266] In response to the operation of opening the second file, the operating system instructs the first application to read the second data from the hard drive;

[0267] The second data shows the display interface of the second document.

[0268] Based on the embodiments of this application, when the electronic device detects that a user has opened a second file, the electronic device does not need to perform the original data reading and parsing process of the second file. Instead, it can quickly wake up the application in the dormant state and display the second file's interface according to the second data, thereby facilitating the electronic device to quickly open the second file.

[0269] In some implementations, the method 700 also includes: maintaining a list of applications in a dormant state on the electronic device.

[0270] Based on embodiments of this application, electronic devices maintain a list of applications in a dormant state, thereby enabling users to determine which applications are in a dormant state.

[0271] In some implementations, method 700 also includes:

[0272] Electronic devices display the identifiers of applications that are in sleep mode in a specific area.

[0273] It should be understood that the specific location of this particular area is not limited in the embodiments of this application. For example, the particular location may be located in the middle, side, or bottom corner of the display screen.

[0274] For example, referring to Figure 6, the specific area may be the lower right corner of the display screen, and the prompt window 511 may include the identifiers of multiple applications.

[0275] This technical solution allows users to determine which applications are in a dormant state.

[0276] In some implementations, the operating system automatically runs the first application capable of opening the first file, including:

[0277] The first application, which can open the first file, is automatically run based on its preset parameters.

[0278] For example, the preset parameter can instruct the first application to support the above preprocessing procedure.

[0279] In other examples, if the preset parameter indicates that the first application does not support the above preprocessing, the electronic device needs to open the first file according to the normal procedure.

[0280] In some implementations, the operating system controls the first application to enter a hibernation state, including:

[0281] The operating system controls the first application to enter a hibernation state during the running phase indicated by the preset parameters of the first application.

[0282] For example, the preset parameter can indicate that it needs to enter a hibernation state before displaying the final interface, so the operating system can control the application to enter a hibernation state before displaying the file's display interface.

[0283] In other examples, this preset parameter can indicate that the application needs to enter a sleep state before parsing the raw data, so the operating system can control the application to enter a sleep state before parsing the raw data.

[0284] Based on the embodiments of this application, electronic devices can provide applications with multiple ways to enter a sleep state at different operating stages, so that application developers can choose according to their needs.

[0285] In some implementations, the method 700 further includes the following before the operating system automatically runs a first application capable of opening the first file:

[0286] The operating system determines that preprocessing is required for the first file. Preprocessing involves reading and parsing the raw data of the first file before the user opens it.

[0287] For example, an electronic device can determine which files to preprocess. For instance, the electronic device might preprocess files that occupy more storage space than a preset storage space. Alternatively, the electronic device might preprocess files from a preset application. Or, the electronic device might preprocess recently opened files. Or, the electronic device might preprocess recently downloaded or received files. Or, the electronic device might preprocess files received from other devices on the same account.

[0288] Based on the embodiments of this application, the electronic device can clearly identify which files need to be preprocessed.

[0289] For example, FIG8 is a schematic block diagram of an electronic device provided in an embodiment of the present application. As shown in FIG8, the electronic device 800 includes one or more processors 810; one or more memories 820; the one or more memories 820 store one or more instructions, which, when executed by one or more processors 810, cause the method described in any of the possible implementations above to be executed.

[0290] For example, the electronic device 800 can be the electronic device 100, electronic device 200, electronic device 500 mentioned above, or the electronic device in the embodiment.

[0291] The electronic device 800 can be used to execute methods 300, 400, 700, etc. mentioned above.

[0292] This application also provides an electronic device, including a processor, a memory, and a communication interface, wherein the communication interface is used to receive signals, the memory is used to store signals, the communication interface is also used to transmit signals to the processor, and the processor processes the signals such that the file processing method described in any of the possible implementations above is executed.

[0293] This application also provides a file processing apparatus, including a processor and a communication interface. The communication interface is used to receive signals and transmit the signals to the processor. The processor processes the signals so that the file processing method described in any of the possible implementations above is executed.

[0294] The device can be a chip. For example, the chip can be a chip system or a standalone chip.

[0295] This application also provides a readable storage medium (also known as a computer-readable storage medium) that stores instructions. When these instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the file processing method described in the above embodiments.

[0296] This application also provides a program product (also known as a computer program product) that, when run on an electronic device, causes the electronic device to perform the aforementioned related steps to implement the file processing method described in the above embodiments.

[0297] This application also provides an apparatus including modules for implementing the file processing method as described in any of the preceding embodiments.

[0298] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store instructions, and when the apparatus is running, the processor may execute the instructions stored in the memory to cause the apparatus to perform the file processing methods in the above method embodiments.

[0299] In this embodiment, the device, readable storage medium, program product or apparatus are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0300] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented 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 implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0301] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0302] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0303] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0304] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0305] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks.

[0306] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method of file processing, characterized by, 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 that can open the first file; The operating system instructs the first application to read the raw data of the first file from the hard drive of the electronic device into the memory of the electronic device; The first application parses the raw data to obtain first data, wherein the first data is data used to support the 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 hibernation state.

2. The method of claim 1, wherein, The method further includes: In response to 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 instructs the first application to read the first data from the hard drive; The first data shows the display interface of the first file.

3. The method according to claim 1 or 2, characterized in that, In the hibernation state, the first application does not occupy the hardware resources of the electronic device.

4. The method of claim 3, wherein, The operating system maintains a process index for the first application, and the first application does not interact with other applications.

5. The method of claim 2, wherein, In response to a user opening the first file, the operating system controls the first application to enter the running state from the hibernation state, including: In response to the user opening the first file, determine the state of the first application; When 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.

6. The method according to any one of claims 1-5, characterized in that, Prior to responding to the user's action of opening the first file, the method further includes: The operating system controls the first application to enter the background running state from the hibernation state; The operating system instructs the first application to read the raw data of the second file from the hard drive 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 the original data of the second file to obtain second data, wherein the second data is the data used to support the 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 hibernation state.

7. The method of claim 6, wherein, 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; The second data shows the display interface of the second file.

8. The method according to any one of claims 1-7, characterized in that, The method further includes: The electronic device maintains a list of applications in a dormant state.

9. The method according to any one of claims 1-8, characterized in that, The method further includes: Display the identifier of applications that are in a dormant state in a specific area.

10. The method according to any one of claims 1-9, characterized in that, The operating system automatically runs a first application capable of opening the first file, including: The operating system determines, based on preset parameters of the first application, to automatically run the first application capable of opening the first file.

11. The method according to any one of claims 1-9, characterized in that, The operating system controls the first application to enter a hibernation state, including: The operating system controls the first application to enter the hibernation state during the running phase indicated by the preset parameters of the first application.

12. An electronic device, comprising: include: One or more processors; One or more memories; the one or more memories storing one or more programs that, when executed by one or more processors, cause the method as described in any one of claims 1-11 to be performed.

13. A chip, characterized by The chip includes a processor and a communication interface, the communication interface being used to receive signals and transmit the signals to the processor, the processor processing the signals such that the method as described in any one of claims 1-11 is executed.

14. A readable storage medium, characterized by, The readable storage medium stores instructions that, when executed on an electronic device, cause the method as described in any one of claims 1-11 to be performed.

15. A program product, characterized by The program product includes program code that, when run on an electronic device, causes the method as described in any one of claims 1-11 to be executed.