Memory data access method, device and computer equipment

By receiving access signals of data in memory and determining the target switching address, using the mapping relationship between pre-stored block identifiers and exchange identifiers, the problem of data in bad blocks cannot be accessed normally is solved, and the normal use of flash chips and the reliability of SoC chips are achieved.

CN114911719BActive Publication Date: 2025-05-16PINGJIE ELECTRONIC TECHNOLOGY (JIANGSU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210505190.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-10
Publication Date
2025-05-16
Estimated Expiration
2042-05-10

AI Technical Summary

Technical Problem

In traditional technology, the data stored in the bad block cannot be accessed normally, resulting in the flash chip being unable to be used normally.

Method used

By receiving the access signal of the data in the memory, the target exchange address is determined according to the first and second identifiers in the access signal, and the data in the memory is accessed. This method avoids bad blocks by mapping relationship between pre-stored block identifiers and exchange identifiers, and ensures the normality of data access.

Benefits of technology

It effectively prevents the problem that data cannot be accessed normally in bad blocks, ensures the normal use of flash chips, and improves the reliability and user experience of SoC chips.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114911719B_ABST
    Figure CN114911719B_ABST
Patent Text Reader

Abstract

The present application relates to a memory data access method, device, computer equipment, storage medium and computer program product. The memory data access method comprises: receiving an access signal for data in the memory; determining the target exchange address corresponding to the access signal according to the first identifier and the second identifier in the access signal; accessing the data corresponding to the target exchange address in the memory. The present method can be used to exchange each block in the data storage area, and the first sub-address of each block can be exchanged with the first sub-address of any block except the bad block configured by the staff. Through this setting, when an access signal for a bad block in the memory is received, the address finally accessed by the access signal can be exchanged to other blocks, thereby ensuring the normal use of the memory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer storage technology, and in particular to a memory data access method, device, computer equipment, storage medium and computer program product. Background Art

[0002] SoC chip is an integrated circuit chip that can effectively reduce the development cost of electronic / information system products, shorten the development cycle, and improve product competitiveness. SoC chip is also called chip-on-chip. It generally uses flash chip to store data. Flash chip includes data storage area and information storage area. Among them, the data storage area is used to store CPU program code or other non-volatile data that can be written and erased by users, and the information storage area is used to store the configuration parameters of the flash chip itself and data that is difficult for users to update.

[0003] The larger the data storage capacity required by the SoC chip, the higher the probability that the corresponding flash chip will have bad pixels during the production process. Although more bad pixels will reduce the actual data storage capacity of the flash chip, it does not affect the normal use of other good blocks in the flash chip. However, if flash chips with more bad pixels are put into use on the market, various errors will occur in the use of the SoC chip, destroying the user experience.

[0004] In summary, in the conventional technology, the data stored in the bad block cannot be normally accessed, so that the flash chip cannot be used normally. Summary of the invention

[0005] Based on this, it is necessary to provide a memory data access method, device, computer equipment, storage medium and computer program product to address the above technical problems, which can prevent the data stored in bad blocks from being unable to be accessed normally, making the flash chip unable to be used normally.

[0006] In a first aspect, the present application provides a memory data access method, comprising:

[0007] receiving an access signal for data in the memory;

[0008] Determining a target exchange address corresponding to the access signal according to the first identifier and the second identifier in the access signal;

[0009] Access the data corresponding to the target exchange address in the memory.

[0010] In one embodiment, the step of determining the target exchange address corresponding to the access signal according to the first identifier and the second identifier in the access signal includes:

[0011] According to the first identifier in the access signal, determining the exchange identifier corresponding to the access signal from a pre-stored mapping relationship between block identifiers and exchange identifiers;

[0012] The target exchange address is obtained according to the exchange identifier and the second identifier.

[0013] In one embodiment, the original address of the data storage area of ​​the memory includes a first sub-address and a second sub-address; the first sub-address is used to represent the block identifier of the data storage area; the exchange identifier is the block identifier after the exchange;

[0014] The step of obtaining the target exchange address according to the exchange identifier and the second identifier comprises:

[0015] The exchanged block identifier and the second identifier are combined into the target exchange address.

[0016] In one embodiment, the steps of generating the pre-stored mapping relationship between the block identifier and the exchange identifier include:

[0017] Traversing the original addresses of each block in the data storage area of ​​the memory;

[0018] The first sub-address in the original address of the other blocks except the bad block is used as the block identifier, and the corresponding exchange identifier is obtained by exchanging;

[0019] A mapping relationship between the block identifiers of blocks other than the bad blocks and the exchange identifiers is established.

[0020] In one embodiment, the step of pre-storing the mapping relationship between the block identifier and the exchange identifier includes:

[0021] Traversing the original addresses of each block in the data storage area of ​​the memory;

[0022] For each block, the first sub-address in the original address of the block is used as the block identifier, and the corresponding exchange identifier is obtained by exchange;

[0023] A mapping relationship between the block identifier and the exchange identifier of each block is established.

[0024] In one of the embodiments, the memory data access method further includes:

[0025] Storing the mapping relationship between the identifier and the exchange identifier in the information storage area of ​​the memory;

[0026] The step of determining the exchange identifier corresponding to the access signal from a pre-stored mapping relationship between block identifiers and exchange identifiers according to the first identifier in the access signal comprises:

[0027] According to the first identifier in the access signal, the exchange identifier corresponding to the first identifier is determined from the mapping relationship between the block identifier and the exchange identifier stored in the information storage area.

[0028] In a second aspect, the present application further provides a memory data access device. The memory data access device comprises:

[0029] A receiving module, used for receiving an access signal for data in the memory;

[0030] A determination module, configured to determine, according to the identifier in the access signal, a target exchange address corresponding to the identifier in the access signal;

[0031] An access module is used to access the data corresponding to the target exchange address in the memory.

[0032] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0033] receiving an access signal for data in the memory;

