CN114489510A - Data reading method and device - Google Patents

Data reading method and device Download PDF

Info

Publication number
CN114489510A
CN114489510A CN202210109184.XA CN202210109184A CN114489510A CN 114489510 A CN114489510 A CN 114489510A CN 202210109184 A CN202210109184 A CN 202210109184A CN 114489510 A CN114489510 A CN 114489510A
Authority
CN
China
Prior art keywords
data
memory
identification information
request
category
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.)
Pending
Application number
CN202210109184.XA
Other languages
Chinese (zh)
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202210109184.XA priority Critical patent/CN114489510A/en
Publication of CN114489510A publication Critical patent/CN114489510A/en
Pending legal-status Critical Current

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/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • 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 application discloses a data reading method and device, and belongs to the technical field of electronic equipment. The data reading method comprises the following steps: sending a data reading request for first data to a memory, wherein the data reading request comprises identification information of a category to which the first data belongs, so that the data reading request is used for searching second data associated with the identification information by the memory, and the second data comprises the first data and data of the same category as the first data; and receiving second data sent by the memory.

Description

Data reading method and device
Technical Field
The application belongs to the technical field of electronic equipment, and particularly relates to a data reading method and device.
Background
FLASH memory (FLASH memory for short) is a form of electrically erasable programmable read-only memory, which is a memory that is erased or written many times in an orderly operation.
In the related art, when data is read once for each pair of Flash memories, the processor sends a Logical Block Address (LBA) to a Flash Translation Layer (FTL), and the FTL converts the LBA into a Physical Block Address (PBA), and then reads the data in the Flash memories through the PBA. Each time of data reading, only data corresponding to the LBA sent by the flash memory can be read, and the data reading efficiency is low.
Disclosure of Invention
An object of the embodiments of the present application is to provide a data reading method and apparatus, which can solve the problem of low data reading efficiency.
In a first aspect, an embodiment of the present application provides a data reading method, including:
sending a data reading request for first data to a memory, wherein the data reading request comprises identification information of a category to which the first data belongs, so that the data reading request is used for searching second data associated with the identification information by the memory, and the second data comprises the first data and data of the same category as the first data;
and receiving second data sent by the memory.
In a second aspect, an embodiment of the present application provides a data reading method, which is applied to a memory, and the data reading method includes:
acquiring a data reading request for first data, wherein the data reading request comprises identification information of a category to which the first data belongs;
and responding to the data reading request, searching and feeding back second data associated with the identification information, wherein the second data comprises the first data and data of the same category as the first data.
In a third aspect, an embodiment of the present application provides a data reading apparatus, including:
the device comprises a first sending module, a second sending module and a processing module, wherein the first sending module is used for sending a data reading request for first data to a memory, the data reading request comprises identification information of a category to which the first data belongs, so that the data reading request is used for the memory to search second data associated with the identification information, and the second data comprises the first data and data of the same category as the first data;
and the receiving module is used for receiving the second data sent by the memory.
In a fourth aspect, an embodiment of the present application provides a data reading apparatus, which is applied to a memory, and includes:
the device comprises a first acquisition module, a second acquisition module and a processing module, wherein the first acquisition module is used for acquiring a data reading request of first data, and the data reading request comprises identification information of a category to which the first data belongs;
and the feedback module is used for responding to the data reading request, searching and feeding back second data associated with the identification information, wherein the second data comprises the first data and the data with the same category as the first data.
In a fifth aspect, embodiments of the present application provide an electronic device, which includes a processor and a memory, where the memory stores a program or instructions, and the program or instructions, when executed, implement the steps of the method according to the first aspect or the second aspect.
In a sixth aspect, embodiments of the present application provide a readable storage medium on which a program or instructions are stored, which when executed, implement the steps of the method according to the first aspect or the second aspect.
In a seventh aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the steps of the method according to the first aspect.
In an eighth aspect, the present application provides a computer program product, which is stored in a storage medium and executed to implement the method according to the first aspect or the second aspect.
In the embodiment of the application, a data reading request for first data is sent to a memory, wherein the data reading request comprises identification information of a category to which the first data belongs, so that the memory searches for second data associated with the identification information, and the second data comprises the first data and data of the same category as the first data; and receiving second data sent by the memory. That is, by sending one data read request to the memory, not only the first data but also the same kind of data to which the first data belongs can be read. Compared with the prior art that only the data corresponding to the LBA sent by the memory can be read in each data reading, the data reading efficiency can be improved through the embodiment of the application.
Drawings
Fig. 1 is a first flowchart of a data reading method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a first structure of a data write command according to an embodiment of the present application;
FIG. 3 is a diagram illustrating a second structure of a data write command according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a second data reading method according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a first structure of a data reading apparatus according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a second structure of a data reading apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 8 is a schematic hardware structure diagram of an electronic device implementing an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The data reading method and apparatus provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
Fig. 1 is a schematic flowchart of a first data reading method according to an embodiment of the present disclosure. As shown in fig. 1, the data reading method may include:
s101: sending a data reading request for first data to a memory, wherein the data reading request comprises identification information of a category to which the first data belongs, so that the data reading request is used for the memory to search second data associated with the identification information of the category to which the first data belongs, and the second data comprises the first data and data of the same category as the first data;
s102: and receiving second data sent by the memory.
Specific implementations of the above steps will be described in detail below.
In the embodiment of the application, a data reading request for first data is sent to a memory, wherein the data reading request comprises identification information of a category to which the first data belongs, so that the memory searches for second data associated with the identification information, and the second data comprises the first data and data of the same category as the first data; and receiving second data sent by the memory. That is, by sending one data read request to the memory, not only the first data but also the same kind of data to which the first data belongs can be read. Compared with the prior art that only the data corresponding to the LBA sent by the memory can be read in each data reading process, the data reading efficiency can be improved through the embodiment of the application.
In some possible implementations of the embodiments of the present application, the memory in the embodiments of the present application may optionally be a flash memory.
In some possible implementations of the embodiment of the present application, before S101, the data reading method provided in the embodiment of the present application may further include: sending a data storage request for the first data to the memory, wherein the data storage request comprises the first data and identification information of a category to which the first data belongs, so that the memory stores the first data and establishes an association relationship between the first data and the identification information of the category to which the first data belongs.
In some possible implementations of embodiments of the present application, the categories to which the data belongs include, but are not limited to: documents, pictures, video, audio, etc.
In some possible implementations of the embodiment of the present application, the type of the data corresponding to the file may be further divided according to the extension of the file, for example, for a file of a document type, the data may be further divided into a word type, a notepad type, and the like. For the video type files, AVI type, MP4 type, MPEG type, 3gp type, MOV type, and the like are subdivided.
The data type is not limited in the embodiments of the present application, and any available division manner can be applied to the embodiments of the present application. The data types can be divided according to actual requirements.
The identification information of the data category may be a name of the data category or an ID number corresponding to the data category.
In some possible implementations of the embodiments of the present application, the association relationship between the data and the identification information may be represented by a correspondence between a physical start block address corresponding to the data and an ID number corresponding to a category to which the data belongs. Exemplarily, as shown in table 1.
TABLE 1
Data of Physical initial block address Data belonging to category ID
Data
1 PBA4 1
Data 2 PBA1 3
Data 3 PBA3 1
Data 4 PBA2 2
Table 2 shows the correspondence between the ID number corresponding to the data category and the data category.
TABLE 2
Kind of data Data belonging to category ID
Picture frame
1
Video 2
Audio frequency 3
As can be seen from tables 1 and 2, data 1 and data 3 are data of picture type, data 2 is data of audio type, and data 3 is data of video type. The physical starting block address of data 1 in the memory is PBA4, the physical starting block address of data 2 in the memory is PBA1, the physical starting block address of data 3 in the memory is PBA3, and the physical starting block address of data 4 in the memory is PBA 1.
In some possible implementations of the embodiments of the present application, after performing operations such as garbage collection, defragmentation of a disk, or data movement on a memory, a physical start block address of data in the memory may change, and in this case, the memory updates a correspondence between the physical start block address corresponding to the data and an ID number corresponding to a type to which the data belongs.
In some possible implementations of the embodiment of the application, after the memory receives a data reading request, sent by the processor, for the first data, where the data reading request includes the identification information of the type to which the first data belongs, the memory searches for data associated with the identification information according to the identification information of the type to which the first data belongs, included in the data reading request, in response to the data reading request, and then sends the searched data to the memory, so as to complete reading of the data associated with the identification information.
Illustratively, the data read request sent by the processor to the memory includes the category IDs to which the data in table 1 and table 2 belong: 1; the memory finds the physical start block address corresponding to the data belonging category ID1 according to the data belonging category ID1 and table 1 above: PBA4 and PBA3, and then data 1 and data 3 corresponding to physical starting block addresses PBA4 and PBA3 are sent to the processor, and the reading of the data 1 and the data 3 is completed.
In some possible implementations of the embodiments of the present application, the memory may collectively store the first data and the same kind of data to which the first data belongs when storing the first data.
Illustratively, the memory has stored therein data of 1MB in size and of the same kind as the first data, and the physical start block address of the data is 0x00100000, and when the memory stores the first data again, 0x00200000 is used as the physical start block address of the first data.
In the embodiment of the application, the first data and the data of the same type as the first data are stored in a centralized manner, so that the disk fragments of the memory can be reduced, the times of cleaning the disk fragments of the memory are reduced, and the use efficiency and the use duration of the memory can be improved.
In some possible implementations of the embodiments of the present application, sending a data storage request for first data to a memory may include: a data storage request is sent to the memory by a data write command (write command).
Specifically, a write command for the first data may be sent to the memory, where the write command is used to instruct the memory to store the first data and carry identification information of a category to which the first data belongs.
In some possible implementations of embodiments of the present application, the structure of the write command is as shown in fig. 3 and 4, where fig. 3 shows the structure of a 10-byte length write command and fig. 4 shows the structure of a 16-byte length write command.
In some possible implementations of embodiments of the present application, when sending a data storage request to the memory through the write command, the identification information of the kind to which the first data belongs may be located in a reserved area that is not used in the write command.
In fig. 3, the 2 nd bit of the 1 st byte and the 0 th bit to the 7 th bit of the 6 th byte are reserved areas, which are not used in the related art. In fig. 4, the 0 th bit of the 1 st byte, the 2 nd bit of the 1 st byte, and the 0 th bit to the 7 th bit of the 14 th byte are reserved areas, which are not used in the related art.
Therefore, when transferring the ID of the kind to which the first data belongs with the 10-byte length write command, it is possible to transfer with the 2 nd bit of the 1 st byte, the 0 th bit to the 7 th bit of the 6 th byte in the 10-byte length write command; when transferring the ID of the kind to which the first data belongs with the write command of 16 bytes in length, the transfer may be performed with the 0 th bit of the 1 st byte, the 2 nd bit of the 1 st byte, and the 0 th bit to the 7 th bit of the 14 th byte in the write command of 16 bytes in length.
Illustratively, it is exemplified that a write command of 10 bytes length transfers an ID of a kind to which the first data belongs.
Assume that the ID of the category to which the first data belongs is 2. The 2 nd bit of the 1 st byte in the write command of 10 bytes in length may be set to 0, the 1 st to 7 th bits of the 6 th byte may be set to 0, and the 0 th bit of the 6 th byte may be set to 1, so as to indicate the kind to which the first data belongs; or, the 2 nd bit of the 1 st byte in the write command of 10 bytes in length is set to 0, the 0 th bit of the 6 th byte is set to 0, the 2 nd bit to the 7 th bit are set to 0, and the 1 st bit of the 6 th byte is set to 1, so as to indicate the kind to which the first data belongs.
The embodiment of the application also provides a data reading method. As shown in fig. 4. Fig. 4 is a second flowchart of a data reading method according to an embodiment of the present application. The data reading method of the embodiment shown in fig. 4 of the present application may be optionally applied to a memory. The data reading method comprises the following steps:
s401: acquiring a data reading request for first data, wherein the data reading request comprises identification information of a category to which the first data belongs;
s402: and responding to the data reading request, searching and feeding back second data associated with the identification information, wherein the second data comprises the first data and data of the same category as the first data.
In the embodiment of the application, a memory obtains a data reading request for first data, wherein the data reading request comprises identification information of a category to which the first data belongs; and responding to the data reading request, searching and feeding back second data associated with the identification information of the category to which the first data belongs, wherein the second data comprises the first data and data of the same category as the first data. That is, the memory can feed back both the first data and the data of the same kind as the first data by one data read request. Compared with the prior art that each time the data reading memory can only feed back the data corresponding to the LBA sent by the memory, the data reading efficiency can be improved through the embodiment of the application.
In some possible implementations of the embodiment of the present application, S401 may include: and receiving a data reading request for the first data sent by the processor.
In some possible implementations of the embodiment of the present application, before S401, the data reading method provided in the embodiment of the present application further includes:
acquiring a data storage request for first data, wherein the data storage request comprises the first data and identification information of a category to which the first data belongs;
and responding to the data storage request, storing the first data and establishing an association relation between the first data and the identification information of the category to which the first data belongs.
In some possible implementations of embodiments of the present application, obtaining the data storage request for the first data may include: and receiving a data storage request for the first data sent by the processor.
In some possible implementations of embodiments of the present application, storing the first data includes:
the first data and the data of the same kind as the first data are stored in a centralized manner.
In the embodiment of the application, the first data and the data of the same type as the first data are stored in a centralized manner, so that disk fragments can be reduced, the times of cleaning the disk fragments are reduced, and the use efficiency and the use duration of the memory can be improved.
In some possible implementations of embodiments of the present application, obtaining a data storage request for first data includes:
a data storage request for the first data is obtained via a write command.
In some possible implementations of embodiments of the present application, the identification information of the kind to which the first data belongs is located in a reserved area that is not used in the write command.
The data reading process in the embodiment shown in fig. 4 of the present application may specifically refer to the data reading process in the embodiment shown in fig. 1, and details of the data reading process in the embodiment of the present application are not repeated herein.
It should be noted that, in the data reading method provided in the embodiment of the present application, the execution main body may be a data reading device. In the embodiment of the present application, a data reading method performed by a data reading apparatus is taken as an example, and the data reading apparatus provided in the embodiment of the present application is described.
Fig. 5 is a schematic structural diagram of a data reading apparatus according to an embodiment of the present disclosure. The data reading apparatus 500 may include:
a first sending module 501, configured to send a data read request for first data to a memory, where the data read request includes identification information of a category to which the first data belongs, so as to be used for the memory to search for second data associated with the identification information, and the second data includes the first data and data of a same category as the first data;
the receiving module 502 is configured to receive second data sent by the memory.
In the embodiment of the application, a data reading request for first data is sent to a memory, wherein the data reading request comprises identification information of a category to which the first data belongs, so that the memory searches for second data associated with the identification information, and the second data comprises the first data and data of the same category as the first data; and receiving second data sent by the memory. That is, by sending one data read request to the memory, not only the first data but also the same kind of data to which the first data belongs can be read. Compared with the prior art that only the data corresponding to the LBA sent by the memory can be read in each data reading process, the data reading efficiency can be improved through the embodiment of the application.
In some possible implementations of embodiments of the present application, the data reading apparatus 500 further includes:
the second sending module is used for sending a data storage request for the first data to the memory, wherein the data storage request comprises the first data and identification information of a category to which the first data belongs, so that the memory stores the first data and establishes an association relationship between the first data and the identification information of the category to which the first data belongs.
In some possible implementations of the embodiment of the present application, the second sending module is specifically configured to:
and sending the data storage request to the memory through the write command.
In some possible implementations of embodiments of the present application, the identification information of the kind to which the first data belongs is located in a reserved area that is not used in the write command.
The data reading apparatus 500 in the embodiment of the present application may be an electronic device, and may also be a component in the electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or may be a device other than a terminal. The electronic Device may be, for example, a Mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic Device, a Mobile Internet Device (MID), an Augmented Reality (AR)/Virtual Reality (VR) Device, a robot, a wearable Device, an ultra-Mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and may also be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine, a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The data reading device 500 in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system (Android), an iOS operating system, or other possible operating systems, which is not specifically limited in the embodiments of the present application.
The data reading apparatus 500 provided in this embodiment of the application can implement each process in the data reading method embodiments of fig. 1 to fig. 3, and is not described here again to avoid repetition.
Fig. 6 is a schematic structural diagram of a second data reading apparatus according to an embodiment of the present application. The data reading device of the embodiment shown in fig. 6 of the present application may be optionally applied to a memory. The data reading apparatus 600 may include:
a first obtaining module 601, configured to obtain a data reading request for first data, where the data reading request includes identification information of a category to which the first data belongs;
the feedback module 602 is configured to search and feed back second data associated with the identification information in response to the data reading request, where the second data includes the first data and data of the same category as the first data.
In the embodiment of the application, a memory obtains a data reading request for first data, wherein the data reading request comprises identification information of a category to which the first data belongs; and responding to the data reading request, and searching and feeding back second data associated with the identification information of the category to which the first data belongs, wherein the second data comprises the first data and data which is the same as the category to which the first data belongs. That is, the memory can feed back both the first data and the data of the same kind as the first data by one data read request. Compared with the prior art that each time the data reading memory can only feed back the data corresponding to the LBA sent by the memory, the data reading efficiency can be improved through the embodiment of the application.
In some possible implementations of the embodiments of the present application, the data reading apparatus 600 provided in the embodiments of the present application further includes:
the second acquisition module is used for acquiring a data storage request for the first data, wherein the data storage request comprises the first data and identification information of a category to which the first data belongs;
and the storage module is used for responding to the data storage request, storing the first data and establishing the association relation between the first data and the identification information of the type to which the first data belongs.
In some possible implementations of the embodiments of the present application, the storage module is specifically configured to:
the first data and the data of the same kind as the first data are stored in a centralized manner.
In the embodiment of the application, the first data and the data of the same type as the first data are stored in a centralized manner, so that disk fragments can be reduced, the times of cleaning the disk fragments are reduced, and the use efficiency and the use duration of the memory can be improved.
In some possible implementations of the embodiment of the present application, the second obtaining module is specifically configured to:
through the write command, the data storage request is obtained.
In some possible implementations of embodiments of the present application, the identification information of the kind to which the first data belongs is located in a reserved area that is not used in the write command.
The data reading apparatus 600 provided in this embodiment of the application can implement each process in the data reading method embodiment of fig. 4, and is not described here again to avoid repetition.
Optionally, as shown in fig. 7, an electronic device 700 is further provided in this embodiment of the present application, and includes a processor 701 and a memory 702, where the memory 702 stores a program or an instruction, and the program or the instruction is executed to implement each step of the data reading method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
In some possible implementations of embodiments of the present Application, the processor 701 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured to implement one or more Integrated circuits of embodiments of the present Application.
In some possible implementations of embodiments of the present application, the Memory 702 may include Read-Only Memory (ROM), Random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash Memory devices, electrical, optical, or other physical/tangible Memory storage devices. Thus, in general, the memory 702 comprises one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the data reading methods according to embodiments of the application.
Fig. 8 is a hardware configuration diagram of an electronic device implementing an embodiment of the present application.
The electronic device 800 includes, but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, an interface unit 808, a memory 809, and a processor 810.
Those skilled in the art will appreciate that the electronic device 800 may further comprise a power source (e.g., a battery) for supplying power to the various components, and the power source may be logically connected to the processor 810 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system. The electronic device structure shown in fig. 8 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
Wherein the processor 810 is configured to: sending a data read request for the first data to the memory 809, wherein the data read request includes identification information of a category to which the first data belongs;
the memory 809 is used for: receiving a data reading request sent by the processor 810, searching second data associated with identification information of a category to which the first data belongs, and sending the second data to the processor 810;
processor 810 is further configured to: the second data sent by the memory 809 is received.
In the embodiment of the application, the processor sends a data reading request for the first data to the memory, wherein the data reading request comprises identification information of a category to which the first data belongs; the memory receives a data reading request sent by the processor, searches for second data associated with the identification information of the type to which the first data belongs, and sends the second data to the processor; the processor receives the second data sent by the memory. That is, the processor can read not only the first data but also the same kind of data to which the first data belongs by sending a data read request to the memory. Compared with the prior art that only the data corresponding to the LBA sent by the memory can be read in each data reading process, the data reading efficiency can be improved through the embodiment of the application.
In some possible implementations of embodiments of the present application, the processor 810 is further configured to:
sending a data storage request for the first data to the memory 809, wherein the data storage request includes the first data and identification information of a category to which the first data belongs;
the memory 809 is also used for:
the memory stores the first data and establishes an association relationship between the first data and identification information of a category to which the first data belongs.
In some possible implementations of embodiments of the present application, the processor 810 is specifically configured to:
the data storage request is sent to the memory 809 through a write command.
In some possible implementations of embodiments of the present application, the identification information of the kind to which the first data belongs is located in a reserved area that is not used in the write command.
In some possible implementations of embodiments of the present application, the memory 809 is further used to:
the first data and the data of the same kind as the first data are stored in a centralized manner.
In the embodiment of the application, the first data and the data of the same type as the first data are stored in a centralized manner, so that disk fragments can be reduced, the times of cleaning the disk fragments are reduced, and the use efficiency and the use duration of the memory can be improved.
It should be understood that in the embodiment of the present application, the input Unit 804 may include a Graphics Processing Unit (GPU) 8041 and a microphone 8042, and the Graphics Processing Unit 8041 processes image data of a still picture or a video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 807 includes at least one of a touch panel 8071 and other input devices 8072. A touch panel 8071, also referred to as a touch screen. The touch panel 8071 may include two portions of a touch detection device and a touch controller. Other input devices 8072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
The memory 809 may be used to store software programs as well as various data. The memory 809 may mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area may store an operating system, application programs or instructions required for at least one function (such as a sound playing function, an image playing function, and the like), and the like. Further, the memory 809 can include volatile memory or nonvolatile memory, or the memory 809 can include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. The volatile Memory may be a Random Access Memory (RAM), a Static Random Access Memory (Static RAM, SRAM), a Dynamic Random Access Memory (Dynamic RAM, DRAM), a Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), a Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, ddr SDRAM), an Enhanced Synchronous SDRAM (ESDRAM), a Synchronous Link DRAM (SLDRAM), and a Direct Memory bus RAM (DRRAM). The memory 809 in the present embodiment of the application includes, but is not limited to, these and any other suitable types of memory.
Processor 810 may include one or more processing units; optionally, the processor 810 integrates an application processor, which primarily handles operations related to the operating system, user interface, and applications, and a modem processor, which primarily handles wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into processor 810.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed, the processes of the data reading method embodiment are implemented, and the same technical effect can be achieved, and in order to avoid repetition, details are not repeated here.
Specifically, the program or instructions stored on the readable storage medium implement the processes of the data reading method embodiment in the above-described embodiment shown in fig. 1 when executed by the processor; the programs or instructions stored on the readable storage medium implement the respective processes of the data reading method embodiment in the above-described embodiment shown in fig. 4 when executed by the readable storage medium.
The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, and examples of the computer readable storage medium include a non-transitory computer readable storage medium such as a flash memory, a ROM, a RAM, a magnetic or optical disk, and the like.
The embodiment of the present application further provides a chip, which includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or an instruction to implement each process of the data reading method embodiment in the embodiment shown in fig. 1, and can achieve the same technical effect, and details are not repeated here to avoid repetition.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
Embodiments of the present application provide a computer program product, where the program product is stored in a storage medium, and the program product is executed to implement the processes of the foregoing data reading method embodiments, and can achieve the same technical effects, and in order to avoid repetition, details are not described here again.
In particular, the program product, when executed by a processor, implements the processes of the data reading method embodiment described above in the embodiment shown in fig. 1; which when executed by a readable storage medium implements the various processes of the data reading method embodiment described above in the embodiment shown in fig. 4.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the present embodiments are not limited to those precise embodiments, which are intended to be illustrative rather than restrictive, and that various changes and modifications may be effected therein by one skilled in the art without departing from the scope of the appended claims.

