Data processing method and device and electronic equipment

By preloading data and hiding startup in the background with accelerated applications, the problem of slow data opening of electronic devices is solved, and data processing efficiency and user experience are improved.

CN120429030APending Publication Date: 2025-08-05HUAWEI TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510378162.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

In the prior art, electronic devices are slow to process data, especially when opening data such as files, audio, video, and images, which affect the user experience.

Method used

By preloading data, the data to be displayed is parsed in advance based on the data type, size, historical update time and usage frequency, and the data interface is displayed immediately when the user enters it. The acceleration application hides startup in the background to reduce the impact on foreground operations.

Benefits of technology

It shortens the data opening time, improves data processing efficiency, improves user experience, and reduces memory usage while ensuring data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120429030A_ABST
    Figure CN120429030A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device and electronic equipment. The method comprises the steps that first data is determined from N pieces of data according to data information of the N pieces of data, the data information comprises one or more of the data type, the data size, the historical updating time and the historical use frequency, and N is a positive integer larger than or equal to 1; pre-loading the first data to obtain a first loading result; and displaying a display interface of the first data according to the first loading result in response to the input of the user to the first data. According to the data processing method and device and the electronic equipment, before a user opens the preloaded data, the data can be analyzed in advance, the data opening time is shortened, the data processing efficiency is improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to electronic device technology, and more particularly, to a data processing method, device and electronic device. Background Art

[0002] Users can process data in the form of files, audio, video, images, etc. through electronic devices. These data are usually processed in applications, and the speed at which these data are opened affects the efficiency of data processing.

[0003] Therefore, how to improve data processing efficiency to enhance user experience is an urgent problem to be solved. Summary of the Invention

[0004] The present application provides a data processing method, apparatus, and electronic device. The method can improve the efficiency of data processing, thereby enhancing the user experience.

[0005] In a first aspect, a method for data processing is provided, which is applied to an electronic device, and the method includes: determining first data from N data based on data information of the N data, the data information including one or more of a data type, a data size, a historical update time, and a historical usage frequency, where N is a positive integer greater than or equal to 1; preloading the first data to obtain a first loading result; and displaying a display interface of the first data based on the first loading result in response to a user input of the first data.

[0006] For example, the data may be files, audio, video, images, etc.

[0007] Based on the above solution, the electronic device can filter out the data that needs to be preloaded based on data information, and parse the data in advance before the user is about to open the data to obtain the loading results, so that when the user opens the data, the electronic device can immediately display the display interface of the data (which may include the content of the data), thereby shortening the time to open the data, improving data processing efficiency, and enhancing user experience.

[0008] In combination with the first aspect, in certain implementations of the first aspect, the electronic device includes a first acceleration application, which is used to display a display interface of the first data; wherein, before preloading the first data and obtaining a first loading result, the method also includes: starting the first acceleration application in the background of the electronic device.

[0009] Based on the above solution, an acceleration application is registered on the electronic device. Before parsing the data, if the acceleration application is not started, it can be hidden and launched in the background to avoid affecting the user operation in the foreground of the electronic device.

[0010] In combination with the first aspect, in certain implementations of the first aspect, preloading the first data to obtain a first loading result includes: obtaining a handle of the first data; and preloading the first data according to the handle of the first data to obtain the first loading result.

[0011] Exemplarily, taking file data as an example, the handle of the first data may be a file handle.

[0012] Based on the above solution, by sharing file handles, the application is accelerated to determine the files that need to be preloaded and parse the files in advance, which shortens the file opening time while ensuring the security of user data.

[0013] In combination with the first aspect, in certain implementations of the first aspect, before determining the first data from the N data based on the data information of the N data, the method also includes: determining L data from the M data based on the data information of the M data, wherein M is a positive integer greater than or equal to 1, and L is a positive integer less than or equal to M; wherein, determining the first data from the N data based on the data information of the N data includes: determining P data from the N data based on the data information of the N data, wherein P is a positive integer less than or equal to N; and determining the first data from the N data when the L data do not include the first data and the P data include the first data.

[0014] Based on the above scheme, whether the first data is preloaded data can be determined by comparing the data lists. The P data can be understood as the first data list, and the L data can be understood as the original data list. By comparing the first data list and the original data list, it is determined that the first data is in the first data list but not in the original data list, thereby determining that the first data is preloaded data.

[0015] In combination with the first aspect, in certain implementations of the first aspect, before determining the first data from the N data based on the data information of the N data, the method also includes: preloading the second data in the L data to obtain a second loading result; the method also includes: when the P data does not include the second data, canceling the preloading of the second data.

[0016] Based on the above scheme, the L data can be understood as the original data list, and the second data in the L data is the data originally required to be preloaded. The specific data included in the data list can be constantly changing. By comparing the new data list with the original data list, the data no longer in the new data list is the data that needs to be canceled from preloading. Canceling the preloading of the second data can free up memory in the electronic device and reduce memory usage.

[0017] In combination with the first aspect, in certain implementations of the first aspect, before determining the first data from the N data based on the data information of the N data, the method also includes: determining that a trigger event is detected, the trigger event including one or more of the following: the local device downloads or receives data through an application, the local device obtains data from other devices, creates new data through the local device, changes data through the local device, and powers on the local device.

[0018] Based on the above solution, the trigger event can be a situation where data changes. Whenever a trigger event occurs, the data to be preloaded can be filtered from one or more data.

[0019] In combination with the first aspect, in certain implementations of the first aspect, the historical usage frequency of the P data is greater than or equal to a preset usage frequency threshold; or the data size of the P data is greater than or equal to a preset data size threshold; or the time difference between the historical update time of the P data and the current time is less than or equal to a preset time difference threshold.

[0020] Based on the above scheme, P data can be filtered and arranged according to historical usage frequency. Moreover, the greater the historical usage frequency, the higher the priority of the data, and it is placed at the front, so that the data with high usage frequency can be preloaded first. Alternatively, P data can be filtered and arranged according to data size. Moreover, the larger the data size, the higher the priority of the data, and it is placed at the front, so that the large data can be preloaded first. Alternatively, P data can be filtered and arranged according to historical update time, and the smaller the time interval between the historical update time and the current time, the higher the priority of the data, and it is placed at the front, so that the most recently updated data can be loaded first.

[0021] In combination with the first aspect, in some implementations of the first aspect, the first preloading result is a display interface of the first data.

[0022] Exemplarily, the display interface of the first data may be the content of the first data. Taking file data as an example, the display interface of the first data may be the content of the file.

[0023] Based on the above solution, before the user triggers the electronic device to display the interface of the first data, the first data that needs to be preloaded can be preloaded to obtain a first preloading result. The first preloading result can be the display interface of the first data, or it can be intermediate data for obtaining the display interface of the first data. When the first preloading result is intermediate data, the speed of opening the data can also be improved to a certain extent; when the first preloading result is the display interface of the first data, when the user triggers the operation of opening the data, the display interface of the data can be immediately displayed on the electronic device, and the speed of opening the data will be further improved.

[0024] In a second aspect, a data processing device is provided, which includes: an acceleration decision engine for determining first data from N data based on data information of the N data, where the data information includes one or more of the data type, data size, historical update time, and historical usage frequency, where N is a positive integer greater than or equal to 1; a first acceleration application for preloading the first data to obtain a first loading result; the first acceleration application for displaying a display interface of the first data in response to user input of the first data according to the first loading result.

[0025] In combination with the second aspect, in some implementations of the second aspect, the device further includes an acceleration application management module, which is used to start the first acceleration application in the background of the device.

