Data processing method and electronic equipment
By simulating the cache module at the driver layer of the operating system, using the data differences between the first storage space and the second storage space, the file information of the target application is obtained and loaded, and the problem of cache clearance after system restart is solved, and the application is quickly started and run.
Patent Information
- Application Number
- CN202510571937.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-19
AI Technical Summary
After the system restarts, the application cache is cleared, resulting in the inability to accelerate the hot and cold startup speeds, and the released memory resources are irreversible, affecting the application's startup and running speed.
By simulating the cache module at the driver layer of the operating system, using the data differences between the first storage space and the second storage space, the file information of the target application is obtained and loaded, the cache missing of the first storage space is compensated, and the startup and operation of the application is optimized.
Improves the startup and running speed of the application, and compensates for the released resources in the cache module to ensure that the application can still respond quickly to user needs after the system restarts.
Smart Images

Figure CN120508330A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data processing method and electronic equipment. Background Art
[0002] When the system restarts, the cache used to speed up the hot start and running speed of the application will be cleared. When the application is cold started, neither the startup nor the running speed can be accelerated. After the application exits, as the system memory decreases, the cache will release some resources, and the released resources are irreversible. At this time, the hot start and running speed of the application cannot be accelerated. Summary of the Invention
[0003] The purpose of the embodiments of the present application is to provide a data processing method and an electronic device.
[0004] The embodiments of the present application adopt the following technical solution: a data processing method, the method comprising:
[0005] Determine a target application to be run and obtain first data; wherein the first data is used to represent file information of the application stored in the first storage space;
[0006] If the first data does not include file information of the target application, obtaining second data, where the second data is determined based on the first data at different time points, where the different time points correspond to different first data, and the second data is used to represent file information of the application stored in a second storage space, where the first storage space is different from the second storage space;
[0007] If the second data includes file information of the target application, the file of the target application is obtained from the second storage space to respond to the running requirement of the target application.
[0008] In some embodiments, the method further comprises:
[0009] When obtaining the target application file from the second storage space, the target application file stored in the second storage space is first loaded into the first storage space, and the first data is updated.
[0010] In some embodiments, the method further comprises:
[0011] According to the running state of the application and / or the available space of the first storage space, at least part of the files of the application stored in the first storage space are removed; and the first data is updated.
[0012] In some embodiments, the second data is determined based on the first data at different time points, including:
[0013] According to a triggering event of switching the running state of the application, obtaining first data at a time point corresponding to the triggering event;
[0014] Determining second data based on differences in first data corresponding to different time points;
[0015] The triggering event of the application's running state switching includes at least one of the following: a user's operation on the application causing the application's running state to switch; and a target model switching based on the determined application's running state.
[0016] In some embodiments, the method further comprises:
[0017] After determining the second data, preloading the corresponding application file into the second storage space according to the set rules based on the second data;
[0018] The setting rule includes at least one of the following: available space of the second storage space, priority of the application, and priority of the file of the application.
[0019] In some embodiments, the setting rules further include:
[0020] Sort the application files by priority;
[0021] Classifying the space available in the second storage space;
[0022] Based on the level classification result, at least part of the application files are loaded into the second storage space in order of priority.
[0023] In some embodiments, it further includes:
[0024] According to changes in application scenarios and / or resource requirements of the electronic device, the level of available space in the second storage space and the priority ranking of applications and files of the applications are adjusted.
[0025] In some embodiments, the method further comprises:
[0026] The first storage space is a first storage area of the operating system's memory, and the second storage space is a second storage area of the operating system's memory.
[0027] An embodiment of the present application further provides an electronic device, including:
[0028] a processor, configured to determine a target application to be started, obtain first data for the target application to be run, obtain second data if the first data does not include file information of the target application, and obtain files of the target application from a second storage space if the second data includes the file information of the target application, so as to respond to a run requirement of the target application;
[0029] a first storage space, the first storage space including first data, the first data being used to represent file information of an application stored in the first storage space;
[0030] The second storage space is different from the first storage space. The second storage space includes second data. The second data is determined based on the first data at different time points. The different time points correspond to different first data. The second data is used to represent file information of the application stored in the second storage space.
[0031] In some embodiments, the processor is further configured to, after determining the second data, preload the file of the application corresponding to the second data into the second storage space according to a set rule. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0033] Figure 1 A flowchart of the data processing method for this application;
[0034] Figure 2 for Figure 1 Flowchart of an embodiment of step S20 in FIG. DETAILED DESCRIPTION
[0035] Various aspects and features of the present application are described herein with reference to the accompanying drawings.
[0036] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but merely as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.
[0037] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0038] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.
[0039] It should also be understood that although the present application has been described with reference to certain specific examples, those skilled in the art will readily be able to implement many other equivalent forms of the present application.
[0040] The above and other aspects, features and advantages of the present application will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.
[0041] Specific embodiments of the present application will be described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments described are merely examples of the present application and may be implemented in a variety of ways. Familiar and / or repetitive functions and structures are not described in detail to avoid obscuring the present application with unnecessary or redundant details. Therefore, the specific structural and functional details described herein are not intended to be limiting, but rather serve merely as a basis and representative basis for the claims to teach those skilled in the art to variously utilize the present application with substantially any suitable detailed structure.
[0042] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," which may all refer to one or more of the same or different embodiments according to the present application.
[0043] First, the application scenarios of the embodiments of the present application are briefly introduced.
[0044] The Windows operating system has a file-based caching mechanism that accelerates application startup and execution. This cache stores cache files required for application startup and execution, accelerating application hot startup and execution. The operating system's cache primarily exists in the form of a standby list (in the form of pages). Currently, with this operating system's cache mechanism, the operating system's cache is cleared when the operating system restarts, preventing application startup and execution from being accelerated during a cold start. The standby files in the operating system cache are intended for application hot startup and execution. After an application process exits, as the system's cache decreases, the standby list's related resources are further released, making the persistence of these resources in memory unpredictable. Furthermore, after an application process exits, as system memory decreases, some of the resources released by the standby list are irreversible. Even if memory increases again, these released resources will not be cached again, preventing application hot startup and execution from being accelerated.
[0045] To solve the problems in the background technology, an embodiment of the present application provides a data processing method.
[0046] This application is supported by a driver added to the operating system. For example, a driver module that simulates the operating system's cache is implemented in the lower layer of the operating system's cache, and the driver module is located in the upper layer of the file system. The driver module supports the execution of the data processing method to achieve compensation for the operating system's cache module. For example, when the application is started, the operating system's cache can be searched for the corresponding resource file. If the operating system's cache does not find the corresponding resource file, the driver module can be used to search for the corresponding resource file in another storage space.
[0047] After introducing the application scenarios of this application, this application is explained below.
[0048] Combine Figure 1 , the method may include the following steps:
[0049] S10, determining a target application to be run, and obtaining first data; wherein the first data is used to represent file information of the application stored in the first storage space.
[0050] For example, there are multiple ways to start an application. When an application receives a corresponding start-up method, the application can be started and the started application can be used as the target application. The started application can run according to the target application to achieve the function that the user wants to achieve through the target application.
[0051] For example, an application may include any of the following startup methods: starting the application by clicking on the application, starting the application by entering a corresponding startup command, starting the application through a shortcut command or shortcut key, and starting the application through a third-party application management software or launcher.
[0052] Launch via desktop shortcut: Each application on the computer desktop typically has a corresponding shortcut icon. Users can quickly launch the application by simply double-clicking the icon. For example, if a user wants to edit a document in Word, they can simply find the Word shortcut icon on the desktop and double-click it to open the Word application.
[0053] Launching via the Start Menu: In Windows, clicking the Start button brings up the Start menu, which contains a list of installed applications. Users can launch an application by locating its name in the menu and clicking it. For example, to launch the Calculator application, click the Start menu and enter "calculator" in the search box, or find and click the "Calculator" option in the "All Programs" list.
[0054] Launching from the command line: In the Windows Command Prompt (CMD) or Linux terminal, users can enter the application's executable file path or command to launch the application. For example, in Linux, to launch the text editor Vim, enter the command "vim" in the terminal and press Enter. If the application is not in the system's default search path, you need to enter the full file path to launch it.
[0055] Launch by file association: When a user double-clicks a file of a specific type, the system automatically launches the associated application to open the file. For example, double-clicking a PDF file automatically launches Adobe Acrobat Reader or other associated PDF reading software to open the file; double-clicking an MP3 music file automatically launches the music player to play the audio file.
[0056] Launch via shortcut command: In some operating systems, users can set shortcut commands or keyboard shortcuts for applications. By pressing a preset shortcut key combination, you can quickly launch an application. For example, in Windows, users can press the Win+R key combination to open the Run dialog box and then enter the application's shortcut command to launch it. For example, entering "notepad" quickly launches the Notepad application.
[0057] Launching through third-party software: Some third-party application management software or launchers can help users launch applications more conveniently. For example, on mobile phones, users can use desktop launcher applications to launch applications by finding the corresponding application icon on the interface and clicking it. On computers, some software management tools also provide the ability to launch applications. Users can find installed applications in the software management tool interface and launch them by clicking a button.
[0058] It should be noted that the target application to be run includes a program that has been started and is running in the background, and an application that is not used for a long time but has not been exited and is to be run from the background to the foreground.
[0059] After determining the target application to be run, first data is obtained, wherein the first data is used to represent file information of the application stored in the first storage space.
[0060] The first data may be in the form of a first list, which may store file information of the application in a page format, wherein the file information may include information such as file names, extensions, file sizes, and file versions of multiple application programs.
[0061] S20. If the first data does not include file information of the target application, obtain second data. The second data is determined based on the first data at different time points. The different time points correspond to different first data. The second data is used to represent file information of the application stored in a second storage space. The first storage space is different from the second storage space.
[0062] Exemplarily, if the first data includes file information of a target application, the file of the target application may be directly obtained from the first storage space, so as to respond to the running requirements of the target application through the file of the target application.
[0063] If the first data does not include the target application's file information, the target application's file cannot be retrieved from the first storage space. In this case, the second data can be obtained through the driver module of the driver layer. Similar to the first data, the second data can be in the form of a second table, and the second page table can also store the application's file information in a page format.
[0064] That is, when obtaining the files of the target application, the access priority of the first storage space is higher than the access priority of the second storage space. That is, the files of the target application can be obtained from the first storage space first. If the files of the target application cannot be obtained from the first storage space, they can be obtained from the second storage space.
[0065] In addition, when the target application file cannot be obtained from the second storage space, the target application file can be obtained from the disk.
[0066] The second data is different from the first data in that it is used to represent file information of an application stored in the second storage space. Here, the second storage space is different from the first storage space.
[0067] For example, the first storage space corresponds to a first storage area of the operating system memory, and the second storage space corresponds to a second storage area of the operating system memory. The first storage area and the second storage area are different. Access speeds of the first storage space and the second storage space are greater than the access speed of the disk.
[0068] Of course, it is understandable that the first storage space and the second storage space may also be other storage spaces. This is only used as an example and does not constitute a limitation on the scope of protection of the claims.
[0069] The second data is determined based on the first data. Specifically, the second data is determined based on data at different time points. Here, different time points correspond to different first data, and the second data can be determined based on the first data at different time points.
[0070] For example, when a target application exits at a first time point, a first data item is generated. When the system restarts the target application at a second time point after a period of operation, a different first data item is generated. Because the system is in operation during the period from the first time point to the second time point, the first data items at the first time point and the second time point are different.
[0071] As the target application exits at the first time point and the system runs, some cached files and other resources stored in the first storage space may be deleted (released) and need to be reloaded when needed. Resource release is irreversible, so the first data corresponding to the first time point and the second time point are different. Moreover, the first data corresponding to the first time point is larger than the first data corresponding to the second time point.
[0072] The second data determined at the different time points may include file information of files deleted from the first storage space. This file information may be included in the second data to compensate for the first data if the first data does not include the target application's file information. The launch and operation of the application will not be slowed down due to the release of files in the first storage space.
[0073] Of course, it is understandable that the first time point and the second time point may also correspond to other time points of the application, and at different time points, the application may have a state different from the above-mentioned exit and startup states.
[0074] S30: If the second data includes file information of the target application, obtain the file of the target application from the second storage space to respond to the running requirement of the target application.
[0075] Exemplarily, if the second data includes file information of the target application, the files of the target application can be obtained from the second storage space through the file information of the target application. Here, the files of the target application may include but are not limited to: executable files (exe), dynamic link libraries (dll), image files (image), configuration files, XML files and temporary files (temp).
[0076] Based on the file information of the target application included in the second data, the files of the target application are obtained from the second storage space. The obtained files of the target application can be used to respond to the running requirements of the target application to compensate for the files of the application stored in the first storage space, thereby improving the startup and running speed of the target application.
[0077] In some embodiments, the method further comprises:
[0078] When obtaining the target application file from the second storage space, the target application file stored in the second storage space is first loaded into the first storage space, and the first data is updated.
[0079] For example, when running a target application, the target application requires the first, second, and third files. The first data includes the first file information of the first file and the second file information of the second file, but does not include the file information of the third file. The second data includes the file information of the third file. Therefore, the first and second files can be retrieved from the first storage space, the second data can be retrieved, and based on the file information of the third file included in the second data, the third file can be retrieved from the second storage space.
[0080] When obtaining the third file from the second storage space, the third file stored in the second storage space can be loaded into the first storage space first, so that the first storage space has the third file, and the first data is updated. Then, during the subsequent operation of the target application, the third file can be obtained from the first storage space without having to obtain the third file from the second storage space, thereby further improving the running speed of the target application.
[0081] In combination with the previous embodiment, when the third file is updated to the first storage space, the third file in the second storage space can be deleted so that the operating system memory only stores one copy of the third file, thereby preventing waste of the operating system memory space.
[0082] In some embodiments, the method further comprises:
[0083] According to the running state of the application and / or the available space of the first storage space, at least part of the files of the application stored in the first storage space are removed; and the first data is updated.
[0084] For example, the operating system can run multiple applications at the same time. As the applications run, other cache files may need to be stored in the first storage space. At this time, if the available space in the first storage space is insufficient or the available space in the first storage space is reduced, which directly affects the access speed of the first storage space, at least part of the files of the application stored in the first storage space can be removed and the first data can be updated.
[0085] Here, the running state of the application may be the running state of the same application or the running state of multiple applications. The application may include the target application or other applications that are not the target application.
[0086] For example, continuing with the above embodiment, the first file, the second file, and the third file of the target application are needed when running the target application. The first data includes the first file information of the first file and the second file information of the second file, and the first data does not include the file information of the third file. The second data includes the file information of the third file, then the first file and the second file can be obtained from the first storage space, the second data can be obtained, and based on the file information of the third file included in the second data, the third file can be obtained from the second storage space. When obtaining the third file from the second storage space, the third file stored in the second storage space can be loaded into the first storage space first. When loading the third file, if the available space in the first storage space is insufficient, the first file and / or the second file can be removed because the first file and / or the second file have already been obtained from the first storage space at this time.
[0087] Of course, other files may also be stored in the first storage space, and before loading the third file into the first storage space, at least some of the other files stored in the first storage space may be removed first.
[0088] For another example, an operating system runs a first application, and the first storage space stores files of the first application. As the user uses the application, the user needs to start a second application. As the second application starts and runs, the second application may also need to load some files into the first storage space, so that the second application can obtain files corresponding to the second application from the first storage space. In this case, at least some of the files of the first application in the first storage space can be removed. Alternatively, at least some of the files of other applications in the first storage space can be removed.
[0089] When the files in the first storage space are changed, the first data is updated so that when the corresponding files need to be obtained from the first storage space, the first data can accurately represent the files stored in the first storage space.
[0090] In some embodiments, combined Figure 2 , wherein the second data is determined based on the first data at different time points, including:
[0091] S201 : According to a triggering event of switching the running state of an application program, first data at a time point corresponding to the triggering event is acquired.
[0092] The triggering event for switching the running state of the application includes at least one of the following: a user operation on the application causing the running state of the application to switch; and a switching of the running state of the application determined by the target model.
[0093] For example, a user's demand for applications may change at different time points. Some applications may be closed, some applications may be started, or background applications may be brought to the foreground. The exiting, starting, and switching from the background to the foreground of an application can all be understood as triggering events for switching the running state of an application. For example, at a first time point, a first application is started, at a second time point, a second application is exited, and at a third time point, a third application is switched from the background to the foreground.
[0094] The target model determines the application's operating state based on the determined state. For example, in the case of a social chat application, the target model is a pre-trained deep learning model configured to analyze user actions within the application and determine the application's operating state accordingly. When a user opens the social chat application, this action is captured by the application's sensors (e.g., a click event monitoring module) and transmitted as data to the target model. The target model analyzes this data and, combined with its internal judgment logic, determines whether the application has switched from a closed state to an active state. During user use, if the user clicks on the chat window, sends a message, switches chat partners, and so on, these actions are also monitored and fed back to the target model. The target model determines whether the application is in an active state based on the characteristics and frequency of these actions. When a user clicks the minimize button on the application, switching it to the background, the target model receives the corresponding action data and determines that the application has switched from an active state to a background state. During these different state transitions, the system acquires first data corresponding to the triggering event, such as the timestamp when the application switched to the background state and the network connection status at that time.
[0095] When a triggering event for switching the running state of an application program occurs, first data at a time point corresponding to the triggering event may be acquired.
[0096] The application may include all programs installed on the electronic device, and monitors whether a trigger event occurs when a program switches its running state. It may also be a target application that meets specific conditions, and the target application includes at least one. The specific condition can be any one of the conditions in the application-specific scenario and the pre-start list. Taking the application as the target application as an example, when the target application exits at a first time point (T1), the target application will correspond to a first data (List1), and the first data at this time is obtained.
[0097] S202 : Determine second data based on the difference between first data corresponding to different time points.
[0098] For example, in conjunction with step S201, at a second time point (T2) after the first time point, when the system is restarted after running for a period of time, the target application will correspond to another first data (List2). Because the system is in operation during the period from the first time point to the second time point, the first data corresponding to the first time point and the second time point are different.
[0099] As the target application exits at the first time point and the system runs, some cached files and other resources stored in the first storage space may be deleted (released) and need to be reloaded when needed. Resource release is irreversible, so the first data corresponding to the first time point and the second time point are different. Moreover, the first data corresponding to the first time point (List1) is greater than the first data corresponding to the second time point (List2), that is, List1>List2.
[0100] The second data (List_Diff) can be determined by the difference between the first data corresponding to the first time point and the first data corresponding to the second time point, that is, List_Diff=List1-List2.
[0101] The second data determined according to the above-mentioned first time point and second time point may include file information of files deleted from the first storage space. This file information may be included in the second data to compensate for the first data when the file information of the target application is not included in the first data.
[0102] In another embodiment, the AI model can predict which applications are about to switch their running states. Taking application startup as an example, the AI model can determine which applications are to be started based on the current scenario. For example, in a learning scenario, the user is very likely to start learning-related applications. The AI model can determine which applications are to be started based on calendar information, travel information, or historical user operation behavior. Alternatively, the AI model can predict whether another application is to be started based on the associated applications, provided that one application is started. When the AI model predicts that the state of an application is about to switch, in order to speed up the startup, the files of these applications can be loaded into the first storage space in advance, or at least part of the files of the application can be unloaded from the first storage space, thereby updating the first data. The AI model is used to predict the switching of the running state of the application, obtain the first data of the corresponding time node, and then determine the second data using the difference between the first data at different time nodes.
[0103] Of course, it is understandable that the first time point and the second time point may also correspond to other time points of the application, and at different time points, the application may have a state different from the above-mentioned exit and startup states.
[0104] In some embodiments, the method further comprises:
[0105] After the second data is determined, the files of the corresponding application are preloaded into the second storage space according to the set rules based on the second data.
[0106] The setting rule includes at least one of the following: available space of the second storage space, priority of the application, and priority of the file of the application.
[0107] For example, after determining the second data, if the available space in the second storage space is insufficient, all files corresponding to the second data cannot be loaded into the second storage space. Therefore, it is necessary to load at least some of the files corresponding to the second data into the second storage space based on the available space in the second storage space, the priority of the application, the priority of the files in the application, etc.
[0108] That is, the list corresponding to the file information of the files actually preloaded into the second storage space may be a subset of the second data, that is, at least a portion of the second data is loaded into the second storage space.
[0109] For example, when the priority of the first application is greater than the priority of the second application, the files corresponding to the first application are preloaded into the second storage space first, and then the files of the second application are preloaded.
[0110] In some embodiments, the setting rules further include:
[0111] Sort the application files by priority.
[0112] The space available in the second storage space is divided into different levels.
[0113] Based on the level classification result, at least part of the application files are loaded into the second storage space in order of priority.
[0114] For example, the files corresponding to the second data may be sorted according to priority, and the priority order may be set as: Exe>DLL>Config configuration file>Image>Temp temporary file.
[0115] The available space in the second storage space is divided into Grade 1, Grade 2, and Grade 3. Based on the available space in the second storage space, preload the files into the memory. For example: (1) When the available space in the second storage space is Grade 1, only EXE and DLL are loaded. (2) When the available space in the second storage space is Grade 2, EXE, DLL, and configuration files are loaded. (3) When the available space in the second storage space is Grade 3, all files can be loaded, including some or all temporary files.
[0116] In some embodiments, it further includes:
[0117] According to changes in application scenarios and / or resource requirements of the electronic device, the level of available space in the second storage space and the priority ranking of applications and files of the applications are adjusted.
[0118] For example, a user might be running a large 3D game on a high-performance gaming phone while simultaneously running music playback software, a weather app, and a push notification service in the background. At the start of the game, the game's requirements for GPU, CPU, and memory resources are relatively low, and the system allocates resources according to normal priorities. The storage space for pre-loaded files for each application is also at the default level.
[0119] When the game enters complex team battles, with numerous characters and special effects appearing onscreen, the game's demands on the GPU and CPU increase dramatically, significantly increasing memory usage. The system detects these resource demand changes in real time and prioritizes the game application and its associated files. Because team battles may require the rapid loading of numerous pre-loaded files, such as character models and skill effects, to ensure smooth gameplay, the system upgrades the storage level of the game application's pre-loaded files from Normal to Highest, prioritizing the storage and access performance of these files. Simultaneously, the music player's online lyric loading function is suspended, its priority lowered, and the storage level of the music player's pre-loaded files is reduced to the lowest level. The weather app's automatic refresh frequency is reduced, and the background operation of the push notification service is restricted, similarly lowering the storage level of their pre-loaded files. This reduces the storage resource consumption of these applications, providing ample storage for the game application's pre-loaded files and ensuring smooth gameplay and stability.
[0120] An embodiment of the present application further provides an electronic device, including:
[0121] The processor is used to determine a target application to be started, determine the target application to be run, obtain first data, if the first data does not include file information of the target application, obtain second data, if the second data includes the file information of the target application, obtain the file of the target application from the second storage space, for responding to the running requirements of the target application.
[0122] A first storage space includes first data, and the first data is used to represent file information of an application stored in the first storage space.
[0123] The second storage space is different from the first storage space. The second storage space includes second data. The second data is determined based on the first data at different time points. The different time points correspond to different first data. The second data is used to represent file information of the application stored in the second storage space.
[0124] For example, there are multiple ways to start an application. When an application receives a corresponding start-up method, the application can be started and the started application can be used as the target application. The started application can run according to the target application to achieve the function that the user wants to achieve through the target application.
[0125] For example, an application may include any of the following startup methods: starting the application by clicking on the application, starting the application by entering a corresponding startup command, starting the application through a shortcut command or shortcut key, and starting the application through a third-party application management software or launcher.
[0126] It should be noted that the target application to be run includes a program that has been started and is running in the background, and an application that is not used for a long time but has not been exited and is to be run from the background to the foreground.
[0127] After determining the target application to be run, first data is obtained, wherein the first data is used to represent file information of the application stored in the first storage space.
[0128] The first data may be in the form of a first list, which may store file information of the application in a page format, wherein the file information may include information such as file names, extensions, file sizes, and file versions of multiple application programs.
[0129] If the first data includes file information of the target application, the file of the target application can be directly obtained from the first storage space, so as to respond to the running requirements of the target application through the file of the target application.
[0130] If the first data does not include the target application's file information, the target application's file cannot be retrieved from the first storage space. In this case, the second data can be retrieved. Similar to the first data, the second data can be in the form of a second table, and the second page table can also store the application's file information in the form of pages.
[0131] That is, when obtaining the files of the target application, the access priority of the first storage space is higher than the access priority of the second storage space. That is, the files of the target application can be obtained from the first storage space first. If the files of the target application cannot be obtained from the first storage space, they can be obtained from the second storage space.
[0132] In addition, when the target application file cannot be obtained from the second storage space, the target application file can be obtained from the disk.
[0133] The second storage space is different from the first storage space. For example, the first storage space corresponds to the first storage area of the operating system memory, and the second storage space corresponds to the second storage area of the operating system memory. The first storage area and the second storage area are different. The access speed of the first storage space and the second storage space is greater than the access speed of the disk.
[0134] Of course, it is understandable that the first storage space and the second storage space may also be other storage spaces. This is only used as an example and does not constitute a limitation on the scope of protection of the claims.
[0135] The second data is determined based on the first data. Specifically, the second data is determined based on data at different time points. Here, different time points correspond to different first data, and the second data can be determined based on the first data at different time points.
[0136] For example, when a target application exits at a first time point, a first data item is generated. When the system restarts the target application at a second time point after a period of operation, a different first data item is generated. Because the system is in operation during the period from the first time point to the second time point, the first data items at the first time point and the second time point are different.
[0137] As the target application exits at the first time point and the system runs, some cached files and other resources stored in the first storage space may be deleted (released) and need to be reloaded when needed. Resource release is irreversible, so the first data corresponding to the first time point and the second time point are different. Moreover, the first data corresponding to the first time point is larger than the first data corresponding to the second time point.
[0138] The second data determined according to the above different time points may include file information of files deleted from the first storage space. This file information may be included in the second data to compensate for the first data when the first data does not include file information of the target application.
[0139] Of course, it is understandable that the first time point and the second time point may also correspond to other time points of the application, and at different time points, the application may have a state different from the above-mentioned exit and startup states.
[0140] If the second data includes file information of the target application, the files of the target application can be obtained from the second storage space through the file information of the target application. Here, the files of the target application may include but are not limited to: executable files (exe), dynamic link libraries (dll), image files (image), configuration files, XML files and temporary files (temp).
[0141] Based on the file information of the target application included in the second data, the files of the target application are obtained from the second storage space. The obtained files of the target application can be used to respond to the running requirements of the target application to compensate for the files of the application stored in the first storage space, thereby improving the startup and running speed of the target application.
[0142] In some embodiments, the processor is further configured to, after determining the second data, preload the file of the application corresponding to the second data into the second storage space according to a set rule.
[0143] For example, after determining the second data, if the available space in the second storage space is insufficient, all files corresponding to the second data cannot be loaded into the second storage space. Therefore, the processor needs to load at least part of the files corresponding to the second data into the second storage space based on the available space in the second storage space, the priority of the application, the priority of the files in the application, etc.
[0144] That is, the list corresponding to the file information of the files actually preloaded into the second storage space may be a subset of the second data, that is, at least a portion of the second data is loaded into the second storage space.
[0145] For example, when the priority of the first application is greater than the priority of the second application, the files corresponding to the first application are preloaded into the second storage space first, and then the files of the second application are preloaded.
[0146] The above describes in detail several embodiments of the present application, but the present application is not limited to these specific embodiments. Those skilled in the art can make various variations and modifications to the embodiments based on the concept of the present application, and these variations and modifications should all fall within the scope of protection claimed by the present application.
Claims
1. A data processing method, comprising: Determine a target application to be run and obtain first data; wherein the first data is used to represent file information of the application stored in the first storage space; If the first data does not include file information of the target application, obtaining second data, where the second data is determined based on the first data at different time points, where the different time points correspond to different first data, and the second data is used to represent file information of the application stored in a second storage space, where the first storage space is different from the second storage space; If the second data includes file information of the target application, the file of the target application is obtained from the second storage space to respond to the running requirement of the target application.
2. The method according to claim 1, further comprising: When obtaining the target application file from the second storage space, the target application file stored in the second storage space is first loaded into the first storage space, and the first data is updated.
3. The method according to claim 1, further comprising: Removing at least part of the files of the application stored in the first storage space according to the running state of the application and / or the available space of the first storage space; And update the first data.
4. The method according to claim 1, wherein The second data is determined based on the first data at different time points, including: According to a triggering event of switching the running state of the application, obtaining first data at a time point corresponding to the triggering event; Determining second data based on differences in first data corresponding to different time points; The triggering event for switching the running state of the application includes at least one of the following: a user operation on the application causing the running state of the application to switch; and a switching of the running state of the application determined by the target model.
5. The method according to claim 1, further comprising: After determining the second data, preloading the corresponding application file into the second storage space according to the set rules based on the second data; The setting rule includes at least one of the following: available space of the second storage space, priority of the application, and priority of the file of the application.
6. The method according to claim 5, wherein the setting rule further comprises: Sort the application files by priority; Classifying the space available in the second storage space; Based on the level classification result, at least part of the application files are loaded into the second storage space in order of priority.
7. The method according to claim 5, further comprising: According to changes in application scenarios and / or resource requirements of the electronic device, the level of available space in the second storage space and the priority ranking of applications and files of the applications are adjusted.
8. The method according to claim 1, further comprising: The first storage space is a first storage area of the operating system's memory, and the second storage space is a second storage area of the operating system's memory.
9. An electronic device comprising: a processor, configured to determine a target application to be started, obtain first data for the target application to be run, obtain second data if the first data does not include file information of the target application, and obtain files of the target application from a second storage space if the second data includes the file information of the target application, so as to respond to a run requirement of the target application; a first storage space, the first storage space including first data, the first data being used to represent file information of an application stored in the first storage space; The second storage space is different from the first storage space. The second storage space includes second data. The second data is determined based on the first data at different time points. The different time points correspond to different first data. The second data is used to represent file information of the application stored in the second storage space. 10 . The electronic device according to claim 9 , wherein the processor is further configured to, after determining the second data, preload a file of an application corresponding to the second data into the second storage space according to a set rule.