Electronic apparatus

By utilizing a processor-managed system of parent and child surfaces within flash memory devices, the electronic device efficiently manages data access and backup, ensuring rapid data reading and reduced startup times.

JP2025089631APending Publication Date: 2025-06-16KYOCERA DOCUMENT SOLUTIONS INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023204366
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-12-04
Publication Date
2025-06-16

AI Technical Summary

Technical Problem

In flash memory devices like NAND and NOR flash, the timing of data access and power loss can overlap, leading to increased data surfaces for backup, which in turn prolongs the time required to read target data during startup.

Method used

The electronic device employs a non-volatile memory with multiple sectors and a processor that manages a plurality of parent surfaces, each containing a predetermined number of child surfaces. The processor sets and updates the states of parent surfaces, selects unused surfaces for writing, and uses increment data and checksums to determine the optimal surface for reading data.

Benefits of technology

This approach allows for rapid data reading even when multiple data surfaces are used for backup, thereby reducing startup times and improving overall performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025089631000001_ABST
    Figure 2025089631000001_ABST
Patent Text Reader

Abstract

To obtain an electronic apparatus which can perform data read in a relatively short time, even when backing up by using a plurality of data surfaces.SOLUTION: A processor sequentially backs up object data with respect to a plurality of parent surfaces 21-1 - 21-N in a non-volatile memory 2. The processor: identifies each state of the plurality of parent surfaces 21-1 - 21-N, as any of a non-use state, a use state and an unstable state; selects the parent surface of the non-use state from the plurality of parent surfaces 21-1 - 21-N; writes increment data and checksum indicating the number of times of backup, with respect to a predetermined number of child surfaces, respectively, while mutually writing object data, as same data, with respect to the predetermined number of child surfaces, about the selected parent surface; and selects the parent surface to read the object data, from the plurality of parent surfaces 21-1 - 21-N, on the basis of the increment data and the state of the parent surface.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an electronic device.

Background Art

[0002] In a certain mobile phone, two blocks are secured for data items to be backed up in a flash memory, and a backup process is executed for the older block of the two blocks (that is, the block for which backup storage was performed earlier) (see, for example, Patent Document 1).

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0004] Among non-volatile memories, different from EEPROM (Electrically Erasable Programmable Read-Only Memory), in flash memories such as NAND flash memory and NOR flash memory, when writing data, after performing an erase, writing is performed. Therefore, the timing of access to the flash memory and power loss is likely to overlap. As a result, the number of data surfaces for backing up target data increases, but due to this, the time required to read target data from the flash memory becomes long at startup or the like.

[0005] The present invention has been made in view of the above problems, and an object thereof is to obtain an electronic device that can read data in a relatively short time even when performing backup using a plurality of data surfaces.

Means for Solving the Problems

[0006] The electronic device according to the present invention includes a plurality of sectors, and when erasing certain data, it includes a non-volatile memory that erases the sectors containing the data, and a processor that sets a plurality of parent surfaces in the non-volatile memory and sequentially backs up the target data with respect to the plurality of parent surfaces. Each of the plurality of parent surfaces includes a predetermined number of child surfaces, and the processor: (a) specifies the state of each of the plurality of parent surfaces as any one of an unused state indicating that data writing has not been performed, a used state indicating that data writing has been performed normally, and an indeterminate state indicating that data writing has not been performed normally; (b) selects the unused parent surface from the plurality of parent surfaces; (c) with respect to the selected parent surface, writes the target data as the same data to the predetermined number of child surfaces, and writes increment data indicating the number of backup times and a checksum of the target data to the predetermined number of child surfaces respectively; (d) based on the increment data and the state of the parent surface, selects the parent surface from which the target data should be read from the plurality of parent surfaces.

Effect of the Invention

[0007] According to the present invention, an electronic device capable of reading data in a relatively short time can be obtained even when backups are performed using a plurality of data surfaces.

[0008] The above or other objects, features, and advantages of the present invention will become more apparent from the following detailed description together with the accompanying drawings.

Brief Description of the Drawings

[0009]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

DETAILED DESCRIPTION OF THE INVENTION

[0010] Hereinafter, embodiments of the present invention will be described with reference to the drawings.