[0026] In combination with the second aspect, in certain implementations of the second aspect, the device also has a cross-process file handle management module for obtaining the handle of the first data; the first acceleration application is specifically used to preload the first data according to the handle of the first data to obtain the first loading result.

[0027] In combination with the second aspect, in certain implementations of the second aspect, the device also includes an information acquisition module, which is used to determine L data from the M data based on data information of the M data, wherein M is a positive integer greater than or equal to 1, and L is a positive integer less than or equal to M; the information acquisition module is specifically used to determine P data from the N data based on the data information of the N data, wherein P is a positive integer less than or equal to N; the acceleration decision engine is specifically used to determine the first data from the N data when the L data do not include the first data and the P data include the first data.

[0028] In combination with the second aspect, in certain implementations of the second aspect, the first acceleration application is also used to preload the second data among the L data to obtain a second loading result; and is also used to cancel preloading of the second data when the P data does not include the second data.

[0029] In combination with the second aspect, in certain implementations of the second aspect, the information collection module is also used to determine whether a trigger event is detected, and the trigger event includes one or more of the following: the local device downloads or receives data through an application, the local device obtains data from other devices, creates new data through the local device, changes data through the local device, and powers on the local device.

[0030] In combination with the second aspect, in certain implementations of the second aspect, the historical usage frequency of the P data is greater than or equal to a preset usage frequency threshold; or the data size of the P data is greater than or equal to a preset data size threshold; or the time difference between the historical update time of the P data and the current time is less than or equal to a preset time difference threshold.

[0031] In combination with the second aspect, in some implementations of the second aspect, the first preloading result is a display interface of the first data.

[0032] In a third aspect, an electronic device is provided, comprising: one or more processors; one or more memories; the one or more memories storing one or more computer programs, the one or more computer programs comprising instructions, which, when executed by the one or more processors, enable the electronic device to perform the method in the first aspect and any possible implementation thereof.

[0033] In a fourth aspect, a data processing device is provided, comprising: a processor coupled to a memory, the memory being used to store a computer program, the processor being used to run the computer program, so that the data processing device executes the method as described in the first aspect and any possible implementation thereof.

[0034] In combination with the fourth aspect, some implementations of the fourth aspect also include one or more of the memory and the transceiver, and the transceiver is used to receive signals and / or send signals.

[0035] In a fifth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a computer, the computer executes the data processing method of the first aspect and any one of the data processing methods that can be implemented in the first aspect.

[0036] In a sixth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the above-mentioned first aspect and any data processing method that can be implemented in the first aspect.

[0037] In the seventh aspect, a chip is provided, which includes a processor and a data interface. The processor reads instructions stored in a memory through the data interface to execute the above-mentioned first aspect and any data processing method that can be implemented in the first aspect.

[0038] In combination with the seventh aspect, in a possible implementation, the processor is coupled to the memory through an interface.

[0039] In combination with the seventh aspect, in a possible implementation, the chip system also includes a memory, in which a computer program or computer instructions are stored. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a structural diagram of an electronic device.

[0041] Figure 2 This is a software structure block diagram of the electronic device provided in the embodiment of the present application.

[0042] Figure 3 This is a schematic diagram of an advance loading file provided in an embodiment of the present application.

[0043] Figure 4 This is a schematic diagram of a system architecture provided in an embodiment of the present application.

[0044] Figure 5 This is a scenario diagram provided in an embodiment of the present application.

[0045] Figure 6 This is a schematic flow chart of a data processing method provided in an embodiment of the present application.

[0046] Figure 7 This is a schematic flow chart of a data processing method provided in an embodiment of the present application.

[0047] Figure 8 This is a schematic diagram of a specific implementation process provided by an embodiment of the present application.

[0048] Figure 9 This is a schematic flow chart of a data processing method provided in an embodiment of the present application.

[0049] Figure 10 This is a schematic block diagram of a data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] The technical solution in this application will be described below with reference to the accompanying drawings.

[0051] The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one, two or more. The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one item among a, b or c can represent: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c can be single or multiple.

[0052] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0053] The following describes an electronic device, a user interface for such an electronic device, and embodiments for using such an electronic device. In some embodiments, the electronic device may be a portable electronic device that also includes other functions such as a personal digital assistant and / or a music player, such as a mobile phone, a tablet computer, a wearable electronic device with wireless communication functions (such as a smart watch), etc. Exemplary embodiments of portable electronic devices include but are not limited to devices equipped with Harmony Or a portable electronic device with other operating systems. The portable electronic device may also be other portable electronic devices, such as a laptop computer. It should also be understood that in some other embodiments, the electronic device may not be a portable electronic device, but a desktop computer.

[0054] For example, Figure 1 : The figure shows a schematic structural diagram of an electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0055] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0056] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0057] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0058] The processor 110 may also include a memory for storing instructions and data.

[0059] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0060] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0061] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.

[0062] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc.

[0063] The modulation and demodulation processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.

[0064] The wireless communication module 160 can provide wireless communication solutions for application on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.

[0065] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-CDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

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

[0067] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED).

[0068] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.

[0069] The ISP is used to process data fed back by the camera 193 .

[0070] The camera 193 is used to capture still images or videos.

[0071] Digital signal processors are used to process digital signals. In addition to processing digital image signals, they can also process other digital signals.

[0072] Video codecs are used to compress or decompress digital video.

[0073] NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn.

[0074] The external memory interface 120 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.

[0075] The internal memory 121 may be used to store computer-executable program codes, where the executable program codes include instructions.

[0076] The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0077] The audio module 170 is used to convert digital audio information into analog audio signals for output, and is also used to convert analog audio input into digital audio signals.

[0078] The speaker 170A, also called a "horn", is used to convert audio electrical signals into sound signals.

[0079] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals.

[0080] Microphone 170C is used to convert sound signals into electrical signals.

[0081] The pressure sensor 180A is used to sense pressure signals and convert the pressure signals into electrical signals.

[0082] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0083] Touch sensor 180K, also known as "touch panel".

[0084] Figure 2 This is a software structure diagram of the electronic device 100 of the embodiment of the present application. The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, The system is divided into four layers, from top to bottom: application layer, application framework layer and system library, and kernel layer. The application layer can include a series of application packages.

[0085] like Figure 2 As shown, the application layer may include camera, settings, skin module, user interface (UI), third-party applications, etc. Among them, third-party applications may include gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

[0086] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer may include some predefined functions.

[0087] like Figure 2As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0088] The window manager manages windowed applications. It can determine the display size, determine whether a status bar is present, lock the screen, and take screenshots. Content providers store and retrieve data and make it accessible to applications. This data can include video, images, audio, incoming and outgoing calls, browsing history and bookmarks, and phone books.

[0089] The view system includes visual controls, such as controls for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views.

[0090] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).

[0091] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0092] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.

[0093] The system library can include multiple functional modules, such as a surface manager, media libraries, a 3D graphics processing library (such as OpenGL ES), and a 2D graphics engine (such as SGL).

[0094] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0095] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0096] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0097] A 2D graphics engine is a drawing engine for 2D drawings.

[0098] In addition, the system library can also include status monitoring service modules, such as a physical status recognition module for analyzing and identifying user gestures; a sensor service module for monitoring sensor data uploaded by various sensors at the hardware layer to determine the physical status of the electronic device 100.

[0099] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0100] The hardware layer can include various types of sensors, such as Figure 1 Various types of sensors introduced in.