[0034] Determining a target exchange address corresponding to the access signal according to the first identifier and the second identifier in the access signal;

[0035] Access the data corresponding to the target exchange address in the memory.

[0036] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0037] receiving an access signal for data in the memory;

[0038] Determining a target exchange address corresponding to the access signal according to the first identifier and the second identifier in the access signal;

[0039] Access the data corresponding to the target exchange address in the memory.

[0040] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program product is executed by a processor, the following steps are implemented:

[0041] receiving an access signal for data in the memory;

[0042] Determining a target exchange address corresponding to the access signal according to the first identifier and the second identifier in the access signal;

[0043] Access the data corresponding to the target exchange address in the memory.

[0044] The above-mentioned memory data access method, apparatus, computer equipment, storage medium and computer program product, by exchanging the block identifiers corresponding to the blocks in the memory, exchanges the first subaddress of each block to the first subaddress of any block except the bad block configured by the staff. Through this setting, it is possible to prevent the address ultimately accessed by the access signal from being exchanged to other blocks when an access signal for the bad block is received, so as to ensure the normal use of the memory. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 An application environment diagram of a memory data access method in one embodiment;

[0046] Figure 2 A schematic diagram of a flow chart of a memory data access method in one embodiment;

[0047] Figure 3 is a flow chart of a memory data access method in another embodiment;

[0048] Figure 4 is a flowchart of a memory data access method in yet another embodiment;

[0049] Figure 5 is a structural block diagram of a memory data access device in one embodiment;

[0050] Figure 6 It is a structural block diagram of a memory data access device in another embodiment;

[0051] Figure 7 is a structural block diagram of a determination module in a memory data access device in one embodiment;

[0052] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0054] The memory data access method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 via the network.

[0055] For example, the memory data access method is applied to the terminal 102. When the terminal 102 detects an access signal for data in the memory, the terminal 102 first determines the target exchange address corresponding to the access signal according to the first identifier and the second identifier in the access signal; then the terminal 102 accesses the data corresponding to the target exchange address in the memory of the server 104, wherein the terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers. The terminal 102 and the server 104 may be directly or indirectly connected via wired or wireless communication, such as via a network connection.

[0056] It should be noted that when the memory data access method is applied to terminal 102, when an access signal for data in the memory is detected, terminal 102 can also determine the target exchange address corresponding to the access signal based on the first identifier and the second identifier in the access signal; then terminal 102 accesses the data corresponding to the target exchange address in the memory of another terminal 102.

[0057] For another example, the memory data access method is applied to the server 104. When the terminal 102 detects an access signal for data in the memory, the terminal 102 sends the access signal to the server 104. Subsequently, the server 104 determines the target exchange address corresponding to the access signal based on the first identifier and the second identifier in the access signal, and accesses the data corresponding to the target exchange address in the memory.