[0011] FIG. 1 is a block diagram showing the configuration of an electronic device according to an embodiment of the present invention. The electronic device shown in FIG. 1 is a device having a predetermined function (here, an image forming device such as a multifunction device or a printer), and includes a processor 1 such as a CPU (Central Processing Unit), a non-volatile memory 2, an internal device 3, a communication device 4, a display device 5, and an input device 6.

[0012] The processor 1 incorporates a RAM (Random Access Memory) 1a, operates according to a program, controls the internal device 3, and reads and writes data to and from the non-volatile memory 2.

[0013] The non-volatile memory 2 includes a plurality of sectors, and when erasing a certain data, erases the sector including the data. Here, the non-volatile memory 2 is a NOR flash memory.

[0014] The internal device 3 is a device for realizing a predetermined function. For example, when the electronic device is an image forming device such as a printer or a multifunction device, the internal device 3 is a printing device, an image reading device, or the like.

[0015] The communication device 4 is a network interface, a peripheral device interface, etc., and is an internal device that performs data communication with other devices.

[0016] The display device 5 is, for example, a liquid crystal display, an indicator, etc., and is a device that presents information to the user. The input device 6 is, for example, a touch panel, hard keys, etc., and accepts user operations and outputs an electrical signal corresponding to the user operation.

[0017] FIG. 2 is a diagram showing an example of the data structure in the non-volatile memory 2 in FIG. 1.

[0018] For example, as shown in FIG. 2, the processor 1 holds the status data 41 and the status data 42 in the RAM 1a as status data. The status data 41 is the status data of the master, and the status data 42 is the status data of the mirror. Then, the processor 1 refers to the status data 41 to identify various settings and states, and when updating various settings and states, updates the status data 41. Also, the processor 1 holds the status data 42 to have the same value as the status data 41, and when the status data 41 is updated, the status data 42 is similarly updated, for example, in a background process. Further, the processor 1 writes the status data 42 of the mirror to the non-volatile memory 2 as described later at a predetermined timing (such as when an event occurs where the status data changes) to back up the status data.

[0019] Also, for example, as shown in FIG. 2, the processor 1 sets a plurality of parent surfaces 21-1 to 21-N (N>1) in the non-volatile memory 2 and sequentially backs up the target data for the plurality of parent surfaces 21-1 to 21-N. Here, the target data is, for example, status data such as setting data (calibration adjustment value, motor setting value, etc.).

[0020] The plurality of parent surfaces 21-1 to 21-N are a predetermined number (for example, six) of sectors, each including a predetermined number (here, three) of child surfaces 31-1 to 31-3. Each child surface is a number (for example, two) of sectors necessary for storing status data, increment data, and checksum. Note that for each sector, erasure and data writing are performed.

[0021] The processor 1 (a) specifies the state of each of the plurality of parent surfaces 21-1 to 21-N as either an unused state indicating that data writing has not been performed, a used state indicating that data writing has been performed normally, or an indeterminate state indicating that data writing has not been performed normally, (b) selects an unused parent surface from the plurality of parent surfaces 21-1 to 21-N, (c) for the selected parent surface, writes the target data as the same data to the predetermined number of child surfaces 31-1 to 31-3, and writes increment data indicating the number of backup times and a checksum to each of the predetermined number of child surfaces 31-1 to 31-3, and (d) selects, based on the increment data and the state of the parent surface, a parent surface from the plurality of parent surfaces 21-1 to 21-N from which the target data should be read.

[0022] Note that the number of child surfaces in one parent surface is not limited to three. Also, the number of sectors per child surface is not limited to two.

[0023] Specifically, the processor 1 selects, as the parent surface from which the target data should be read, the parent surface with the largest increment data among the parent surfaces in the used state and with a correct checksum.

[0024] Here, the number of child surfaces (the above-mentioned predetermined number) in one parent surface is odd, and the processor 1 (a) selects, by majority vote, a child surface from which the target data should be read for the predetermined number of child surfaces 31-1 to 31-3 in the selected parent surface, and (b) reads the target data from the selected child surface. That is, when the data in more than half of the child surfaces for a certain data item in the target data is the same, that data is adopted by majority vote.

[0025] Figure 3 is a diagram for explaining the state transition of each parent surface. For example, as shown in Figure 3, when the processor 1 fails in the erase for the parent surface, the state of the parent surface is set to an indeterminate state; when the data write to the parent surface fails, the state of the parent surface is set to an indeterminate state; when the erase for the parent surface is successful, the state of the parent surface is set to an unused state; when the data write to the parent surface is successful, the state of the parent surface is set to a used state.

[0026] Note that when all the data in the parent surface is the initial value (the value after erase, here 0xFF), the state of the parent surface is specified as an unused state. Also, when the checksum is incorrect and in the case of a verification error of the status data, it is determined that the data write has failed. Further, when one of the values of the checksum and the increment data is 0xFFFF and the other value is not 0xFFFF, and when at least one of the erases of the child surfaces 31-1 to 31-3 is not completed, it is determined that the erase has failed.

[0027] The processor 1 holds the states of the parent surfaces 21-1 to 21-N and the increment data as the parent surface state data 43 in the RAM1a, and updates the parent surface state data 43 according to the above-mentioned state transition. Also, when the electronic device is started up, the processor 1 generates the parent surface state data with reference to the checksum 52 and the increment data 53 in the parent surfaces 21-1 to 21-N and stores it in the RAM1a.

[0028] FIG. 4 is a diagram showing an example of a ring buffer configuration of a plurality of parent surfaces. FIG. 5 is a diagram for explaining an active parent surface. For example, as shown in FIG. 4, a plurality of parent surfaces 21-1 to 21-N (N = 20 in FIG. 4) form a ring buffer. The processor 1 (a) sequentially designates a predetermined number (here, five) of parent surfaces as active parent surfaces starting from the parent surface (parent surface 21-6 in FIG. 4) where the latest backup has been performed in the ring buffer, and (b) updates the active parent surfaces at the time of the next backup (in FIG. 5, parent surface 21-7 is added to the active parent surfaces and parent surface 21-2 is removed from the active parent surfaces), erases the parent surface removed from the active parent surfaces (parent surface 21-2 in FIG. 5), and sets the parent surface to an unused state.

[0029] As a result, all parent surfaces other than the active parent surfaces become unused states. Therefore, first, the active parent surfaces are specified, and the parent surfaces from which the target data should be read are selected from the active parent surfaces, and the target data can be read in a short time.

[0030] Next, the operation of the above electronic device will be described.

[0031] (a) Backup of target data

[0032] In the initial state, all parent surfaces 21-1 to 21-N are in an unused state.

[0033] When the first backup is performed, the processor 1 calculates the checksum of the status data 42, writes the status data 51 to the child surfaces 31-1 to 31-3 of the parent surface 21-1, and writes the checksum 52 and the increment data 53 (here, 1) respectively. If the writing of these data is successful, the state of the parent surface 21-1 is updated from the unused state to the used state. If the writing of these data fails, the state of the parent surface 21-1 is updated from the unused state to the indeterminate state.

[0034] Next, when a backup is performed, the processor 1 calculates the checksum of the status data 42, writes the status data 51 to the child faces 31-1 to 31-3 of the parent face 21-2, and writes the checksum 52 and the increment data 53 (here 2) respectively. If the writing of these data is successful, the state of the parent face 21-2 is updated from the unused state to the used state. If the writing of these data fails, the state of the parent face 21-2 is updated from the unused state to the indeterminate state.

[0035] After that, backups are sequentially performed. When the number of backups exceeds the number of active parent faces, the processor 1 similarly executes data writing for the next unused parent face and executes an erase for the parent face that has become detached from the active parent faces. As a result, the state of the parent face for which data writing has been executed becomes the used state or the indeterminate state. Also, the state of the parent face for which the erase has been executed becomes the unused state or the indeterminate state.

[0036] (b) Reading of target data

[0037] First, the processor 1 refers to the parent face state data 43, identifies the parent face among the used parent faces with the largest value of the increment data, calculates the checksum of the status data 51 of the identified parent face, and determines whether the checksum 52 stored in the identified parent face matches the calculated checksum. If both match, the processor 1 selects that parent face, selects a child face by majority vote among the child faces 31-1 to 31-3 of that parent face, and reads the target data from the selected child face.

[0038] If the checksums do not match, the processor 1 refers to the used parent faces in descending order of the increment data, selects the parent face for which the checksum matches, selects a child face by majority vote among the child faces 31-1 to 31-3 of that parent face, and reads the target data from the selected child face.