[0101] Combined with the above Figure 1 and Figure 2 The electronic device introduced in the embodiment of the present application can be a personal computer, tablet computer, smart screen, mobile phone terminal, etc. that can run applications and support data processing functions such as files, videos, audio, and images.

[0102] Nowadays, users can process files, images, audio, video, and other data through a variety of electronic devices. Taking files as an example, when users open files on electronic devices, they often have to wait for a while, and the larger the file, the slower the opening speed, which affects the user's file processing experience.

[0103] To shorten the time users wait during file opening, Figure 3 FIG2 shows a schematic diagram of a method for preloading files, caching files from disk in memory. When opening a file, application process 1 can directly read the file from memory instead of from disk. This reduces the time it takes for the application to read the file, thereby shortening the time the user waits while the file is opened.

[0104] When the above-mentioned method of caching files from disk to memory in advance is adopted, when the application opens the file, it still needs to parse the file content and display the file content. When the file content is displayed to the user, the process of waiting for the file to be opened is considered complete. The process of parsing the file content still takes a lot of time. Caching the file in memory in advance does not reduce the time required for the electronic device to parse the file content. Moreover, after the file is cached, the application cannot use the cached file until the application is started. However, in actual situations, the user may start the application by opening the file, which means that the startup of the application and the reading of the file in the electronic device may be a continuous process, without an intermediate process for the application to read the file in advance.

[0105] Based on this, the embodiments of the present application provide a method, device and electronic device for data processing. Taking the processing of file data as an example, by sensing the changes in the file, the accelerated application is pushed files that the user may open, so that the accelerated application can parse the file content in advance (preload the file). When the user opens the file, the electronic device can directly display the file content, saving the time required for the file parsing process. At the same time, in order to ensure the security of user data, the file handle can be shared with the accelerated application so that the accelerated application can parse the corresponding content in advance. In addition, if the accelerated application is not started, the accelerated application can be hidden and pulled up in the background first, and the file content can be parsed in advance without affecting the user's foreground operation.

[0106] The following will take files as an example to introduce the data processing method provided in the embodiment of the present application.

[0107] like Figure 4 , which shows a schematic diagram of a system architecture provided by an embodiment of the present application. This system architecture can be applied to electronic devices such as personal computers, tablet computers, and mobile phones. The system architecture includes a system acceleration service module, a task management module, a process management module, a file management module, a detection module, and a memory management module. The main steps in the data processing method provided by the embodiment of the present application can be performed by the system acceleration service module. The functions of each module are introduced below.

[0108] Exemplarily, the system acceleration service module includes an information collection module, an acceleration application management module, a cross-process file handle management module, an acceleration decision engine, and a maintainability design (design for X, DFX) module.

[0109] Among them, the information collection module is used to determine whether a file change occurs, and when a file change occurs, a file list is generated. The file list includes the files that need to be preloaded, which are screened by the information collection module based on the collected file information. The files that need to be preloaded can be arranged according to a certain priority. The information collection module can send the file list to the acceleration decision engine. Among them, the information collection module can determine whether a file change occurs through the file management module and / or the detection module. When a change occurs, the file management module and / or the information collection module can notify the information collection module. The file management module can be used to subscribe to and / or push multiple files, including but not limited to recently opened files, and the detection module can detect whether the file has changed.

[0110] The acceleration decision engine can determine whether a file needs to be preloaded based on the file list. Specifically, the acceleration decision engine includes a recommendation engine and an elimination engine. The recommendation engine is responsible for managing recommended files, that is, files that need to be preloaded; the elimination engine is responsible for managing eliminated files, that is, files that are canceled from preload.

[0111] After receiving the file list from the information collection module, the acceleration decision engine can compare it with the original recommended file list. Add the files that are no longer in the file list to the eliminated file list, and the files in the eliminated file list will be canceled from preloading. Add the files newly added to the file list to the recommended file list, and the files in the recommended file list will be preloaded. When there are new files added, the acceleration decision engine determines that the files need to be preloaded. The acceleration decision engine can send the files that are newly added to the file list or the files that are no longer in the file list to the cross-process file handle management module. The acceleration decision engine can also detect the current system memory usage and the memory occupied by applications through the memory management module, and can stop preloading files or actively eliminate files when there is insufficient memory.

[0112] The cross-process file handle management module is used to open or close files and obtain file handles. For example, the cross-process file handle management module opens a file newly added to the file list, obtains the file handle of the file, and sends the file handle to the acceleration application management module through the acceleration decision engine; or closes a file no longer in the file list, obtains the file handle of the file, and sends the file handle to the acceleration application management module through the acceleration decision engine.

[0113] The acceleration application management module is used to manage the acceleration application and is responsible for inter-process communication with the acceleration application. When the acceleration decision engine determines that a file needs to be preloaded, the acceleration application management module can be notified, and the acceleration application management module can determine whether the acceleration application is started through the process management module. When the acceleration application is not started and it is necessary to preload files for the acceleration application, the acceleration application management module hides and pulls up the acceleration application in the background by calling the process management module. When the acceleration application is hidden and pulled up in the background, the acceleration application can be managed through the task management module. For example, a prompt message can be displayed near the acceleration application to prompt that the application is being accelerated or that the application's files are being preloaded. The acceleration application management module can send a file handle to the acceleration application so that the acceleration application can determine the files that need to be preloaded or the files that need to be preloaded based on the file handle.

[0114] The DFX module is used to collect statistics on accelerated applications, preloaded files (accelerated files), accelerated memory usage, acceleration hit rate, and other maintenance and measurement information.

[0115] In addition, the system acceleration service module also provides a variety of interfaces, including the native application programming interface (NAPI) interface and the native development kit (NDK) interface.

[0116] Among them, the NAPI interface is used to implement the interaction between ArkTS (Ark TypeScript) / TS (TypeScript) / JS (JavaScript) and C / C++.

[0117] The NDK interface can specifically include interfaces that implement four functions. First, it is used to be called by a third application function program or a system application, and is used to register as an accelerated application, or to cancel the registration as an accelerated application; second, it is used to notify the accelerated application of files that need to be preloaded, or to notify the accelerated application of files that need to be canceled from being preloaded. Third, it is used for the accelerated application management module to determine the status of the accelerated application and whether the file can be preloaded at present. Fourth, after preloading the file, if the user actually opens the file later, the accelerated hit notification can be notified to the accelerated application management module through the interface, so as to count the hit rate of accelerating file opening using the data processing method provided in the embodiment of the present application.

[0118] The system acceleration service module can also provide an inner application programming interface (inner_api) interface. The system acceleration service module can send information about the accelerated application and preloaded files to the task manager through the inner-api interface, so that the task manager can display a prompt message to remind the user of the application being accelerated.

[0119] It should be noted that Figure 3 The division of each module in the system architecture shown is only an exemplary logical or functional division, and this application does not limit it.

[0120] In the data processing method provided by the embodiment of the present application, when a file change is determined by the system acceleration service module, a file list is generated and recommended to the acceleration application so that the acceleration application can preload the file and parse the file content in advance. To ensure security, the system acceleration service module opens the file that needs to be preloaded by the system acceleration service module through a shared file handle, and shares the file handle with the acceleration application through inter-process communication so that the acceleration application can parse the file content in advance. In addition, in a scenario where the user may open a file (for example, when a file change occurs), the acceleration application is first hidden and pulled up in the background, and the file content is parsed in advance to shorten the time taken to open the file and improve the user experience.

[0121] like Figure 5 FIG. 1 is a schematic diagram of a scenario provided by an embodiment of the present application, wherein the scenario mainly includes a user and an electronic device (eg, a personal computer), and illustrates a process for improving the file opening speed.