Claims (10)

1. A method of reading data, the method comprising:
sending a data reading request for first data to a memory, wherein the data reading request comprises identification information of a category to which the first data belongs, so that the memory searches second data associated with the identification information, and the second data comprises the first data and data of the same category as the first data;
and receiving the second data sent by the memory.
2. The method of claim 1, wherein prior to sending the data read request for the first data to the memory, the method further comprises:
sending a data storage request for the first data to the memory, wherein the data storage request comprises the first data and the identification information, and is used for the memory to store the first data and establish an association relationship between the first data and the identification information.
3. The method of claim 2, wherein sending a data storage request for the first data to the memory comprises:
sending the data storage request to the memory through a data write command, wherein the identification information is located in an unused reserved area in the data write command.
4. A data reading method, applied to a memory, the method comprising:
acquiring a data reading request for first data, wherein the data reading request comprises identification information of a category to which the first data belongs;
and responding to the data reading request, searching and feeding back second data associated with the identification information, wherein the second data comprises the first data and data of the same category as the first data.
5. The method of claim 4, wherein prior to obtaining the data read request for the first data, the method further comprises:
acquiring a data storage request for the first data, wherein the data storage request comprises the first data and the identification information;
and responding to the data storage request, storing the first data and establishing an association relation between the first data and the identification information.
6. A data reading apparatus, characterized in that the apparatus comprises:
a first sending module, configured to send a data read request for first data to a memory, where the data read request includes identification information of a category to which the first data belongs, so that the memory searches for second data associated with the identification information, where the second data includes the first data and data of a same category as the first data;
and the receiving module is used for receiving the second data sent by the memory.
7. The apparatus of claim 6, further comprising:
a second sending module, configured to send a data storage request for the first data to the memory, where the data storage request includes the first data and the identification information, and is used for the memory to store the first data and establish an association relationship between the first data and the identification information.
8. The apparatus of claim 7, wherein the second sending module is specifically configured to:
sending the data storage request to the memory through a data write command, wherein the identification information is located in an unused reserved area in the data write command.
9. A data reading apparatus, applied to a memory, the apparatus comprising:
the device comprises a first acquisition module, a second acquisition module and a processing module, wherein the first acquisition module is used for acquiring a data reading request of first data, and the data reading request comprises identification information of a category to which the first data belongs;
and the feedback module is used for responding to the data reading request, and searching and feeding back second data associated with the identification information, wherein the second data comprises the first data and data of which the category is the same as that of the first data.
10. The apparatus of claim 9, further comprising:
a second obtaining module, configured to obtain a data storage request for the first data, where the data storage request includes the first data and the identification information;
and the storage module is used for responding to the data storage request, storing the first data and establishing the association relationship between the first data and the identification information.
CN202210109184.XA 2022-01-28 2022-01-28 Data reading method and device Pending CN114489510A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210109184.XA CN114489510A (en) 2022-01-28 2022-01-28 Data reading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210109184.XA CN114489510A (en) 2022-01-28 2022-01-28 Data reading method and device

