CN109800179B - Method for acquiring data, method for sending data, host and embedded memory - Google Patents

Method for acquiring data, method for sending data, host and embedded memory Download PDF

Info

Publication number
CN109800179B
CN109800179B CN201910095873.8A CN201910095873A CN109800179B CN 109800179 B CN109800179 B CN 109800179B CN 201910095873 A CN201910095873 A CN 201910095873A CN 109800179 B CN109800179 B CN 109800179B
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.)
Active
Application number
CN201910095873.8A
Other languages
Chinese (zh)
Other versions
CN109800179A (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

Images

Abstract

The invention discloses a method for acquiring data, a method for sending data, a host and an embedded memory, which are used for solving the problem of low efficiency of acquiring data by the host in the prior art. The method provided by the application comprises the following steps: acquiring an address mapping table stored in the embedded memory, wherein the address mapping table comprises a mapping relation between a target logical address and a target physical address; determining a target physical address corresponding to the target logical address according to the address mapping table; data of the target physical address is acquired. By the scheme, the electronic equipment such as the host and the like can directly inquire the target physical address through the acquired address mapping table so as to acquire the data of the target physical address, and the embedded memory is prevented from loading the address mapping table and inquiring the target physical address corresponding to the target logical address. The scheme provided by the application can rapidly determine the target physical address according to the target logical address, so that the overall speed of acquiring the data of the target physical address is improved, and the data acquisition efficiency is improved.

Description

Method for acquiring data, method for sending data, host and embedded memory
Technical Field
The present invention relates to the field of communications, and in particular, to a method for acquiring data, a method for sending data, a host, and an embedded memory.
Background
In the prior art, when the Host needs to obtain data of a logical address, the Host often sends the target logical address to an Embedded memory (eMMC). The eMMC loads a partial address Mapping Table (Mapping Table) containing a target logical address, and then searches a target physical address corresponding to the target logical address in the loaded address Mapping Table, so as to obtain data of the target physical address. And finally, sending the acquired data to the Host to enable the Host to acquire the required data.
In the above process, since the Random Access Memory (RAM) of the eMMC is often small in capacity, a complete address mapping table cannot be loaded. In the practical application process, Host usually needs to acquire data of a plurality of logical addresses. When the address mapping table loaded by the RAM in the eMMC does not contain a new target logical address, the address mapping table containing the new target logical address needs to be reloaded. In the process of acquiring data of a logical address, the RAM in the eMMC often needs to repeatedly load an address mapping table, so that the efficiency of acquiring the data is low, and memory resources of the eMMC are wasted.
How to improve the efficiency of acquiring data is the technical problem that the application needs to solve.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method for acquiring data, a method for sending data, a host and an embedded memory, so as to solve the problem in the prior art that the efficiency of acquiring data by the host is low.
In a first aspect, a method for obtaining data is provided, and is applied to a host, and includes:
acquiring an address mapping table stored in an embedded memory, wherein the address mapping table comprises a mapping relation between a target logical address and a target physical address;
determining the target physical address corresponding to the target logical address according to the address mapping table;
and acquiring the data of the target physical address.
In a second aspect, a method for sending data is provided, which is applied to an embedded memory, and includes:
receiving a mapping table acquisition instruction sent by a host;
acquiring an instruction according to the mapping table, and sending an address mapping table to the host, wherein the address mapping table comprises a mapping relation between a target logical address and a target physical address;
determining data of the target physical address according to the target physical address corresponding to the target logical address fed back by the host;
and sending the data of the target physical address to the host.
In a third aspect, a host is provided, including:
the mapping table acquisition module is used for acquiring an address mapping table stored in the embedded memory, and the address mapping table comprises a mapping relation between a target logical address and a target physical address;
a determining module, configured to determine, according to the address mapping table, the target physical address corresponding to the target logical address;
and the data acquisition module is used for acquiring the data of the target physical address.
In a fourth aspect, an embedded memory is provided, comprising:
the first receiving module is used for receiving a mapping table acquisition instruction sent by the host;
a mapping table sending module, configured to send an address mapping table to the host according to the mapping table obtaining instruction, where the address mapping table includes a mapping relationship between a target logical address and a target physical address;
a first determining module, configured to determine, according to the target physical address corresponding to the target logical address and fed back by the host, data of the target physical address;
and the data sending module is used for sending the data of the target physical address to the host.
In a fifth aspect, a mobile terminal is provided, the mobile terminal comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the method according to the first and/or second aspect.
A sixth aspect provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of the first and/or second aspect.
In the embodiment of the application, an address mapping table stored in the embedded memory is obtained, a target physical address corresponding to a target logical address is determined according to the address mapping table, and data of the target physical address is further obtained. By the scheme, the electronic equipment such as the host and the like can directly inquire the target physical address through the acquired address mapping table so as to acquire the data of the target physical address, and the embedded memory is prevented from loading the address mapping table and inquiring the target physical address corresponding to the target logical address. The scheme provided by the application can rapidly determine the target physical address according to the target logical address, so that the speed of acquiring the data of the target physical address is improved, and the data acquisition efficiency is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is one of the flow diagrams of a method of acquiring data of the present invention;
FIG. 2 is a second flowchart of a method for acquiring data according to the present invention;
FIG. 3 is a third schematic flow chart of a method of acquiring data according to the present invention;
FIG. 4 is a fourth flowchart of a method of acquiring data according to the present invention;
FIG. 5 is a fifth flowchart illustrating a method of acquiring data according to the present invention;
FIG. 6 is a flow chart illustrating one embodiment of a method of transmitting data;
FIG. 7 is a second flowchart of a method for transmitting data according to the present invention;
FIG. 8 is a third flowchart of a method of transmitting data according to the present invention;
FIG. 9 is a schematic diagram of a host of the present application;
FIG. 10 is a diagram illustrating an embedded memory according to the present application;
fig. 11 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. The reference numbers in the present application are only used for distinguishing the steps in the scheme and are not used for limiting the execution sequence of the steps, and the specific execution sequence is described in the specification.
Example one
In order to solve the above problems in the prior art, the present application provides a method for obtaining data, which is applied to a Host, and is particularly applicable to a Host connected to an embedded memory eMMC, as shown in fig. 1, and includes the following steps:
s11: and acquiring an address mapping table stored in the embedded memory eMMC, wherein the address mapping table comprises a mapping relation between a target logical address and a target physical address.
The eMMC in this scheme may be understood as an embedded multimedia memory card, which may include a Flash memory and a control chip packaged together. The Host in the scheme can be directly connected with the eMMC and can also be connected in other modes to realize a data transmission function.
Optionally, based on the method for acquiring data in the foregoing solution, as shown in fig. 2, the step S11 includes the following steps:
s111: and sending a mapping table acquisition instruction to the embedded memory.
Specifically, the mapping table obtaining instruction sent by the Host to the eMMC may be CMD60+ arg: 11111111 command, which instructs the eMMC to feed back the address Mapping Table associated with the internal data to the Host.
S112: and receiving the address mapping table fed back by the embedded memory aiming at the mapping table acquisition instruction.
After receiving the Mapping Table fed back by the eMMC, the Host stores the Mapping Table so as to search a target physical address corresponding to the target logical address.
In addition, before the step, the Host may apply for a certain amount of memory in advance according to actual requirements, so as to immediately store the Mapping Table after receiving the Mapping Table.
According to the scheme provided by the application, the Host sends the Mapping Table acquisition instruction to the eMMC, the Mapping Table of the address Mapping Table is directly acquired, and the efficiency of acquiring the Mapping Table is improved.
After the Host acquires the address mapping table, the following steps are executed:
s12: and determining the target physical address corresponding to the target logical address according to the address mapping table.
The logical address (LogicalAddress) may refer to an offset address portion associated with a segment generated by a program, and in some cases may also be referred to as a virtual address. The Physical Address (Physical Address) indicates that the Address signal that is present on the CPU external Address bus and that addresses the Physical memory is the final Address of the Address translation. In the scheme, the address mapping table obtained by the Host records the corresponding relationship between the logical address and the physical address. When the Host needs to acquire the data of the target logical address, the target physical address corresponding to the target logical address needs to be determined first, and then the required data is read through the target physical address.
Preferably, based on the method for acquiring data in the above scheme, as shown in fig. 3, the step S12 includes the following steps:
s121: and carrying out reliability check on the address mapping table, wherein when the check code of the address mapping table is matched with a preset check code, the reliability check is passed, and when the check code of the address mapping table is not matched with the preset check code, the reliability check is not passed.
Specifically, a Hash value is calculated when the Host acquires and stores the Mapping Table, the Hash value is a check code of the address Mapping Table, and the Hash value can be used for checking the reliability of the address Mapping Table. Specifically, when the Hash value calculated by the Host is consistent with the Hash value stored in the eMMC, the Mapping Table acquired by the Host is consistent with the Mapping Table stored in the eMMC. Wherein, the Mapping Table stored in the eMMC is the preset check code. Once the eMMC internal data changes, a new Hash value is generated, if the eMMC internal data is shifted, e.g., logical address 0x0000000a no longer corresponds to physical address 0x1000000A, but rather to physical address 0x 1000000B. At this time, the Mapping relationship between the physical address and the logical address changes, but the Mapping Table stored in the Host is not updated, and when the reliability verification in the scheme is performed, a Hash check error occurs, that is, the Hash value calculated by the Host is not matched with the Hash value stored in the eMMC. When the Hash check is wrong, the address mapping table can be updated first, and the Hash check is performed again until the check is passed. By checking the Hash value through the method, whether the Mapping Table changes or not can be determined.
Preferably, when the Hash is used for checking errors, the eMMC may determine which part of the Mapping Table has changed first, and send only the changed part of the Mapping Table to the Host, so that the Host updates the stored Mapping Table, and the Host searches for a current target physical address corresponding to the target logical address.
S122: and under the condition that the reliability check is passed, searching a target physical address corresponding to the target logical address in the address mapping table.
According to the scheme provided by the application, the situation that in the process that the Host queries the target physical address according to the target logical address, the wrong physical address is queried according to the Mapping Table which is not updated is avoided. By the scheme, the reliability of the address Mapping relation in the Mapping Table can be verified before the target physical address is queried, and the reliability of the queried target physical address corresponding to the target logical address is further ensured.
Preferably, after the Mapping Table in the eMMC changes, the eMMC may send a notification to the Host according to the update condition, so that the Host updates the stored Mapping Table. Specifically, the eMMC may directly send the update content to the Host, and the Host updates the Mapping Table according to the received update content. Or the eMMC may send an update notification to the Host, and the Host sends an update obtaining instruction to the eMMC to obtain at least part of the updated Mapping Table in the eMMC.
In addition, after the reliability check is performed on the address mapping table, in the case that the reliability check fails, the Host may further send a second data obtaining instruction to the embedded memory, where the second data obtaining instruction includes the target logical address. And the eMMC queries a corresponding target physical address according to the target logical address, reads data according to the queried target physical address and feeds back the read data to the Host. And receiving data of the target physical address fed back by the embedded memory for the second data acquisition instruction by the Host. Therefore, under the condition that the reliability verification fails, the data corresponding to the target logical address is acquired.
Preferably, in the case that the reliability check fails, the Host may send the logical address and the physical address that failed in the check to the eMMC, and notify the eMMC that the logical address and the physical address are unreliable. After the eMMC queries the physical address corresponding to the logical address and acquires the data of the physical address, the eMMC may feed back the acquired data and the current target physical address corresponding to the target logical address to the Host, so that the Host updates the mapping relationship between the target logical address and the target physical address.
S13: and acquiring the data of the target physical address.
After the target physical address corresponding to the target logical address is acquired, the data of the target physical address, that is, the data corresponding to the target logical address, may be directly read.
In the embodiment of the application, an address mapping table stored in the embedded memory is obtained, a target physical address corresponding to a target logical address is determined according to the address mapping table, and data of the target physical address is further obtained. By the scheme, the electronic equipment such as the host and the like can directly inquire the target physical address through the acquired address mapping table so as to acquire the data of the target physical address, and the embedded memory is prevented from loading the address mapping table and inquiring the target physical address corresponding to the target logical address. The scheme provided by the application can rapidly determine the target physical address according to the target logical address, so that the speed of acquiring the data of the target physical address is improved, and the data acquisition efficiency is improved.
Preferably, the step S13, based on any one of the above methods for acquiring data, as shown in fig. 4, includes the following steps:
s131: and sending a first data acquisition instruction to the embedded memory, wherein the first data acquisition instruction comprises the target physical address.
In a case where the Host is connected to the flash memory NAND through the eMMC, the Host may send a first data obtaining instruction to the eMMC, where the instruction includes a target physical address, and may be used to instruct the eMMC to read data of the target physical address. After the eMMC reads the data for the target physical address, the data may be fed back to the Host.
S132: and receiving data of the target physical address fed back by the embedded memory for the first data acquisition instruction.
The data fed back by the eMMC received by the Host is data corresponding to a target physical address in a first data acquisition instruction sent by the Host, and the target physical address corresponds to a target logical address. Therefore, by the above scheme, the Host can obtain the data corresponding to the target logical address.
Optionally, based on any one of the methods for acquiring data in the foregoing schemes, as shown in fig. 5, after the step S11, the method further includes the following steps:
s14: in the case of receiving the mapping table update notification, a mapping table update request is sent.
When the data in the eMMC is updated, and the corresponding relation between the physical address and the logical address is changed, the eMMC can inform the Host according to the actual updating condition. After the Host receives the mapping table update notification, the Host may send a mapping table update request to the eMMC, where the mapping table update request may specifically be CMD60+ arg: 11111110 command, instructing the eMMC to feed back only the updated partial Mapping Table to the Host, so that the Host updates the saved Mapping Table.
S15: and updating the address mapping table according to the received mapping table updating information aiming at the mapping table updating request.
And when the received Mapping Table updating information comprises the partial Mapping Table, updating the partial Mapping Table which is stored in the Host and corresponds to the Mapping Table updating information. And when the received Mapping Table updating information comprises the updated complete Mapping Table, replacing the Mapping Table stored in the Host with the Mapping Table in the Mapping Table updating information.
According to the scheme, the Mapping Table stored in the Host can be updated correspondingly in time after the Mapping Table in the eMMC is updated. And ensuring that the Mapping Table stored in the Host is consistent with the Mapping Table in the eMMC. And therefore, the reliability of Mapping tables stored in the Host is guaranteed, the Host can be ensured to search the correct target physical address according to the target logical address, and the required data can be read.
Example two
In order to solve the above problems in the prior art, as shown in fig. 6, the present application further provides a method for sending data, which is applied to an embedded memory eMMC, and includes the following steps:
s21: and receiving a mapping table acquisition instruction sent by the Host.
Specifically, the mapping table obtaining instruction sent by the Host to the eMMC may be CMD60+ arg: 11111111 command.
S22: and acquiring an instruction according to the mapping table, and sending an address mapping table to the host, wherein the address mapping table comprises a mapping relation between a target logical address and a target physical address.
After receiving the Mapping Table acquiring instruction, the eMMC feeds back the Mapping Table related to the internal data to the Host.
S23: and determining the data of the target physical address according to the target physical address corresponding to the target logical address fed back by the host.
Specifically, when the Host is connected to the flash memory NAND through the eMMC, the Host may query a target physical address corresponding to the target logical address according to the stored Mapping Table, and send the queried target physical address to the eMMC. The eMMC may read data of the target physical address after receiving the target physical address.
S24: and sending the data of the target physical address to the host.
After the eMMC reads the data for the target physical address, the data may be fed back to the Host.
According to the scheme, the electronic equipment such as the host and the like can directly inquire the target physical address through the obtained address mapping table so as to obtain the data of the target physical address, the embedded memory can read corresponding data according to the target physical address sent by the host and send the read data to the host, so that the host obtains the data of the target logical address. The scheme provided by the application can improve the speed of acquiring the data of the target physical address and realize the improvement of the data acquisition efficiency.
Based on the method for sending data in the above scheme, as shown in fig. 7, before the step S24, the method further includes the following steps:
s25: and receiving a first data acquisition instruction sent by the host, wherein the first data acquisition instruction comprises the target physical address.
In a case where the Host is connected to the flash memory NAND through the eMMC, the Host may send a first data fetch instruction to the eMMC, where the instruction includes a target physical address. After receiving the first data obtaining instruction, the eMMC may read data of the target physical address and feed back the data to the Host.
S26: and determining the data of the target physical address according to the first data acquisition instruction.
The data fed back to the Host by the eMMC is data corresponding to a target physical address in a first data acquisition instruction sent by the Host, and the target physical address corresponds to a target logical address. Therefore, by the above scheme, the Host can obtain the data corresponding to the target logical address.
Based on the method for sending data in the above scheme, as shown in fig. 8, after the step S22, the method further includes the following steps:
s27: and sending a mapping table update notification to the host when the address mapping table is updated.
When the data in the eMMC is updated and the corresponding relationship between the physical address and the logical address changes, the eMMC may send a mapping table update notification to the Host according to the actual update condition. After the Host receives the mapping table update notification, the Host may send a mapping table update request to the eMMC, where the mapping table update request may specifically be CMD60+ arg: 11111110 command.
S28: and sending mapping table updating information to the host according to the updated address mapping table under the condition of receiving a mapping table updating request which is fed back by the host and aims at the mapping table updating notice, wherein the mapping table updating information is used for enabling the host to update the address mapping table.
Specifically, the mapping table update information may be generated according to the updated address mapping table. The Mapping Table updating information may only include a part of the address Mapping Table in which the update occurs, or may also include an updated europe complete address Mapping Table, so that the Host updates the stored Mapping Table according to the Mapping Table updating information.
According to the scheme, the Mapping Table stored in the Host can be updated correspondingly in time after the Mapping Table in the eMMC is updated. And ensuring that the Mapping Table stored in the Host is consistent with the Mapping Table in the eMMC. And therefore, the reliability of Mapping tables stored in the Host is guaranteed, the Host can be ensured to search the correct target physical address according to the target logical address, and the required data can be read.
EXAMPLE III
In order to solve the above problems in the prior art, as shown in fig. 9, the present application further provides a Host 90, which includes:
a mapping table obtaining module 91, configured to obtain an address mapping table stored in the embedded memory eMMC, where the address mapping table includes a mapping relationship between a target logical address and a target physical address;
a determining module 92, configured to determine, according to the address mapping table, the target physical address corresponding to the target logical address;
and a data obtaining module 93, configured to obtain data of the target physical address.
Based on the host in the above solution, the mapping table obtaining module 91 is configured to:
sending a mapping table acquisition instruction to the embedded memory;
and receiving the address mapping table fed back by the embedded memory aiming at the mapping table acquisition instruction.
Based on the host described in the above solution, the determining module 92 is configured to:
performing reliability check on the address mapping table, wherein when a check code of the address mapping table is matched with a preset check code, the reliability check is passed, and when the check code of the address mapping table is not matched with the preset check code, the reliability check is not passed;
and under the condition that the reliability check is passed, searching a target physical address corresponding to the target logical address in the address mapping table.
Based on the host in the above solution, the data obtaining module 93 is configured to:
sending a first data acquisition instruction to the embedded memory, wherein the first data acquisition instruction comprises the target physical address;
and receiving data of the target physical address fed back by the embedded memory for the first data acquisition instruction.
Based on the host described in the above solution, the host further includes an update module 94;
sending a mapping table updating request under the condition of receiving a mapping table updating notification;
and updating the address mapping table according to the received mapping table updating information aiming at the mapping table updating request.
In the embodiment of the application, an address mapping table stored in the embedded memory is obtained, a target physical address corresponding to a target logical address is determined according to the address mapping table, and data of the target physical address is further obtained. By the scheme, the electronic equipment such as the host and the like can directly inquire the target physical address through the acquired address mapping table so as to acquire the data of the target physical address, and the embedded memory is prevented from loading the address mapping table and inquiring the target physical address corresponding to the target logical address. The scheme provided by the application can rapidly determine the target physical address according to the target logical address, so that the speed of acquiring the data of the target physical address is improved, and the data acquisition efficiency is improved.
Example four
In order to solve the above problems in the prior art, as shown in fig. 10, the present application provides an embedded memory eMMC, where the embedded memory 100 includes:
the first receiving module 101 is configured to receive a mapping table obtaining instruction sent by a Host;
a mapping table sending module 102, configured to send an address mapping table to the host according to the mapping table obtaining instruction, where the address mapping table includes a mapping relationship between a target logical address and a target physical address;
a first determining module 103, configured to determine, according to the target physical address corresponding to the target logical address fed back by the host, data of the target physical address;
a data sending module 104, configured to send the data of the target physical address to the host.
Based on the embedded memory in the above scheme, the embedded memory further includes:
a second receiving module 105, configured to receive a first data obtaining instruction sent by the host, where the first data obtaining instruction includes the target physical address;
a second determining module 106, configured to determine, according to the first data obtaining instruction, data of the target physical address.
Based on the embedded memory in the above scheme, the embedded memory further includes an update module 107, configured to:
sending a mapping table update notification to the host when the address mapping table is updated;
and sending mapping table updating information to the host according to the updated address mapping table under the condition of receiving a mapping table updating request which is fed back by the host and aims at the mapping table updating notice, wherein the mapping table updating information is used for enabling the host to update the address mapping table.
According to the scheme, the electronic equipment such as the host and the like can directly inquire the target physical address through the obtained address mapping table so as to obtain the data of the target physical address, the embedded memory can read corresponding data according to the target physical address sent by the host and send the read data to the host, so that the host obtains the data of the target logical address. The scheme provided by the application can improve the speed of acquiring the data of the target physical address and realize the improvement of the data acquisition efficiency.
EXAMPLE five
Fig. 11 is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, where the mobile terminal 1100 includes, but is not limited to: radio frequency unit 1101, network module 1102, audio output unit 1103, input unit 1104, sensor 1105, display unit 1106, user input unit 1107, interface unit 1108, memory 1109, processor 1110, and power supply 1111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 11 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 1110 may include one of the host provided in the third embodiment and the embedded memory provided in the fourth embodiment. Processor 1110 may implement at least one of the methods described in embodiments one and two above.
Optionally, the processor 1110 is configured to obtain an address mapping table stored in the embedded memory eMMC, where the address mapping table includes a mapping relationship between a target logical address and a target physical address; determining the target physical address corresponding to the target logical address according to the address mapping table; and acquiring the data of the target physical address.
In the embodiment of the application, an address mapping table stored in the embedded memory is obtained, a target physical address corresponding to a target logical address is determined according to the address mapping table, and data of the target physical address is further obtained. By the scheme, the electronic equipment such as the host and the like can directly inquire the target physical address through the acquired address mapping table so as to acquire the data of the target physical address, and the embedded memory is prevented from loading the address mapping table and inquiring the target physical address corresponding to the target logical address. The scheme provided by the application can rapidly determine the target physical address according to the target logical address, so that the speed of acquiring the data of the target physical address is improved, and the data acquisition efficiency is improved.
Optionally, the processor 1110 is configured to receive a mapping table obtaining instruction sent by the Host; acquiring an instruction according to the mapping table, and sending an address mapping table to the host, wherein the address mapping table comprises a mapping relation between a target logical address and a target physical address; determining data of the target physical address according to the target physical address corresponding to the target logical address fed back by the host; and sending the data of the target physical address to the host.
According to the scheme, the electronic equipment such as the host and the like can directly inquire the target physical address through the obtained address mapping table so as to obtain the data of the target physical address, the embedded memory can read corresponding data according to the target physical address sent by the host and send the read data to the host, so that the host obtains the data of the target logical address. The scheme provided by the application can improve the speed of acquiring the data of the target physical address and realize the improvement of the data acquisition efficiency.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 1101 may be configured to receive and transmit signals during a message transmission or a call, and specifically, receive downlink data from a base station and then process the received downlink data to the processor 1110; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 1101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 1101 may also communicate with a network and other devices through a wireless communication system.
The mobile terminal provides the user with wireless broadband internet access through the network module 1102, such as helping the user send and receive e-mails, browse web pages, and access streaming media.
The audio output unit 1103 may convert audio data received by the radio frequency unit 1101 or the network module 1102 or stored in the memory 1109 into an audio signal and output as sound. Also, the audio output unit 1103 may also provide audio output related to a specific function performed by the mobile terminal 1100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 1103 includes a speaker, a buzzer, a receiver, and the like.
The input unit 1104 is used to receive audio or video signals. The input Unit 1104 may include a Graphics Processing Unit (GPU) 11041 and a microphone 11042, and the Graphics processor 11041 processes image data of still pictures or video obtained by an image capturing device, such as a camera, in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 1106. The image frames processed by the graphic processor 11041 may be stored in the memory 1109 (or other storage medium) or transmitted via the radio frequency unit 1101 or the network module 1102. The microphone 11042 may receive sound and can process such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 1101 in case of the phone call mode.
The mobile terminal 1100 also includes at least one sensor 1105, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 11061 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 11061 and/or a backlight when the mobile terminal 1100 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 1105 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., and will not be described in detail herein.
The display unit 1106 is used to display information input by a user or information provided to the user. The Display unit 1106 may include a Display panel 11061, and the Display panel 11061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 1107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 1107 includes a touch panel 11071 and other input devices 11072. The touch panel 11071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 11071 (e.g., operations by a user on or near the touch panel 11071 using a finger, a stylus, or any other suitable object or attachment). The touch panel 11071 may include two portions of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 1110, and receives and executes commands sent from the processor 1110. In addition, the touch panel 11071 may be implemented by various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The user input unit 1107 may include other input devices 11072 in addition to the touch panel 11071. In particular, the other input devices 11072 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.
Further, the touch panel 11071 can be overlaid on the display panel 11061, and when the touch panel 11071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 1110 to determine the type of the touch event, and then the processor 1110 provides a corresponding visual output on the display panel 11061 according to the type of the touch event. Although the touch panel 11071 and the display panel 11061 are shown in fig. 11 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 11071 and the display panel 11061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 1108 is an interface through which an external device is connected to the mobile terminal 1100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. Interface unit 1108 may be used to receive input from external devices (e.g., data information, power, etc.) and transmit the received input to one or more elements within mobile terminal 1100 or may be used to transmit data between mobile terminal 1100 and external devices.
The memory 1109 may be used to store software programs as well as various data. The memory 1109 may mainly include a storage program area and a storage data area, where the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory 1109 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 1110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 1109 and calling data stored in the memory 1109, thereby integrally monitoring the mobile terminal. Processor 1110 may include one or more processing units; preferably, the processor 1110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 1110.
The mobile terminal 1100 may also include a power supply 1111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 1111 may be logically connected to the processor 1110 via a power management system such that functions of managing charging, discharging, and power consumption are performed via the power management system.
In addition, the mobile terminal 1100 includes some functional modules that are not shown, and thus will not be described in detail herein.
Preferably, an embodiment of the present invention further provides a mobile terminal, including a processor 1110, a memory 1109, and a computer program stored in the memory 1109 and capable of running on the processor 1110, where the computer program, when executed by the processor 1110, implements each process of the above-mentioned method for acquiring data and/or the above-mentioned method for sending data embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned method for acquiring data and/or the above-mentioned method for sending data, and can achieve the same technical effect, and in order to avoid repetition, the details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
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.
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 invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (12)

1. A method for acquiring data, applied to a host, includes:
acquiring an address mapping table stored in an embedded memory, wherein the address mapping table comprises a mapping relation between a target logical address and a target physical address;
determining the target physical address corresponding to the target logical address according to the address mapping table;
acquiring data of the target physical address;
wherein the acquiring the data of the target physical address includes:
sending a first data acquisition instruction to the embedded memory, wherein the first data acquisition instruction comprises the target physical address;
and receiving data of the target physical address fed back by the embedded memory for the first data acquisition instruction.
2. The method of claim 1, wherein obtaining the address mapping table in embedded memory comprises:
sending a mapping table acquisition instruction to the embedded memory;
and receiving the address mapping table fed back by the embedded memory aiming at the mapping table acquisition instruction.
3. The method of claim 1, wherein said determining the target physical address corresponding to the target logical address from the address mapping table comprises:
performing reliability check on the address mapping table, wherein when a check code of the address mapping table is matched with a preset check code, the reliability check is passed, and when the check code of the address mapping table is not matched with the preset check code, the reliability check is not passed;
and under the condition that the reliability check is passed, searching a target physical address corresponding to the target logical address in the address mapping table.
4. The method of any of claims 1-3, wherein after retrieving the address mapping table stored in the embedded memory, the method further comprises:
sending a mapping table updating request under the condition of receiving a mapping table updating notification;
and updating the address mapping table according to the received mapping table updating information aiming at the mapping table updating request.
5. A method for sending data, which is applied to an embedded memory, comprises the following steps:
receiving a mapping table acquisition instruction sent by a host;
acquiring an instruction according to the mapping table, and sending an address mapping table to the host, wherein the address mapping table comprises a mapping relation between a target logical address and a target physical address;
determining data of the target physical address according to the target physical address corresponding to the target logical address fed back by the host;
sending the data of the target physical address to the host;
wherein before the sending the data of the target physical address to the host, the method further comprises:
receiving a first data acquisition instruction sent by the host, wherein the first data acquisition instruction comprises the target physical address;
and determining the data of the target physical address according to the first data acquisition instruction.
6. The method of claim 5, after sending the address mapping table to the host, further comprising:
sending a mapping table update notification to the host when the address mapping table is updated;
and sending mapping table updating information to the host according to the updated address mapping table under the condition of receiving a mapping table updating request which is fed back by the host and aims at the mapping table updating notice, wherein the mapping table updating information is used for enabling the host to update the address mapping table.
7. A host, comprising:
the mapping table acquisition module is used for acquiring an address mapping table stored in the embedded memory, and the address mapping table comprises a mapping relation between a target logical address and a target physical address;
a determining module, configured to determine, according to the address mapping table, the target physical address corresponding to the target logical address;
the data acquisition module is used for acquiring the data of the target physical address;
wherein the data acquisition module is configured to:
sending a first data acquisition instruction to the embedded memory, wherein the first data acquisition instruction comprises the target physical address;
and receiving data of the target physical address fed back by the embedded memory for the first data acquisition instruction.
8. The host of claim 7, wherein the mapping table obtaining module is to:
sending a mapping table acquisition instruction to the embedded memory;
and receiving the address mapping table fed back by the embedded memory aiming at the mapping table acquisition instruction.
9. The host of claim 7, wherein the determination module is to:
performing reliability check on the address mapping table, wherein when a check code of the address mapping table is matched with a preset check code, the reliability check is passed, and when the check code of the address mapping table is not matched with the preset check code, the reliability check is not passed;
and under the condition that the reliability check is passed, searching a target physical address corresponding to the target logical address in the address mapping table.
10. The host of any one of claims 7 to 9, wherein the host further comprises an update module for;
sending a mapping table updating request under the condition of receiving a mapping table updating notification;
and updating the address mapping table according to the received mapping table updating information aiming at the mapping table updating request.
11. An embedded memory, comprising:
the first receiving module is used for receiving a mapping table acquisition instruction sent by the host;
a mapping table sending module, configured to send an address mapping table to the host according to the mapping table obtaining instruction, where the address mapping table includes a mapping relationship between a target logical address and a target physical address;
a first determining module, configured to determine, according to the target physical address corresponding to the target logical address and fed back by the host, data of the target physical address;
the data sending module is used for sending the data of the target physical address to the host;
a second receiving module, configured to receive a first data obtaining instruction sent by the host, where the first data obtaining instruction includes the target physical address;
and the second determining module is used for determining the data of the target physical address according to the first data acquisition instruction.
12. The embedded memory of claim 11, further comprising an update module to:
sending a mapping table update notification to the host when the address mapping table is updated;
and sending mapping table updating information to the host according to the updated address mapping table under the condition of receiving a mapping table updating request which is fed back by the host and aims at the mapping table updating notice, wherein the mapping table updating information is used for enabling the host to update the 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 CN109800179A (en) 2019-05-24
CN109800179B true 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)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113050877B (en) * 2019-12-27 2024-03-01 兆易创新科技集团股份有限公司 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
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
CN112968981B (en) * 2021-03-18 2022-09-27 四川虹美智能科技有限公司 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
CN115118481B (en) * 2022-06-22 2023-11-21 深圳星云智联科技有限公司 Host information acquisition method, device, equipment and medium

Citations (4)

* 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

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170300422A1 (en) * 2016-04-14 2017-10-19 Micron Technology, Inc. Memory device with direct read access
KR20170120741A (en) * 2016-04-21 2017-11-01 에스케이하이닉스 주식회사 Data storage device and operating method thereof
KR20180051706A (en) * 2016-11-07 2018-05-17 삼성전자주식회사 Memory system performing error correction of address mapping table
CN109358809B (en) * 2018-09-28 2020-07-24 方一信息科技(上海)有限公司 RAID data storage system and method

Patent Citations (4)

* 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

Also Published As

Publication number Publication date
CN109800179A (en) 2019-05-24

Similar Documents

Publication Publication Date Title
CN109800179B (en) Method for acquiring data, method for sending data, host and embedded memory
CN107368518B (en) Notification message management method, terminal and computer readable storage medium
CN109462668B (en) Method and device for processing domain name resolution request
CN110391867B (en) DCI detection method, DCI sending method, terminal and base station
US11543935B2 (en) Information processing method and terminal device
CN109343788B (en) Operation control method of mobile terminal and mobile terminal
CN106953898B (en) Method and device for acquiring software package
JP7324949B2 (en) Application sharing method, first electronic device and computer readable storage medium
CN111143002A (en) Application sharing method, electronic equipment and computer readable storage medium
CN107734023B (en) Static resource file downloading method, mobile terminal and computer readable storage medium
CN109828770B (en) Software upgrading method, terminal equipment and server
CN110099434B (en) Power adjustment method, terminal equipment and computer readable storage medium
CN111131607A (en) Information sharing method, electronic equipment and computer readable storage medium
CN107844318B (en) Upgrading method of operating system, mobile terminal and server
CN107704287B (en) Installation-free method for program application, mobile terminal and computer-readable storage medium
CN110209434B (en) Memory management method and device and computer readable storage medium
CN111966373A (en) APN resetting method, terminal equipment and storage medium
CN109889568B (en) Data export method, server and system
CN105528220B (en) Method and device for loading dynamic shared object
CN108228357B (en) Memory cleaning method and mobile terminal
CN109918340B (en) File processing method and terminal equipment
CN111443847B (en) Push message processing method and electronic equipment
CN108446345B (en) Data searching method and mobile terminal
CN109151809B (en) Mobile terminal detection method and mobile terminal
CN108280798B (en) Method and device for rendering and displaying browser kernel

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