[0058] It should be noted that when the memory data access method is applied to the server 104, when an access signal for data in the memory is detected, the server 104 can also determine the target exchange address corresponding to the access signal based on the first identifier and the second identifier in the access signal; then the server 104 accesses the data corresponding to the target exchange address in the memory of another server 104.

[0059] It is understandable that the memory may be an independent storage device, or the memory may be located on a server, or the memory may be located on another terminal. When the terminal or the server detects an access signal for data in the memory, it first determines the target exchange address corresponding to the access signal according to the first identifier and the second identifier in the access signal, and then accesses the data corresponding to the target exchange address in the memory.

[0060] In one embodiment, a method for accessing memory data is provided. This embodiment uses the memory data access method applied to a server as an example. It is understandable that the method can also be applied to a terminal, or to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. Figure 2 As shown, the memory access method includes:

[0061] Step 202: Receive an access signal for data in a memory.

[0062] Specifically, the access signal is sent by the terminal, and the access signal refers to an access request initiated by the user for the data that the user wants to access.

[0063] In this embodiment, the server receives an access signal sent by the terminal.

[0064] Step 204: Determine the target switch address corresponding to the access signal according to the first identifier and the second identifier in the access signal.

[0065] The first identifier refers to the first identifier carried by the current access signal, and the first identifier can be composed of at least one of letters, characters or numbers. The second identifier refers to the second identifier carried by the current access signal, and the second identifier can also be composed of at least one of letters, characters or numbers. The first identifier and the second identifier are used to uniquely identify the access signal. The server of this embodiment pre-stores a one-to-one mapping relationship between the first identifier and the second identifier and multiple exchange addresses.

[0066] In this embodiment, the server extracts the first identifier and the second identifier included in the access signal, and matches the exchange address corresponding to the current access signal from the pre-stored mapping relationship according to the first identifier and the second identifier as the target exchange address.

[0067] Step 206: Access the data corresponding to the target exchange address in the memory.

[0068] In this embodiment, the server matches the target exchange address with each address in the memory, and accesses the data contained in the matched address.

[0069] In the above-mentioned memory data access method, the server matches the corresponding address as the target exchange address from the pre-stored mapping relationship through the first identifier and the second identifier included in the received access signal. According to the target exchange address, the server matches the address in the memory that is the same as the target exchange address, and accesses the data contained in the block corresponding to the address.

[0070] In one embodiment, step 204, determining the target exchange address corresponding to the access signal according to the first identifier and the second identifier in the access signal, includes:

[0071] According to the first identifier in the access signal, the exchange identifier corresponding to the access signal is determined from the pre-stored mapping relationship between the block identifier and the exchange identifier; and the target exchange address is obtained according to the exchange identifier and the second identifier.

[0072] In this embodiment, the memory in the server is pre-tested for bad blocks. When a bad bit appears in the data of a block in the data storage area, the block is considered a bad block, and the data contained in the bad block cannot be read, written or erased normally.

[0073] The server of this embodiment pre-stores a mapping relationship between a block identifier and an exchange identifier. The block identifier is used to uniquely identify each block in the memory of the server. The exchange identifier refers to the block identifier after exchange. The exchange identifier can be the block identifier of any other block, or the block identifier of any block except the bad block, which is used to uniquely identify the block after exchange. In this embodiment, the block identifier corresponding to the bad block is not used as the exchange identifier. Through this setting, the block actually accessed by the access signal can directly avoid the bad block, so as to prevent the above-mentioned terminal from failing to access the target exchange address.

[0074] The server of this embodiment also pre-stores a mapping relationship between the exchange identifier, the second identifier and the exchange address.

[0075] In this embodiment, the server matches the first identifier in the access signal with the pre-stored block identifier, and obtains the exchange identifier corresponding to the matched block identifier based on the mapping relationship between the pre-stored block identifier and the exchange identifier, and then matches the corresponding exchange address from the mapping relationship between the pre-stored exchange identifier and the second identifier and the exchange address based on the exchange identifier and the first identifier of the access signal as the target exchange address.

[0076] In one embodiment, the original address of the data storage area of ​​the memory includes a first sub-address and a second sub-address; the first sub-address is used to represent the block identifier of the data storage area; the exchange identifier is the block identifier after exchange; then the step of obtaining the target exchange address according to the exchange identifier and the second identifier includes: synthesizing the block identifier and the second identifier after exchange into the target exchange address.

[0077] The memory in the server generally includes a data storage area and an information storage area. The data storage area is used to store CPU programs and other non-volatile data developed by users, while the information storage area stores some configuration parameters and some important information data of users. The data storage area is pre-divided into multiple blocks, and each block contains a corresponding original address. The original address includes a first sub-address and a second sub-address. The first sub-address is used to represent the block identifier of the current block. For example, each block in the data storage area includes a sixteen-bit original address, wherein the first sub-address is the first three bits of the original address of the current block, and the second sub-address is the remaining thirteen bits of the original address of the current block.

[0078] In this embodiment, the switch identifier is post-synthesized with the first identifier carried by the access signal to obtain the target switch address.

[0079] In one embodiment, the steps of generating the mapping relationship between the pre-stored identifier and the exchange identifier include:

[0080] Traverse the original addresses of each block in the data storage area of ​​the memory; use the first sub-address in the original address of other blocks except the bad block as the block identifier, exchange to obtain the corresponding exchange identifier; establish a mapping relationship between the block identifier of other blocks except the bad block and the exchange identifier.

[0081] In this embodiment, the server uses the first sub-address included in the original address of other blocks in the data storage area except the bad blocks as the block identifier of the current bad block, and then exchanges the other blocks except the bad blocks with the corresponding blocks according to the preset exchange relationship, and uses the block identifiers of other blocks except the bad blocks as the exchange identifier, so as to establish a one-to-one mapping relationship between the block identifiers of other blocks except the bad blocks and the exchange identifier. This embodiment exchanges the block identifiers of other blocks in the data storage area except the bad blocks in advance. Through this setting, the server will not eventually access the bad blocks, so as to prevent the above-mentioned terminal from failing to access the target exchange address.

[0082] For example, the data storage area of ​​the server memory is pre-divided into eight blocks, and the first three bits of the sixteen-bit original address of each block are used as the block identifier of the current block. The block identifiers of the eight blocks are BLOCK numbers 0-7, respectively. Among them, through the pre-completed bad block detection, it can be known that the blocks with BLOCK numbers 0 and 7 are bad blocks. The default BLOCK numbers of the six blocks provided by the current memory to the outside are 0 to 5. Therefore, the BLOCK numbers of the blocks corresponding to the access signals received by the memory are 0 to 5. According to the preset exchange relationship between blocks, there will be 6 BLOCK mapping relationships. The block with BLOCK number 0 corresponding to the access signal is exchanged to the block with the actual BLOCK number 1, and the block with BLOCK number 2 corresponding to the access signal is exchanged to the block with the actual BLOCK number 1. Switch to the block with actual BLOCK number 3, and so on, exchange the block with actual BLOCK number 5 corresponding to the access signal to the block with actual BLOCK number 6. In this way, the bad blocks with actual BLOCK numbers 0 and 7 are avoided. In the mapping relationship, the exchange identifier corresponding to the block with actual BLOCK number 1 corresponding to the access signal is the first three digits of the original address of the block with actual BLOCK number 2, and the exchange identifier corresponding to the block with actual BLOCK number 2 corresponding to the access signal is the first three digits of the original address of the block with actual BLOCK number 3... and so on. The exchange identifiers corresponding to the six blocks with BLOCK numbers 0-5 corresponding to the access signal can be the first three digits of the original address of any block with actual BLOCK numbers 1-6.

[0083] like Figure 3 As shown, in this embodiment, the memory data access method includes:

[0084] Step a1, receiving an access signal;

[0085] Step a2: obtain the 16-bit original address of the corresponding block carried by the access signal, use the first three bits of the original address as the first identifier of the access signal, and use the last thirteen bits of the original address as the second identifier of the access signal.

[0086] Step a3: Match the first identifier in the access signal with all block identifiers in the pre-stored mapping relationship, and determine whether the match is successful.

[0087] Step a4: If yes, obtain the corresponding exchange identifier according to the matched block identifier, and execute step a5.

[0088] If not, go to step a7.

[0089] Step a5: synthesize the exchange identifier and the second identifier in the access signal to obtain the target exchange address.

[0090] Step a6: Match the exchange identifier contained in the target exchange address with the first three digits of the address of each block in the data storage area of ​​the memory, and access the matched block as the block corresponding to the target exchange address.