Publications (1)

Publication Number Publication Date
CN114489510A true CN114489510A (en) 2022-05-13

Family

ID=81478309

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210109184.XA Pending CN114489510A (en) 2022-01-28 2022-01-28 Data reading method and device

Country Status (1)

Country Link
CN (1) CN114489510A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100188197A1 (en) * 2008-11-19 2010-07-29 Intermec Ip Corp. Finding sensor data in an rfid network
CN107798038A (en) * 2017-05-05 2018-03-13 平安科技(深圳)有限公司 Data response method and data response apparatus
CN109766318A (en) * 2018-12-17 2019-05-17 新华三大数据技术有限公司 File reading and device
CN111881135A (en) * 2020-07-28 2020-11-03 苏州浪潮智能科技有限公司 Data aggregation method, device, equipment and computer readable storage medium
CN112269789A (en) * 2020-11-16 2021-01-26 北京百度网讯科技有限公司 Method and device for storing data and method and device for reading data
CN113448510A (en) * 2020-03-25 2021-09-28 三星电子株式会社 Storage device and method thereof
CN113553306A (en) * 2021-07-27 2021-10-26 重庆紫光华山智安科技有限公司 Data processing method and data storage management system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100188197A1 (en) * 2008-11-19 2010-07-29 Intermec Ip Corp. Finding sensor data in an rfid network
CN107798038A (en) * 2017-05-05 2018-03-13 平安科技(深圳)有限公司 Data response method and data response apparatus
CN109766318A (en) * 2018-12-17 2019-05-17 新华三大数据技术有限公司 File reading and device
CN113448510A (en) * 2020-03-25 2021-09-28 三星电子株式会社 Storage device and method thereof
CN111881135A (en) * 2020-07-28 2020-11-03 苏州浪潮智能科技有限公司 Data aggregation method, device, equipment and computer readable storage medium
CN112269789A (en) * 2020-11-16 2021-01-26 北京百度网讯科技有限公司 Method and device for storing data and method and device for reading data
CN113553306A (en) * 2021-07-27 2021-10-26 重庆紫光华山智安科技有限公司 Data processing method and data storage management system

