CN108170376B - Method and system for reading and writing memory card - Google Patents

Method and system for reading and writing memory card Download PDF

Info

Publication number
CN108170376B
CN108170376B CN201711397150.0A CN201711397150A CN108170376B CN 108170376 B CN108170376 B CN 108170376B CN 201711397150 A CN201711397150 A CN 201711397150A CN 108170376 B CN108170376 B CN 108170376B
Authority
CN
China
Prior art keywords
card
kernel
file system
writing
written
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711397150.0A
Other languages
Chinese (zh)
Other versions
CN108170376A (en
Inventor
吴晓亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Shimai Digital Technology Co ltd
Original Assignee
Shanghai Shimai Digital Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Shimai Digital Technology Co ltd filed Critical Shanghai Shimai Digital Technology Co ltd
Priority to CN201711397150.0A priority Critical patent/CN108170376B/en
Publication of CN108170376A publication Critical patent/CN108170376A/en
Application granted granted Critical
Publication of CN108170376B publication Critical patent/CN108170376B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Abstract

The invention aims to provide a method and a system for reading and writing a memory card, which can avoid the need of converting a user space and a kernel space for three times when a user space file system reads and writes data once by mounting the memory card by using a file system of the memory card instead of mounting the memory card by using a special file system, and improve the reading and writing speed. In addition, the contents such as the code stream file are written into the SD card through a direct input/output mode, the contents are not written into the cache firstly, and then the contents are written into the SD card through the cache, namely, the code stream data are directly written into the memory card and are not cached in the kernel, the memory pressure is reduced, more effective contents can be stored in the cache of the kernel space, and the system performance is improved. The invention can realize the random writing speed of the memory card to be improved by 20 to 30 percent.

Description

Method and system for reading and writing memory card
Technical Field
The invention relates to the field of computers, in particular to a method and a system for reading and writing a memory card.
Background
The existing memory card writing method comprises the following steps:
step one, from a user space to a kernel space: a first program of the user space sends a write request to a proprietary file system in the kernel, such as an android proprietary file system;
step two, from kernel to user space: the proprietary file in the kernel sends the write request to a second program in user space;
step three, from the user space to the kernel space: the second program of the user space writes the content to be written in the write request into a cache of an SD card file system in a kernel;
step four, when the content in the cache is accumulated to a certain amount, the SD card file system in the kernel writes the content in the cache into the SD card.
The existing memory card reading method comprises the following steps:
step two, from the user space to the kernel: a first program of the user space sends a read request to a proprietary file system in the kernel, such as an android proprietary file system;
step two, from the kernel to the user space: the proprietary file in the kernel sends the read request to a second program in user space;
step two, the user space reaches the kernel: the second program of the user space sends the read request to the SD card file system of the kernel;
fourthly, the SD card file system of the kernel reads corresponding data from the memory card according to the reading request and stores the data into a cache;
and step two, the SD card file system of the kernel feeds back the data in the cache to the user space.
The disadvantages of the existing solutions are:
1. the writing cache is continuously generated, and the memory pressure can be increased;
2. a large amount of useless write cache occupies cache space, and common data cannot be cached for a long time, so that the system performance is reduced;
3. the user space file system needs to perform three times of conversion between the user space and the kernel space when performing one-time data reading and writing, and the reading and writing speed is reduced.
Disclosure of Invention
The invention aims to provide a method and a system for reading and writing a memory card, which can solve the problem that the user space file system needs to convert a user space and a kernel space for three times when performing data reading and writing once, so that the reading and writing speed is reduced.
According to an aspect of the present invention, there is provided a memory card writing method, the method including:
the user space sends a write request to an SD card file system in the kernel;
and the SD card file system in the kernel writes the specific content to be written into the SD card according to the write request.
Further, in the above method, writing the content to be written specifically into the SD card according to the write request includes:
and writing the specific to-be-written content with the integral multiple size of the preset data block into the SD card.
According to another aspect of the present invention, there is also provided a memory card reading method, including:
the user space sends a read request to an SD card file system of the kernel;
the SD card file system of the kernel reads corresponding data from the memory card and stores the data into a cache according to the read request;
and the SD card file system of the kernel feeds back the data in the cache to the user space.
According to another aspect of the present invention, there is also provided a memory card read/write method, including:
the user space sends a write request to an SD card file system in the kernel;
the SD card file system in the kernel writes the specific content to be written into the SD card according to the write request;
the user space sends a read request to an SD card file system of the kernel;
the SD card file system of the kernel reads corresponding data from the memory card and stores the data into a cache according to the read request;
and the SD card file system of the kernel feeds back the data in the cache to the user space.
Further, in the foregoing, writing the content to be written specifically into the SD card according to the write request includes:
and writing the specific to-be-written content with the integral multiple size of the preset data block into the SD card.
According to another aspect of the present invention, there is also provided a memory card writing system including:
the sending module is used for sending the write request to an SD card file system in the kernel by the user space;
and the writing module is used for the SD card file system in the kernel and writing the specific content to be written into the SD card according to the writing request.
Further, in the above system, the writing module is configured to write the specific content to be written in an integer multiple of a preset data block into the SD card.
According to another aspect of the present invention, there is also provided a memory card reading system, including:
the sending module is used for sending the reading request to the SD card file system of the kernel by the user space;
the reading module is used for reading corresponding data from the memory card and storing the data into a cache by the SD card file system of the kernel according to the reading request;
and the feedback module is used for feeding back the data in the cache to the user space by the SD card file system of the kernel.
According to another aspect of the present invention, there is also provided a memory card read/write system, including:
the first sending module is used for sending the write request to an SD card file system in the kernel by the user space;
the writing module is used for the SD card file system in the kernel and writing the specific content to be written into the SD card according to the writing request;
the second sending module is used for sending the read request to the SD card file system of the kernel by the user space;
the reading module is used for reading corresponding data from the memory card and storing the data into a cache by the SD card file system of the kernel according to the reading request;
and the feedback module is used for feeding back the data in the cache to the user space by the SD card file system of the kernel.
Further, in the above system, the writing module is configured to write the specific content to be written in an integer multiple of a preset data block into the SD card.
According to another aspect of the present invention, there is also provided a computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
the user space sends a write request to an SD card file system in the kernel;
and the SD card file system in the kernel writes the specific content to be written into the SD card according to the write request.
According to another aspect of the present invention, there is also provided a computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
the user space sends a read request to an SD card file system of the kernel;
the SD card file system of the kernel reads corresponding data from the memory card and stores the data into a cache according to the read request;
and the SD card file system of the kernel feeds back the data in the cache to the user space.
According to another aspect of the present invention, there is also provided a computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
the user space sends a write request to an SD card file system in the kernel;
the SD card file system in the kernel writes the specific content to be written into the SD card according to the write request;
the user space sends a read request to an SD card file system of the kernel;
the SD card file system of the kernel reads corresponding data from the memory card and stores the data into a cache according to the read request;
and the SD card file system of the kernel feeds back the data in the cache to the user space.
According to another aspect of the present invention, there is also provided a calculator apparatus, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
the user space sends a write request to an SD card file system in the kernel;
and the SD card file system in the kernel writes the specific content to be written into the SD card according to the write request.
According to another aspect of the present invention, there is also provided a calculator apparatus, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
the user space sends a read request to an SD card file system of the kernel;
the SD card file system of the kernel reads corresponding data from the memory card and stores the data into a cache according to the read request;
and the SD card file system of the kernel feeds back the data in the cache to the user space.
According to another aspect of the present invention, there is also provided a calculator apparatus, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
the user space sends a write request to an SD card file system in the kernel;
the SD card file system in the kernel writes the specific content to be written into the SD card according to the write request;
the user space sends a read request to an SD card file system of the kernel;
the SD card file system of the kernel reads corresponding data from the memory card and stores the data into a cache according to the read request;
and the SD card file system of the kernel feeds back the data in the cache to the user space.
Compared with the prior art, the memory card is mounted by using the file system of the memory card instead of mounting the memory card by using a special file system, so that the situation that the user space file system needs to convert the user space and the kernel space for three times when performing one-time data reading and writing can be avoided, and the reading and writing speed is improved. In addition, the contents such as the code stream file are written into the SD card through a direct input/output mode, the contents are not written into the cache firstly, and then the contents are written into the SD card through the cache, namely, the code stream data are directly written into the memory card and are not cached in the kernel, the memory pressure is reduced, more effective contents can be stored in the cache of the kernel space, and the system performance is improved. The invention can realize the random writing speed of the memory card to be improved by 20 to 30 percent.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
FIG. 1 shows a flow diagram of a memory card writing method according to an embodiment of the invention;
fig. 2 shows a flow chart of a memory card reading method according to an embodiment of the invention.
The same or similar reference numbers in the drawings identify the same or similar elements.
Detailed Description
The present invention is described in further detail below with reference to the attached drawing figures.
In a typical configuration of the present application, the terminal, the device serving the network, and the trusted party each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
As shown in fig. 1, the memory card writing method according to an embodiment of the present invention includes the following steps:
step S11, user space to kernel: the user space sends a write request to an SD card file system in the kernel;
and step S12, the SD card file system in the kernel writes the specific content to be written into the SD card according to the write request.
Here, in this embodiment, the memory card is mounted by using the file system of the memory card, and the memory card is not mounted by using a dedicated file system, so that it is possible to avoid that the user space file system needs to perform data reading and writing for one time and perform conversion between the user space and the kernel space for three times, and improve the reading and writing speed. In addition, the contents such as the code stream file are written into the SD card through a direct input/output mode, the contents are not written into the cache firstly, and then the contents are written into the SD card through the cache, namely, the code stream data are directly written into the memory card and are not cached in the kernel, the memory pressure is reduced, more effective contents can be stored in the cache of the kernel space, and the system performance is improved. The invention can realize the random writing speed of the memory card to be improved by 20 to 30 percent.
In the memory card writing method according to an embodiment of the present invention, writing a content to be written specifically into an SD card according to the write request includes:
and writing the specific to-be-written content with the integral multiple size of the preset data block into the SD card.
The data in the memory card is read and written in a direct input/output mode, and meanwhile, when a file is written, the data written in each time is required to be integral multiple of the block size, so that writing failure is avoided, and reliable writing is guaranteed.
As shown in fig. 2, the memory card reading method according to an embodiment of the present invention includes the following steps:
step S21, user space to kernel: the user space sends a read request to an SD card file system of the kernel;
step S22, the SD card file system of the kernel reads corresponding data from the memory card and stores the data in a cache according to the read request;
and step S23, the SD card file system of the kernel feeds back the data in the cache to the user space.
Here, in this embodiment, the memory card is mounted by using the file system of the memory card, and the memory card is not mounted by using a dedicated file system, so that it is possible to avoid that the user space file system needs to perform data reading and writing for one time and perform conversion between the user space and the kernel space for three times, and improve the reading and writing speed.
The memory card reading and writing method of an embodiment of the invention comprises the following steps:
step S31, user space to kernel: the user space sends a write request to an SD card file system in the kernel;
step S32, the SD card file system in the kernel writes the specific content to be written into the SD card according to the write request;
step S33, user space to kernel: the user space sends a read request to an SD card file system of the kernel;
step S34, the SD card file system of the kernel reads corresponding data from the memory card and stores the data in a cache according to the read request;
and step S35, the SD card file system of the kernel feeds back the data in the cache to the user space.
Here, in this embodiment, the memory card is mounted by using the file system of the memory card, and the memory card is not mounted by using a dedicated file system, so that it is possible to avoid that the user space file system needs to perform data reading and writing for one time and perform conversion between the user space and the kernel space for three times, and improve the reading and writing speed. In addition, the contents such as the code stream file are written into the SD card through a direct input/output mode, the contents are not written into the cache firstly, and then the contents are written into the SD card through the cache, namely, the code stream data are directly written into the memory card and are not cached in the kernel, the memory pressure is reduced, more effective contents can be stored in the cache of the kernel space, and the system performance is improved. The invention can realize the random writing speed of the memory card to be improved by 20 to 30 percent.
In the memory card read/write method according to an embodiment of the present invention, writing a specific content to be written into the SD card according to the write request includes:
and writing the specific to-be-written content with the integral multiple size of the preset data block into the SD card.
The data in the memory card is read and written in a direct input/output mode, and meanwhile, when a file is written, the data written in each time is required to be integral multiple of the block size, so that writing failure is avoided, and reliable writing is guaranteed.
According to another aspect of the present invention, there is also provided a memory card writing system including:
the sending module is used for sending the write request to an SD card file system in the kernel by the user space;
and the writing module is used for the SD card file system in the kernel and writing the specific content to be written into the SD card according to the writing request.
Here, in this embodiment, the memory card is mounted by using the file system of the memory card, and the memory card is not mounted by using a dedicated file system, so that it is possible to avoid that the user space file system needs to perform data reading and writing for one time and perform conversion between the user space and the kernel space for three times, and improve the reading and writing speed. In addition, the contents such as the code stream file are written into the SD card through a direct input/output mode, the contents are not written into the cache firstly, and then the contents are written into the SD card through the cache, namely, the code stream data are directly written into the memory card and are not cached in the kernel, the memory pressure is reduced, more effective contents can be stored in the cache of the kernel space, and the system performance is improved. The invention can realize the random writing speed of the memory card to be improved by 20 to 30 percent.
In the memory card writing system according to an embodiment of the present invention, the writing module is configured to write the specific content to be written in an integer multiple of a preset data block into the SD card.
The data in the memory card is read and written in a direct input/output mode, and meanwhile, when a file is written, the data written in each time is required to be integral multiple of the block size, so that writing failure is avoided, and reliable writing is guaranteed.
According to another aspect of the present invention, there is also provided a memory card reading system, including:
the sending module is used for sending the reading request to the SD card file system of the kernel by the user space;
the reading module is used for reading corresponding data from the memory card and storing the data into a cache by the SD card file system of the kernel according to the reading request;
and the feedback module is used for feeding back the data in the cache to the user space by the SD card file system of the kernel.
Here, in this embodiment, the memory card is mounted by using the file system of the memory card, and the memory card is not mounted by using a dedicated file system, so that it is possible to avoid that the user space file system needs to perform data reading and writing for one time and perform conversion between the user space and the kernel space for three times, and improve the reading and writing speed.
According to another aspect of the present invention, there is also provided a memory card read/write system, including:
the first sending module is used for sending the write request to an SD card file system in the kernel by the user space;
the writing module is used for the SD card file system in the kernel and writing the specific content to be written into the SD card according to the writing request;
the second sending module is used for sending the read request to the SD card file system of the kernel by the user space;
the reading module is used for reading corresponding data from the memory card and storing the data into a cache by the SD card file system of the kernel according to the reading request;
and the feedback module is used for feeding back the data in the cache to the user space by the SD card file system of the kernel.
Here, in this embodiment, the memory card is mounted by using the file system of the memory card, and the memory card is not mounted by using a dedicated file system, so that it is possible to avoid that the user space file system needs to perform data reading and writing for one time and perform conversion between the user space and the kernel space for three times, and improve the reading and writing speed. In addition, the contents such as the code stream file are written into the SD card through a direct input/output mode, the contents are not written into the cache firstly, and then the contents are written into the SD card through the cache, namely, the code stream data are directly written into the memory card and are not cached in the kernel, the memory pressure is reduced, more effective contents can be stored in the cache of the kernel space, and the system performance is improved. The invention can realize the random writing speed of the memory card to be improved by 20 to 30 percent.
In the memory card read-write system according to an embodiment of the present invention, the write module is configured to write the specific content to be written in an integer multiple of a preset data block into the SD card.
The data in the memory card is read and written in a direct input/output mode, and meanwhile, when a file is written, the data written in each time is required to be integral multiple of the block size, so that writing failure is avoided, and reliable writing is guaranteed.
According to another aspect of the present invention, there is also provided a computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
the user space sends a write request to an SD card file system in the kernel;
and the SD card file system in the kernel writes the specific content to be written into the SD card according to the write request.
According to another aspect of the present invention, there is also provided a computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
the user space sends a read request to an SD card file system of the kernel;
the SD card file system of the kernel reads corresponding data from the memory card and stores the data into a cache according to the read request;
and the SD card file system of the kernel feeds back the data in the cache to the user space.
According to another aspect of the present invention, there is also provided a computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
the user space sends a write request to an SD card file system in the kernel;
the SD card file system in the kernel writes the specific content to be written into the SD card according to the write request;
the user space sends a read request to an SD card file system of the kernel;
the SD card file system of the kernel reads corresponding data from the memory card and stores the data into a cache according to the read request;
and the SD card file system of the kernel feeds back the data in the cache to the user space.
According to another aspect of the present invention, there is also provided a calculator apparatus, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
the user space sends a write request to an SD card file system in the kernel;
and the SD card file system in the kernel writes the specific content to be written into the SD card according to the write request.
According to another aspect of the present invention, there is also provided a calculator apparatus, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
the user space sends a read request to an SD card file system of the kernel;
the SD card file system of the kernel reads corresponding data from the memory card and stores the data into a cache according to the read request;
and the SD card file system of the kernel feeds back the data in the cache to the user space.
According to another aspect of the present invention, there is also provided a calculator apparatus, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
the user space sends a write request to an SD card file system in the kernel;
the SD card file system in the kernel writes the specific content to be written into the SD card according to the write request;
the user space sends a read request to an SD card file system of the kernel;
the SD card file system of the kernel reads corresponding data from the memory card and stores the data into a cache according to the read request;
and the SD card file system of the kernel feeds back the data in the cache to the user space.
In summary, by using the file system of the memory card to mount the memory card, rather than using a dedicated file system to mount the memory card, it is possible to avoid the need to perform three times of conversion between the user space and the kernel space when the user space file system performs one data read/write operation, thereby improving the read/write speed. In addition, the contents such as the code stream file are written into the SD card through a direct input/output mode, the contents are not written into the cache firstly, and then the contents are written into the SD card through the cache, namely, the code stream data are directly written into the memory card and are not cached in the kernel, the memory pressure is reduced, more effective contents can be stored in the cache of the kernel space, and the system performance is improved. The invention can realize the random writing speed of the memory card to be improved by 20 to 30 percent.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
It should be noted that the present invention may be implemented in software and/or in a combination of software and hardware, for example, as an Application Specific Integrated Circuit (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present invention may be executed by a processor to implement the steps or functions described above. Also, the software programs (including associated data structures) of the present invention can be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Further, some of the steps or functions of the present invention may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
In addition, some of the present invention can be applied as a computer program product, such as computer program instructions, which when executed by a computer, can invoke or provide the method and/or technical solution according to the present invention through the operation of the computer. Program instructions which invoke the methods of the present invention may be stored on a fixed or removable recording medium and/or transmitted via a data stream on a broadcast or other signal-bearing medium and/or stored within a working memory of a computer device operating in accordance with the program instructions. An embodiment according to the invention herein comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform a method and/or solution according to embodiments of the invention as described above.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.

Claims (12)

1. A memory card writing method, wherein the method comprises:
the user space sends a write request to an SD card file system in the kernel;
the SD card file system in the kernel writes the specific content to be written into the SD card according to the write request;
writing the content to be written into the SD card according to the write request, wherein the writing comprises the following steps:
and writing the specific to-be-written content with the integral multiple size of the preset data block into the SD card.
2. A memory card reading method, wherein the method comprises:
the user space sends a read request to an SD card file system of the kernel;
the SD card file system of the kernel reads corresponding data from the memory card and stores the data into a cache according to the read request;
and the SD card file system of the kernel feeds back the data in the cache to the user space.
3. A memory card read-write method, wherein the method comprises:
the user space sends a write request to an SD card file system in the kernel;
the SD card file system in the kernel writes the specific content to be written into the SD card according to the write request;
the user space sends a read request to an SD card file system of the kernel;
the SD card file system of the kernel reads corresponding data from the memory card and stores the data into a cache according to the read request;
the SD card file system of the kernel feeds back the data in the cache to the user space;
writing the content to be written into the SD card according to the write request, wherein the writing comprises the following steps:
and writing the specific to-be-written content with the integral multiple size of the preset data block into the SD card.
4. A memory card writing system, wherein the system comprises:
the sending module is used for sending the write request to an SD card file system in the kernel by the user space;
the writing module is used for the SD card file system in the kernel and writing the specific content to be written into the SD card according to the writing request;
the writing module is configured to write the specific content to be written in the size of an integral multiple of a preset data block into the SD card.
5. A memory card reading system, wherein the system comprises:
the sending module is used for sending the reading request to the SD card file system of the kernel by the user space;
the reading module is used for reading corresponding data from the memory card and storing the data into a cache by the SD card file system of the kernel according to the reading request;
and the feedback module is used for feeding back the data in the cache to the user space by the SD card file system of the kernel.
6. A memory card read-write system, wherein the system comprises:
the first sending module is used for sending the write request to an SD card file system in the kernel by the user space;
the writing module is used for the SD card file system in the kernel and writing the specific content to be written into the SD card according to the writing request;
the second sending module is used for sending the read request to the SD card file system of the kernel by the user space;
the reading module is used for reading corresponding data from the memory card and storing the data into a cache by the SD card file system of the kernel according to the reading request;
the feedback module is used for feeding back the data in the cache to the user space by the SD card file system of the kernel;
the writing module is configured to write the specific content to be written in the size of an integral multiple of a preset data block into the SD card.
7. A computer-readable storage medium having computer-executable instructions stored thereon, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
the user space sends a write request to an SD card file system in the kernel;
the SD card file system in the kernel writes the specific content to be written into the SD card according to the write request;
writing the content to be written into the SD card according to the write request, wherein the writing comprises the following steps:
and writing the specific to-be-written content with the integral multiple size of the preset data block into the SD card.
8. A computer-readable storage medium having computer-executable instructions stored thereon, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
the user space sends a read request to an SD card file system of the kernel;
the SD card file system of the kernel reads corresponding data from the memory card and stores the data into a cache according to the read request;
and the SD card file system of the kernel feeds back the data in the cache to the user space.
9. A computer-readable storage medium having computer-executable instructions stored thereon, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
the user space sends a write request to an SD card file system in the kernel;
the SD card file system in the kernel writes the specific content to be written into the SD card according to the write request;
the user space sends a read request to an SD card file system of the kernel;
the SD card file system of the kernel reads corresponding data from the memory card and stores the data into a cache according to the read request;
the SD card file system of the kernel feeds back the data in the cache to the user space;
writing the content to be written into the SD card according to the write request, wherein the writing comprises the following steps:
and writing the specific to-be-written content with the integral multiple size of the preset data block into the SD card.
10. A calculator device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
the user space sends a write request to an SD card file system in the kernel;
the SD card file system in the kernel writes the specific content to be written into the SD card according to the write request;
writing the content to be written into the SD card according to the write request, wherein the writing comprises the following steps:
and writing the specific to-be-written content with the integral multiple size of the preset data block into the SD card.
11. A calculator device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
the user space sends a read request to an SD card file system of the kernel;
the SD card file system of the kernel reads corresponding data from the memory card and stores the data into a cache according to the read request;
and the SD card file system of the kernel feeds back the data in the cache to the user space.
12. A calculator device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
the user space sends a write request to an SD card file system in the kernel;
the SD card file system in the kernel writes the specific content to be written into the SD card according to the write request;
the user space sends a read request to an SD card file system of the kernel;
the SD card file system of the kernel reads corresponding data from the memory card and stores the data into a cache according to the read request;
the SD card file system of the kernel feeds back the data in the cache to the user space;
writing the content to be written into the SD card according to the write request, wherein the writing comprises the following steps:
and writing the specific to-be-written content with the integral multiple size of the preset data block into the SD card.
CN201711397150.0A 2017-12-21 2017-12-21 Method and system for reading and writing memory card Active CN108170376B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711397150.0A CN108170376B (en) 2017-12-21 2017-12-21 Method and system for reading and writing memory card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711397150.0A CN108170376B (en) 2017-12-21 2017-12-21 Method and system for reading and writing memory card

Publications (2)

Publication Number Publication Date
CN108170376A CN108170376A (en) 2018-06-15
CN108170376B true CN108170376B (en) 2021-05-28

Family

ID=62523171

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711397150.0A Active CN108170376B (en) 2017-12-21 2017-12-21 Method and system for reading and writing memory card

Country Status (1)

Country Link
CN (1) CN108170376B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471622B (en) * 2019-07-30 2024-02-20 惠州Tcl移动通信有限公司 SD card data writing method and device, storage medium and terminal
CN110941843B (en) * 2019-11-22 2022-03-29 北京明略软件系统有限公司 Encryption implementation method, device, equipment and storage medium
CN111258965B (en) * 2020-01-10 2024-03-08 北京聚云立方科技有限公司 Data acquisition method and device, electronic equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103793256A (en) * 2014-03-03 2014-05-14 联想(北京)有限公司 Method for management of memory cards, and electronic device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8874824B2 (en) * 2009-06-04 2014-10-28 Memory Technologies, LLC Apparatus and method to share host system RAM with mass storage memory RAM

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103793256A (en) * 2014-03-03 2014-05-14 联想(北京)有限公司 Method for management of memory cards, and electronic device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
https://blog.csdn.net/hljhnu/article/details/53055695?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-2.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-2.nonecase;hljhnu;《为什么android手机中sdcardfs比fuse性能好》;20161106;网页全文 *

Also Published As

Publication number Publication date
CN108170376A (en) 2018-06-15

Similar Documents

Publication Publication Date Title
US10282128B2 (en) Data deduplication
CN108170376B (en) Method and system for reading and writing memory card
CN106919494B (en) Method and device for realizing android application log
KR102321793B1 (en) Semiconductor memory device managing flexsible refresh skip area
US11010056B2 (en) Data operating method, device, and system
US10649905B2 (en) Method and apparatus for storing data
CN110362547B (en) Method and device for encoding, analyzing and storing log file
US10725698B2 (en) Memory controller and control method thereof
US20170206011A1 (en) Enhancing performance-cost ratio of a primary storage adaptive data reduction system
CN112667246B (en) Application function expansion method and device and electronic equipment
CN112115068A (en) Data access of multiple namespaces and computer readable storage medium
US8930631B2 (en) Efficient management of computer memory using memory page associations and memory
CN113176859B (en) Data storage method and device
CN111314535A (en) Method and equipment for recording quality inspection process of mobile phone
US20060143313A1 (en) Method for accessing a storage device
CN108108133B (en) Method and equipment for changing usable capacity of nvme SSD (solid State disk) hard disk user
US10803109B2 (en) Method and device for reading and writing video data in NAS device
CN110837338A (en) Storage index processing method and device
CN114385552A (en) Page integration method and device for file pages in memory
US9804968B2 (en) Storage system and data writing method
WO2017028718A1 (en) Data reading method and device
CN112463041A (en) Processing method for host read-write data and related device
US9740428B1 (en) Circular buffer descriptor for describing and/or accessing a circular buffer
CN107870736B (en) Method and device for supporting non-linear flash memory larger than 4GB
CN114489686B (en) Middleware decoupling method, device and equipment under multi-cloud deployment

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 200241 2220, room 2, No. 588 Zixing Road, Minhang District, Shanghai.

Applicant after: Shanghai shimai Digital Technology Co.,Ltd.

Address before: 201700 room 228, area T, 2 / F, building 2, 349 xicen street, Qingpu District, Shanghai

Applicant before: SHANGHAI XIN AN DIGITAL TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant