CN109800179A - It obtains the method for data, send method, host and the embedded memory of data - Google Patents

It obtains the method for data, send method, host and the embedded memory of data Download PDF

Info

Publication number
CN109800179A
CN109800179A CN201910095873.8A CN201910095873A CN109800179A CN 109800179 A CN109800179 A CN 109800179A CN 201910095873 A CN201910095873 A CN 201910095873A CN 109800179 A CN109800179 A CN 109800179A
Authority
CN
China
Prior art keywords
mapping table
address
host
data
target physical
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.)
Granted
Application number
CN201910095873.8A
Other languages
Chinese (zh)
Other versions
CN109800179B (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.)
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 CN201910095873.8A priority Critical patent/CN109800179B/en
Publication of CN109800179A publication Critical patent/CN109800179A/en
Application granted granted Critical
Publication of CN109800179B publication Critical patent/CN109800179B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses obtaining the method for data, sending method, host and the embedded memory of data, to solve the problems, such as the low efficiency of host acquisition data in the prior art.Method provided by the present application includes: the address mapping table for obtaining and storing in embedded memory, and address mapping table includes the mapping relations of destination logical address and target physical address;According to address mapping table, target physical address corresponding with destination logical address is determined;Obtain the data of target physical address.Through the above scheme, the electronic equipments such as host directly can inquire target physical address by the address mapping table got, and then the data of target physical address are obtained, embedded memory load address mapping table is avoided and inquire target physical address corresponding with destination logical address.Scheme provided by the present application rapidly can determine target physical address according to destination logical address, and then improve the bulk velocity for obtaining the data of target physical address, realize the promotion for obtaining data efficiency.

Description