[0122] Exemplarily, in the first step, a user turns on an electronic device, which activates the acceleration service. This means that the electronic device will use the data processing method provided by the embodiments of the present application to increase the speed of opening files. In the second step, the electronic device begins predicting and preloading files. This means that the electronic device predicts the files the user is about to open and preloads these files. In the third step, the user opens a file and edits it in the foreground. In response to the user opening the file, the electronic device immediately displays the file contents. That is, when the user opens the preloaded file, the electronic device will immediately display the file contents because the file contents have been parsed in advance. In the fourth step, the user closes the foreground file, indicating that the file has been edited. The electronic device will then continue to predict and preload files. It is understood that when the electronic device displays the file contents in the foreground, it means that the user is editing the file. To avoid interfering with the user's editing operations, the electronic device can suspend the acceleration service. When the electronic device closes the file in the foreground, the acceleration service can continue. In the fifth step, the user turns off the electronic device or turns off the acceleration service on the electronic device. The electronic device then turns off the acceleration service and frees up memory.

[0123] It is understandable that the acceleration service provided by the electronic device in the embodiment of the present application will be applicable to acceleration scenarios, which can also be understood as scenarios where users may open files, including various scenarios where file changes occur.

[0124] For example, a file is downloaded or received from an application.

[0125] For example, receiving files through email or downloading files through a browser.

[0126] Exemplarily, files are obtained from other electronic devices.

[0127] For example, copy and paste files across devices and unzip files through the file management module.

[0128] Exemplarily, a new file is created on the local electronic device.

[0129] For example, Save as file on the app, Create new file on the app and save it.

[0130] Exemplarily, the file content is changed on the local electronic device.

[0131] For example, you can edit a previously used file on an application and save it.

[0132] Exemplarily, the electronic device is turned on.

[0133] For example, the files used by the electronic device before it was last shut down may still be used by the user after it is turned on again.

[0134] The data processing method provided in the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0135] like Figure 6 As shown, a schematic flow chart of a data processing method provided by an embodiment of the present application is shown, which can be applied to Figure 4 In the system architecture shown, the method is described in detail below.

[0136] S601 : When a trigger event is detected, a file list 1 is generated, and the file list 1 includes file 1 .

[0137] For example, a triggering event can be a file change event. This triggering event is used to trigger the acceleration service. This triggering event includes, but is not limited to, one of the following: powering on the electronic device, modifying file content on the local electronic device, creating a new file on the local electronic device, obtaining a file from another electronic device, or downloading or receiving a file from an application.

[0138] Exemplarily, when the file management module and / or the detection module detects a triggering event, the system acceleration service module is notified.

[0139] Exemplarily, the system acceleration service module may filter out files that need to be preloaded based on the file information, and the files that need to be preloaded may be arranged according to a certain priority, thereby obtaining a file list 1 .

[0140] In one implementation, the file information includes a file type, and the system acceleration service module filters out files that need to be preloaded according to the file type.

[0141] For example, when the accelerated application is a document editing application, document files (suffixed with .doc or .docx), spreadsheet files (suffixed with .xlxs), presentation files (suffixed with .ppt) and compressed files (suffixed with .rar or .zip) can be filtered out as files that need to be preloaded.

[0142] For example, when the accelerated application is an audio or video editing application, video files (suffixed with .mp4 or .asf, etc.), audio files (suffixed with .mp3 or .wav, etc.) and image files (suffixed with .jpg or .png, etc.) can be filtered out as files that need to be preloaded.

[0143] It is understandable that, depending on the type of the accelerated application, the system acceleration service module may also filter out different files that need to be preloaded based on the file type.

[0144] It is understandable that the system acceleration service module includes an NDK interface, and third-party applications or system applications can register as acceleration applications by calling this interface.

[0145] In one implementation, the file information includes the file size, and the system acceleration service module selects the files that need to be preloaded based on the file size.

[0146] For example, a preset file size threshold is set. When a file size is smaller than the preset file size threshold, even if the file is not preloaded, the time required to open the file is relatively short. To save power, preloading is not required for smaller files. Files with a file size greater than or equal to the preset file size threshold are files that need to be preloaded.

[0147] In one implementation, the file information includes a historical update time of the file, and the system acceleration service module selects the files that need to be preloaded according to a time difference between the historical update time of the file and the current time.

[0148] For example, the file history update time includes but is not limited to the file creation time, file modification time, file opening time, etc. By setting a preset time difference threshold, if the time difference between the file history update time and the current time is less than or equal to the preset time difference threshold, it means that the file is a file that the user has recently used and is a file that needs to be preloaded.

[0149] In one implementation, the file information includes a historical usage frequency of the file, and the system acceleration service module filters out the files that need to be preloaded according to the historical usage frequency of the file.

[0150] Exemplarily, a preset usage frequency threshold is set. If the historical usage frequency of a file is greater than or equal to the preset usage frequency threshold, it indicates that the file is frequently used by the user and is a preloaded file.

[0151] In one implementation, the system acceleration service module may determine the order in which each file is arranged in the file list according to the file type.

[0152] For example, the higher the matching degree between the file type and the type of the acceleration application, the higher the priority of the file, and the closer the file is to the front of the list of files, and the content of the file with high priority will be parsed first.

[0153] In one implementation, the system acceleration service module may determine the order in which each file is arranged in the file list according to the file size.

[0154] For example, the larger the file is, the longer it takes to parse the file content, the higher the priority is, and the higher the priority file is in the file list, the higher the priority file content will be parsed first.

[0155] In one implementation, the system acceleration service module may determine the order in which each file is arranged in the file list according to the historical update time of the file.

[0156] For example, the file history update time includes but is not limited to the file creation time, file modification time, file opening time, etc. The closer the file history update time is to the current time, the higher the priority is, and the higher the position is in the file list, and the content of the file with high priority will be parsed first.

[0157] In one implementation, the system acceleration service module may determine the order in which each file is arranged in the file list according to the historical usage frequency of the file.

[0158] For example, a file with a higher historical usage frequency has a higher possibility of being used by a user, has a higher priority, is located at a higher position in the file list, and the content of the file with a higher priority will be parsed first.

[0159] Exemplarily, each time a trigger event is detected, a file list can be generated, and the specific files included in the file list generated each time may change. By comparing the new file list with the original file recommendation list, the newly added files are files that need to be preloaded, and the acceleration application needs to parse the content of the file in advance. Files that are no longer in the new file list are files that no longer need to be preloaded, and the acceleration application does not need to parse the content of the file in advance. For the above two situations, there may be the following two implementation methods, which include step S602 and step S605. The embodiment of the present application does not limit the specific execution order of these two implementation methods. The following is a detailed introduction to these two implementation methods.

[0160] In one implementation, S602 , the newly added file 1 is determined by comparing the file list 1 with the original recommended file list.

[0161] Exemplarily, the system acceleration service module compares file list 1 with the original recommended file list and determines that file 1 is not included in the original recommended file list, but is included in the newly generated file list 1, i.e., file 1 is a newly added file. If a newly added file exists, the system acceleration service module determines that newly added file 1 is a file that needs to be preloaded, i.e., determines that the acceleration service is required.

[0162] For example, when the system acceleration service module determines that the acceleration service needs to be provided, there are two situations shown in step S603 and step S604 depending on whether the acceleration application has been started:

[0163] Optionally, in S603 , when the acceleration application is not started, the acceleration application is hidden and launched in the background, and file 1 is opened to obtain a file handle of file 1 .