[0091] Step a7: It prompts that there is no corresponding block.

[0092] In step a3, if there is no block identifier identical to the first identifier in the pre-stored mapping relationship, it is considered that the address that the terminal wants to access does not exist in the current memory. Here, in step a7, the server issues a prompt, and the terminal displays the prompt to indicate that there is no corresponding block in the current memory and the data cannot be accessed normally.

[0093] It should be noted that the prompting methods may include signal light prompts, sound prompts, text prompts, buzzer prompts, etc. The setting is intended to prompt the staff through the terminal that there is no corresponding block in the current memory. The present application does not limit the prompting method, and all prompting methods with the same purpose as this setting should be included in the protection scope of the present invention.

[0094] In the above-mentioned memory data access method, the first three digits of the original address of other blocks except the bad block are used as the block identifier of the current block, and are exchanged according to the preset exchange relationship between blocks, and the mapping relationship formed by the block identifiers of other blocks except the bad block and the exchanged block identifiers is saved, so that when the current server receives the access signal sent by the terminal, it can match the corresponding block identifier according to the first identifier included in the access signal, and further obtain the exchanged block identifier corresponding to the access signal in the saved mapping relationship according to the matched block identifier. The server accesses the data stored in the corresponding block according to the exchanged block identifier, thereby realizing the address exchange encryption of all blocks in the memory, and, in the preset exchange relationship between blocks, the block identifier of the bad block does not need to be used as the exchanged block identifier. Therefore, through the settings in this embodiment, when the server receives the access signal for the bad block, it can smoothly access the data in other good blocks without any access exception.

[0095] In one embodiment, the step of generating the pre-stored mapping relationship between the block identifier and the exchange identifier may further include:

[0096] The original addresses of each block in the data storage area of ​​the memory are traversed; for each block, the first sub-address in the original address of the block is used as the block identifier, and the corresponding exchange identifier is obtained by exchange; and a mapping relationship between the block identifier and the exchange identifier of each block is established.

[0097] In this embodiment, the server uses the first sub-address included in the original address of each block in the data storage area as the block identifier of the current block, and then exchanges them according to the preset exchange relationship between blocks, and uses the block identifier of the block corresponding to the current block as the exchange identifier, so as to establish a one-to-one mapping relationship between the block identifier and the exchange identifier of each block. This embodiment exchanges the block identifier of each block in the data storage area in advance, thereby encrypting the access action during the data access process.

[0098] For example, the data storage area of ​​the server memory is pre-divided into eight blocks, and the first three bits of the sixteen-bit original address of each block are used as the block identifier of the current block. The block identifiers of the eight blocks can be BLOCK numbers of 0-7 respectively. It can be known from the pre-completed bad block detection that there are no bad blocks in the current memory. According to the preset exchange relationship between blocks, there will be at most 8 BLOCK mapping relationships. The memory exchanges the block with BLOCK number 0 to the block with BLOCK number 5, and exchanges the block with BLOCK number 7 to the block with BLOCK number 4. In the mapping relationship, the exchange identifier corresponding to the block with BLOCK number 0 is the first three bits of the original address of the block with BLOCK number 5, and the exchange identifier corresponding to the block with BLOCK number 7 is the first three bits of the original address of the block with BLOCK number 4. In this way, the BLOCK order is disrupted, which plays a role in data access encryption.

[0099] like Figure 4 As shown, in this embodiment, the memory data access method includes:

[0100] Step b1, receiving an access signal;

[0101] Step b2: Obtain the 16-bit original address of the corresponding block carried by the access signal, use the first three bits of the original address as the first identifier of the access signal, and use the last thirteen bits of the original address as the second identifier of the access signal.

[0102] Step b3: Match the first identifier in the access signal with all block identifiers in the pre-stored mapping relationship, and determine whether the match is successful.

[0103] Step b4: If the corresponding block identifier is successfully matched, the corresponding exchange identifier is obtained according to the matched block identifier, and step b7 is executed.

[0104] Step b5: if the corresponding block identifier is not successfully matched, then further matching the first identifier in the access signal with the block identifiers of other blocks that have not been exchanged, and determining whether the match is successful;

[0105] Step b6: If the block identifiers of other blocks that have not been exchanged are matched successfully, the first identifier in the access signal is directly used as the exchange identifier, and step b7 is executed.