It obtains the method for data, send method, host and the embedded memory of data
Technical field
The present invention relates to the communications field, more particularly to obtain the method for data, the method for sending data, host and embedded Memory.
Background technique
In the prior art, when host Host needs to obtain the data of logical address, often destination logical address is sent To embedded memory (Embedded Multi Media Card, eMMC).It include destination logical address by eMMC load Partial address mapping table (Mapping Table) is then searched in the address mapping table of load corresponding with destination logical address Target physical address, and then obtain target physical address data.Finally, the data that will acquire are sent to Host, make Host gets required data.
In above process, since the random access memory of eMMC (Random Access Memory, RAM) capacity is past It is past smaller, sufficient address mapping table can not be loaded.And in actual application, Host generally require to obtain it is multiple logically The data of location.When not including new destination logical address in the address mapping table of the RAM load in eMMC, then need to add again Load includes the address mapping table of new destination logical address.During this makes the data of acquisition logical address, in eMMC RAM generally require to repeat load address mapping table, this makes the low efficiency for obtaining data, and causes eMMC memory source unrestrained Take.
The efficiency for obtaining data how is improved, is technical problems to be solved in this application.
Summary of the invention
The purpose of the embodiment of the present application is to provide the method for data that obtains, sends the methods of data, host and embedded deposit Reservoir, to solve the problems, such as the low efficiency of host acquisition data in the prior art.
In a first aspect, providing a kind of method for obtaining data, it is applied to host, comprising:
The address mapping table stored in embedded memory is obtained, the address mapping table includes destination logical address and mesh Mark the mapping relations of physical address;
According to the address mapping table, the target physical address corresponding with the destination logical address is determined;
Obtain the data of the target physical address.
Second aspect provides a kind of method for sending data, is applied to embedded memory, comprising:
The mapping table acquisition instruction that receiving host is sent;
According to the mapping table acquisition instruction, Xiang Suoshu host sends address mapping table, and the address mapping table includes mesh Mark the mapping relations of logical address and target physical address;
According to the target physical address corresponding with the destination logical address that the host is fed back, the mesh is determined Mark the data of physical address;
The data of the target physical address are sent to the host.
The third aspect provides a kind of host, comprising:
Mapping table obtains module, for obtaining the address mapping table stored in embedded memory, the address mapping table Mapping relations including destination logical address and target physical address;
Determining module, for determining the target corresponding with the destination logical address according to the address mapping table Physical address;
Data acquisition module, for obtaining the data of the target physical address.
Fourth aspect provides a kind of embedded memory, comprising:
First receiving module, the mapping table acquisition instruction sent for receiving host;
Mapping table sending module, for according to the mapping table acquisition instruction, Xiang Suoshu host to send address mapping table, institute State the mapping relations that address mapping table includes destination logical address and target physical address;
First determining module, the object corresponding with the destination logical address for being fed back according to the host Address is managed, determines the data of the target physical address;
Data transmission blocks, for sending the data of the target physical address to the host.
5th aspect, provides a kind of mobile terminal, which includes processor, memory and be stored in the storage On device and the computer program that can run on the processor, such as first party is realized when which is executed by the processor The step of method of face and/or second aspect.
6th aspect, provides a kind of computer readable storage medium, stores and calculates on the computer readable storage medium Machine program, when which is executed by processor the step of the realization such as method of first aspect and/or second aspect.
In the embodiment of the present application, the address mapping table that stores in embedded memory is obtained, and according to address mapping table, It determines target physical address corresponding with destination logical address, and then obtains the data of target physical address.Through the above scheme, The electronic equipments such as host directly can inquire target physical address by the address mapping table got, and then with obtaining target physical The data of location, with avoiding embedded memory load address mapping table and inquiry target physical corresponding with destination logical address Location.Scheme provided by the present application rapidly can determine target physical address according to destination logical address, and then improve and obtain target The speed of the data of physical address realizes the promotion for obtaining data efficiency.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes a part of the invention, this hair Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is a kind of one of the flow diagram of method of acquisition data of the invention;
Fig. 2 is the two of the flow diagram of the method for a kind of acquisition data of the invention;
Fig. 3 is the three of the flow diagram of the method for a kind of acquisition data of the invention;
Fig. 4 is the four of the flow diagram of the method for a kind of acquisition data of the invention;
Fig. 5 is the five of the flow diagram of the method for a kind of acquisition data of the invention;
Fig. 6 is a kind of one of the flow diagram of method of transmission data of the invention;
Fig. 7 is the two of the flow diagram of the method for a kind of transmission data of the invention;
Fig. 8 is the three of the flow diagram of the method for a kind of transmission data of the invention;
Fig. 9 is a kind of structural schematic diagram of host of the application;
Figure 10 is a kind of structural schematic diagram of embedded memory of the application;
A kind of hardware structural diagram of Figure 11 mobile terminal of each embodiment to realize the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.Accompanying drawing number is only used for each step in differentiation scheme in the application, is not used in limit Fixed each step executes sequence, and specific execution sequence is subject in specification and is described.
Embodiment one
In order to solve the above-mentioned problems in the prior art, the application provides a kind of method for obtaining data, is applied to Host Host is particularly suitable for the host Host connecting with embedded memory eMMC, as shown in Figure 1, comprising the following steps:
S11: the address mapping table stored in embedded memory eMMC is obtained, the address mapping table includes target logic The mapping relations of address and target physical address.
EMMC in this programme can be understood as a kind of Embedded multimedia storage card, wherein may include being encapsulated in one The flash storage and control chip risen.Host in this programme can be connected directly with eMMC, can also be by other means Data-transformation facility is realized in connection.
Optionally, the method based on a kind of acquisition data described in above scheme, as shown in Fig. 2, above-mentioned steps S11, The following steps are included:
S111: Xiang Suoshu embedded memory sends mapping table acquisition instruction.
Specifically, the mapping table acquisition instruction that Host is sent to eMMC can be CMD60+arg:11111111 order, use To indicate that eMMC address mapping table Mapping Tables relevant to internal data feed back to Host.
S112: the address mapping table that the embedded memory is directed to mapping table acquisition instruction feedback is received.
Host saves the Mapping Table, after the Mapping Table for receiving eMMC feedback so as to subsequent Search target physical address corresponding with destination logical address.
In addition, Host can according to actual needs, the memory of pre- first to file certain capacity before this step, so as to After receiving Mapping Table, the Mapping Table is stored at once.
Scheme provided by the present application sends mapping table acquisition instruction from Host to eMMC, directly acquires address mapping table Mapping Table improves the efficiency for obtaining mapping table.
After Host gets address mapping table, following steps are executed:
S12: according to the address mapping table, the target physical address corresponding with the destination logical address is determined.
Above-mentioned logical address (LogicalAddress) can refer to offset address relevant to the section part generated by program, Logical address is alternatively referred to as virtual address in some circumstances.Above-mentioned physical address (Physical Address) is it can be pointed out that existing The address signal of addressable physical memory on CPU outer address bus is the final result address of address mapping.And this programme Record has the corresponding relationship of above-mentioned logical address and physical address in the address mapping table that middle Host is got.When Host needs obtain When taking the data of destination logical address, needs first to determine target physical address corresponding with destination logical address, then pass through again Target physical address reads required data.
Preferably, the method based on a kind of acquisition data described in above scheme, as shown in figure 3, above-mentioned steps S12, The following steps are included:
S121: carrying out reliability verification to the address mapping table, check code and default school when the address mapping table When testing code matching, the reliability verification passes through, when the check code of the address mapping table and the default check code mismatch When, the reliability verification does not pass through.
Specifically, Host is obtained and can be calculated a hash value, the hash value, that is, above-mentioned when saving Mapping Table The check code of address mapping table, the hash value can be used for verifying the reliability of address mapping table.Specifically, when Host is calculated Hash value it is consistent with the hash value of eMMC storage inside when, store in the Mapping Table and eMMC that Host is obtained Mapping Table is consistent.Wherein, the i.e. above-mentioned default check code of the Mapping Table stored in eMMC.Once inside eMMC Data variation can then generate new hash value, if eMMC internal data is moved, for example, logical address 0x0000000a is not Corresponding physical address 0x1000000A again, but corresponding physical address 0x1000000B.At this point, physical address and logical address There is variation in mapping relations, but the Mapping Table saved in Host is not updated, reliable in progress this programme Property verifying when, it may appear that the case where Hash check errors, i.e. the hash value stored in the calculated hash value of Host and eMMC is not Matching.In Hash check errors, first address mapping table can be updated, carry out Hash verification again, it is logical until verifying It crosses.Hash value is verified by the above method, can determine whether Mapping Table changes.
Preferably, in Hash check errors, eMMC can first determine which is partially become in Mapping Table Change, changed part Mapping Table is only sent to Host, carries out Host to the Mapping Table of preservation It updates, so that Host searches currently target physical address corresponding with destination logical address.
S122: the reliability verification pass through in the case where, search in the address mapping table with the target logic The corresponding target physical address in address.
Above scheme provided by the present application avoids the process for inquiring target physical address according to destination logical address in Host In, the physical address of mistake is inquired according to the Mapping Table not updated.It through the above scheme, can be in inquiry object Manage address before verify Mapping Table in address mapping relation reliability, and then guarantee inquire and target logic The reliability of the corresponding target physical address in address.
Preferably, after the Mapping Table in eMMC changes, eMMC can be sent out according to update status to Host Notice is sent, so that Mapping Table of the Host to preservation is updated.Specifically, can directly will more new content by eMMC It is sent to Host, Mapping Table is updated according to the more new content received by Host.Can also from eMMC to Host send update notification, from Host to eMMC send update acquisition instruction, to obtain in eMMC it is updated at least partly Mapping Table。
In addition, verifying unsanctioned feelings in the reliability after carrying out reliability verification to the address mapping table Under condition, Host can also send the instruction of the second data acquisition, the second data acquisition instruction packet to the embedded memory Include the destination logical address.Corresponding target physical address is inquired according to destination logical address by eMMC, and according to inquiry The target physical address arrived reads data, then by the data feedback of reading to Host.The embedded memory is received by Host For the data of the target physical address of the second data acquisition instruction feedback.To unsanctioned in reliability demonstration In the case of, get the corresponding data of destination logical address.
Preferably, in the case where reliability verifies unsanctioned situation, Host can will verify unsanctioned logical address and object Reason address is sent to eMMC, notifies the eMMC logical address and physical address unreliable.EMMC is corresponding in the inquiry logical address Physical address, and after obtaining the data of the physical address, the data that can will acquire and currently with target logic The corresponding target physical address in location feeds back to Host, so that the Host mapping for updating destination logical address and target physical address is closed System.
S13: the data of the target physical address are obtained.
After getting target physical address corresponding with destination logical address, target physical address can be directly read Data, the data are data corresponding with destination logical address.
In the embodiment of the present application, the address mapping table that stores in embedded memory is obtained, and according to address mapping table, It determines target physical address corresponding with destination logical address, and then obtains the data of target physical address.Through the above scheme, The electronic equipments such as host directly can inquire target physical address by the address mapping table got, and then with obtaining target physical The data of location, with avoiding embedded memory load address mapping table and inquiry target physical corresponding with destination logical address Location.Scheme provided by the present application rapidly can determine target physical address according to destination logical address, and then improve and obtain target The speed of the data of physical address realizes the promotion for obtaining data efficiency.
Preferably, the method based on any acquisition data described in above scheme, as shown in figure 4, above-mentioned steps S13, comprising the following steps:
S131: Xiang Suoshu embedded memory sends the instruction of the first data acquisition, and the first data acquisition instruction includes The target physical address.
In the case where Host is connect by eMMC with flash memory NAND, the first data acquisition can be sent from Host to eMMC It instructs, includes target physical address in the instruction, can serve to indicate that eMMC reads the data of the target physical address.In eMMC It, can be by the data feedback to Host after reading the data of target physical address.
S132: the embedded memory is received for the target physical of the first data acquisition instruction feedback The data of location.
The data for the eMMC feedback that Host is received are the target physicals in the first data acquisition instruction sent with Host The corresponding data in address, the target physical address are corresponding with destination logical address.Therefore, through the above scheme, Host can be obtained Obtain data corresponding with destination logical address.
Optionally, the method based on any acquisition data described in above scheme, as shown in figure 5, in above-mentioned steps After S11, the method also includes following steps:
S14: it in the case where receiving mapping table update notification, sends mapping table and updates request.
When eMMC internal data updates, after the corresponding relationship of physical address and logical address changes, eMMC meeting Host is notified according to practical update status.After Host receives mapping table update notification, mapping table can be sent from Host to eMMC Update request, which updates request and is specifically as follows CMD60+arg:11111110 order, instruction eMMC only generation more New part Mapping Table feeds back to Host, so that Host updates the Mapping Table saved.
S15: it according to the mapping table more new information for updating request for the mapping table received, updates the address and reflects Firing table.
When in the mapping table received more new information include part Mapping Table when, update Host in save with The corresponding part Mapping Table of mapping table more new information.When in the mapping table received more new information include it is updated When complete Mapping Table, the Mapping Table saved in Host is replaced in mapping table more new information Mapping Table。
Above scheme provided by the present application, can be after Mapping Table updates in eMMC, in time to saving in Host Mapping Table is accordingly updated.Guarantee the Mapping in the Mapping Table stored in Host and eMMC Table is consistent.And then guarantee the reliability of the Mapping Table stored in Host, it is ensured that Host can be patrolled according to target Address search is collected to correct target physical address, and then reads required data.
Embodiment two
In order to solve the above-mentioned problems in the prior art, as shown in fig. 6, the application also provides and a kind of to send data Method is applied to embedded memory eMMC, comprising the following steps:
S21: the receiving host Host mapping table acquisition instruction sent.
Specifically, the mapping table acquisition instruction that Host is sent to eMMC can be CMD60+arg:11111111 order.
S22: according to the mapping table acquisition instruction, Xiang Suoshu host sends address mapping table, the address mapping table packet Include the mapping relations of destination logical address and target physical address.
After receiving above-mentioned mapping table acquisition instruction, eMMC address mapping table relevant to internal data Mapping Table feeds back to Host.
S23: the target physical address corresponding with the destination logical address fed back according to the host determines institute State the data of target physical address.
Specifically, in the case where Host is connect by eMMC with flash memory NAND, it can be by Host according to storage Mapping Table inquires target physical address corresponding with destination logical address, and the target physical address inquired is sent out Give eMMC.After eMMC receives target physical address, the data of target physical address can be read.
S24: Xiang Suoshu host sends the data of the target physical address.
It, can be by the data feedback to Host after eMMC reads the data of target physical address.
Through the above scheme, the electronic equipments such as host can directly pass through the address mapping table got with inquiring target physical Location, and then the data of target physical address are obtained, the target physical address that embedded memory can be sent according to host reads phase Data are answered, and the data read are sent to host, host is made to obtain the data of destination logical address.Side provided by the present application Case can improve the speed for obtaining the data of target physical address, realize the promotion for obtaining data efficiency.
Based on a kind of method of transmission data described in above scheme, as shown in Figure 7 before above-mentioned steps S24, also The following steps are included:
S25: the first data acquisition instruction that the host is sent is received, the first data acquisition instruction includes the mesh Mark physical address.
In the case where Host is connect by eMMC with flash memory NAND, the first data acquisition can be sent from Host to eMMC It instructs, includes target physical address in the instruction.After eMMC receives first data acquisition instruction, target physical can be read The data of location, and by the data feedback to Host.
S26: it is instructed according to first data acquisition, determines the data of the target physical address.
The data that eMMC is fed back to Host are the target physical address pair in the first data acquisition instruction sent with Host The data answered, the target physical address are corresponding with destination logical address.Therefore, through the above scheme, Host can be obtained and mesh Mark the corresponding data of logical address.
Based on a kind of method of transmission data described in above scheme, as shown in figure 8, after above-mentioned steps S22, also The following steps are included:
S27: in the case where the address mapping table updates, Xiang Suoshu host sends mapping table update notification.
When eMMC internal data updates, after the corresponding relationship of physical address and logical address changes, eMMC can To send mapping table update notification to Host according to practical update status.After Host receives mapping table update notification, Ke Yiyou Host sends mapping table to eMMC and updates request, which updates request and be specifically as follows CMD60+arg:11111110 life It enables.
S28: the feelings of request are updated in the mapping table for the mapping table update notification for receiving the host feedback Under condition, mapping table more new information is sent to the host according to the updated address mapping table, the mapping table updates letter Breath is for making the host update the address mapping table.
Specifically, mapping table more new information can be generated according to updated address mapping table.In mapping table more new information It can only include the partial address mapping table updated in address mapping table, also may include the sufficient address in Europe after updating Mapping table, so that Host is updated according to Mapping Table of the mapping table more new information to preservation.
Above scheme provided by the present application, can be after Mapping Table updates in eMMC, in time to saving in Host Mapping Table is accordingly updated.Guarantee the Mapping in the Mapping Table stored in Host and eMMC Table is consistent.And then guarantee the reliability of the Mapping Table stored in Host, it is ensured that Host can be patrolled according to target Address search is collected to correct target physical address, and then reads required data.
Embodiment three
In order to solve the above-mentioned problems in the prior art, as shown in figure 9, the application also provides a kind of host Host, The host 90 includes:
Mapping table obtains module 91, for obtaining the address mapping table stored in embedded memory eMMC, the address Mapping table includes the mapping relations of destination logical address and target physical address;
Determining module 92, for determining the mesh corresponding with the destination logical address according to the address mapping table Mark physical address;
Data acquisition module 93, for obtaining the data of the target physical address.
Based on host described in above scheme, the mapping table obtains module 91, is used for:
Mapping table acquisition instruction is sent to the embedded memory;
Receive the address mapping table that the embedded memory is directed to mapping table acquisition instruction feedback.
Based on host described in above scheme, the determining module 92 is used for:
Reliability verification is carried out to the address mapping table, when the check code and default check code of the address mapping table Timing, the reliability verification passes through, described when the check code of the address mapping table and default check code mismatch Reliability verification does not pass through;
The reliability verification pass through in the case where, search in the address mapping table with the destination logical address pair The target physical address answered.
Based on host described in above scheme, the data acquisition module 93 is used for:
The instruction of the first data acquisition is sent to the embedded memory, the first data acquisition instruction includes the mesh Mark physical address;
The embedded memory is received for the target physical address of the first data acquisition instruction feedback Data.
Based on host described in above scheme, the host further includes update module 94, is used for;
In the case where receiving mapping table update notification, sends mapping table and update request;
According to the mapping table more new information for updating request for the mapping table received, the address of cache is updated Table.
In the embodiment of the present application, the address mapping table that stores in embedded memory is obtained, and according to address mapping table, It determines target physical address corresponding with destination logical address, and then obtains the data of target physical address.Through the above scheme, The electronic equipments such as host directly can inquire target physical address by the address mapping table got, and then with obtaining target physical The data of location, with avoiding embedded memory load address mapping table and inquiry target physical corresponding with destination logical address Location.Scheme provided by the present application rapidly can determine target physical address according to destination logical address, and then improve and obtain target The speed of the data of physical address realizes the promotion for obtaining data efficiency.
Example IV
In order to solve the above-mentioned problems in the prior art, as shown in Figure 10, the application provides a kind of embedded storage Device eMMC, the embedded memory 100 include:
First receiving module 101, the mapping table acquisition instruction sent for receiving host Host;
Mapping table sending module 102, for according to the mapping table acquisition instruction, Xiang Suoshu host to send address of cache Table, the address mapping table include the mapping relations of destination logical address and target physical address;
First determining module 103, the mesh corresponding with the destination logical address for being fed back according to the host Physical address is marked, determines the data of the target physical address;
Data transmission blocks 104, for sending the data of the target physical address to the host.
Based on embedded memory described in above scheme, further includes:
Second receiving module 105, the first data acquisition instruction sent for receiving the host, first data obtain Instruction fetch includes the target physical address;
Second determining module 106 determines the number of the target physical address for instructing according to first data acquisition According to.
Based on embedded memory described in above scheme, further includes update module 107, is used for:
In the case where the address mapping table updates, Xiang Suoshu host sends mapping table update notification;
In the case where the mapping table for the mapping table update notification for receiving the host feedback updates request, Mapping table more new information is sent to the host according to the updated address mapping table, the mapping table more new information is used for The host is set to update the address mapping table.
Through the above scheme, the electronic equipments such as host can directly pass through the address mapping table got with inquiring target physical Location, and then the data of target physical address are obtained, the target physical address that embedded memory can be sent according to host reads phase Data are answered, and the data read are sent to host, host is made to obtain the data of destination logical address.Side provided by the present application Case can improve the speed for obtaining the data of target physical address, realize the promotion for obtaining data efficiency.
Embodiment five
A kind of hardware structural diagram of Figure 11 mobile terminal of each embodiment to realize the present invention, the mobile terminal 1100 include but is not limited to: radio frequency unit 1101, network module 1102, audio output unit 1103, input unit 1104, sensing Device 1105, display unit 1106, user input unit 1107, interface unit 1108, memory 1109, processor 1110 and The components such as power supply 1111.It will be understood by those skilled in the art that mobile terminal structure shown in Figure 11 is not constituted to movement The restriction of terminal, mobile terminal may include perhaps combining certain components or different than illustrating more or fewer components Component layout.In embodiments of the present invention, mobile terminal includes but is not limited to mobile phone, tablet computer, laptop, palm electricity Brain, car-mounted terminal, wearable device and pedometer etc..
Wherein, may include in processor 1110 above-described embodiment three provide host and above-described embodiment four provide it is interior One of embedded memory.At least one side described in above-described embodiment one and embodiment two may be implemented in processor 1110 Method.
Optionally, processor 1110, for obtaining the address mapping table stored in embedded memory eMMC, the address Mapping table includes the mapping relations of destination logical address and target physical address;According to the address mapping table, it is determining with it is described The corresponding target physical address of destination logical address;Obtain the data of the target physical address.
In the embodiment of the present application, the address mapping table that stores in embedded memory is obtained, and according to address mapping table, It determines target physical address corresponding with destination logical address, and then obtains the data of target physical address.Through the above scheme, The electronic equipments such as host directly can inquire target physical address by the address mapping table got, and then with obtaining target physical The data of location, with avoiding embedded memory load address mapping table and inquiry target physical corresponding with destination logical address Location.Scheme provided by the present application rapidly can determine target physical address according to destination logical address, and then improve and obtain target The speed of the data of physical address realizes the promotion for obtaining data efficiency.
Optionally, processor 1110, the mapping table acquisition instruction sent for receiving host Host;According to the mapping table Acquisition instruction, Xiang Suoshu host send address mapping table, and the address mapping table includes destination logical address and target physical The mapping relations of location;According to the target physical address corresponding with the destination logical address that the host is fed back, determine The data of the target physical address;The data of the target physical address are sent to the host.
Through the above scheme, the electronic equipments such as host can directly pass through the address mapping table got with inquiring target physical Location, and then the data of target physical address are obtained, the target physical address that embedded memory can be sent according to host reads phase Data are answered, and the data read are sent to host, host is made to obtain the data of destination logical address.Side provided by the present application Case can improve the speed for obtaining the data of target physical address, realize the promotion for obtaining data efficiency.
It should be understood that the embodiment of the present invention in, radio frequency unit 1101 can be used for receiving and sending messages or communication process in, signal Send and receive, specifically, by from base station downlink data receive after, to processor 1110 handle;In addition, by uplink Data are sent to base station.In general, radio frequency unit 1101 includes but is not limited to antenna, at least one amplifier, transceiver, coupling Device, low-noise amplifier, duplexer etc..In addition, radio frequency unit 1101 can also by wireless communication system and network and other Equipment communication.
Mobile terminal provides wireless broadband internet by network module 1102 for user and accesses, and such as user is helped to receive It sends e-mails, browse webpage and access streaming video etc..
Audio output unit 1103 can be received by radio frequency unit 1101 or network module 1102 or in memory The audio data stored in 1109 is converted into audio signal and exports to be sound.Moreover, audio output unit 1103 can be with Audio output relevant to the specific function that mobile terminal 1100 executes is provided (for example, call signal receives sound, message sink Sound etc.).Audio output unit 1103 includes loudspeaker, buzzer and receiver etc..
Input unit 1104 is for receiving audio or video signal.Input unit 1104 may include graphics processor (Graphics Processing Unit, GPU) 11041 and microphone 11042, graphics processor 11041 are captured in video In mode or image capture mode by image capture apparatus (such as camera) obtain static images or video image data into Row processing.Treated, and picture frame may be displayed on display unit 1106.Through treated the picture frame of graphics processor 11041 It can store in memory 1109 (or other storage mediums) or carried out via radio frequency unit 1101 or network module 1102 It sends.Microphone 11042 can receive sound, and can be audio data by such acoustic processing.Audio that treated Data can be converted to the lattice that mobile communication base station can be sent to via radio frequency unit 1101 in the case where telephone calling model Formula output.
Mobile terminal 1100 further includes at least one sensor 1105, for example, optical sensor, motion sensor and other Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ring The light and shade of border light adjusts the brightness of display panel 11061, proximity sensor can when mobile terminal 1100 is moved in one's ear, Close display panel 11061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions The size of (generally three axis) acceleration, can detect that size and the direction of gravity, can be used to identify mobile terminal appearance when static State (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) Deng;Sensor 1105 can also include fingerprint sensor, pressure sensor, iris sensor, molecule sensor, gyroscope, gas Meter, hygrometer, thermometer, infrared sensor etc. are pressed, details are not described herein.
Display unit 1106 is for showing information input by user or being supplied to the information of user.Display unit 1106 can Including display panel 11061, liquid crystal display (Liquid Crystal Display, LCD), organic light-emitting diodes can be used Forms such as (Organic Light-Emitting Diode, OLED) are managed to configure display panel 11061.
User input unit 1107 can be used for receiving the number or character information of input, and generate the use with mobile terminal Family setting and the related key signals input of function control.Specifically, user input unit 1107 include touch panel 11071 with And other input equipments 11072.Touch panel 11071, also referred to as touch screen collect the touch behaviour of user on it or nearby Make (for example user uses any suitable objects or attachment such as finger, stylus on touch panel 11071 or in touch panel Operation near 11071).Touch panel 11071 may include both touch detecting apparatus and touch controller.Wherein, it touches The touch orientation of detection device detection user is touched, and detects touch operation bring signal, transmits a signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives processor 1110, It receives the order that processor 1110 is sent and is executed.Furthermore, it is possible to using resistance-type, condenser type, infrared ray and surface The multiple types such as sound wave realize touch panel 11071.In addition to touch panel 11071, user input unit 1107 can also include Other input equipments 11072.Specifically, other input equipments 11072 can include but is not limited to physical keyboard, function key (ratio Such as volume control button, switch key), trace ball, mouse, operating stick, details are not described herein.
Further, touch panel 11071 can be covered on display panel 11061, when touch panel 11071 detects After touch operation on or near it, processor 1110 is sent to determine the type of touch event, is followed by subsequent processing device 1110 Corresponding visual output is provided on display panel 11061 according to the type of touch event.Although in Figure 11, touch panel 11071 and display panel 11061 are the functions that outputs and inputs of realizing mobile terminal as two independent components, but In some embodiments, touch panel 11071 can be integrated with display panel 11061 and realize outputting and inputting for mobile terminal Function, specifically herein without limitation.
Interface unit 1108 is the interface that external device (ED) is connect with mobile terminal 1100.For example, external device (ED) may include Wired or wireless headphone port, external power supply (or battery charger) port, wired or wireless data port, storage card Port, port, the port audio input/output (I/O), video i/o port, earphone for connecting the device with identification module Port etc..Interface unit 1108 can be used for receiving the input (for example, data information, electric power etc.) from external device (ED) simultaneously And by one or more elements that the input received is transferred in mobile terminal 1100 or it can be used in mobile terminal Data are transmitted between 1100 and external device (ED).
Memory 1109 can be used for storing software program and various data.Memory 1109 can mainly include storage program Area and storage data area, wherein storing program area can application program needed for storage program area, at least one function (such as Sound-playing function, image player function etc.) etc.;Storage data area, which can be stored, uses created data (ratio according to mobile phone Such as audio data, phone directory) etc..In addition, memory 1109 may include high-speed random access memory, it can also include non- Volatile memory, for example, at least a disk memory, flush memory device or other volatile solid-state parts.
Processor 1110 is the control centre of mobile terminal, utilizes each of various interfaces and the entire mobile terminal of connection A part by running or execute the software program and/or module that are stored in memory 1109, and calls and is stored in storage Data in device 1109 execute the various functions and processing data of mobile terminal, to carry out integral monitoring to mobile terminal.Place Managing device 1110 may include one or more processing units;Preferably, processor 1110 can integrate application processor and modulation /demodulation Processor, wherein the main processing operation system of application processor, user interface and application program etc., modem processor master Handle wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 1110.
Mobile terminal 1100 can also include the power supply 1111 (such as battery) powered to all parts, it is preferred that power supply 1111 can be logically contiguous by power-supply management system and processor 1110, to realize that management is filled by power-supply management system The functions such as electricity, electric discharge and power managed.
In addition, mobile terminal 1100 includes some unshowned functional modules, details are not described herein.
Preferably, the embodiment of the present invention also provides a kind of mobile terminal, including processor 1110, memory 1109, storage On memory 1109 and the computer program that can run on the processor 1110, the computer program is by processor 1110 A kind of above-mentioned method for obtaining data and/or a kind of each process for the embodiment of the method for sending data, and energy are realized when execution Reach identical technical effect, to avoid repeating, which is not described herein again.
The embodiment of the present invention also provides a kind of computer readable storage medium, and meter is stored on computer readable storage medium Calculation machine program, the computer program realize a kind of above-mentioned method for obtaining data and/or a kind of transmission number when being executed by processor According to embodiment of the method each process, and identical technical effect can be reached, to avoid repeating, which is not described herein again.Wherein, The computer readable storage medium, such as read-only memory (Read-Only Memory, abbreviation ROM), random access memory Device (Random Access Memory, abbreviation RAM), magnetic or disk etc..
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form belongs within protection of the invention.