[0164] For example, the fact that the acceleration application is not started can be understood as the acceleration application not being started in the background. In order for the acceleration application to parse the file content in advance, the acceleration application needs to be started first. In order to avoid the startup of the acceleration application affecting the user's current operation in the foreground of the electronic device, the acceleration application can be hidden and launched in the background first, so that the acceleration application can preload the file.

[0165] For example, while the acceleration application is hidden and launched in the background of the electronic device, the system acceleration service module can open the file 1 that needs to be preloaded and obtain the file handle of the file 1. The file handle can be understood as a file identifier. In the data processing method provided in the embodiment of the present application, the acceleration application can implement operations such as reading, writing, and locating the file through the file handle.

[0166] Optionally, in S604 , when the acceleration application is started, the file 1 is opened and the file handle of the file 1 is obtained.

[0167] Exemplarily, when the acceleration application has been started, the system acceleration service module can open the file 1 that needs to be preloaded and obtain the file handle of the file 1.

[0168] S605 , sending the file handle of file 1 to the acceleration application, so that the acceleration application preloads file 1 .

[0169] For example, the file handle has a corresponding relationship with the file. When the acceleration application obtains the file handle of file 1, it can be determined that the file to be preloaded is file 1, thereby implementing early parsing of the content of file 1.

[0170] It is understandable that the file handles for the same file can be different for different processes. In the data processing method provided by the embodiment of the present application, the system acceleration service module enables the accelerated application to preload the corresponding file by sharing the file handle, thereby improving the file opening speed while ensuring the security of user data.

[0171] In one implementation, S606 , by comparing the file list 1 with the original recommended file list, it is determined that the original recommended file list includes the file 2 , but the file list 1 does not include the file 2 .

[0172] For example, the system acceleration service module compares file list 1 with the original recommended file list and determines that file 2 is included in the original recommended file list, but not in file list 1. That is, file 2 is a file that originally needs to be preloaded, but is not currently being preloaded, and therefore does not need to be accelerated.

[0173] S607: Close file 2 and send the file handle of file 2 to the acceleration application.

[0174] Illustratively, the acceleration application in step S607 may be the same as or different from the acceleration application in step S605.

[0175] S608 , the acceleration application stops preloading file 2 .

[0176] For example, after the system service acceleration module determines that file 2 no longer needs to be preloaded, it first closes file 2 and sends the file handle of file 2 to the acceleration application. The acceleration application has previously preloaded file 2 and, after receiving the file handle of file 2, can determine that the file to be preloaded is file 2.

[0177] It is understandable that the system acceleration service module closes files that do not need to be preloaded, and enables the acceleration application to cancel preloading of the file by sharing the file handle, thereby freeing up memory while ensuring the security of user data.

[0178] In the above process, when a trigger event is detected, a file list 1 can be generated, and the file list 1 includes at least one file that needs to be preloaded. The system acceleration service module can determine the newly added files that need to be preloaded and the files that need to be canceled from preloading by comparing the file list 1 with the original recommendation list. For the newly added files that need to be preloaded, the system acceleration service module opens the file and shares the file handle of the file to the acceleration application, so that the acceleration application can parse the file content in advance. For the files that need to be canceled from preloading, the system acceleration service module closes the file and shares the file handle of the file to the acceleration application, so that the acceleration application can cancel the preloading of the file.

[0179] It should be noted that the above process is only an example. In practice, there may be multiple situations each time a trigger event occurs. Several possible situations are described below.

[0180] In one implementation, by comparing the file list 1 generated in step S601 with the original recommended file list, it is determined that there are files that need to be preloaded, but there are no files that need to be canceled from preloading.

[0181] In one implementation, by comparing the file list 1 generated in step S601 with the original recommended file list, it is determined that there are no files that need to be preloaded, but there are files that need to be canceled from preloading.

[0182] In one implementation, after a trigger event occurs, a file list 1 is generated first. By comparing file list 1 with the original recommended file list, it is determined that the newly added file 1 is a file that needs to be preloaded. The system acceleration service module opens file 1 and shares the file handle of file 1 (for example, file handle 1) with acceleration application 1. Acceleration application 1 parses the content of file 1 in advance. As time goes by, file 1 does not change for a long time. When the trigger event occurs again, file list 2 is generated again. By comparing file list 2 with file list 1 (equivalent to the original recommended file list), it is determined that file 1 is not in file list 2. The system acceleration service module closes file 1 and shares the file handle of file 1 (for example, file handle 2) with acceleration application 1. Acceleration application 1 will cancel the early parsing of the content of file 1.

[0183] Although the processes are different, the file handles of the same file may be different. However, in the above example, file handle 1 and file handle 2 are for the same file 1 and the same process of the same accelerated application 1, so the above file handle 1 and file handle 2 can be the same.

[0184] In one implementation, an electronic device includes multiple acceleration applications, which may need to preload the same file. When the same file needs to be pre-parsed by different acceleration applications, the system acceleration service module opens the file and shares the file handle with each of the different acceleration applications, allowing them to pre-parse the same file. The file handles obtained by different acceleration applications for the same file may be different.

[0185] Exemplarily, the electronic device includes an acceleration application 1 and an acceleration application 2, both of which are document editing applications. The system acceleration service module determines that file 1 needs to be preloaded, and after opening file 1, obtains the file handle of file 1. The system acceleration service module shares the file handle of file 1 (for example, file handle 1) with the acceleration application 1, and shares the file handle of file 1 (for example, file handle 2) with the acceleration application 2. The acceleration application 1 uses the file handle 1 to determine that the preloaded file is file 1, and the acceleration application 2 uses the file handle 2 to determine the preloaded file 1. Among them, the file handle 1 and the file handle 2 can be different. Of course, if the acceleration application 1 and the acceleration application 2 have not been started yet, the acceleration application 1 and the acceleration application 2 need to be hidden in the background and pulled up first.

[0186] like Figure 7 As shown, a schematic flow chart of a data processing method provided by an embodiment of the present application is shown, which can be applied to Figure 4 The system architecture shown involves interactions between various functional modules, and the method is described in detail below.

[0187] S701: The file management module and / or the detection module determines that a file has changed.

[0188] For example, a change in a file can be understood as a trigger event, including but not limited to turning on an electronic device, changing the file content on the local electronic device, creating a new file on the local electronic device, obtaining a file from another electronic device, downloading or receiving a file from an application, etc.

[0189] S702, the file management module and / or the detection module sends notification information 1, and accordingly, the information collection module receives the notification information 1.

[0190] S703, the information collection module generates file list 1 according to notification information 1.

[0191] Exemplarily, the information collection module registers a trigger event (i.e., a file change event) with the file management module and / or the detection module. When a trigger event occurs, the file management module and / or the detection module notifies the information collection module. When a file change occurs, the information collection module generates a file list 1. File list 1 includes files that need to be preloaded, which are selected by the information collection module based on the collected file information. The files that need to be preloaded can be arranged according to a certain priority.

[0192] In one implementation, the file information includes a file type, and the information collection module filters out files that need to be preloaded according to the file type.

[0193] In another implementation, the file information includes file size, and the information collection module selects files that need to be preloaded based on the file size.

[0194] In one implementation, the information collection module may determine the order in which each file is arranged in the file list according to the file type.

[0195] In another implementation, the information collection module may determine the order in which each file is arranged in the file list according to the file size.

[0196] S704, the information collection module sends the file list 1, and accordingly, the acceleration decision engine receives the file list 1.

