Data processing method and device, electronic equipment and computer readable medium
By obtaining and traversing the bad block table, accurately finding the target physical block to perform data operations, the problem of errors in reading and writing data in the prior art is solved, and the accuracy and reliability of data processing are improved.
Patent Information
- Application Number
- CN202411145389.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2025-03-04
AI Technical Summary
The existing bad block management methods still have problems in the storage device with errors in reading and writing data, especially the unique correspondence between logical blocks and physical blocks is difficult to guarantee.
By obtaining the target bad block table from the storage module, determining the logical index value of the logical starting block based on the logical address, and traversing the accumulated number of physical good blocks, accurately finding the target physical block, thereby performing read operations, write operations or erasing operations.
This method can avoid errors in read and write erase operations, improve the accuracy and reliability of data processing, and ensure the unique correspondence between the logical start block and the target physical block.
Smart Images

Figure CN119556851A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of integrated circuit technology, and more specifically, to a data processing method, device, electronic device and computer-readable medium. Background Art
[0002] Bad block management is a strategy used in storage devices to detect, process and manage defective physical blocks. Bad block management has a great impact on the reliability of the device, and existing bad block management methods still have the problem of reading and writing data errors. Summary of the invention
[0003] The present application proposes a data processing method, device, electronic device and computer-readable medium to improve the above-mentioned defects.
[0004] In a first aspect, the present application provides a data processing method, the method comprising: obtaining a target bad block table from the storage module, the target bad block table comprising a label of each of the physical blocks and an index value of the physical block, the label of the physical block being divided into a physical bad block and a physical good block; determining a logical index value of a logical starting block according to an acquired logical address; traversing from the first physical block based on the target bad block table, and accumulating the number of traversed physical good blocks; if the number of traversed physical good blocks is equal to the logical index value, determining the index value corresponding to the last traversed physical good block as the target index value; determining a target physical block corresponding to the target index value according to a plurality of the physical blocks; and performing a target operation on the target physical block, the target operation comprising at least one of a read operation, a write operation, and an erase operation.
[0005] Optionally, for a possible implementation, the target operation is a write operation or an erase operation, and after performing the target operation on the target physical block, it also includes: if the write operation or the erase operation on the target physical block fails, modifying the target index value to add one to obtain a new target index value, returning to perform the operation of determining the target physical block corresponding to the target index value based on multiple physical blocks and subsequent operations.
[0006] Optionally, for a possible implementation, the target operation is a write operation or an erase operation, and after performing the target operation on the target physical block, it also includes: if the write operation or the erase operation on the target physical block fails, modifying the label of the target physical block to a physical bad block; and updating the target bad block table according to the label of the target physical block.
[0007] Optionally, for a possible implementation, the target operation is a read operation, and performing the target operation on the target physical block includes: determining an offset according to the logical address; determining a target page in the target physical block based on the offset; and performing a read operation on data in the target page.
[0008] Optionally, for a possible implementation, obtaining the target bad block table from the storage module includes: obtaining a bad block table from the multiple physical blocks of the storage module; detecting whether the data in the bad block table matches preset data; if they match, determining the bad block table as the target bad block table; if they do not match, traversing each of the physical blocks to obtain a label for each of the physical blocks; and determining the target bad block table based on the label and index value of each of the physical blocks.
[0009] Optionally, for a possible implementation, before obtaining the bad block table from the multiple physical blocks of the storage module, it also includes: determining whether a preset label is stored in the multiple physical blocks of the storage module; if the preset label is not stored, traversing each physical block to obtain the label of each physical block; creating a bad block table based on the label and index value of each physical block; and storing the bad block table in the first preset physical block in the storage module whose label is a physical good block.
[0010] Optionally, for a possible implementation, after creating the bad block table based on the label and index value of each physical block, it also includes: backing up the bad block table to obtain a spare table; storing the spare table in a second preset physical block labeled as a physical good block in the storage module.
[0011] In the second aspect, the present application also provides a data processing device, which includes: an acquisition unit, used to acquire a target bad block table from the storage module, the target bad block table including a label of each physical block and an index value of the physical block, the label of the physical block is divided into a physical bad block and a physical good block; a calculation unit, used to determine the logical index value of the logical starting block according to the acquired logical address; a traversal unit, used to traverse from the first physical block based on the target bad block table, and accumulate the number of traversed physical good blocks; a determination unit, used to determine that the index value corresponding to the last traversed physical good block is the target index value if the number of traversed physical good blocks is equal to the logical index value; a conversion unit, used to determine the target physical block corresponding to the target index value based on multiple physical blocks; an execution unit, used to perform a target operation on the target physical block, the target operation including at least one of a read operation, a write operation and an erase operation.
[0012] In a third aspect, the present application also provides an electronic device, comprising: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory, the one or more applications are configured to be executed by the one or more processors, and the one or more applications are configured to execute the above method.
[0013] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program code executable by a processor, and when the program code is executed by the processor, the processor executes the above method.
[0014] The solution provided by the present application is as follows: first, a target bad block table is obtained from the storage module, the target bad block table includes a label of each physical block and an index value of the physical block, and the label of the physical block is divided into a physical bad block and a physical good block; the logical index value of the logical starting block is determined according to the obtained logical address; secondly, based on the target bad block table, the first physical block is traversed and the number of traversed physical good blocks is accumulated; if the number of traversed physical good blocks is equal to the logical index value, the index value corresponding to the last traversed physical good block is determined to be the target index value; then, the target physical block corresponding to the target index value is determined according to multiple physical blocks; finally, a target operation is performed on the target physical block, and the target operation includes at least one of a read operation, a write operation and an erase operation.
[0015] The present application proposes a data processing method, which traverses the target bad block table from the first physical good block, accurately finds the target physical block through the logical index value and the number of traversed physical good blocks, and makes the logical starting block uniquely correspond to the target physical block, which can avoid errors in read, write and erase operations and improve the accuracy of data processing.
[0016] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 A flow chart of a method for data processing provided by an embodiment of the present application is shown;
[0019] Figure 2 A method flow chart of a data processing method provided by another embodiment of the present application is shown;
[0020] Figure 3 A method flow chart of a data processing method provided by another embodiment of the present application is shown;
[0021] Figure 4 A method flow chart of a data processing method provided by another embodiment of the present application is shown;
[0022] Figure 5 A method flow chart of a data processing method provided by another embodiment of the present application is shown;
[0023] Figure 6 A method flow chart of a data processing method provided by another embodiment of the present application is shown;
[0024] Figure 7 A method flow chart of a data processing method provided by another embodiment of the present application is shown;
[0025] Figure 8 A flow chart of a method for creating a bad block table provided in an embodiment of the present application is shown;
[0026] Fig. 9 A flowchart of initializing a bad block table provided in an embodiment of the present application is shown;
[0027] Fig.10 A flowchart of reading data provided by an embodiment of the present application is shown;
[0028] Fig.11 A flowchart of writing data provided by an embodiment of the present application is shown;
[0029] Fig.12 A schematic diagram of the structure of a storage module provided in an embodiment of the present application is shown;
[0030] Fig.13 A structural block diagram of a data processing device provided in an embodiment of the present application is shown;
[0031] Fig.14 A structural block diagram of an electronic device provided in an embodiment of the present application is shown;
[0032] Fig.15 A structural block diagram of a computer-readable storage medium provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0033] In order to make those skilled in the art better understand the present application scheme, the technical scheme in the present application embodiment will be clearly and completely described below in conjunction with the drawings in the present application embodiment. Obviously, the described embodiment is only a part of the present application embodiment, rather than all the embodiments. The components of the present application embodiment usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application for protection, but merely represents the selected embodiment of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0034] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0035] Bad block management is a strategy used in storage devices to detect, process and manage defective physical blocks. Bad block management has a great impact on the reliability of the device, and existing bad block management methods still have the problem of reading and writing data errors. When read, write or erase operations encounter bad blocks, there is a problem that the logical block and the physical block are not uniquely corresponding; for example: when physical block 1 is a bad block and physical block 2 is a good block, according to the rule of jumping to the next good block when encountering a bad block, when reading logical block 1, the data content of physical block 2 is actually read; when reading logical block 2, the data content of physical block 2 is actually read. In this way, reading logical block 1 and reading logical block 2 actually read the same physical block 2, resulting in read and write data errors, and then causing abnormal operation of electronic equipment.
[0036] Therefore, in the embodiments of the present application, a data processing method, device, electronic device and computer-readable medium are provided to solve or partially solve the above-mentioned problems.
[0037] See also Figure 1 , which shows a method flow chart of a data processing method provided in an embodiment of the present application, the method is applied to a processor of an electronic device, the electronic device also includes a storage module, the storage module includes multiple physical blocks, and the method specifically includes steps S110 to S160.
[0038] Step S110: Obtain a target bad block table from the storage module, wherein the target bad block table includes a label of each physical block and an index value of the physical block, and the labels of the physical blocks are divided into physical bad blocks and physical good blocks.
[0039] The index value of a physical block and the label of the physical block can be obtained through the target bad block table.
[0040] As an exemplary example, through the target bad block table, it can be obtained that the index value of a physical block is 12, and the label of the physical block is a physical good block, which means that the physical block with the index value of 12 is a good block, and the read, write and erase operations can be performed on the physical block.
[0041] Another exemplary example is that through the target bad block table, it can be obtained that the index value of a physical block is 16, and the label of the physical block is a physical bad block, which means that the physical block with an index value of 16 is a bad block. Reading, writing or erasing operations on the bad block will cause abnormal operation of the electronic device, so the physical block cannot be read, written or erased.
[0042] The target bad block table is obtained from the storage module. Specifically, the target bad block table is first read from the storage module and stored in the memory, and then the target bad block table is obtained from the memory.
[0043] Step S120: Determine the logical index value of the logical start block according to the acquired logical address.
[0044] It should be noted that the logical address can be an artificially set, continuous virtual address. Unlike the logical address, the physical address refers to the actual address of the data in the physical memory.
[0045] Specifically, the logical address may refer to the entire continuous address space of the storage module seen from the user's perspective; the physical address refers to the address space of the storage module actually operated from the perspective of the storage module.
[0046] When the processor receives a logical address, it needs to convert the logical address into a physical address or a specific physical block, and then perform read, write, or erase operations based on the physical address or physical block. To this end, it is necessary to determine the logical index value of the logical starting block based on the acquired logical address, and then determine the target physical block based on the logical index value.
[0047] Exemplarily, the logical address space is 0x00000000 to 0x8000000, which is used to represent each position in the entire storage space. Each logical block contains 0x20000 bytes, and the obtained logical address is 0x80800. The logical index value of the logical starting block = logical address / size of the logical block + 1, that is, the quotient of 0x80800 and 0x20000 plus 1 is the logical index value of the logical starting block, and the calculated logical index value of the logical starting block is 5.
[0048] Step S130: Traverse from the first physical block based on the target bad block table, and accumulate the number of traversed physical good blocks.
[0049] It should be noted that, according to the index value of the physical block, the traversal starts from the first physical block, the label of the physical block is determined based on the target bad block table during each traversal, and the number of traversed physical good blocks is accumulated.
[0050] For example, there are 200 physical blocks in the storage module, and only the third physical block is a bad block. When traversing from the first physical block to the third physical block, the number of good physical blocks is 2, and when traversing to the fourth physical block, the number of good physical blocks is 3.
[0051] Step S140: If the number of traversed physical good blocks is equal to the logical index value, determine the index value corresponding to the last traversed physical good block as the target index value.
[0052] It should be noted that the size of the physical block is the same as the size of the logical block. Continuing with the above-mentioned embodiment, the logical index value of the logical start block is 5. There are 200 physical blocks in the storage module, and only the third physical block is a bad block. When traversing from the first physical block to the third physical block, the number of good physical blocks is 2, and when traversing to the fourth physical block, the number of good physical blocks is 3. By analogy, when traversing to the sixth physical block, the number of good physical blocks is 5. At this time, the number of good physical blocks is equal to the logical index value, and the index value 6 corresponding to the sixth physical block is determined as the target index value.
[0053] Step S150: determining a target physical block corresponding to the target index value according to the plurality of physical blocks.
[0054] The target physical block corresponding to the target index value is determined according to the index values corresponding to the multiple physical blocks. Continuing with the above-mentioned embodiment, the physical block corresponding to the target index value 6 can be determined as the target physical block. That is, the correct correspondence between the logical block and the target physical block is achieved, the correspondence relationship between the logical block and the physical block is avoided to be non-unique, and the accuracy of data operation is improved.
[0055] Step S160: performing a target operation on the target physical block, where the target operation includes at least one of a read operation, a write operation and an erase operation.
[0056] After the target physical block is determined, that is, the physical block corresponding to the logical address is found, a target operation can be performed based on the target physical block, and the target operation includes at least one of a read operation, a write operation, and an erase operation.
[0057] In an exemplary embodiment, the processor receives an instruction for a target operation based on a logical address, obtains a target bad block table from a storage module, determines a logical index value corresponding to a logical start block based on a logical address, traverses from the first physical block based on the target bad block table, and accumulates the number of traversed physical good blocks; if the number of traversed physical good blocks is equal to the logical index value, determines the index value corresponding to the last traversed physical good block as the target index value; and then determines the target physical block corresponding to the target index value; and finally performs the target operation on the target physical block. The target physical block is correctly found, and the target operation is performed based on the correct target physical block, thereby improving the accuracy of data processing.
[0058] The present application proposes a data processing method, which traverses the target bad block table from the first physical good block, accurately finds the target physical block through the logical index value and the number of traversed physical good blocks, and makes the logical starting block uniquely correspond to the target physical block, which can avoid errors in read, write and erase operations and improve the accuracy of data processing.
[0059] See also Figure 2 , which shows a method flow chart of a data processing method provided in an embodiment of the present application, the method is applied to a processor of an electronic device, the electronic device also includes a storage module, the storage module includes multiple physical blocks, the target operation is a write operation or an erase operation, and the method specifically includes steps S210 to S270.
[0060] Step S210: Obtain a target bad block table from the storage module, wherein the target bad block table includes a label of each physical block and an index value of the physical block, and the labels of the physical blocks are divided into physical bad blocks and physical good blocks.
[0061] Step S220: Determine the logical index value of the logical start block according to the acquired logical address.
[0062] Step S230: Traverse from the first physical block based on the target bad block table, and accumulate the number of traversed physical good blocks.
[0063] Step S240: If the number of traversed physical good blocks is equal to the logical index value, determine the index value corresponding to the last traversed physical good block as the target index value.
[0064] Step S250: Determine a target physical block corresponding to the target index value according to the plurality of physical blocks.
[0065] Among them, step S210 and step S250 have been introduced in detail in the above embodiments and will not be repeated here.
[0066] Step S260: performing a target operation on the target physical block, where the target operation includes at least one of a read operation, a write operation and an erase operation.
[0067] It should be noted that, in this embodiment, the target operation is a write operation or an erase operation.
[0068] Step S270: If the write operation or erase operation on the target physical block fails, the target index value is modified to be plus one to obtain a new target index value, and the operation of determining the target physical block corresponding to the target index value based on the multiple physical blocks and subsequent operations are returned.
[0069] It should be noted that physical bad blocks are divided into two types: "factory bad blocks" and "secondary bad blocks". During the manufacturing process of storage devices, the charge in the storage cells of some physical blocks cannot reach the expected value. This type of physical block is called a "factory bad block". In addition, with repeated read, write and erase operations during normal use of storage devices, new "secondary bad blocks" will be generated.
[0070] To this end, when a write operation or an erase operation is performed on the target physical block, the write operation or the erase operation may fail. If the write operation or the erase operation on the target physical block fails, it means that the target physical block is a bad block, and the target operation is not performed on the bad block. The target index value is modified to add one to obtain a new target index value, and the operation of determining the target physical block corresponding to the target index value based on multiple physical blocks and subsequent operations are returned.
[0071] Exemplarily, the 6th physical block is determined to be the target physical block. When a write operation or an erase operation on the target physical block fails, the target index value 6 is increased by 1 to obtain a new target index value 7. The process then returns to execute the determination that the 7th physical block is the new target physical block based on the target index value 7, and the target operation is performed on the new target physical block.
[0072] The present application proposes a data processing method, which further determines the label of the target physical block by judging whether a write operation or an erase operation on a target physical block fails. When it is detected that a write operation or an erase operation on a target physical block fails, it indicates that the target physical block is a bad block, and the target physical block needs to be re-determined. The present application can correctly find the target physical block corresponding to the logical starting block, which can avoid user data being stored in a secondary bad block, and further improve the correctness of data processing.
[0073] See also Figure 3, which shows a method flow chart of a data processing method provided in an embodiment of the present application, the method is applied to a processor of an electronic device, the electronic device also includes a storage module, the storage module includes multiple physical blocks, the target operation is a write operation or an erase operation, and the method specifically includes steps S310 to S380.
[0074] Step S310: Obtain a target bad block table from the storage module, wherein the target bad block table includes a label of each physical block and an index value of the physical block, and the labels of the physical blocks are divided into physical bad blocks and physical good blocks.
[0075] Step S320: Determine the logical index value of the logical start block according to the acquired logical address.
[0076] Step S330: Traverse from the first physical block based on the target bad block table, and accumulate the number of traversed physical good blocks.
[0077] Step S340: If the number of traversed physical good blocks is equal to the logical index value, determine the index value corresponding to the last traversed physical good block as the target index value.
[0078] Step S350: Determine a target physical block corresponding to the target index value according to the plurality of physical blocks.
[0079] Among them, step S310 and step S350 have been introduced in detail in the above embodiments and will not be repeated here.
[0080] Step S360: performing a target operation on the target physical block, wherein the target operation includes at least one of a read operation, a write operation and an erase operation.
[0081] It should be noted that, in this embodiment, the target operation is a write operation or an erase operation.
[0082] Step S370: If the write operation or erase operation on the target physical block fails, modify the label of the target physical block to a physical bad block.
[0083] If the write operation or erase operation on the target physical block fails, it means that the target physical block is a bad block, and the target physical block is a "secondary bad block". The label of the target physical block in the target bad block table is wrong, and the target bad block table needs to be updated.
[0084] Step S380: Update the target bad block table according to the label of the target physical block.
[0085] It should be noted that the index value of the target physical block is the target index value, and in the target bad block table, the label of the physical block corresponding to the target index value is a physical good block, but in fact, the physical block corresponding to the target index value is a "secondary bad block", so it is necessary to modify the label of the physical block corresponding to the target index value to a physical bad block, thereby achieving the purpose of updating the target bad block table. The accuracy of the target bad block table is ensured, and when the target bad block table is used next time, the label of the physical block obtained is correct, ensuring the security of the target bad block table data and further improving the accuracy of data processing.
[0086] Furthermore, if the write operation or erase operation fails to be performed on the target physical block, the label of the target physical block is determined to be a physical bad block, and the target bad block table is updated according to the label of the target physical block. Then the target index value is modified to be plus one, a new target index value is obtained, and the operation of determining the target physical block corresponding to the target index value according to the multiple physical blocks and subsequent operations are returned. On the one hand, the target bad block table can be updated, and on the other hand, the target physical block corresponding to the logical starting block can be correctly found, further improving the correctness of data processing.
[0087] See also Figure 4 , which shows a method flow chart of a data processing method provided in an embodiment of the present application, the method is applied to a processor of an electronic device, the electronic device also includes a storage module, the storage module includes multiple physical blocks, and the method specifically includes steps S410 to S480.
[0088] Step S410: Obtain a target bad block table from the storage module, wherein the target bad block table includes a label of each physical block and an index value of the physical block, and the labels of the physical blocks are divided into physical bad blocks and physical good blocks.
[0089] Step S420: Determine the logical index value of the logical start block according to the acquired logical address.
[0090] Step S430: Traverse from the first physical block based on the target bad block table, and accumulate the number of traversed physical good blocks.
[0091] Step S440: If the number of traversed physical good blocks is equal to the logical index value, determine the index value corresponding to the last traversed physical good block as the target index value.
[0092] Step S450: Determine a target physical block corresponding to the target index value according to the plurality of physical blocks.
[0093] Among them, step S410 and step S450 have been introduced in detail in the above embodiments and will not be repeated here.
[0094] Step S460: Determine the offset according to the logical address.
[0095] Continuing with the above-mentioned embodiment, the logical address space is 0x00000000 to 0x8000000, each logical block contains 0x20000 bytes, and the obtained logical address is 0x80800. The logical index value of the logical starting block = logical address / size of the logical block + 1, that is, the quotient of 0x80800 and 0x20000 plus 1 is the logical index value of the logical starting block, and the remainder of 0x80800 and 0x20000 is the offset. The calculated logical index value of the logical starting block is 5, and the offset is 2048. That is, the offset represents the 2048th byte stored in the target physical block, so it is necessary to perform a read operation on the 2048th byte stored in the target physical block.
[0096] Step S470: Determine a target page in the target physical block based on the offset.
[0097] It should be noted that the storage module may be composed of multiple physical blocks, each of which is composed of multiple pages. A page is the smallest unit for a read operation, and a physical block is the smallest unit for an erase operation.
[0098] It should be noted that, taking the storage module as Nand flash memory as an example, the first page of the physical block storing the target bad block table is used to store the preset label of the physical block, and the second page is used to store the read and write data. Each page of the target physical block is used to store the read and write data, and the target page in the target physical block can be determined according to the offset. For example, the offset is 2048, the page size in the target physical block is 2048 bytes, the target page = offset / page size + 1, and 2048 / 2048 = 1 is calculated, then the target page can be obtained as page 2.
[0099] Step S480: performing a read operation on the data in the target page.
[0100] After the target page is determined, a read operation may be performed on the target page to read out the data in the target page.
[0101] See also Figure 5 , which shows a method flow chart of a data processing method provided in an embodiment of the present application, the method is applied to a processor of an electronic device, the electronic device also includes a storage module, the storage module includes multiple physical blocks, and the method specifically includes steps S510 to S5100.
[0102] Step S510: Obtain a bad block table from the multiple physical blocks of the storage module.
[0103] It should be noted that when the user uses the storage module for the first time, it is necessary to traverse each physical block to create a bad block table. After power off, the data in the bad block table may be wrong when the storage module is used next time. Therefore, before using the bad block table next time, it is necessary to check the data in the bad block table to ensure that the bad block table is used when the data in the bad block table is correct.
[0104] Step S520: Detect whether the data in the bad block table matches the preset data.
[0105] It is important to know that the bad block table includes a label for each physical block and an index value of the physical block. The labels of the physical blocks are divided into physical bad blocks and physical good blocks. When the user uses the storage module again, data errors may occur in the bad block table. Directly using the wrong bad block table will cause data processing errors.
[0106] Therefore, it is necessary to detect the data in the bad block table to check whether the data in the bad block table matches the preset data, so as to ensure the correctness of the data in the bad block table.
[0107] The preset data may be data obtained by detecting the bad block table when the user used it last time, and is pre-stored in a specific physical block.
[0108] In an exemplary embodiment, when a user uses a storage module for the first time, he needs to traverse each physical block to create a bad block table, perform a cyclic redundancy check (CRC) based on the data in the created bad block table to obtain a CRC check code, and store it in the physical block. After power is turned off, when the storage module is used next time, the data in the bad block table stored in the storage module is detected to obtain a new CRC check code. If the new CRC check code is the same as the pre-stored CRC check code, it means that the data in the bad block table matches the preset data. Otherwise, it means that the data in the bad block table does not match the preset data.
[0109] In an exemplary embodiment, when the user uses the storage module this time, a CRC check is performed based on the correct data in the bad block table to obtain a CRC check code, and the CRC check code is stored in the physical block. After power is turned off, when the storage module is used next time, the data in the bad block table stored in the storage module is detected to obtain a new CRC check code. If the new CRC check code is the same as the pre-stored CRC check code, it means that the data in the bad block table matches the preset data. Otherwise, it means that the data in the bad block table does not match the preset data.
[0110] Step S530: If there is a match, the bad block table is determined as a target bad block table.
[0111] If the data in the bad block table matches the preset data, it means that the data in the bad block table is correct, and the bad block table is determined as the target bad block table.
[0112] Step S540: If there is no match, traverse each of the physical blocks to obtain the label of each of the physical blocks.
[0113] If the data in the bad block table does not match the preset data, it means that the data in the bad block table is wrong, and then each of the physical blocks is traversed to obtain the label of each of the physical blocks, so as to obtain the correct bad block table.
[0114] Step S550: Determine a target bad block table based on the label and index value of each physical block.
[0115] The label of each physical block and its corresponding index value are combined into a data pair, and then the data pair corresponding to each physical block is collected into the target bad block table.
[0116] Step S560: Determine the logical index value of the logical start block according to the acquired logical address.
[0117] Step S570: Traverse from the first physical block based on the target bad block table, and accumulate the number of traversed physical good blocks.
[0118] Step S580: If the number of traversed physical good blocks is equal to the logical index value, determine that the index value corresponding to the last traversed physical good block is the target index value.
[0119] Step S590: Determine the target physical block corresponding to the target index value according to the multiple physical blocks.
[0120] Step S5100: performing a target operation on the target physical block, wherein the target operation includes at least one of a read operation, a write operation and an erase operation.
[0121] Among them, step S560 and step S5100 have been introduced in detail in the above embodiments and will not be repeated here.
[0122] A data processing method provided in an embodiment of the present application further realizes the correctness of the target bad block table data by detecting the data in the bad block table, thereby improving the reliability of the target bad block table data and further improving the accuracy of data processing.
[0123] See also Figure 6 , which shows a method flow chart of a data processing method provided in an embodiment of the present application, the method is applied to a processor of an electronic device, the electronic device also includes a storage module, the storage module includes multiple physical blocks, and the method specifically includes steps S610 to S6140.
[0124] Step S610: Determine whether a preset tag is stored in the plurality of physical blocks of the storage module.
[0125] It should be noted that the preset position in the preset physical block in the storage module is used to store the preset label, and the preset label may include the label sign of the bad block table, the version version of the bad block table, and the check value crc32 of the data in the bad block table.
[0126] When the user uses the storage module for the first time, he needs to traverse each physical block to create a bad block table, and store the bad block table in a preset physical block, and also store the preset label at a preset position in the physical block. Later, the user can obtain the information of the preset label by traversing the physical block. If it is detected that a preset label is stored in a physical block, it means that the bad block table is stored in the physical block, and the bad block table can be obtained from the physical block.
[0127] Step S620: If the preset label is not stored, traverse each of the physical blocks to obtain the label of each of the physical blocks.
[0128] It should be noted that if the preset label is not stored in the physical block in the storage module, it means that the user has not stored the bad block table in the physical block. The user side needs to establish a bad block table, then traverse each physical block to obtain the label of each physical block.
[0129] Step S630: Create a bad block table based on the label and index value of each physical block.
[0130] The label of each physical block and its corresponding index value are combined into a data pair, and then the data pairs corresponding to each physical block are collected into the bad block table.
[0131] Step S640: storing the bad block table in a first preset physical block labeled as a physical good block in the storage module.
[0132] The established bad block table is stored in the first preset physical block labeled as a physical good block in the storage module, that is, the bad block table is stored in a specific physical block, and the bad block table can be directly read from the storage module later.
[0133] Step S650: Obtain a bad block table from the multiple physical blocks of the storage module.
[0134] Step S660: Detect whether the data in the bad block table matches the preset data.
[0135] Step S670: If there is a match, the bad block table is determined as the target bad block table.
[0136] Step S680: If there is no match, traverse each of the physical blocks to obtain the label of each of the physical blocks.
[0137] Step S690: Determine a target bad block table based on the label and index value of each physical block.
[0138] Step S6100: Determine the logical index value of the logical starting block according to the acquired logical address.
[0139] Step S6110: Traverse from the first physical block based on the target bad block table, and accumulate the number of traversed physical good blocks.
[0140] Step S6120: If the number of traversed physical good blocks is equal to the logical index value, determine that the index value corresponding to the last traversed physical good block is the target index value.
[0141] Step S6130: Determine the target physical block corresponding to the target index value according to the multiple physical blocks.
[0142] Step S6140: Perform a target operation on the target physical block, where the target operation includes at least one of a read operation, a write operation, and an erase operation.
[0143] Among them, step S650 and step S6140 have been introduced in detail in the above embodiments and will not be repeated here.
[0144] See also Figure 7 , which shows a method flow chart of a data processing method provided in an embodiment of the present application, the method is applied to a processor of an electronic device, the electronic device also includes a storage module, the storage module includes multiple physical blocks, and the method specifically includes steps S710 to S7160.
[0145] Step S710: Determine whether a preset tag is stored in the plurality of physical blocks of the storage module.
[0146] Step S720: If the preset label is not stored, traverse each of the physical blocks to obtain the label of each of the physical blocks.
[0147] Step S730: Create a bad block table based on the label and index value of each physical block.
[0148] Among them, step S710 and step S730 have been introduced in detail in the above embodiments and will not be repeated here.
[0149] Step S740: back up the bad block table to obtain a spare table.
[0150] It should be noted that the existing bad block management solution does not have a power-off protection mechanism. If the bad block table is updated due to abnormal power failure, the data in the bad block table will be lost.
[0151] To this end, the present application backs up the bad block table to obtain a spare table, and the data in the spare table is the same as the data in the bad block table.
[0152] Step S750: storing the spare table in a second preset physical block labeled as a physical good block in the storage module.
[0153] The spare table is stored in the second preset physical block labeled as a physical good block in the storage module. When the bad block table is updated due to abnormal power failure, the bad block table data is lost, but the data in the spare table is correct. The controller can obtain the data in the spare table as the bad block table, which can improve data security.
[0154] Step S760: storing the bad block table in a first preset physical block labeled as a physical good block in the storage module.
[0155] Step S770: Obtain a bad block table from the multiple physical blocks of the storage module.
[0156] Step S780: Detect whether the data in the bad block table matches the preset data.
[0157] Step S790: If there is a match, the bad block table is determined as the target bad block table.
[0158] Step S7100: If there is no match, traverse each of the physical blocks to obtain the label of each of the physical blocks.
[0159] Step S7110: Determine a target bad block table based on the label and index value of each physical block.
[0160] Step S7120: Determine the logical index value of the logical starting block according to the acquired logical address.
[0161] Step S7130: Traverse from the first physical block based on the target bad block table, and accumulate the number of traversed physical good blocks.
[0162] Step S7140: If the number of traversed physical good blocks is equal to the logical index value, determine that the index value corresponding to the last traversed physical good block is the target index value.
[0163] Step S7150: Determine the target physical block corresponding to the target index value according to the multiple physical blocks.
[0164] Step S7160: Perform a target operation on the target physical block, where the target operation includes at least one of a read operation, a write operation, and an erase operation.
[0165] Among them, step S760 and step S7160 have been introduced in detail in the above embodiments and will not be repeated here.
[0166] Further, the storage module is a Nand flash memory, see Figure 8 , which shows a flow chart of a method for creating a bad block table provided in an embodiment of the present application.
[0167] Step S810: Scan and traverse the factory bad block marks of all physical blocks in the flash memory.
[0168] The factory bad block marks of all physical blocks in the flash memory are traversed to obtain the label of each physical block.
[0169] Step S820: Determine whether the label of the physical block is a physical bad block.
[0170] According to the label of each physical block, it is determined whether the physical block is a physical good block or a physical bad block.
[0171] Step S830: If yes, mark the label of the physical block as a physical bad block in the bad block table.
[0172] If the label of the physical block is a physical bad block, it means that the physical block is a bad block, and the label of the physical block is marked as a physical bad block in the bad block table.
[0173] Step S840: If not, mark the label of the physical block as a physical good block in the bad block table.
[0174] If the label of the physical block is a physical good block, it means that the physical block is good, and the label of the physical block is marked as a physical good block in the bad block table.
[0175] Step S850: Write the bad block table into the physical block labeled as a physical good block among the last four physical blocks of the flash memory.
[0176] After each physical block has been traversed and the label of each physical block has been marked, the bad block table is written into the flash memory. For Nand flash memory, the last 4 block areas can be reserved as the storage area for the bad block table. To this end, the bad block table is written into the physical block labeled as a physical good block in the last 4 physical blocks of the flash memory.
[0177] It should be noted that, for different storage structures, the physical blocks used to store the bad block table may be different, and the physical blocks used to store the bad block table in storage modules produced by different manufacturers may be different.
[0178] Step S860: Obtain a spare table according to the bad block table, and write it into a physical block labeled as a physical good block among the last four physical blocks in the flash memory, and the spare table and the bad block table are not in the same physical block.
[0179] A spare table having the same data as the bad block table is obtained according to the bad block table, and the spare table is written into a physical block labeled as a physical good block in the last four physical blocks in the flash memory, and the spare table and the bad block table are not in the same physical block.
[0180] Bad blocks are indicated as follows Fig.12 As shown, the flash memory includes multiple physical blocks 11, such as Block 0, Block n-3, Block n-2, Block n-1, Block n, etc. The last four physical blocks of the flash memory represent reserved blocks, and the reserved blocks include Block n-3, Block n-2, Block n-1, Block n4 physical blocks, which are used to store the bad block table BBT and the spare table Mirror BBT. The physical block 12 storing the bad block table includes multiple pages. The first two bytes of the spare area in each block homepage store the factory bad block mark 13 of the block, and the other bytes of the spare area in each block homepage are used to store the error correction code (Error-Correcting Code, ECC) of the BBT. The data area in each block homepage is used to store the preset label sign of the bad block table, the current version date version of the BBT, and the check calculation value crc32 of the entire BBT data. The second page of each block is used to store BBT data.
[0181] See also Fig. 9 , which shows a flowchart of initializing a bad block table provided in an embodiment of the present application.
[0182] Step S910: Initialize the BbtDesc / MirrorBbtDesc data structure.
[0183] Among them, BbtDesc represents a bad block table descriptor, MirrorBbtDesc represents a spare bad block table descriptor, and MirrorBBT represents a spare bad block table.
[0184] Step S920: Retrieve the BBT according to the signature and read the BBT data in the flash memory.
[0185] That is, the physical block storing the BBT is retrieved according to the preset tag of the physical block, and the BBT data is read from the physical block.
[0186] Step S930: Verify BBT data.
[0187] Check whether the BBT data matches the preset data.
[0188] Step S940: Retrieve MirrorBBT according to the signature and read the MirrorBBT data in the flash memory.
[0189] That is, the physical block storing the MirrorBBT is retrieved according to the preset tag of the physical block, and the MirrorBBT data is read from the physical block.
[0190] Step S950: Verify MirrorBBT data.
[0191] Check whether the MirrorBBT data matches the preset data.
[0192] Step S960: Determine whether BBT is valid and MirrorBBT is invalid.
[0193] If BBT is valid and MirrorBBT is invalid, it means that the BBT data is correct and the MirrorBBT data is invalid.
[0194] Step S970: If yes, read the BBT from the flash memory to the memory, and update the MirrorBBT in the flash memory.
[0195] When BBT is valid and MirrorBBT is invalid, BBT is read from the flash memory to the memory and MirrorBBT in the flash memory is updated.
[0196] Step S980: If not, determine whether BBT is invalid and MirrorBBT is valid.
[0197] If not, determine whether BBT is invalid and MirrorBBT is valid.
[0198] Step S990: If yes, read MirrorBBT from the flash memory to the memory, and update the BBT in the flash memory.
[0199] When BBT is invalid, MirrorBBT is valid, MirrorBBT is read from the flash memory to the memory, and the BBT in the flash memory is updated.
[0200] Step S9100: If not, determine whether BBT is valid and MirrorBBT is valid.
[0201] If not, determine whether BBT is valid and MirrorBBT is valid.
[0202] Step S9110: If yes, read the BBT from the flash memory to the memory.
[0203] If the BBT data is correct and the MirrorBBT data is correct, read the BBT from the flash memory to the memory.
[0204] Step S9120: If not, create a bad block table.
[0205] If the BBT data is incorrect and the MirrorBBT data is incorrect, it means that there is no available BBT and MirrorBBT, and the BBT needs to be re-established. For details, please refer to the above embodiment.
[0206] See also Fig.10 , which shows a flowchart of reading data provided by an embodiment of the present application.
[0207] Step S1010: Obtain a logical address and calculate a logical index value n of a logical starting block.
[0208] That is, the logical index value of the logical starting block is determined according to the acquired logical address.
[0209] Step S1020: Calculate the target index value m according to the logical index value n and the BBT.
[0210] According to the logical index value n and the BBT, the target index value m corresponding to the target physical block is calculated.
[0211] Step S1030: Search for the bad block identifier corresponding to the target index value m in the BBT.
[0212] Find the bad block identifier corresponding to the target index value m, that is, find the label of the physical block corresponding to the target index value m.
[0213] Step S1040: Determine whether the physical block corresponding to the target index value m is a physical bad block.
[0214] The label is used to determine whether the physical block corresponding to the target index value m is a physical bad block.
[0215] Step S1050: If yes, skip the physical block m and increase the target index value m by 1.
[0216] If so, it means that the physical block is damaged, so the physical block m is skipped and the target index value m is increased by 1.
[0217] Step S1060: If not, read the data content of physical block m.
[0218] If not, it means that the physical block is lossless and a read operation can be performed on the physical block to read the data content of the physical block m.
[0219] See also Fig.11 , which shows a flowchart of writing data provided by an embodiment of the present application.
[0220] Step S1110: Obtain the logical address and calculate the logical index value n of the logical starting block.
[0221] Step S1120: Calculate the target index value m according to the logical index value n and the BBT.
[0222] Step S1130: Search for the bad block identifier corresponding to the target index value m in the BBT.
[0223] Step S1140: Determine whether the physical block corresponding to the target index value m is a physical bad block.
[0224] Step S1150: If yes, skip the physical block m and increase the target index value m by 1.
[0225] Among them, step S1110 and step S1150 have been introduced in detail in the above embodiments and will not be repeated here.
[0226] Step S1160: If not, erase and write the data content of physical block m.
[0227] If not, it means that the physical block is lossless and can be written and erased.
[0228] Step S1170: Determine whether writing or erasing fails.
[0229] The erasure failure can be determined by comparing the known correctly erased data with the erased data. If the known correctly erased data is inconsistent with the erased data, it means that the erase operation has failed, otherwise it means that the erase operation is successful. The same principle can be used to determine whether the write operation has failed.
[0230] Step S1180: If yes, mark the physical block as a physical bad block in the BBT, and write the updated BBT into the flash memory.
[0231] If writing or erasing fails, the physical block is marked as a physical bad block in the BBT, and the updated BBT is written to the flash memory.
[0232] See also Fig.13 , which shows a structural block diagram of a test device 600 provided in an embodiment of the present application, wherein the test device 600 includes: an acquisition unit 610, a calculation unit 620, a traversal unit 630, a determination unit 640, a conversion unit 650 and an execution unit 660.
[0233] The acquisition unit 610 is used to acquire a target bad block table from the storage module, wherein the target bad block table includes a label of each physical block and an index value of the physical block, and the labels of the physical blocks are divided into physical bad blocks and physical good blocks.
[0234] Furthermore, the acquisition unit 610 can also be used to determine whether a preset label is stored in the multiple physical blocks of the storage module; if the preset label is not stored, traverse each physical block to obtain the label of each physical block; determine the bad block table based on the label and index value of each physical block; store the bad block table in the first preset physical block in the storage module whose label is a physical good block.
[0235] Furthermore, the acquisition unit 610 may also be configured to back up the bad block table to obtain a spare table; and store the spare table in a second preset physical block labeled as a physical good block in the storage module.
[0236] The calculation unit 620 is used to determine the logical index value of the logical starting block according to the acquired logical address.
[0237] The traversal unit 630 is used to traverse from the first physical block based on the target bad block table, and accumulate the number of traversed physical good blocks.
[0238] The determination unit 640 is configured to determine, if the number of traversed physical good blocks is equal to the logical index value, the index value corresponding to the last traversed physical good block as the target index value.
[0239] The conversion unit 650 is configured to determine a target physical block corresponding to the target index value according to the plurality of physical blocks.
[0240] The execution unit 660 is configured to execute a target operation on the target physical block, where the target operation includes at least one of a read operation, a write operation, and an erase operation.
[0241] Furthermore, the execution unit 660 can also be used to modify the target index value to add one to obtain a new target index value if the write operation or erase operation on the target physical block fails, and return to execute the operation of determining the target physical block corresponding to the target index value based on multiple physical blocks and subsequent operations.
[0242] Furthermore, the execution unit 660 may also be configured to determine that the label of the target physical block is a physical bad block if a write operation or an erase operation on the target physical block fails; and update the target bad block table according to the label of the target physical block.
[0243] Furthermore, the execution unit 660 may also be configured to determine an offset according to the logical address; determine a target page in the target physical block based on the offset; and perform a read operation on data in the target page.
[0244] Furthermore, the execution unit 660 can also be used to obtain a bad block table from the multiple physical blocks of the storage module; detect whether the data in the bad block table matches the preset data; if they match, determine the bad block table as the target bad block table; if they do not match, traverse each of the physical blocks to obtain the label of each physical block; determine the target bad block table based on the label and index value of each physical block.
[0245] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0246] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.
[0247] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0248] Please refer to Fig.14 , which shows a structural block diagram of an electronic device 700 provided in an embodiment of the present application. The electronic device 700 may be a vehicle system, which may be arranged in a vehicle. The electronic device 700 in the present application may include one or more of the following components: a processor 711, a memory 712, and one or more application programs, wherein the processor 711 is electrically connected to the memory 712, and the one or more program configurations are used to execute the methods described in the various embodiments of the aforementioned test method.
[0249] The processor 711 may include one or more processing cores. The processor 711 uses various interfaces and lines to connect various parts of the entire electronic device 700, and executes various functions and processes data of the electronic device 700 by running or executing instructions, programs, code sets or instruction sets stored in the memory 712, and calling data stored in the memory 712. Optionally, the processor 711 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 711 can integrate one or more combinations of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and computer programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 711, and it can be implemented separately through a communication chip. Specifically, the method described in the above embodiment can be executed by one or more processors 711.
[0250] For some embodiments, the memory 712 may include a random access memory (RAM) or a read-only memory (ROM). The memory 712 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 712 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the following various method embodiments, etc. The data storage area may also store data created by the electronic device 700 during use, etc.
[0251] Please refer to Fig.15 , which shows a structural block diagram of a computer-readable medium provided in an embodiment of the present application. The computer-readable medium 800 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
[0252] The computer readable medium 800 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable medium 800 includes a non-transitory computer-readable storage medium. The computer readable medium 800 has storage space for program code 810 that performs any method steps in the above method. These program codes can be read from or written to one or more computer program products. The program code 810 can be compressed, for example, in an appropriate form.
[0253] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A data processing method, characterized in that: The method is applied to a processor of an electronic device, the electronic device further comprising a storage module, the storage module comprising a plurality of physical blocks, the method comprising: Acquire a target bad block table from the storage module, wherein the target bad block table includes a label of each physical block and an index value of the physical block, and the label of the physical block is divided into a physical bad block and a physical good block; Determine the logical index value of the logical starting block according to the acquired logical address; Traversing from the first physical block based on the target bad block table, accumulating the number of traversed physical good blocks; If the number of traversed physical good blocks is equal to the logical index value, determining the index value corresponding to the last traversed physical good block as the target index value; Determine a target physical block corresponding to the target index value according to the plurality of physical blocks; A target operation is performed on the target physical block, where the target operation includes at least one of a read operation, a write operation, and an erase operation.
2. The method according to claim 1, characterized in that The target operation is a write operation or an erase operation. After performing the target operation on the target physical block, the method further includes: If the write operation or erase operation on the target physical block fails, the target index value is modified to be plus one to obtain a new target index value, and the operation of determining the target physical block corresponding to the target index value based on multiple physical blocks and subsequent operations are returned.
3. The method according to claim 1, characterized in that The target operation is a write operation or an erase operation. After the target operation is performed on the target physical block, the method further includes: If a write operation or an erase operation on the target physical block fails, modifying the label of the target physical block to a physical bad block; The target bad block table is updated according to the label of the target physical block.
4. The method according to claim 1, characterized in that: The target operation is a read operation, and performing the target operation on the target physical block includes: Determine an offset according to the logical address; determining a target page in the target physical block based on the offset; A read operation is performed on the data in the target page.
5. The method according to claim 1, characterized in that: The obtaining of the target bad block table from the storage module comprises: Acquire a bad block table from the plurality of physical blocks of the storage module; Detect whether the data in the bad block table matches the preset data; If they match, the bad block table is determined as the target bad block table; If there is no match, traverse each of the physical blocks to obtain the label of each of the physical blocks; A target bad block table is determined based on the label and index value of each of the physical blocks.
6. The method according to claim 5, characterized in that Before obtaining the bad block table from the plurality of physical blocks of the storage module, the method further includes: Determining whether a preset tag is stored in the plurality of physical blocks of the storage module; If the preset label is not stored, traverse each of the physical blocks to obtain the label of each of the physical blocks; Creating a bad block table based on the label and index value of each physical block; The bad block table is stored in a first preset physical block labeled as a physical good block in the storage module.
7. The method according to claim 6, characterized in that After creating the bad block table based on the label and index value of each physical block, the method further includes: Backing up the bad block table to obtain a spare table; The spare table is stored in a second preset physical block labeled as a physical good block in the storage module.
8. A data processing device, characterized in that: The device is applied to a processor of an electronic device, the electronic device further includes a storage module, the storage module includes a plurality of physical blocks, and the device includes: an acquisition unit, configured to acquire a target bad block table from the storage module, wherein the target bad block table includes a label of each physical block and an index value of the physical block, wherein the label of the physical block is divided into a physical bad block and a physical good block; A calculation unit, used to determine a logic index value of a logic start block according to the acquired logic address; A traversal unit, configured to traverse from the first physical block based on the target bad block table, and accumulate the number of traversed physical good blocks; A determination unit, configured to determine, if the number of traversed physical good blocks is equal to the logical index value, the index value corresponding to the last traversed physical good block as the target index value; A conversion unit, configured to determine a target physical block corresponding to the target index value according to the plurality of physical blocks; An execution unit is used to execute a target operation on the target physical block, where the target operation includes at least one of a read operation, a write operation and an erase operation.
9. An electronic device, characterized in that: include: one or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory, the one or more applications are configured to be executed by the one or more processors, and the one or more applications are configured to execute the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 7.