Claims (16)

1. a kind of method for obtaining data, which is characterized in that be applied to host, comprising:
The address mapping table stored in embedded memory is obtained, the address mapping table includes destination logical address and object Manage the mapping relations of address;
According to the address mapping table, the target physical address corresponding with the destination logical address is determined;
Obtain the data of the target physical address.
2. the method as described in claim 1, which is characterized in that the address mapping table obtained in embedded memory, packet It includes:
Mapping table acquisition instruction is sent to the embedded memory;
Receive the address mapping table that the embedded memory is directed to mapping table acquisition instruction feedback.
3. the method as described in claim 1, which is characterized in that described according to the address mapping table, the determining and target The corresponding target physical address of logical address, comprising:
Reliability verification is carried out to the address mapping table, when the check code of the address mapping table is matched with default check code When, reliability verification passes through, when the check code of the address mapping table and the default check code mismatch, it is described can Do not pass through by property verification;
In the case where reliability verification passes through, search corresponding with the destination logical address in the address mapping table Target physical address.
4. method as claimed in any one of claims 1 to 3, which is characterized in that the number for obtaining the target physical address According to, comprising:
The instruction of the first data acquisition is sent to the embedded memory, the first data acquisition instruction includes the object Manage address;
The embedded memory is received for the data of the target physical address of the first data acquisition instruction feedback.
5. method as claimed in any one of claims 1 to 3, which is characterized in that the ground stored in obtaining embedded memory After the mapping table of location, the method also includes:
In the case where receiving mapping table update notification, sends mapping table and update request;
According to the mapping table more new information for updating request for the mapping table received, the address mapping table is updated.
6. a kind of method for sending data, which is characterized in that be applied to embedded memory, comprising:
The mapping table acquisition instruction that receiving host is sent;
According to the mapping table acquisition instruction, Xiang Suoshu host sends address mapping table, and the address mapping table includes that target is patrolled Collect the mapping relations of address and target physical address;
According to the target physical address corresponding with the destination logical address that the host is fed back, the object is determined Manage the data of address;
The data of the target physical address are sent to the host.
7. method as claimed in claim 6, which is characterized in that send the target physical address to the host described Before data, further includes:
The first data acquisition instruction that the host is sent is received, the first data acquisition instruction is including the target physical Location;
It is instructed according to first data acquisition, determines the data of the target physical address.
8. method according to claim 6 or 7, which is characterized in that after sending address mapping table to host, further includes:
In the case where the address mapping table updates, Xiang Suoshu host sends mapping table update notification;
In the case where the mapping table for the mapping table update notification for receiving the host feedback updates request, according to The updated address mapping table sends mapping table more new information to the host, and the mapping table more new information is for making institute It states host and updates the address mapping table.
9. a kind of host characterized by comprising
Mapping table obtains module, and for obtaining the address mapping table stored in embedded memory, the address mapping table includes The mapping relations of destination logical address and target physical address;
Determining module, for determining the target physical corresponding with the destination logical address according to the address mapping table Address;
Data acquisition module, for obtaining the data of the target physical address.
10. host as claimed in claim 9, which is characterized in that the mapping table obtains module, is used for:
Mapping table acquisition instruction is sent to the embedded memory;
Receive the address mapping table that the embedded memory is directed to mapping table acquisition instruction feedback.
11. host as claimed in claim 9, which is characterized in that the determining module is used for:
Reliability verification is carried out to the address mapping table, when the check code of the address mapping table is matched with default check code When, reliability verification passes through, when the check code of the address mapping table and the default check code mismatch, it is described can Do not pass through by property verification;
In the case where reliability verification passes through, search corresponding with the destination logical address in the address mapping table Target physical address.
12. such as the described in any item hosts of claim 9~11, which is characterized in that the data acquisition module is used for:
The instruction of the first data acquisition is sent to the embedded memory, the first data acquisition instruction includes the object Manage address;
The embedded memory is received for the data of the target physical address of the first data acquisition instruction feedback.
13. such as the described in any item hosts of claim 9~11, which is characterized in that the host further includes update module, is used In;
In the case where receiving mapping table update notification, sends mapping table and update request;
According to the mapping table more new information for updating request for the mapping table received, the address mapping table is updated.
14. a kind of embedded memory characterized by comprising
First receiving module, the mapping table acquisition instruction sent for receiving host;
Mapping table sending module, for according to the mapping table acquisition instruction, Xiang Suoshu host to send address mapping table, describedly Location mapping table includes the mapping relations of destination logical address and target physical address;
First determining module, the target physical corresponding with the destination logical address for being fed back according to the host Location determines the data of the target physical address;
Data transmission blocks, for sending the data of the target physical address to the host.
15. embedded memory as claimed in claim 14, which is characterized in that further include:
Second receiving module, the first data acquisition instruction sent for receiving the host, the first data acquisition instruction Including the target physical address;
Second determining module determines the data of the target physical address for instructing according to first data acquisition.
16. the embedded memory as described in claims 14 or 15, which is characterized in that further include update module, be used for:
In the case where the address mapping table updates, Xiang Suoshu host sends mapping table update notification;Receiving State host feedback for the mapping table update notification mapping table update request in the case where, according to it is updated describedly Location mapping table sends mapping table more new information to the host, and the mapping table more new information is for making described in the host update Address mapping table.
CN201910095873.8A 2019-01-31 2019-01-31 Method for acquiring data, method for sending data, host and embedded memory Active CN109800179B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910095873.8A CN109800179B (en) 2019-01-31 2019-01-31 Method for acquiring data, method for sending data, host and embedded memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910095873.8A CN109800179B (en) 2019-01-31 2019-01-31 Method for acquiring data, method for sending data, host and embedded memory