[0106] If the block identifiers of other blocks that have not been exchanged are matched successfully, step b9 is executed.

[0107] Step b7: Combine the exchange identifier and the second identifier into a target exchange address.

[0108] Step b8: Match the exchange identifier contained in the target exchange address with the first three digits of the address of each block in the data storage area of ​​the memory, and access the matched block as the block corresponding to the target exchange address.

[0109] Step b9: It prompts that there is no corresponding block.

[0110] In step b5, if the block identifiers of all blocks in the memory are not the same as the first identifier, it is considered that the address that the terminal wants to access does not exist in the current memory. Therefore, in step b9, the server issues a prompt, and the terminal displays the prompt to indicate that the corresponding block does not exist in the current memory and the data cannot be accessed normally.

[0111] It should be noted that the prompting methods may include signal light prompts, sound prompts, text prompts, buzzer prompts, etc. The setting is intended to prompt the staff through the terminal that there is no corresponding block in the current memory. The present application does not limit the prompting method, and all prompting methods with the same purpose as this setting should be included in the protection scope of the present invention.

[0112] In this embodiment, all blocks in the memory are good blocks. The server exchanges the block identifiers corresponding to the blocks in the memory, and exchanges the first sub-address of any block to the first sub-address of any block configured by the staff. Through this setting, data access encryption can be achieved.

[0113] In the above-mentioned memory data access method, the first three bits of the original address of each block are used as the block identifier of the current block, and the blocks are exchanged according to the preset exchange relationship between the blocks, and the mapping relationship formed by the block identifier of each block and the exchanged block identifier is saved, so that when the current server receives the access signal sent by the terminal, it can match the corresponding block identifier according to the first identifier included in the access signal, and further obtain the exchanged block identifier corresponding to the access signal in the saved mapping relationship according to the matched block identifier. The server accesses the data stored in the corresponding block according to the exchanged block identifier, thereby realizing the address exchange encryption of all blocks in the memory. Therefore, through the setting in this embodiment, when the server receives the access signal for any block, it can access the data in other blocks after the exchange, thereby realizing data access encryption.

[0114] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0115] Based on the same inventive concept, the embodiment of the present application also provides a memory data access device for implementing the memory data access method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more memory data access device embodiments provided below can refer to the limitations on the memory data access method above, and will not be repeated here.

[0116] In one embodiment, Figure 5 As shown, a memory data access device is provided, including: a receiving module 402, a determining module 404 and an access module 406, wherein:

[0117] A receiving module 402, configured to receive an access signal for data in a memory;

[0118] A determination module 404, configured to determine a target exchange address corresponding to the access signal according to the first identifier and the second identifier in the access signal;

[0119] The access module 406 is used to access the data corresponding to the target exchange address in the memory.

[0120] like Figure 5 As shown, in one embodiment, the memory data access device further includes:

[0121] The first exchange module 408 is used to traverse the original addresses of each block in the data storage area of ​​the memory; use the first sub-address in the original address of other blocks except the bad block as the block identifier, exchange to obtain the corresponding exchange identifier; establish a mapping relationship between the block identifier of other blocks except the bad block and the exchange identifier.

[0122] like Figure 6 As shown, in another embodiment, the memory data access device further includes:

[0123] The second exchange module 410 is used to traverse the original addresses of each block in the data storage area of ​​the memory, and for each block, use the first sub-address in the original address of the block as the block identifier, exchange to obtain the corresponding exchange identifier, and establish a mapping relationship between the block identifier and the exchange identifier of each block.

[0124] Specifically, the mapping relationship between the identifier and the exchange identifier is stored in the information storage area of ​​the memory.

[0125] like Figure 7 As shown, in one embodiment, the determination module 404 includes:

[0126] The determining unit 4041 is configured to determine, according to the first identifier in the access signal, the exchange identifier corresponding to the first identifier from a pre-stored mapping relationship between block identifiers and exchange identifiers;

[0127] The processing unit 4042 is configured to obtain a target switch address according to the switch identifier and the second identifier.

[0128] Specifically, the original address of the data storage area of ​​the memory includes a first sub-address and a second sub-address; the first sub-address is used to represent a block identifier of the data storage area; and the exchange identifier is a block identifier after exchange.

[0129] In one embodiment, the determining unit 4041 is further configured to determine, according to the first identifier in the access signal, the exchange identifier corresponding to the first identifier from the mapping relationship between the block identifier and the exchange identifier stored in the information storage area.