[0197] Exemplarily, each time a trigger event is detected, the information collection module can generate a file list, and the specific files included in the file list generated each time will change. By comparing the new file list with the original file recommendation list, the newly added files are files that need to be preloaded, and the acceleration application needs to parse the content of the file in advance. The files that are no longer in the new file list are files that no longer need to be preloaded, and the acceleration application does not need to parse the content of the file in advance. For the above two situations, there may be the following two implementation methods, which include step S705 and step S714. The embodiment of the present application does not limit the specific execution order of these two implementation methods.

[0198] In one implementation, at S705 , the acceleration decision engine determines the newly added file 1 by comparing the file list 1 with the original recommended file list.

[0199] For example, the acceleration decision engine can determine whether a file needs to be loaded based on the file list. Specifically, the acceleration decision engine includes a recommendation engine and an elimination engine. The recommendation engine is responsible for managing recommended files, that is, files that need to be preloaded; the elimination engine is responsible for managing eliminated files, that is, files that are canceled from preloaded.

[0200] For example, after receiving file list 1 from the information collection module, the acceleration decision engine compares it with the original recommended file list. File 1 in the newly added file list is added to the recommended file list, and the files in the recommended file list are to be preloaded. When a newly added file is present, the acceleration decision engine determines that the file needs to be preloaded.

[0201] S706 , the acceleration decision engine sends notification information 2 , and accordingly, the acceleration application management module receives notification information 2 .

[0202] For example, when the acceleration decision engine determines that there is a new file, that is, when it determines that an acceleration service is required, notification information 2 may be sent to notify the corresponding module to provide the acceleration service.

[0203] Optionally, the notification information 2 may include the file 1 that needs to be preloaded.

[0204] S707 , the acceleration application management module determines whether the acceleration application is started through the cross-process management module according to the notification information 2 .

[0205] Exemplarily, the acceleration application management module may determine that a file needs to be preloaded based on the notification information 2 from the acceleration decision engine. Before preloading the file, the acceleration application management module needs to determine whether the acceleration application program is started.

[0206] Optionally, the accelerated application management module may determine which applications are accelerated applications through the NDK interface, and determine whether the accelerated application is started through the process management module.

[0207] S708: When the acceleration application is not started, the acceleration application management module calls the process management module to hide and start the acceleration application in the background.

[0208] For example, when the acceleration application is not started and files need to be preloaded for the acceleration application, the acceleration application management module calls the process management module to hide and launch the acceleration application in the background. Furthermore, when the acceleration application is hidden and launched in the background, the task management module can manage the acceleration application, for example, by displaying a prompt message near the acceleration application to indicate that the application is being accelerated or that files for the application are being preloaded.

[0209] It is understandable that hiding the acceleration application in the background can prevent the acceleration application from being launched in the foreground and affecting the user's current operation in the foreground of the electronic device.

[0210] S709 , the acceleration decision engine sends notification information 2 , and accordingly, the cross-process file handle management module receives notification information 2 .

[0211] Optionally, the notification information 2 may include the file 1 that needs to be preloaded.

[0212] S710 , the cross-process file handle management module opens file 1 and obtains the file handle of file 1 .

[0213] Exemplarily, after receiving the notification information 2 from the acceleration decision engine, the cross-process file handle management module may open the file 1 that needs to be preloaded and obtain the file handle of the file 1 .

[0214] S711, the cross-process file handle management module sends the file handle of file 1, and accordingly, the acceleration decision engine receives the file handle of file 1.

[0215] S712 , the acceleration decision engine sends the file handle of file 1 , and accordingly, the acceleration application management module receives the file handle of file 1 .

[0216] Exemplarily, the cross-process file handle management module forwards the file handle of file 1 to the acceleration application management module through the acceleration decision engine.

[0217] S713: The acceleration application management module sends the file handle of file 1 to the acceleration application program.

[0218] Exemplarily, the acceleration application management module is responsible for inter-process communication with the acceleration application. When file 1 needs to be preloaded, the file handle of file 1 can be sent to the acceleration application so that the acceleration application preloads file 1, thereby achieving early parsing of the content of file 1.

[0219] It is understandable that by sharing the file handle, the application is accelerated to preload the corresponding file, which improves the file opening speed while ensuring the security of user data.

[0220] In one implementation, at S714 , the acceleration decision engine compares the file list 1 with the original recommended file list and determines that the original recommended file list includes the file 2 but the file list 1 does not include the file 2.

[0221] For example, after receiving the file list 1 from the information collection module, the acceleration decision engine can compare it with the original recommended file list and add the file 2 that is no longer in the file list to the eliminated file list. The files in the eliminated file list will not be loaded.

[0222] Optionally, the acceleration decision engine can also detect the current system memory usage and application memory usage through the memory management module, and can stop preloading files or actively eliminate files when memory is insufficient.

[0223] S715 , the acceleration decision engine sends notification information 3 , and accordingly, the cross-process file handle management module receives notification information 3 .

[0224] For example, when the acceleration decision engine determines that there is an obsolete file, that is, when it determines that there is a file that needs to be canceled from preloading, notification information 3 may be sent to notify the corresponding module to cancel the preloading of the file.

[0225] Optionally, the notification information 3 includes the file 2 .

[0226] S716 , the cross-process file handle management module closes file 2 and obtains the file handle of file 2 .

[0227] Exemplarily, after receiving the notification information 3 from the acceleration decision engine, the cross-process file management module can close and cancel the preloaded file 2 and obtain the file handle of the file 2.

[0228] S717, the cross-process file handle management module sends the file handle of file 2, and accordingly, the acceleration decision engine receives the file handle of file 2.

[0229] S718 , the acceleration decision engine sends the file handle of file 2 , and accordingly, the acceleration application management module receives the file handle of file 2 .

[0230] Exemplarily, the cross-process file handle management module forwards the file handle of file 2 to the acceleration application management module through the acceleration decision engine.

[0231] S719: The acceleration application management module sends the file handle of file 2 to the acceleration application program.

[0232] Exemplarily, the acceleration application management module is responsible for inter-process communication with the acceleration application. When the preloading of file 2 needs to be canceled, the file handle of file 2 can be sent to the acceleration application so that the acceleration application cancels the preloading of file 2.

[0233] It is understandable that Figure 7 The schematic flow of the data processing method shown is only an example. In practice, there may be multiple situations each time a trigger event occurs. The specific possible implementation methods can be referred to above. To avoid redundancy, they will not be repeated here.

[0234] For ease of understanding, Figure 8 As shown, a schematic diagram of a specific implementation process provided by an embodiment of the present application is shown.

[0235] For example, when a trigger event is detected and the acceleration application is not started, the acceleration application management module first calls the process management module to pull up the acceleration application 1 in a hidden window in the background. The process management module calls the task management module so that a prompt message is displayed near the acceleration application to remind the user that the application is being accelerated. In addition, the acceleration application management module sends the file handle of the file 1 that needs to be preloaded to the acceleration application 1 through inter-process communication. The acceleration application 1 parses the content of the file 1 in advance while hiding and pulling up in the background. When the user uses the acceleration application 1 to open the file 1, the acceleration application 1 is pulled up in the foreground and the content of the file 1 is directly displayed. When the user closes the foreground of the acceleration application 1, the next round of acceleration service will continue.

[0236] like Figure 9 As shown, a schematic flow chart of a data processing method provided by an embodiment of the present application is shown. The method can be applied to Figure 4 In the system architecture shown, the method is described in detail below.