Publications (2)

Publication Number Publication Date
CN109800179A true CN109800179A (en) 2019-05-24
CN109800179B CN109800179B (en) 2021-06-22

Family

ID=66560531

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910095873.8A Active CN109800179B (en) 2019-01-31 2019-01-31 Method for acquiring data, method for sending data, host and embedded memory

Country Status (1)

Country Link
CN (1) CN109800179B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143111A (en) * 2019-12-27 2020-05-12 深圳忆联信息系统有限公司 SSD mapping table protection mechanism verification method and device, computer equipment and storage medium
CN111651424A (en) * 2020-06-10 2020-09-11 中国科学院深圳先进技术研究院 Data processing method and device, data node and storage medium
CN112241394A (en) * 2020-10-15 2021-01-19 浪潮商用机器有限公司 Index node IO statistical method, tool, equipment and storage medium
CN112559564A (en) * 2020-11-19 2021-03-26 山东云海国创云计算装备产业创新中心有限公司 Access method, device and medium for application layer state information
CN112968981A (en) * 2021-03-18 2021-06-15 四川虹美智能科技有限公司 Indoor unit address change processing method and device in multi-split system
CN113050877A (en) * 2019-12-27 2021-06-29 北京兆易创新科技股份有限公司 Mapping table storage method and device, electronic equipment and storage medium
CN114371814A (en) * 2021-12-08 2022-04-19 浙江大华存储科技有限公司 Data processing method and device and solid state disk
CN115118481A (en) * 2022-06-22 2022-09-27 深圳星云智联科技有限公司 Host information acquisition method, device, equipment and medium
CN117971722A (en) * 2024-03-28 2024-05-03 北京微核芯科技有限公司 Execution method and device for fetch instruction

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102063377A (en) * 2009-11-16 2011-05-18 联发科技股份有限公司 Method of managing data access of a storage medium and storage controller
CN103064795A (en) * 2012-12-31 2013-04-24 华为技术有限公司 Control method of memory device and relevant device
US8527544B1 (en) * 2011-08-11 2013-09-03 Pure Storage Inc. Garbage collection in a storage system
CN103530062A (en) * 2012-07-03 2014-01-22 群联电子股份有限公司 Data storage method, memorizer controller and memorizer storage device
CN107305530A (en) * 2016-04-21 2017-10-31 爱思开海力士有限公司 Data storage device and its operating method
CN108073470A (en) * 2016-11-07 2018-05-25 三星电子株式会社 Perform the storage system and its control method of the error correction of address mapping table
CN109074307A (en) * 2016-04-14 2018-12-21 美光科技公司 With the memory device for directly reading access
CN109358809A (en) * 2018-09-28 2019-02-19 方信息科技(上海)有限公司 A kind of RAID data storage system and method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102063377A (en) * 2009-11-16 2011-05-18 联发科技股份有限公司 Method of managing data access of a storage medium and storage controller
US8527544B1 (en) * 2011-08-11 2013-09-03 Pure Storage Inc. Garbage collection in a storage system
CN103530062A (en) * 2012-07-03 2014-01-22 群联电子股份有限公司 Data storage method, memorizer controller and memorizer storage device
CN103064795A (en) * 2012-12-31 2013-04-24 华为技术有限公司 Control method of memory device and relevant device
CN109074307A (en) * 2016-04-14 2018-12-21 美光科技公司 With the memory device for directly reading access
CN107305530A (en) * 2016-04-21 2017-10-31 爱思开海力士有限公司 Data storage device and its operating method
CN108073470A (en) * 2016-11-07 2018-05-25 三星电子株式会社 Perform the storage system and its control method of the error correction of address mapping table
CN109358809A (en) * 2018-09-28 2019-02-19 方信息科技(上海)有限公司 A kind of RAID data storage system and method

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143111A (en) * 2019-12-27 2020-05-12 深圳忆联信息系统有限公司 SSD mapping table protection mechanism verification method and device, computer equipment and storage medium
CN113050877B (en) * 2019-12-27 2024-03-01 兆易创新科技集团股份有限公司 Mapping table storage method and device, electronic equipment and storage medium
CN113050877A (en) * 2019-12-27 2021-06-29 北京兆易创新科技股份有限公司 Mapping table storage method and device, electronic equipment and storage medium
CN111143111B (en) * 2019-12-27 2023-06-06 深圳忆联信息系统有限公司 SSD mapping table protection mechanism verification method, SSD mapping table protection mechanism verification device, computer equipment and storage medium
CN111651424A (en) * 2020-06-10 2020-09-11 中国科学院深圳先进技术研究院 Data processing method and device, data node and storage medium
CN111651424B (en) * 2020-06-10 2024-05-03 中国科学院深圳先进技术研究院 Data processing method, device, data node and storage medium
CN112241394A (en) * 2020-10-15 2021-01-19 浪潮商用机器有限公司 Index node IO statistical method, tool, equipment and storage medium
CN112241394B (en) * 2020-10-15 2022-08-02 浪潮商用机器有限公司 Index node IO statistical method, tool, equipment and storage medium
CN112559564B (en) * 2020-11-19 2022-08-12 山东云海国创云计算装备产业创新中心有限公司 Access method, device and medium for application layer state information
CN112559564A (en) * 2020-11-19 2021-03-26 山东云海国创云计算装备产业创新中心有限公司 Access method, device and medium for application layer state information
CN112968981A (en) * 2021-03-18 2021-06-15 四川虹美智能科技有限公司 Indoor unit address change processing method and device in multi-split system
CN114371814A (en) * 2021-12-08 2022-04-19 浙江大华存储科技有限公司 Data processing method and device and solid state disk
CN114371814B (en) * 2021-12-08 2024-05-10 浙江华忆芯科技有限公司 Data processing method and device and solid state disk
CN115118481A (en) * 2022-06-22 2022-09-27 深圳星云智联科技有限公司 Host information acquisition method, device, equipment and medium
CN115118481B (en) * 2022-06-22 2023-11-21 深圳星云智联科技有限公司 Host information acquisition method, device, equipment and medium
CN117971722A (en) * 2024-03-28 2024-05-03 北京微核芯科技有限公司 Execution method and device for fetch instruction