[0130] In one embodiment, the processing unit 4042 is further configured to combine the exchanged block identifier and the second identifier into a target exchange address.

[0131] Each module in the above-mentioned memory data access device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0132] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements each step of the above-mentioned memory data access method when executing the computer program.

[0133] The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a memory data access method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0134] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0135] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, each step of the above-mentioned memory data access method is implemented.

[0136] In one embodiment, a computer program product is provided, comprising a computer program, and when the computer program product is executed by a processor, the computer program product implements the steps of the above-mentioned memory data access method.

[0137] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0138] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0139] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A memory data access method, characterized in that: include: receiving an access signal for data in the memory; Determining a target exchange address corresponding to the access signal according to the first identifier and the second identifier in the access signal; Accessing the data corresponding to the target exchange address in the memory; the step of determining the target exchange address corresponding to the access signal according to the first identifier and the second identifier in the access signal comprises: According to the first identifier in the access signal, determining the exchange identifier corresponding to the access signal from a pre-stored mapping relationship between block identifiers and exchange identifiers; The target exchange address is obtained according to the exchange identifier and the second identifier; the exchange identifier represents the block identifier after the exchange, and the exchange identifier includes the block identifier of any block except the bad block.

2. The memory data access method according to claim 1, characterized in that: The original address of the data storage area of ​​the memory includes a first sub-address and a second sub-address; the first sub-address is used to represent the block identifier of the data storage area; the exchange identifier is the block identifier after the exchange; The step of obtaining the target exchange address according to the exchange identifier and the second identifier comprises: The exchanged block identifier and the second identifier are combined into the target exchange address.

3. The memory data access method according to claim 2, characterized in that: The steps of generating the pre-stored mapping relationship between the block identifier and the exchange identifier include: Traversing the original addresses of each block in the data storage area of ​​the memory; The first sub-address in the original address of the other blocks except the bad block is used as the block identifier, and the corresponding exchange identifier is obtained by exchanging; A mapping relationship between the block identifiers of blocks other than the bad blocks and the exchange identifiers is established.

4. The memory data access method according to claim 2, characterized in that: The step of pre-storing the mapping relationship between the block identifier and the exchange identifier comprises: Traversing the original addresses of each block in the data storage area of ​​the memory; For each block, the first sub-address in the original address of the block is used as the block identifier, and the corresponding exchange identifier is obtained by exchange; A mapping relationship between the block identifier and the exchange identifier of each block is established.

5. The memory data access method according to claim 3 or 4, characterized in that: The memory data access method further comprises: Storing the mapping relationship between the block identifier and the exchange identifier in the information storage area of ​​the memory; The step of determining the exchange identifier corresponding to the access signal from a pre-stored mapping relationship between block identifiers and exchange identifiers according to the first identifier in the access signal comprises: According to the first identifier in the access signal, the exchange identifier corresponding to the first identifier is determined from the mapping relationship between the block identifier and the exchange identifier stored in the information storage area.

6. A memory data access device, characterized in that: include: A receiving module, used for receiving an access signal for data in the memory; A determination module, configured to determine a target exchange address corresponding to the access signal according to a first identifier and a second identifier in the access signal; An access module, used for accessing the data corresponding to the target exchange address in the memory; The first exchange module is used to determine the exchange identifier corresponding to the access signal from a pre-stored mapping relationship between block identifiers and exchange identifiers according to the first identifier in the access signal; obtain the target exchange address according to the exchange identifier and the second identifier; the exchange identifier represents the block identifier after the exchange, and the exchange identifier includes the block identifier of any block except the bad block.

7. The memory data access device according to claim 6, characterized in that: The memory data access device also includes: The second exchange module is used to traverse the original addresses of each block in the data storage area of ​​the memory; use the first sub-address in the original address of other blocks except the bad block as the block identifier, exchange to obtain the corresponding exchange identifier; establish a mapping relationship between the block identifier of other blocks except the bad block and the exchange identifier.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the memory data access method according to any one of claims 1 to 5 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the memory data access method according to any one of claims 1 to 5 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the memory data access method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Power-fail protection method based on two continuous logical blocks for non-volatile memory

    CN101025715A

  • Flash memory chip management method, device and computer readable storage medium

    CN107992430A