[0237] S901, determining first data from N data based on data information of N data, where the data information includes at least one or more of data type, data size, historical update time, and historical usage frequency, where N is a positive integer greater than or equal to 1.

[0238] Illustratively, the data in the embodiments of the present application includes but is not limited to one of the following: files, audio, video, images, etc.

[0239] Optionally, taking file data as an example, the data information may be file information, and the file information includes one or more of file type, file size, historical update time, and historical usage frequency.

[0240] Exemplarily, the information collection module in the system acceleration service module filters out at least one data, for example, the first data, from N data according to the data information.

[0241] Optionally, the system acceleration service module may arrange the one or more data obtained by screening into a first data list according to a certain priority, such as the file list 1 mentioned above.

[0242] Optionally, the information collection module filters out at least one file according to the file information and generates a file list.

[0243] In one implementation, when a trigger event occurs, the information collection module may generate a first data list.

[0244] Exemplarily, before determining the first data from N data based on the data information of N data, it is determined that a trigger event is detected, and the trigger event includes one or more of the following: the local device downloads or receives data through an application, the local device obtains data from other devices, creates new data through the local device, changes data through the local device, and the local device is turned on.

[0245] That is to say, the trigger event may be a situation where data changes.

[0246] Exemplarily, when the file management module and / or the detection module determines that a trigger event is detected, the information collection module may be notified so that the collection module determines the first data list according to the data information.

[0247] In one implementation, one or more data in the first data list are obtained by screening according to certain conditions and are arranged in a certain priority order.

[0248] Exemplarily, the first data list includes one or more data, and the historical usage frequency of the one or more data is greater than or equal to a preset usage frequency threshold. At least one data in the first data list is arranged in a first order, and the at least one data includes first data and second data, wherein the first data is located in the first position in the first data list, and the second data is located in the second position in the first data list, the historical usage frequency of the first data is greater than the historical usage frequency of the second data, and the priority of the first position is higher than the priority of the second position.

[0249] That is to say, at least one data in the first data list can be arranged according to the historical usage frequency. The greater the historical usage frequency, the higher the priority of the data, and it is placed at the front of the first data list so that the data with high usage frequency can be preloaded first.

[0250] Exemplarily, the first data list includes one or more data, and the data size of the one or more data is greater than or equal to a preset data size threshold. At least one data in the first data list is arranged in a first order, and the at least one data includes first data and second data, wherein the first data is located at a first position in the first data list and the second data is located at a second position in the first data list. The data size of the first data is greater than the data size of the second data, and the priority of the first position is higher than the priority of the second position.

[0251] That is to say, at least one data in the first data list can be arranged according to data size. The larger the data size, the higher the priority of the data, and the data is preferably placed at the front of the first data list so that large data can be preloaded first.

[0252] Exemplarily, the first data list includes one or more data, and the degree of match between the data type of the one or more data and the type of the accelerated application function program is greater than or equal to a preset matching threshold. At least one data in the first data list is arranged in a first order, and the at least one data includes first data and second data, wherein the first data is located at the first position of the first data list and the second data is located at the second position of the first data list. The degree of match between the data type of the first data and the type of the accelerated application program is higher than the degree of match between the data type of the second data and the type of the accelerated application program, and the priority of the first position is higher than the priority of the second position.

[0253] That is to say, at least one data in the first data list can be arranged according to the matching degree or correlation between the data type and the type of the accelerated application. The higher the matching degree, the higher the priority of the data, and it is placed at the front of the first data list so that data with a more matching type can be preloaded first.

[0254] Exemplarily, the first data list includes one or more data, and the time difference between the historical update time of one or more data and the historical update time of at least one data in the current first data list and the current time is less than or equal to a preset time difference threshold. At least one data in the first data list is arranged in a first order, and at least one data includes first data and second data, wherein the first data is located at the first position in the first data list, and the second data is located at the second position in the first data list. The time difference between the historical update time of the first data and the current time is a first value, and the time difference between the historical update time of the second data and the current time is a second value. The first value is less than the second value, and the priority of the first position is higher than the priority of the second position.

[0255] That is to say, at least one data in the first data can be arranged according to the difference between the historical update time and the current time. The smaller the difference, the higher the priority of the data, and it is placed at the front of the first data list so as to preload the data that the user has just used recently with priority.

[0256] Illustratively, the first data may be the file 1 mentioned above.

[0257] In one implementation, whether the first data is preloaded data may be determined by comparing the data list.

[0258] Exemplarily, before determining the first data from the N data based on the data information of the N data, L data may be determined from the M data based on the data information of the M data, where M is a positive integer greater than or equal to 1, and L is a positive integer less than or equal to M. Specifically, P data may be determined from the N data based on the data information of the N data, where P is a positive integer less than or equal to N; if the L data do not include the first data and the P data include the first data, the first data is determined from the N data.

[0259] In the above, the P data can be understood as the first data list, and the L data can be understood as the original data list. By comparing the first data list and the original data list, it is determined that the first data is in the first data list, but not in the original data list, and thus the first data is determined to be preloaded data.

[0260] Optionally, the original data list is the original recommended file list described above. Each time a trigger event is detected, the information acquisition module can generate a file list, and the specific files included in the file list generated each time will change. By comparing the new file recommendation list with the original file recommendation list, the newly added files are files that need to be preloaded, and the application program needs to be accelerated to parse the content of the file in advance. The information acquisition module sends the generated first data list to the acceleration decision engine, and the acceleration decision engine determines that the first data is newly added data by comparing the first data list with the original data list, that is, the first data is preloaded data.

[0261] Exemplarily, before determining the first data from the N data based on the data information of the N data, the second data in the L data is preloaded to obtain a second loading result. If the P data does not include the second data, the preloading of the second data is canceled.

[0262] Illustratively, the second data may be the file 2 mentioned above.

[0263] Optionally, the original data list is the original recommended file list described above. Each time a trigger event is detected, the information acquisition module can generate a file list, and the specific files included in the file list generated each time will change. By comparing the new file list with the original file recommendation list, the files that are no longer in the new file recommendation list are the files that need to be canceled from preloading. The information acquisition module sends the generated first data list to the acceleration decision engine. The acceleration decision engine determines that the second data is data that is not in the first data list by comparing the first data list with the original data list. If the second data is the data that originally needed to be preloaded, then the preloading of the second data needs to be canceled at present.

[0264] S902: Preload the first data to obtain a first loading result.

[0265] Optionally, one or more acceleration applications may be registered on the electronic device. If the acceleration application is not started, the acceleration application needs to be hidden and launched in the background before parsing the data.

[0266] Exemplarily, the electronic device includes a first acceleration application program, which is used to display a display interface of the first data. Before preloading the first data and obtaining a first loading result, the first acceleration application program needs to be started in the background of the electronic device.

[0267] Optionally, when the acceleration decision engine determines that the newly added first data is preloaded data, the acceleration application management program may be used to notify the acceleration application. When the acceleration application is not started, the process management module may first hide and launch the acceleration application in the background.

[0268] In one implementation, taking file data as an example, a file handle may be shared so that the application program can be accelerated to parse the first data in advance to obtain a first loading result.

[0269] Exemplarily, a handle of the first data is obtained; and the first data is preloaded according to the handle of the first data to obtain a first loading result.

[0270] Optionally, taking file data as an example, the handle of the first data can be the file handle of file 1 described above. The cross-process file handle management module receives file 1 from the acceleration decision engine, opens file 1, and obtains the file handle of file 1. The cross-process file handle management module sends the file handle of file 1 to the acceleration application management module through the acceleration decision engine, and the acceleration application management module sends the file handle of file 1 to the first acceleration application (such as the acceleration application 1 described above) through inter-process communication. Acceleration application 1 determines that file 1 is a preloaded file based on the file handle of file 1, and parses file 1 in advance to obtain the specific content of file 1.

[0271] Exemplarily, for the second data that needs to be canceled from preloading, a handle of the second data may be obtained; and the preloading of the second data may be canceled according to the handle of the second data.

[0272] Optionally, taking file data as an example, the handle of the second data can be the file handle of file 2 described above. The cross-process file handle management module receives file 2 from the acceleration decision engine, closes file 2, and obtains the file handle of file 2. The cross-process file handle management module sends the file handle of file 2 to the acceleration application management module through the acceleration decision engine, and the acceleration application management module sends the file handle of file 2 to the first acceleration application (such as the acceleration application 1 described above) through inter-process communication. Acceleration application 1 determines that file 2 is a file to be canceled from preloading based on the file handle of file 2, thereby canceling the early parsing of file 2.

[0273] It can be seen that by sharing the file handle, the application is accelerated to preload the corresponding file or cancel the preloading of the corresponding file, which improves the file opening speed while ensuring the security of user data.

[0274] S903 : In response to the user input of the first data, display a display interface of the first data according to the first loading result.

[0275] Optionally, the first preloading result may be a display interface of the first data.

[0276] Exemplarily, the display interface of the first data may be the content of the first data. Taking file data as an example, the display interface of the first data may be the content of the file.

[0277] It can be seen that before the user performs the operation of opening the first data, it is predicted that the user may open the first data, and the electronic device can parse the first data in advance, so that when the user opens the first data, the electronic device can immediately display the display interface of the first data, shortening the time required to open the data.

[0278] In the data processing method provided by the embodiment of the present application, by sensing the changes in data, the acceleration application pushes the data that the user may open, so that the acceleration application can parse the data content in advance. When the user opens the data, the electronic device can directly display the content of the data (such as the display interface of the data), saving the time required for the data parsing process. At the same time, in order to ensure the security of user data, the file handle can be shared with the acceleration application so that the acceleration application can parse the corresponding content in advance. In addition, if the acceleration application is not started, the acceleration application can be hidden and pulled up in the background first, and the data content can be parsed in advance without affecting the user's foreground operation.

[0279] Figure 10 It is a schematic block diagram of a data processing device according to an embodiment of the present application. Figure 10The data processing device 1000 shown may include: a processor 1010, a transceiver 1020, and a memory 1030. The processor 1010, the transceiver 1020, and the memory 1030 are connected via an internal connection path. The memory 1030 is used to store instructions, and the processor 1010 is used to execute the instructions stored in the memory 1030 to receive / send some parameters through the transceiver 1020. Optionally, the memory 1030 may be coupled to the processor 1010 via an interface or may be integrated with the processor 1010.

[0280] During implementation, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor 1010 or by instructions in the form of software. The method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1030, and the processor 1010 reads the information in the memory 1030 and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.

[0281] It should also be understood that in the embodiments of the present application, the memory may include read-only memory and random access memory, and provide instructions and data to the processor. A portion of the processor may also include non-volatile random access memory. For example, the processor may also store device type information.

[0282] The present application provides a computer program product that, when executed on a device, enables the device to execute the technical solution in the above embodiment. The implementation principle and technical effects are similar to those of the above method-related embodiments and will not be described in detail here.

[0283] The present embodiment provides a readable storage medium containing instructions that, when executed on a device, cause the device to execute the technical solution of the above embodiment. The implementation principles and technical effects are similar and will not be further described here.

[0284] The present application provides a chip for executing instructions. When the chip is running, the technical solution in the above embodiment is executed. The implementation principle and technical effect are similar and will not be described in detail here.

[0285] Those skilled in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of this application.

[0286] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units (modules) can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0287] In the several embodiments provided in this application, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the unit is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0288] The units described above as separate components may or may not be physically separate, and 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 these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0289] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0290] If the above functions are implemented in the form of 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 the embodiment of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0291] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A data processing method, characterized in that: The method is applied to an electronic device, and includes: Determining first data from the N data according to data information of the N data, where the data information includes one or more of a data type, a data size, a historical update time, and a historical usage frequency, where N is a positive integer greater than or equal to 1; Preloading the first data to obtain a first loading result; In response to the user's input of the first data, a display interface of the first data is displayed according to the first loading result.

2. The method according to claim 1, characterized in that The electronic device includes a first acceleration application, and the first acceleration application is used to display a display interface of the first data; Before preloading the first data to obtain a first loading result, the method further includes: The first acceleration application is started in the background of the electronic device.

3. The method according to claim 2, characterized in that The preloading of the first data to obtain a first loading result includes: Obtaining a handle to the first data; The first data is preloaded according to the handle of the first data to obtain the first loading result.

4. The method according to any one of claims 1 to 3, characterized in that Before determining the first data from the N data according to the data information of the N data, the method further includes: Determine L data from the M data according to data information of the M data, where M is a positive integer greater than or equal to 1, and L is a positive integer less than or equal to M; The determining of the first data from the N data according to the data information of the N data includes: Determine P data from the N data according to the data information of the N data, where P is a positive integer less than or equal to N; In a case where the L data do not include the first data and the P data include the first data, the first data is determined from the N data.

5. The method according to claim 4, characterized in that Before determining the first data from the N data according to the data information of the N data, the method further includes: Preloading second data among the L data to obtain a second loading result; The method further comprises: In the case where the P data do not include the second data, The preloading of the second data is canceled.

6. The method according to any one of claims 1 to 5, characterized in that Before determining the first data from the N data according to the data information of the N data, the method further includes: Determining that a triggering event is detected, the triggering event includes one or more of the following: The local device downloads or receives data through the application, obtains data from other devices, creates new data through the local device, changes data through the local device, and powers on the local device.

7. The method according to claim 4 or 5, characterized in that The historical usage frequency of the P data is greater than or equal to a preset usage frequency threshold; or The data size of the P data is greater than or equal to a preset data size threshold; or The time difference between the historical update time of the P data and the current time is less than or equal to a preset time difference threshold.

8. The method according to any one of claims 1 to 7, characterized in that The first preloading result is a display interface of the first data.

9. An electronic device, characterized in that: include: one or more processors; one or more memories; The one or more memories store one or more computer programs, which include instructions. When the instructions are executed by the one or more processors, the electronic device performs the method according to any one of claims 1 to 8.

10. A data processing device, characterized in that: include: A processor coupled to a memory, wherein the memory is used to store a computer program, and the processor is used to run the computer program so that the data processing device performs the method according to any one of claims 1 to 8.

11. The data processing device according to claim 10, characterized in that: It also includes one or more of the memory and the transceiver, where the transceiver is used to receive signals and / or send signals.

12. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a computer, the computer is caused to implement the method according to any one of claims 1 to 8.

13. A computer program product comprising instructions, characterized in that When the computer program product is run on a computer, the computer is caused to perform the method according to any one of claims 1 to 8.

14. A chip, characterized in that: The chip includes a processor and a data interface, and the processor reads instructions stored in a memory through the data interface to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Page preloading method and device

    CN104361071A

  • Application preloading method and device, storage medium and terminal

    CN108762831A

  • Method and device for accelerating starting of application program and electronic equipment

    CN112214254A

  • Application data processing method and device

    CN113722023A

  • Application program management method and device, electronic equipment and storage medium

    CN114174987A