Also Published As

Publication number Publication date
CN109800179B (en) 2021-06-22

Similar Documents

Publication Publication Date Title
CN109800179A (en) It obtains the method for data, send method, host and the embedded memory of data
CN108347759A (en) A kind of anti-interference method and mobile terminal of flexible screen
CN110034876A (en) PUCCH resource instruction, processing method, network side equipment, user terminal
CN108628565A (en) A kind of mobile terminal operating method and mobile terminal
CN109885257A (en) A kind of disk file reading/writing method and device
CN109032486A (en) A kind of display control method and terminal device
CN110035149A (en) A kind of multiple antennas optimization method and mobile terminal
CN110149663A (en) Condition handover cancelling method and communication equipment
CN110417960A (en) A kind of method for folding and electronic equipment of foldable touch screen
CN108900695A (en) A kind of display processing method and terminal device
CN107450795A (en) Status bar icon loading method, terminal and computer-readable recording medium
CN108320148A (en) A kind of resource transfers method and relevant device
CN110035181A (en) It is a kind of to apply card theme setting method and terminal fastly
CN108898555A (en) A kind of image processing method and terminal device
CN108304516A (en) A kind of Web content pre-add support method and mobile terminal
CN109743449A (en) A kind of virtual key display methods and terminal
CN109857354A (en) A kind of interface display method and terminal device
CN109933196A (en) A kind of screen control method, device and terminal device
CN109745699A (en) A kind of method and terminal device responding touch control operation
CN110162234A (en) A kind of application control method and terminal device
CN109032699A (en) A kind of method and terminal for modifying application environment variable
CN109284146A (en) A kind of light application open method and mobile terminal
CN109443261A (en) The acquisition methods and mobile terminal of Folding screen mobile terminal folding angles
CN109144723A (en) A kind of method and terminal for distributing memory space
CN108366106A (en) Update method, management method, amending method and the relevant device of the communication information

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
GR01 Patent grant
GR01 Patent grant