Similar Documents

Publication Publication Date Title
CN105786403A (en) Storage device including buffer and main memories, and user device including the same
CN108038112B (en) File processing method, mobile terminal and computer readable storage medium
CN103167134A (en) Infinite storage system and method of mobile phone
CN106575273A (en) Systems and methods for expanding memory for system on chip
CN108268216A (en) Data processing method, device and server
CN115470156A (en) RDMA-based memory use method, system, electronic device and storage medium
CN104424224A (en) File index storage method and device
CN104537049A (en) Picture browsing method and device
KR101996266B1 (en) Host and computer system having the same
WO2023226845A1 (en) Image data transmission method and apparatus, and electronic device
CN110321321B (en) Snapshot read-write method, device and equipment for network block equipment and storage medium
CN114489510A (en) Data reading method and device
CN109271543B (en) Thumbnail display method and device, terminal and computer-readable storage medium
CN115495020A (en) File processing method and device, electronic equipment and readable storage medium
CN114070892A (en) Data transmission method and device
CN111708715B (en) Memory allocation method, memory allocation device and terminal equipment
JP2019164712A (en) Storage device, information processing system and program
CN112395245B (en) Access device and method of processor and computer equipment
CN106487862A (en) Transfer interactive system and method based on fingerprint identification information
CN106599699B (en) Method and system for realizing safe deletion of data in mobile terminal
CN111428453A (en) Processing method, device and system in annotation synchronization process
CN111045962B (en) SD card data confidentiality method, system, equipment and computer medium
KR101175355B1 (en) Apparatus for Controlling Storage, Mobile Device Including the Same and Method for Controlling Storage
US11662947B2 (en) Memory system and data processing system performing operation on commands before fetching of commands
CN112395244B (en) Access device and method for processor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination