File reading and writing method, terminal and computer-readable medium
By monitoring file read and write requests in the Android R system and obtaining file handles and process information, and directly reading and writing through the underlying file system, the inefficiency problem caused by the Fuse file system is solved and more efficient file operations are achieved.
Patent Information
- Application Number
- CN202011633310.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-31
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2040-12-31
AI Technical Summary
The Fuse file system mechanism in Android R leads to low file reading and writing efficiency, because the kernel-state module and user-state multimedia applications need to interact multiple times each time the file is read and written, which takes a long time.
When monitoring file read and write requests, obtain file handles and process information, and directly read and write through the underlying file system to avoid processing of user-mode multimedia applications.
This greatly improves the read and write efficiency of files and reduces the number of interactions between the kernel and user state.
Smart Images

Figure CN112612759B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and particularly to a file reading and writing method, a terminal, and a computer-readable medium. Background Art
[0002] Android R has introduced the mechanism of the Fuse file system. When an APP (application) reads and writes a file, according to the design of the Fuse file system, for each read and write of the file, the module in the kernel state has to interact and confirm with the multimedia application in the user state. The larger the file, the more interaction tests are required, the more time-consuming it is, and the file reading and writing efficiency is relatively low. Summary of the Invention
[0003] The main object of the present invention is to provide a file reading and writing method, a terminal, and a computer-readable medium, aiming to effectively improve the file reading and writing efficiency.
[0004] To achieve the above object, the file reading and writing method proposed by the present invention includes the following steps:
[0005] When a file read and write request is detected, obtain a file handle and process information;
[0006] According to the obtained file handle and process information, directly read and write the file through the underlying file system.
[0007] Optionally, before the step of obtaining the file handle and process information, it further includes:
[0008] Judge whether the file is a file under the Fuse file system;
[0009] If so, obtain a file handle and process information.
[0010] Optionally, after the step of judging whether the file is a file under the Fuse file system, it includes:
[0011] Judge whether the read and write request is allowed;
[0012] If so, judge whether the file is a file under the Fuse file system;
[0013] If not, reject the read and write request.
[0014] Optionally, the step of judging whether the read and write request is allowed includes:
[0015] Judge whether the verification permission information feedback by the multimedia application in the user state is received;
[0016] If so, determine that the read and write request is allowed;
[0017] If the answer is negative, it is determined that the read / write request is not allowed.
[0018] Optionally, the step of determining whether the file is a file under the fuse file system includes:
[0019] Determine whether the received verification permission information contains a file handle and process information;
[0020] If so, it is determined that the file is a file under the fuse file system;
[0021] If not, it is determined that the file is not a file under the fuse file system.
[0022] Optionally, after the step of reading and writing the file through the underlying file system, the method further includes:
[0023] Return the corresponding file content.
[0024] Optionally, the step of reading and writing the file through the underlying file system includes:
[0025] Read and write the file through the sdcardfs file system.
[0026] Optionally, after the step of rejecting the read / write request, the method further includes:
[0027] Send a prompt for rejecting the file read / write request.
[0028] In addition, the present invention further provides a terminal, including a memory, a processor, and an implementation program of a file read / write method stored on the memory and executable on the processor. When the implementation program of the file read / write method is executed by the processor, the following steps are performed:
[0029] When a read / write request for a file is detected, obtain a file handle and process information;
[0030] According to the obtained file handle and the process information, directly read and write the file through the underlying file system.
[0031] In addition, the present invention further provides a computer-readable medium, on which an implementation program of a file read / write method is stored. When the implementation program of the file read / write method is executed, the following steps are implemented:
[0032] When a read / write request for a file is detected, obtain a file handle and process information;
[0033] According to the obtained file handle and the process information, directly read and write the file through the underlying file system.
[0034] In the technical solution of the present invention, when a read / write request for a file is detected, a file handle and process information are obtained; then, based on the obtained file handle and process information, the file is directly read and written through the underlying file system; there is no longer a need to process the read / write request for the file through a multimedia application in the user state, which greatly improves the file writing efficiency. Description of the Drawings
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on the structures shown in these drawings.
[0036] Figure 1 Schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present invention;
[0037] Figure 2 Schematic diagram of a communication network system architecture provided by an embodiment of the present invention;
[0038] Figure 3 Flowchart of an embodiment of the file read / write method of the present invention;
[0039] Figure 4 Flowchart of a specific embodiment of the file read / write method of the present invention;
[0040] Figure 5 For Figure 4 Flowchart of the step of determining whether the read / write request is allowed as shown;
[0041] Figure 6 For Figure 4 Flowchart of the step of determining whether the file is a file under the fuse file system as shown.
[0042] The realization, functional characteristics and advantages of the object of the present invention will be further described with reference to the embodiments and the drawings. Detailed Embodiments
[0043] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0044] In the subsequent description, suffixes such as "module", "component" or "unit" used to represent elements are only for the convenience of describing the present invention, and they have no specific meaning in themselves. Therefore, "module", "component" or "unit" can be used interchangeably.
[0045] The terminal can be implemented in various forms. For example, the terminal described in the present invention may include mobile terminals such as mobile phones, tablet computers, laptop computers, palmtop computers, personal digital assistants (PDAs), portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., and fixed terminals such as digital TVs, desktop computers, etc.
[0046] In the following description, a mobile terminal will be taken as an example for illustration. Those skilled in the art will understand that, except for elements specifically for mobile purposes, the configuration according to the embodiments of the present invention can also be applied to fixed-type terminals.
[0047] Please refer to Figure 1 , which is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present invention. The mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (audio / video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111, etc. Those skilled in the art can understand that Figure 1 the mobile terminal structure shown in
[0048] does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0048] Next, each component of the mobile terminal will be specifically introduced in conjunction with Figure 1 :
[0049] The radio frequency unit 101 can be used for receiving and transmitting information or signals during a call. Specifically, after receiving the downlink information of the base station, it is sent to the processor 110 for processing. Additionally, the uplink data is transmitted to the base station. Generally, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, etc. Moreover, the radio frequency unit 101 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution), etc.
[0050] WiFi belongs to short-range wireless transmission technology. The mobile terminal can help users send and receive emails, browse the web, and access streaming media through the WiFi module 102, which provides users with wireless broadband Internet access. Although Figure 1 the WiFi module 102 is shown, it can be understood that it is not an essential component of the mobile terminal and can be omitted entirely within the scope of not changing the essence of the invention according to needs.
[0051] The audio output unit 103 can convert the audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output it as sound when the mobile terminal 100 is in call signal reception mode, call mode, recording mode, voice recognition mode, broadcast reception mode, and other modes. Moreover, the audio output unit 103 can also provide audio output related to specific functions executed by the mobile terminal 100 (such as call signal reception sound, message reception sound, etc.). The audio output unit 103 can include a speaker, a buzzer, etc.
[0052] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes the image data of still pictures or videos obtained by an image capturing device (such as a camera) in a video capture mode or an image capture mode. The processed image frames can be displayed on the display unit 106. The image frames processed by the GPU 1041 can be stored in the memory 109 (or other storage media) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sounds (audio data) via the microphone 1042 in operating modes such as a phone call mode, a recording mode, a voice recognition mode, etc., and can process such sounds into audio data. The processed audio (voice) data can be output in a format that can be transmitted to a mobile communication base station via the radio frequency unit 101 in the case of the phone call mode. The microphone 1042 can implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) the noise or interference generated during the reception and transmission of audio signals.
[0053] The mobile terminal 100 further includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. Among them, the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1061 and / or the backlight when the mobile terminal 100 is moved to the ear. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as a pedometer, tapping), etc.; as for other sensors that the mobile phone can also be configured with, such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., they will not be elaborated here.
[0054] The display unit 106 is used to display the information input by the user or the information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 can be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), etc.
[0055] The user input unit 107 can be used to receive input numerical or character information, and generate key signal inputs related to the user settings and function control of the mobile terminal. Specifically, the user input unit 107 can include a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can collect touch operations of the user on or near it (such as operations of the user using any suitable object or accessory such as a finger or a stylus on or near the touch panel 1071), and drive corresponding connection devices according to a preset program. The touch panel 1071 can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch position of the user, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 110, and can receive and execute commands sent by the processor 110. In addition, various types such as resistive, capacitive, infrared, and surface acoustic wave can be used to implement the touch panel 1071. In addition to the touch panel 1071, the user input unit 107 can also include other input devices 1072. Specifically, the other input devices 1072 can include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, a joystick, etc., and specific details are not limited here.
[0056] Further, the touch panel 1071 can cover the display panel 1061. After the touch panel 1071 detects a touch operation on or near it, it transmits the operation to the processor 110 to determine the type of touch event. Subsequently, the processor 110 provides corresponding visual output on the display panel 1061 according to the type of touch event. Although in Figure 1 the touch panel 1071 and the display panel 1061 are implemented as two independent components to realize the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal, and specific details are not limited here.
[0057] The interface unit 108 serves as an interface through which at least one external device can be connected to the mobile terminal 100. For example, the external device can include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headset port, and so on. The interface unit 108 can be used to receive inputs from external devices (such as data information, power, etc.) and transmit the received inputs to one or more components within the mobile terminal 100 or can be used to transmit data between the mobile terminal 100 and external devices.
[0058] The memory 109 can be used to store software programs and various data. The memory 109 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory 109 can include high-speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0059] The processor 110 is the control center of the mobile terminal, connecting various parts of the entire mobile terminal through various interfaces and lines. By running or executing software programs and / or modules stored in the memory 109, and calling data stored in the memory 109, it executes various functions of the mobile terminal and processes data, thereby monitoring the mobile terminal as a whole. The processor 110 can include one or more processing units; preferably, the processor 110 can integrate an application processor and a modulation / demodulation processor. Among them, the application processor mainly processes the operating system, user interface, and application programs, etc., and the modulation / demodulation processor mainly processes wireless communication. It can be understood that the above modulation / demodulation processor may not be integrated into the processor 110.
[0060] The mobile terminal 100 can also include a power supply 111 (such as a battery) for powering each component. Preferably, the power supply 111 can be logically connected to the processor 110 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system.
[0061] Although Figure 1 not shown, the mobile terminal 100 can also include a Bluetooth module, etc., which will not be elaborated here.
[0062] To facilitate the understanding of the embodiments of the present invention, the communication network system on which the mobile terminal of the present invention is based will be described below.
[0063] Please refer to Figure 2 , Figure 2 which is an architecture diagram of a communication network system provided by an embodiment of the present invention. The communication network system is an LTE system of the Universal Mobile Telecommunications Technology. The LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an operator's IP service 204 that are communicatively connected in sequence.
[0064] Specifically, the UE 201 may be the above-mentioned terminal 100, which will not be elaborated here.
[0065] The E-UTRAN 202 includes an eNodeB 2021 and other eNodeBs 2022, etc. Among them, the eNodeB 2021 can be connected to other eNodeBs 2022 through a backhaul (such as an X2 interface), the eNodeB 2021 is connected to the EPC 203, and the eNodeB 2021 can provide access for the UE 201 to the EPC 203.
[0066] The EPC 203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving Gate Way) 2034, a PGW (PDN Gate Way) 2035, a PCRF (Policy and Charging Rules Function) 2036, etc. Among them, the MME 2031 is a control node that processes the signaling between the UE 201 and the EPC 203 and provides bearer and connection management. The HSS 2032 is used to provide some registers to manage functions such as a home location register (not shown in the figure) and stores some user-specific information such as service characteristics and data rates. All user data can be sent through the SGW 2034. The PGW 2035 can provide IP address allocation for the UE 201 and other functions. The PCRF 2036 is a policy and charging control policy decision point for service data flows and IP bearer resources, and it selects and provides available policy and charging control decisions for a policy and charging enforcement functional unit (not shown in the figure).
[0067] The IP service 204 may include the Internet, an intranet, an IMS (IP Multimedia Subsystem), or other IP services, etc.
[0068] Although the above has been introduced by taking the LTE system as an example, those skilled in the art should be aware that the present invention is not only applicable to the LTE system, but also applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems, etc., which are not limited here.
[0069] Based on the above-mentioned mobile terminal hardware structure and communication network system, various embodiments of the method of the present invention are proposed.
[0070] As Figure 3 shown Figure 3 is a flowchart of an embodiment of the file reading and writing method of the present invention.
[0071] In this embodiment, the file reading and writing method includes the following steps:
[0072] Step S310, monitor the read and write requests of the file.
[0073] Step S320, obtain the file handle and process information;
[0074] Step S330, directly read and write the file through the underlying file system according to the obtained file handle and process information.
[0075] Specifically, in this embodiment, a passthrod module for accelerating the file reading and writing speed is established in the kernel layer of the kernel. When a read and write request for a file is monitored, the passthrod module obtains the file handle and process information. Then, according to the obtained file handle and process information, the file is directly read and written through the underlying file system. There is no need to process the read and write requests of the file through the multimedia application processing in the user state, which greatly improves the writing efficiency of the file.
[0076] As Figures 4 to 6 shown Figure 4 is a flowchart of a specific embodiment of the file reading and writing method of the present invention. Figure 5 Is Figure 4 a flowchart of the step of determining whether the read and write request is allowed as shown. Figure 6 Is Figure 4 a flowchart of the step of determining whether the file is a file under the fuse file system as shown. The main technical solution of this is based on the fuse file system.
[0077] In this embodiment, the file reading and writing method includes the following steps:
[0078] Step S410, monitor the read and write requests of the file.
[0079] Step S420, determine whether the read and write request is allowed; if so, execute step S430, if not, execute step S470. Among them, the specific steps of determining whether the read and write request is allowed include:
[0080] Step S421, determine whether the verification permission information feedback by the multimedia application in the user state is received. If so, execute step S422; if not, execute step S423.
[0081] Step S422, determine that the read and write request is allowed.
[0082] Step S423, determine that the read / write request is not allowed.
[0083] Step S430, determine whether the file is a file under the fuse file system. If so, execute Step S440; if not, do not perform any action. When no action is performed, the read / write operation of the file is carried out in the existing manner. Among them, the specific steps for determining whether the file is a file under the fuse file system include:
[0084] Step S431, determine whether the received verification permission information contains a file handle and process information. If so, execute Step S432; if not, execute Step S433.
[0085] Step S432, determine that the file is a file under the fuse file system.
[0086] Step S433, determine that the file is not a file under the fuse file system.
[0087] Step S440, obtain the file handle and process information.
[0088] Step S450, directly read and write the file through the sdcardfs file system according to the obtained file handle and the process information.
[0089] Step S460, return the corresponding file content.
[0090] Step S470, send a prompt for rejecting the file read / write request.
[0091] Specifically, in this embodiment, similarly, a passthrod module for accelerating file read and write speed is established in the kernel layer of the kernel state. When an APP (application) requests to read or write a file, the multimedia application in the user state first verifies the request. After the verification passes, the multimedia application in the user state feeds back a receipt carrying the file handle and process information to the passthrod module in the kernel state. After receiving the receipt information, the passthrod module parses the receipt and determines whether the receipt contains the file handle and process information. If the receipt contains the file handle and process information, it indicates that the read / write request is an operation on a file under the fuse file system. At this time, the passthrod module records the file handle and process information. When the APP actually performs the emotional read / write operation, the passthrod module compares the file handle and process information passed by the APP with the file handle and process information recorded in the passthrod module. If the comparison is successful, the passthrod module performs read and write operations on the file through the underlying sdcardfs file system, and then returns the corresponding file content, without throwing the read / write request to the multimedia application in the user state for processing, so as to reduce the interaction times between the kernel and the user state, thereby achieving the purpose of improving the file read and write efficiency. When the verification of the read / write request of the multimedia application in the user state for the file fails, a prompt for rejecting the file read / write request, such as "no read / write permission", is sent to the APP.
[0092] It is worth mentioning that this technical solution is not only applicable to the reading and writing of files under the fuse file system, but also applicable to the reading and writing of files in the io cache. The technical solution of applying this technical solution to the reading and writing of files in the io cache is the same as the technical solution of applying it to the reading and writing of files under the fuse file system, and will not be elaborated here.
[0093] The present invention also proposes a terminal, including a memory, a processor, and an implementation program of the file read and write method stored on the memory and executable on the processor. When the implementation program of the file read and write method is executed by the processor, all steps in the embodiments of the above file read and write method are implemented. Since the terminal can execute all steps in any of the above embodiments, this mobile terminal at least has all the beneficial effects brought by the technical solutions in the above method embodiments, and will not be elaborated here one by one.
[0094] The present invention also proposes a computer-readable medium, on which an implementation program of the file read and write method is stored. When the implementation program of the file read and write method is executed, all steps in any of the above embodiments can be implemented. Since the computer-readable medium can execute all steps in any of the above embodiments, this computer-readable medium at least has all the beneficial effects brought by the technical solutions in the above method embodiments, and will not be elaborated here one by one.
[0095] It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising such element.
[0096] The serial numbers of the above embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments.
[0097] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0098] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make many forms without departing from the spirit and scope protected by the claims of the present invention. These all fall within the protection scope of the present invention.
Claims
1. A file reading and writing method, characterized in that, It includes the following steps: Step S410, monitor the read / write requests of files; Step S420, determine whether the read / write request is allowed; if yes, execute Step S430, if no, execute Step S470; Among them, the specific steps for determining whether the read / write request is allowed include: Step S421, determine whether the verification permission information feedback by the multimedia application in the user space is received; if yes, execute Step S422, if no, execute Step S423; Step S422, determine that the read / write request is allowed; Step S423, determine that the read / write request is not allowed; Step S430, determine whether the file is a file under the fuse file system; if yes, execute Step S440, if no, do not perform any action. When no action is performed, the read / write operation of the file is carried out in the existing manner; Among them, the specific steps for determining whether the file is a file under the fuse file system include: Step S431, determine whether the received verification permission information contains a file handle and process information; if yes, execute Step S432, if no, execute Step S433; Step S432, determine that the file is a file under the fuse file system; Step S433, determine that the file is not a file under the fuse file system; Step S440, obtain the file handle and process information; Step S450, directly read and write the file through the sdcardfs file system according to the obtained file handle and process information; Step S460, return the corresponding file content; Step S470, send a prompt for rejecting the file read / write request; Among them, establish a passthrod module for accelerating the file read / write speed in the kernel layer of the kernel; when the multimedia application in the user space requests to read / write a file, the multimedia application in the user space first verifies the request; after the verification passes, the multimedia application in the user space feeds back a receipt carrying the file handle and process information to the passthrod module in the kernel space; after the passthrod module obtains the receipt information, it parses the receipt and determines whether the receipt contains a file handle and process information; if the receipt contains a file handle and process information, it is determined that the request is an operation on a file under the fuse file system; the passthrod module records the file handle and process information; when the multimedia application in the user space performs a read / write operation, the passthrod module compares the file handle and process information passed by the multimedia application in the user space with the file handle and process information recorded in the passthrod module; if the comparison is successful, the passthrod module performs read / write operations on the file through the underlying sdcardfs file system, and then returns the corresponding file content, and no longer throws the read / write request to the multimedia application in the user space for processing, so as to reduce the interaction times between the kernel and the user space; When the read / write request verification of the file by the multimedia application in the user state fails, a prompt for rejecting the file read / write request without read / write permission is sent to the multimedia application in the user state.
2. A terminal, characterized in that, It includes a memory, a processor, and an implementation program of a file read / write method stored on the memory and executable on the processor. When the implementation program of the file read / write method is executed by the processor, the steps of the file read / write method described in Claim 1 are implemented.
3. A computer-readable medium, characterized in that, An implementation program of a file read / write method is stored on the computer-readable medium. When the implementation program of the file read / write method is executed, the steps of the file read / write method described in Claim 1 are implemented.