[0039] As described above, according to the above embodiment, the processor 1 sets a plurality of parent surfaces 21-1 to 21-N in the non-volatile memory 2, and sequentially backs up the target data for the plurality of parent surfaces 21-1 to 21-N. Each of the plurality of parent surfaces 21-1 to 21-N includes a predetermined number of child surfaces. The processor 1 (a) specifies the state of each of the plurality of parent surfaces 21-1 to 21-N as any one of an unused state, a used state, and an indeterminate state, (b) selects an unused parent surface from the plurality of parent surfaces 21-1 to 21-N, (c) for the selected parent surface, writes the target data as the same data to the predetermined number of child surfaces, and writes increment data indicating the number of backup times and a checksum to the predetermined number of child surfaces respectively, (d) selects a parent surface from which the target data should be read from the plurality of parent surfaces 21-1 to 21-N based on the increment data and the state of the parent surface.

[0040] Thereby, by referring to the increment data and the state of the parent surface, a parent surface from which the target data should be read can be selected in a short time. Therefore, even when backup is performed using a plurality of data surfaces (parent surfaces), data reading can be performed in a relatively short time.

[0041] It should be noted that various changes and modifications to the above-described embodiment are obvious to those skilled in the art. Such changes and modifications may be made without departing from the spirit and scope of the subject matter and without weakening the intended advantages. That is, it is intended that such changes and modifications be included in the claims.

[0042] For example, in the above embodiment, when the processor 1 specifies the states of the plurality of parent surfaces 21-1 to 21-N, if there is no parent surface in the unused state, it may be determined that there is a device abnormality, and all of the plurality of parent surfaces 21-1 to 21-N may be erased and returned to the unused state.

Industrial Applicability

[0043] The present invention is applicable to, for example, electronic devices.

Explanation of Symbols

[0044] 1 Processor 2 Non-volatile Memory 21-1 to 21-N Parent Surfaces 31-1 to 31-3 Child Surfaces

Claims

1. A non-volatile memory having a plurality of sectors, and when erasing certain data, erasing the sectors containing the data; A processor that sets a plurality of parent surfaces in the non-volatile memory and sequentially backs up target data with respect to the plurality of parent surfaces; Each of the plurality of parent surfaces includes a predetermined number of child surfaces; The processor: (a) identifies the states of each of the plurality of parent surfaces as any of an unused state indicating that data writing has not been performed, a used state indicating that data writing has been performed normally, and an indeterminate state indicating that data writing has not been performed normally; (b) selects an unused parent surface from the plurality of parent surfaces; (c) for the selected parent surface, writes the target data as the same data to the predetermined number of child surfaces, and writes increment data indicating the number of backup times and a checksum of the target data to the predetermined number of child surfaces respectively; (d) selects a parent surface from the plurality of parent surfaces from which the target data should be read based on the increment data and the state of the parent surface; An electronic device characterized by the above.

2. The electronic device according to claim 1, wherein the processor selects, as the parent surface from which the target data should be read, the parent surface having the maximum increment data among the parent surfaces in the used state and having a correct checksum.

3. The predetermined number is an odd number; The processor: (a) selects, by a majority vote, a child surface from which the target data should be read with respect to the predetermined number of child surfaces on the selected parent surface; (b) reads the target data from the selected child surface; The electronic device according to claim 1, characterized by the above.

4. The plurality of parent surfaces constitute a ring buffer; The processor: (a) designates a predetermined number of parent surfaces in sequence from the parent surface where the latest backup has been performed in the ring buffer as active parent surfaces; and (b) erases the parent surfaces that have become detached from the active parent surfaces by backup, rendering these parent surfaces in an unused state. The electronic device according to claim 1, characterized in that

5. The processor: (a) sets the state of the parent surface to the indeterminate state when erasing the parent surface fails; (b) sets the state of the parent surface to the indeterminate state when data writing to the parent surface fails; (c) sets the state of the parent surface to the unused state when erasing the parent surface succeeds; and (d) sets the state of the parent surface to the used state when data writing to the parent surface succeeds. The electronic device according to claim 1 is characterized by the above.

6. When the processor identifies the states of the plurality of parent surfaces, if there is no parent surface in the unused state, it determines that there is a device abnormality, and erases all of the plurality of parent surfaces to return them to the unused state. The electronic device according to claim 1 is characterized by the above.

Citation Information

Patent Citations

  • Magnetic head, and method and device for magnetic recording / Reproducing using the same

    JP2002157710A