STORAGE, VIDEO RECORDING SYSTEM, AND STORAGE CONTROL METHOD
The storage system with a controller manages data distribution to prevent wear leveling interruptions, ensuring uninterrupted video recording by executing a second wear leveling process that maintains data recording unevenness below a second threshold, thus preventing interruptions and ensuring high-quality video capture.
Patent Information
- Application Number
- JP2024520378
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-05-11
- Filing Date
- 2023-04-26
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2043-04-26
AI Technical Summary
Existing video recording systems using SSDs with NAND flash memory face interruptions due to wear leveling processes, which can degrade performance during video recording, leading to incomplete or lower quality recordings.
A storage system with a controller that manages video recording by executing a second wear leveling process to maintain data recording unevenness below a second threshold, preventing the standard first wear leveling process from interrupting video recording.
Ensures uninterrupted video recording by avoiding the execution of the first wear leveling process during recording, maintaining data distribution within acceptable limits, thus preventing interruptions and ensuring high-quality video capture.
Smart Images

Figure 0007731061000001 
Figure 0007731061000002 
Figure 0007731061000003
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to a storage for recording video, a video recording system for recording video in a storage, and a method for controlling a storage for recording video. [Background technology]
[0002] There is a known system that inputs video captured by a video output device such as a camera and records the video in storage. The video recorded in the external storage is used, for example, for future playback or video editing. This system sometimes uses a storage device called a solid-state drive (SSD).
[0003] SSDs use semiconductor devices called NAND flash memory as their data storage area. NAND flash memory is composed of numerous memory elements, each of which stores data (bit data). Due to their nature, NAND flash memory elements have a limit to the number of times data can be stored. Furthermore, if a specific memory element reaches its limit and no longer functions properly, this can have an impact on the entire NAND flash memory.
[0004] To solve the above problem, SSDs perform a process called "wear leveling" to prevent data from being recorded unevenly on specific memory elements. Wear leveling is a process that reduces the difference between the maximum and minimum number of recordings on a memory element by "rearranging" the data recorded in the NAND flash memory.
[0005] On the other hand, if wear leveling occurs when reading data from an SSD or when writing data to an SSD, the reading or writing of data may become slow. Therefore, it is known to disable wear leveling when reading data (see, for example, Patent Document 1). [Prior art documents] [Patent documents]
[0006] [Patent Document 1] Japanese Patent Application Laid-Open No. 2013-191150 Summary of the Invention [Problem to be solved by the invention]
[0007] When recording video onto an SSD, it is important that the video be recorded without interruption. This is because if the video recording is interrupted, part of the video will be missing, and the quality of the recorded video will be lower than the original video. Therefore, wear leveling processing is also required to ensure that the video recording onto the SSD is not interrupted.
[0008] The present disclosure aims to prevent wear leveling processing from being performed while video is being recorded in a storage device that uses flash memory as a video recording area, thereby recording video uninterrupted in the flash memory recording area. [Means for solving the problem]
[0009] The storage of the present disclosure is a storage for recording video, and includes a flash memory and a controller. The flash memory has a recording area for recording video. The controller controls the recording of video to the flash memory.
[0010] The recording area is divided into multiple blocks, which are units for erasing data. When a data recording maldistribution degree expressed as the difference between the maximum number of data recordings in blocks among the multiple blocks where video may be recorded and the minimum number of recordings among all the multiple blocks becomes equal to or greater than a first threshold, the controller executes a first wear leveling process as a standard function of the storage, which reduces the data recording maldistribution degree below the first threshold. The controller also acquires a second threshold, which is a data recording maldistribution degree that prevents the data recording maldistribution degree from reaching the first threshold during video recording. When the data recording maldistribution degree is greater than the second threshold, the controller executes a second wear leveling process that reduces the data recording maldistribution degree to equal to or less than the second threshold. [Effects of the Invention]
[0011] In the storage device of the present disclosure, by executing the second wear leveling process and keeping the data recording unevenness at or below the second threshold, it is possible to prevent the first wear leveling process, which is executed as a standard function of the storage device, from being executed while video is being recorded, thereby enabling video to be recorded uninterrupted in the recording area of the flash memory. [Brief explanation of the drawings]
[0012] [Figure 1] FIG. 1 is a diagram showing the configuration of a video recording system. [Figure 2] FIG. 2 is a diagram illustrating a configuration of the information processing device. [Figure 3] FIG. 3 is a diagram illustrating the configuration of storage. [Figure 4] FIG. 4 is a diagram showing the configuration of the recording area. [Figure 5] FIG. 5 is a diagram illustrating an example of the address assignment table. [Figure 6] FIG. 6 is a flowchart showing the operation of the information processing device. [Figure 7] FIG. 7 is a flowchart showing the operation of the storage. [Figure 8] FIG. 8 is a diagram showing signal transmission and reception during operation. [Figure 9] FIG. 9 is a diagram showing an example of the state of the recording area before the second wear leveling process. [Figure 10] FIG. 10 is a diagram showing an example of the address allocation table before the second wear leveling process. [Figure 11] FIG. 11 is a diagram showing an example of the state transition of the recording area due to the second wear leveling process. [Figure 12] FIG. 12 is a diagram showing an example of the address allocation table after the second wear leveling process. [Figure 13] FIG. 13 is a diagram showing an example of an address allocation table before another second wear leveling process. [Figure 14] FIG. 14 is a diagram showing an example of a state transition of a recording area by another second wear leveling process. [Figure 15] FIG. 15 is a diagram showing an example of an address allocation table after another second wear leveling process. [Figure 16] FIG. 16 is a flowchart showing the operation of the information processing device of the first modification. [Figure 17] FIG. 17 is a flowchart showing the operation of the storage according to the first modification. [Figure 18] FIG. 18 is a diagram illustrating signal transmission and reception in the first modification. [Figure 19] FIG. 19 is a diagram showing the configuration of a video recording system according to the second modification. DETAILED DESCRIPTION OF THE INVENTION
[0013] Hereinafter, embodiments will be described in detail with reference to the drawings as appropriate. However, more detailed description than necessary may be omitted. For example, detailed description of already well-known matters or redundant description of substantially identical configurations may be omitted. This is to avoid unnecessary redundancy in the following description and to facilitate understanding by those skilled in the art. Note that the inventors provide the accompanying drawings and the following description to enable those skilled in the art to fully understand the present disclosure, and do not intend for them to limit the subject matter described in the claims.
[0014] In this disclosure, "video" refers to data including video data and audio data, data including only video data, and data including still image data. "Recording" data refers to changing the content of the data, and includes not only writing data but also erasing data.
[0015] [1.Video Recording System] A video recording system 100 according to the present disclosure will be described below with reference to the drawings. The video recording system 100 is a system that stores video captured by a video output device 1 in a storage 5. The configuration of the video recording system 100 will be described with reference to FIG. 1. FIG. 1 is a diagram showing the configuration of the video recording system 100. The video recording system 100 includes a video output device 1, an information processing device 3, and a storage 5.
[0016] The video output device 1 is a device that outputs video to the outside. The video output device 1 is, for example, a video shooting device that includes a camera that shoots a predetermined video, a microphone that captures the audio of the predetermined video, and the like. Alternatively, the video output device 1 may be, for example, a media server that records a large number of videos, or a video receiving device that captures video carried on a signal such as radio waves. The video captured by the video output device 1 is, for example, high-quality video such as uncompressed 4K video. Note that, although only one video output device 1 is provided in the example shown in FIG. 1, this is not limiting. The video recording system 100 may include multiple video output devices 1.
[0017] The information processing device 3 is connected to the video output device 1 and the storage 5. The information processing device 3 records the video input from the video output device 1 in the storage 5. The information processing device 3 can use the video recorded in the storage 5 for future video editing, playback, etc., for example.
[0018] The information processing device 3 can, for example, edit the video input from the video output device 1 and send the edited video to an external device (not shown). When editing the video, the information processing device 3 can, for example, insert a specific portion of a past video stored in the storage 5 into the video input from the video output device 1 to generate a new video.
[0019] The information processing device 3 is connected to an input device 7. The input device 7 receives an input operation from a user and transmits the input operation to the information processing device 3. The input device 7 is, for example, a video editing console, a keyboard, a mouse, a touch panel, etc.
[0020] The information processing device 3 is connected to a display device 9. The display device 9 displays video edited by the information processing device 3 and video read for playback from the storage 5. The display device 9 is, for example, a display device such as a liquid crystal display, an organic EL display, or a plasma display.
[0021] The information processing device 3, the input device 7, and / or the display device 9 may be configured as a single device, or may be configured as separate devices.
[0022] The storage 5 is a device for recording video. The storage 5 has flash memory, which is a semiconductor non-volatile memory, as a data recording area. The storage 5 is a solid state drive (SSD).
[0023] In the example of the video recording system 100 shown in Fig. 1, the video output device 1, the information processing device 3, and the storage 5 are configured as separate devices. However, this is not limiting, and the information processing device 3 and the storage 5 may be arranged in a single housing to configure a single device. Furthermore, the video output device 1 and the information processing device 3 may be arranged in a single housing to configure a single device. Furthermore, the video output device 1, the information processing device 3, and the storage 5 may be arranged in a single housing to configure the video recording system 100 as a single device.
[0024] [2. Information processing device] The configuration of the information processing device 3 will be described with reference to Fig. 2. Fig. 2 is a diagram showing the configuration of the information processing device 3. The information processing device 3 has a CPU 31, a RAM 33, a storage device 35, and various interfaces.
[0025] The CPU 31 executes various processes in the information processing device 3. In particular, the CPU 31 executes information processing related to video editing, processing related to recording video input from the video output device 1 to the storage 5, etc. The CPU 31 executes various processes in accordance with instructions indicated in a program stored in the storage device 35. Note that part of the processes may be realized by hardware implemented in the CPU 31. The CPU 31 generates commands for executing various processes.
[0026] The RAM 33 temporarily stores data, etc. Commands generated by the CPU 31 are temporarily stored (queued) in the RAM 33. Data transmitted and received between the video output device 1 and the storage 5 is also temporarily stored in the RAM 33.
[0027] The storage device 35 is composed of a ROM, a hard disk (HDD), a solid state drive (SSD), etc. The storage device 35 stores programs executed by the CPU 31, settings related to the processing of the information processing device 3, parameters used for the processing, etc.
[0028] The interface connects the information processing device 3 to other devices. In detail, the interface includes a video interface 37, an I / O interface 39, a display interface 41, and a storage interface 43.
[0029] The video output device 1 is connected to the video interface 37. The video interface 37 is an interface for connecting video-related devices such as an interface conforming to the Serial Digital Interface (SDI) standard. The input device 7 is connected to the I / O interface 39. The display interface 41 is connected to the display device 9.
[0030] The storage 5 is connected to the storage interface 43. The storage interface 43 is, for example, a PCIe interface. This allows the information processing device 3 and the storage 5 to send and receive data at high speed using a protocol (NVMe (Non-Volatile Memory Express)) dedicated to solid state drives.
[0031] [3. Storage] The configuration of the storage 5 will be described with reference to Fig. 3. Fig. 3 is a diagram showing the configuration of the storage 5. The storage 5 has an access port 51, a flash memory 53, a controller 55, and a storage unit 57. The access port 51 connects the information processing device 3 to the storage 5. Note that a plurality of access ports 51 may be provided, and the information processing device 3 may be connected to one of the plurality of access ports 51.
[0032] The flash memory 53 is composed of multiple NAND flash memories. The flash memory 53 has a recording area RA for recording video. As shown in Figure 4, the recording area RA is divided into multiple blocks BL. Figure 4 is a diagram showing the configuration of the recording area RA.
[0033] A block BL is also called an erase block, and is the unit in which data is erased. A block BL is further divided into multiple pages PA. A page PA is the unit in which data is written. When data in a block BL is erased in the flash memory 53, the data contained in this block BL is moved to another block BL and then erased (garbage collection). This makes this block BL a "free block" to which data can be written.
[0034] The recording area RA is composed of an available area UA and a spare area SA. The available area UA includes blocks BL in which data can be recorded. The spare area SA is used for the purpose of saving data included in the available area UA through wear leveling processing, garbage collection, etc. Recording of data from the information processing device 3 to blocks BL included in the spare area SA is prohibited.
[0035] The controller 55 executes control related to the storage 5. In particular, the controller 55 controls the recording of data to the flash memory 53 and the reading of data from the flash memory 53. The controller 55 also executes other processes required for a solid state drive, such as wear leveling. The controller 55 executes a program stored in the storage unit 57 to execute the above processes. The controller 55 may also implement the above processes using its own hardware.
[0036] The storage unit 57 is provided as a memory separate from the flash memory 53, or is a part of the recording area RA, and stores various parameters related to the control of the storage 5. In detail, the storage unit 57 stores recording count information CI, an address allocation table TA, and a threshold value TH.
[0037] The recording count information CI is information indicating the number of times data has been recorded in each block BL included in the recording area RA. As shown in Fig. 5, the address allocation table TA is a table that associates addresses (logical addresses) specified by an external device with addresses (physical addresses) of blocks BL corresponding to the logical addresses. Fig. 5 is a diagram showing an example of the address allocation table TA. The controller 55 determines a logical address from the address specified by the external device, determines a physical address from the determined logical address, and determines the block BL to be accessed.
[0038] The threshold value TH indicates the condition for executing the wear leveling process. More specifically, the threshold value TH indicates that the wear leveling process is executed when the data recording unevenness is equal to or greater than this threshold value TH. In other words, the first wear leveling process and the second wear leveling process described below use a common wear leveling process algorithm, and multiple wear leveling processes can be selectively executed simply by changing the threshold value TH in the storage unit 57.
[0039] The data recording unevenness indicates the degree to which data recording is concentrated in blocks BL where data recording is frequent. The data recording unevenness is expressed as the difference between the maximum number of recordings of blocks BL where video may be recorded among multiple blocks BL and the minimum number of recordings of all multiple blocks BL. The blocks BL where video may be recorded are blocks BL included in the available area UA.
[0040] The default value of the threshold value TH is the first threshold value. That is, when the data recording uneven distribution degree becomes equal to or greater than the first threshold value, the controller 55 executes wear leveling processing as a standard function of the storage 5. This wear leveling processing is called first wear leveling processing.
[0041] [4. Operation of the video recording system] [4-1. Operation of information processing device] The video read / recording operation in the video recording system will be described with reference to Figs. 6 to 8. Fig. 6 is a flowchart showing the operation of the information processing device 3. Fig. 7 is a flowchart showing the operation of the storage 5. Fig. 8 is a diagram showing the transmission and reception of signals during operation. First, the operation in the information processing device 3 will be described with reference to Figs. 6 and 8.
[0042] When the video recording system 100 is started, the video recording system 100 is initialized. Specifically, in the storage 5, the controller 55 stores a first threshold value as the threshold value TH. This enables the storage 5 to execute the first wear leveling process as a standard function. Furthermore, if necessary, other initialization (for example, clearing the buffer memory) may be executed in the storage 5, and predetermined initialization may be executed in the information processing device 3.
[0043] 6, after the video recording system 100 is initialized, the user sets the operation mode of the video recording system 100 using the input device 7. The operation mode indicates the quality of the video used in the video recording system 100. The operation mode includes information such as the number of pixels per frame of the video used in the video recording system 100, the number of frames per unit time (e.g., fps (frames per second)), and the allowable range of speed reduction in recording / reading of the video.
[0044] If the user performs an operation using the input device 7 ("Yes" in step S12), the CPU 31 determines whether the user's operation was a read operation or a record operation (step S13). If there is no operation using the input device 7 ("No" in step S12), the CPU 31 waits to receive an operation from the input device 7.
[0045] If the user's operation is a read operation ("Read" in step S13), CPU 31 generates a read command, and the video is read from storage 5 (step S14, steps S101 to S102). The read command includes a read address for accessing the video to be read. The operation of reading the video from storage 5 will be described in detail later.
[0046] On the other hand, if the user operation is a recording operation ("record" in step S13), CPU 31 calculates a second threshold value and stores it in RAM 33 (step S15). The second threshold value is a data recording maldistribution degree that prevents the data recording maldistribution degree from reaching the first threshold value while the video to be recorded is being recorded. In other words, the second threshold value is a data recording maldistribution degree that prevents the first wear leveling process from being executed while the video to be recorded is being recorded.
[0047] Specifically, the CPU 31 calculates the second threshold value based on the recording speed at which the video to be recorded is recorded in the recording area RA and the required time required to record the video in the recording area. In the case of uncompressed recording, the recording speed is calculated as the product of the number of pixels per frame of the video to be recorded, the bit depth per pixel, chroma sampling, and the number of frames per unit time, all of which are included in the operating mode. In the case of compressed recording, the amount of data per unit time is reduced to, for example, one-tenth. In other words, the recording speed corresponds to the amount of data per unit time of the video to be recorded, for example, the bit rate (bps, bits per second). On the other hand, the required time corresponds to the duration of the video to be recorded.
[0048] More specifically, the CPU 31 calculates the total data volume of the video to be recorded from the product of the recording speed and the required time, and calculates the second threshold value based on this total data volume. Even more specifically, the larger the total data volume, the smaller the second threshold value the CPU 31 can calculate. This is because the larger the total data volume, the higher the probability that the video will be recorded in the block BL with the largest number of recordings. In other words, the larger the total data volume, the higher the probability that the video will be recorded in the block BL with the largest number of recordings, and that the first wear leveling process will be executed.
[0049] After calculating the second threshold, the second threshold is transmitted from the RAM 33 to the storage 5 (steps S16 and S103). As a result, a wear leveling process (referred to as a second wear leveling process) is executed on the storage 5 side to set the data recording unevenness to the second threshold or less. The detailed operation of the second wear leveling process will be described later in detail.
[0050] After transmitting the second threshold value, the CPU 31 of the information processing device 3 determines whether or not a completion notification of the second wear leveling process has been received from the storage 5 (step S17). Specifically, the CPU 31 determines whether or not a completion notification has been stored in the RAM 33. If a completion notification has not been received ("No" in step S17), the CPU 31 waits until a completion notification is received.
[0051] On the other hand, if a completion notification has been given ("Yes" in step S17, step S104), CPU 31 generates a recording command, acquires the video to be recorded from video output device 1, and stores the recording command and the video to be recorded in RAM 33, thereby recording the video to storage 5 (step S18, steps S105 to S107). The read command includes a recording address at which the video to be recorded is to be recorded. The operation of recording video to storage 5 will be described in detail later.
[0052] After reading / recording the video, the CPU 31 determines whether or not a stop operation for the information processing device 3 has been performed from the input device 7 or the like (step S19). As long as a stop operation has not been performed (as long as the answer is "No" in step S19), the above steps S11 to S18 are repeatedly executed. On the other hand, if a stop operation has been performed ("Yes" in step S19), the information processing device 3 stops operating.
[0053] [4-2. Storage Operation] Next, the operation of the storage 5 will be described with reference to Figures 7 and 8. First, in step S31, the controller 55 determines whether the current data recording unevenness is equal to or greater than a threshold value TH stored in the storage unit 57. Specifically, the controller 55 refers to the recording count information CI, calculates the difference between the maximum and minimum values of the data recording counts of the multiple blocks BL as the data recording unevenness, and compares this with the threshold value TH.
[0054] As described above, the threshold value TH is set as the first threshold value in the initialization operation of the video recording system 100. Therefore, the controller 55 determines whether the current data recording uneven distribution degree is equal to or greater than the first threshold value.
[0055] If the current data recording unevenness is equal to or greater than the first threshold value ("Yes" in step S31), the controller 55 executes a first wear leveling process (step S32) as a standard function of the storage 5. The first wear leveling process is repeatedly executed until the data recording unevenness becomes smaller than the first threshold value.
[0056] On the other hand, if the current data recording uneven distribution degree is smaller than the first threshold value ("No" in step S31), the process proceeds to step S33. In step S33, the controller 55 determines whether or not the second threshold value can be acquired. Specifically, the controller 55 determines whether or not the second threshold value is stored in the RAM 33 of the information processing device 3. If the second threshold value is not stored in the RAM 33 ("No" in step S33), the operation of the storage 5 proceeds to step S39. That is, if there is a data read / record command, the command is executed.
[0057] On the other hand, if the second threshold value is stored in the RAM 33 ("Yes" in step S33), in step S34, the controller 55 acquires the second threshold value from the RAM 33 (step S103) and rewrites the threshold value TH in the memory unit 57 from the first threshold value to the second threshold value.
[0058] Thereafter, in step S35, it is determined whether the current data recording unevenness is greater than the second threshold. If the current data recording unevenness is greater than the second threshold ("Yes" in step S35), the controller 55 executes a second wear leveling process (step S36). The second wear leveling process is repeatedly executed until the data recording unevenness becomes equal to or less than the second threshold.
[0059] If the second wear leveling process is performed and the current data recording maldistribution degree is equal to or less than the second threshold, or if the data recording maldistribution degree is equal to or less than the second threshold without performing the second wear leveling process ("No" in step S35), the controller 55 rewrites the threshold value TH in the storage unit 57 from the second threshold value to the first threshold value (step S37). Thereafter, the controller 55 generates a completion notification of the second wear leveling process and transmits it to the information processing device 3 (steps S38 and S104). The transmitted completion notification is stored in the RAM 33.
[0060] In this way, in the storage 5, when the data recording unevenness is equal to or less than the second threshold, the first wear leveling process can be executed as a standard function. As a result, the first wear leveling process is not executed at least while video is being recorded. Since the wear leveling process is not executed while video is being recorded, video recording in the recording area RA can be executed without interruption.
[0061] When a request to read or record video is made by the information processing device 3 ("Yes" in step S39), the controller 55 of the storage 5 executes the reading / recording of video (step S40).
[0062] Reading of video is executed as follows. First, the controller 55 of the storage 5 acquires a read command stored in the RAM 33 of the information processing device 3 (step S101). Next, the controller 55 determines a logical address from the read address included in the read command. The controller 55 determines a physical address from the logical address by referring to the address allocation table TA. The controller 55 acquires the video to be read from the page PA determined based on the physical address, and transmits it to the RAM 33 (step S102).
[0063] Video recording is performed as follows. First, the controller 55 of the storage 5 acquires the recording command and the video to be recorded stored in the RAM 33 of the information processing device 3 (steps S105 to S106). Next, the controller 55 determines a logical address from the recording address included in the recording command. The controller 55 references the address allocation table TA and determines a physical address from the logical address. The controller 55 records the video to be recorded in the page PA determined based on the physical address. If the video recording is successful, the controller 55 generates a video recording completion notification and transmits it to the information processing device 3 (step S107). The transmitted completion notification is stored in the RAM 33. This allows the information processing device 3 to recognize that the video to be recorded has been recorded in the specified recording area RA.
[0064] [4-3. Second wear leveling process] The second wear leveling process will be described below with reference to FIGS. 9 to 12. FIG. 9 is a diagram showing an example of the state of the recording area RA before the second wear leveling process. FIG. 10 is a diagram showing an example of the address allocation table TA before the second wear leveling process. FIG. 11 is a diagram showing an example of the state transition of the recording area RA by the second wear leveling process. FIG. 12 is a diagram showing an example of the address allocation table TA after the second wear leveling process. For ease of understanding, in FIGS. 9 and 11, the spare area SA of the recording area RA is shown by hatching. Furthermore, on the right or left side of each block BL, the physical address and the number of times of recording of the block BL are shown in the format of "physical address (number of times of recording)". Furthermore, in FIGS. 10 and 12, only the address allocation in the available area UA of the address allocation table TA is shown.
[0065] In the following description, the first threshold is set to 100 and the second threshold is set to 98. As a result, for example, the first wear leveling process is not executed until data is recorded twice in the block BL with the maximum number of recording times.
[0066] 9, before the second wear leveling process, the maximum recording count of the blocks BL included in the available area UA is N+99, which is the value of the block BL at physical address "0001." On the other hand, the minimum recording count of all the blocks BL is N, which is the value of the block BL at physical address "00AB." In other words, the data recording unevenness is 99.
[0067] The second wear leveling process can be realized by "exchanging" the least recorded block BL in the available area UA with the least recorded block BL in the spare area SA. Specifically, this can be realized by the following process: The controller 55 copies data in the block BL at physical address "00AB" in the available area UA to the least recorded block BL (N+4) in the spare area SA at physical address "00F2" (see (A) of FIG. 11).
[0068] When erasing already recorded data and recording new data, the recording count of the block BL increases by 1 at the time the existing data is erased. Therefore, the recording count of the block BL at physical address "00F2" that was moved to the available area UA does not increase even with this copy and remains at N+4.
[0069] Next, the controller 55 designates the block BL at physical address "00F2" as a block in the usable area UA, and the block BL at physical address "00AB" as a block in the spare area SA ((B) and (C) of FIG. 11). The controller 55 also changes the physical address assigned to the logical address "0124" in the address assignment table TA from "00AB" to "00F2" (FIG. 12). As a result, when the logical address "0124" is designated by the information processing device 3, the block BL at physical address "00F2" is accessed.
[0070] Even if the logical addresses and physical addresses are associated as described above after the second wear leveling process, the information processing device 3 can access data appropriately before and after the second wear leveling process. This is because the block BL at physical address "00F2" contains data from the block BL (physical address: 00AB) that was assigned to logical address "0124" before the second wear leveling process.
[0071] Thereafter, the controller 55 erases the data in the block BL at the physical address "00AB." This erase increases the recording count of the block BL at the physical address "00AB" by one to N+1. As a result, the maximum recording count of the blocks BL included in the available area UA remains N+99, but the minimum recording count of all the blocks BL becomes N+1. In other words, the data recording unevenness becomes 98. In this case, the first wear leveling process is not executed unless data is recorded twice in the block BL (physical address: 0001) included in the available area UA that has the maximum recording count. In other words, the first wear leveling process is not executed even if one video is recorded.
[0072] Alternatively, the second wear leveling process can also be realized by garbage collection (GC). The second wear leveling process using garbage collection will be described below with reference to Figs. 13 to 15. Fig. 13 is a diagram showing an example of an address allocation table TA before the other second wear leveling process. Fig. 14 is a diagram showing an example of a state transition of the recording area RA by the other second wear leveling process. Fig. 15 is a diagram showing an example of an address allocation table TA after the other second wear leveling process.
[0073] In the following description, it is assumed that the address allocation table TA is as shown in Fig. 13. That is, it is assumed that the physical addresses "0001" and "00AB" are assigned to the logical address "0001".
[0074] First, the controller 55 of the storage 5 copies the data of the block BL (physical address: 0001) with the most recorded count and the data of the block BL (physical address: 00AB) with the least recorded count in the available area UA to the block BL (physical address: 00F2) with the least recorded count in the spare area SA (garbage collection) ((A) of Figures 9 and 14).
[0075] Next, the controller 55 designates the block BL (physical address: 00F2) to which the data has been copied as a block in the available area UA. The controller 55 also designates the block BL (physical address: 0001) with the largest number of recordings and the block BL (physical address: 00AB) with the smallest number of recordings in the available area UA as blocks in the spare area SA ((B) and (C) in FIG. 14). The controller 55 also changes the physical address assigned to the logical address "0001" in the address assignment table TA to "00F2" (FIG. 15).
[0076] In the second wear leveling process using garbage collection described above, the maximum number of recordings of blocks BL included in the available area UA is N+97, and the minimum number of recordings of all blocks BL remains N. In other words, the data recording unevenness is 97. In this case, the first wear leveling process will not be executed unless data is recorded three times in the block BL (physical address: 0002) included in the available area UA that has the maximum number of recordings. In other words, even if one video is recorded, the first wear leveling process will not be executed.
[0077] The block BL (physical address: 0001) having the maximum number of recordings (N+99) of all blocks BL is located in the spare area SA. Therefore, no data is recorded in this block BL, and the number of recordings of this block BL remains at N+99.
[0078] Furthermore, the second wear leveling process by exchanging blocks BL and the second wear leveling process using garbage collection may be executed in combination.
[0079] [5. Variation 1] In the following modified example 1, it is assumed that the second wear leveling process is executed by specifying a free time when video is not being recorded to the flash memory 53. The operation of the video recording system 100 in this case will be described with reference to Figs. 16 to 18. Fig. 16 is a flowchart showing the operation of the information processing device 3 in modified example 1. Fig. 17 is a flowchart showing the operation of the storage 5 in modified example 1. Fig. 18 is a diagram showing the transmission and reception of signals in modified example 1.
[0080] When the information processing device 3 calculates the second threshold (step S55), it determines the designated time for executing the second wear leveling process (step S56). For example, the CPU 31 refers to the time when video recording is scheduled by a user operation, and determines a time period when no such reservation has been made as the designated time. The CPU 31 stores the determined designated time in the RAM 33. Thereafter, the second threshold and the designated time stored in the RAM 33 are transmitted to the storage 5 (steps S57 and S203).
[0081] In the storage 5, the controller 55 acquires the second threshold value and the specified time ("Yes" in step S63, step S203), and then executes the second wear leveling process (steps S65 to S69) when the specified time arrives ("Yes" in step S64). ).
[0082] Note that the processing contents of steps S51 to S55 and steps S58 to S60 in Fig. 16 are the same as the processing contents of steps S11 to S15 and steps S17 to S19 in Fig. 6, respectively, and therefore detailed explanations will be omitted. The processing contents of steps S61 to S63 and steps S65 to S71 in Fig. 17 are the same as the processing contents of steps S31 to S33 and steps S34 to S60 in Fig. 7, respectively, and therefore detailed explanations will be omitted. The processing contents of steps S201 to S202 and steps S204 to S207 in Fig. 18 are the same as the processing contents of steps S101 to S102 and steps S104 to S107 in Fig. 8, respectively, and therefore detailed explanations will be omitted.
[0083] In this way, by performing the second wear leveling process during the free time when video is not being recorded to the flash memory 53, it is possible to prevent other operations in the storage 5 from being stopped or slowed down due to the execution of the second wear leveling process.
[0084] [6. Variation 2] In the following modified example 2, it is assumed that, as shown in Fig. 19, in a video recording system 100a, a plurality of storages 5 are connected to an information processing device 3. Fig. 19 is a diagram showing the configuration of the video recording system 100a of modified example 2. In the example shown in Fig. 19, n storages 5 are connected to the information processing device 3.
[0085] The multiple storages 5 of the video recording system 100a are configured in a striping configuration. That is, in the video recording system 100a, the multiple storages 5 are treated as a single storage having the total capacity of the multiple storages 5. This increases the amount of video that can be recorded in the video recording system 100a.
[0086] Furthermore, in the video recording system 100a, each storage 5 can send and receive commands and video to and from the information processing device 3 independently of the other storages 5. This allows each storage 5 to perform various operations in accordance with commands received from the information processing device 3 without being restricted by the operations of the other storages 5.
[0087] For example, the information processing device 3 can transmit the second threshold value to each storage 5 at a different time period, thereby causing each storage 5 to execute the second wear leveling process at a different time period from the other storages 5. This allows other operations, such as reading / recording video, to be performed in the other storages 5 while the second wear leveling process is being executed in one storage 5. As a result, the operational efficiency of the multiple storages 5 is improved, and the video recording system 100a becomes faster.
[0088] Furthermore, when the second wear leveling process is being executed in a storage 5, the video to be recorded in that storage 5 is recorded in the RAM 33 of the information processing device 3 until the second wear leveling process is completed. As described above, in the video recording system 100a, each storage 5 executes the second wear leveling process at a different time, so the amount of video data accumulated in the RAM 33 is reduced.
[0089] As a comparative example, in a case where only one command can be sent simultaneously to multiple storages 5, for example, when a second threshold value is sent to multiple storages 5, the second wear leveling process is executed simultaneously in the multiple storages 5. Furthermore, until the storage 5 that last completed the second wear leveling process notifies the completion, the other storages 5 that have completed the second wear leveling process cannot execute the operation instructed to them.
[0090] Furthermore, if multiple storages 5 simultaneously execute the second wear leveling process, the amount of video data stored in RAM 33 during execution of the second wear leveling process will be as large as the amount of data for multiple storages 5, which may affect the operation of the information processing device 3.
[0091] 7. Features of the Disclosure (1) A storage according to the present disclosure is a storage for recording video, and includes a flash memory and a controller. The flash memory has a recording area for recording video. The controller controls the recording of video to the flash memory.
[0092] The recording area is divided into multiple blocks, which are units for erasing data. When a data recording maldistribution degree expressed as the difference between the maximum number of data recordings in blocks among the multiple blocks where video may be recorded and the minimum number of recordings among all the multiple blocks becomes equal to or greater than a first threshold, the controller executes a first wear leveling process as a standard function of the storage, which reduces the data recording maldistribution degree below the first threshold. The controller also acquires a second threshold, which is a data recording maldistribution degree that prevents the data recording maldistribution degree from reaching the first threshold during video recording. When the data recording maldistribution degree is greater than the second threshold, the controller executes a second wear leveling process that reduces the data recording maldistribution degree to equal to or less than the second threshold.
[0093] In the storage device of the present disclosure, by executing the second wear leveling process and keeping the data recording unevenness at or below the second threshold, it is possible to prevent the first wear leveling process, which is executed as a standard function of the storage device, from being executed while video is being recorded, thereby enabling video to be recorded uninterrupted in the recording area of the flash memory.
[0094] (2) In the storage of (1) above, the second threshold may be calculated based on the recording speed at which the video is recorded in the recording area and the time required to record the video in the recording area, thereby making it possible to calculate an appropriate second threshold according to the characteristics of the video to be recorded.
[0095] (3) In the storage described in (1) and (2) above, the controller may execute the second wear leveling process during the free time when no video is being recorded to the flash memory. This prevents other operations in the storage from being stopped or slowed down due to the execution of the second wear leveling process.
[0096] (4) The storage described in (1) to (3) above may further include a storage unit. In this case, the controller may execute the wear leveling process when the data recording maldistribution degree is equal to or greater than a threshold value stored in the storage unit. The controller may also execute the second wear leveling process by storing the acquired second threshold value in the storage unit, and after executing the second wear leveling process, rewrite the second threshold value stored in the storage unit with the first threshold value. This allows the first wear leveling process and the second wear leveling process to be executed individually by simply changing the threshold value stored in the storage unit using a common algorithm that executes the wear leveling process when the data recording maldistribution degree is equal to or greater than the threshold value stored in the storage unit.
[0097] (5) In the storage of (1) to (4) above, the second threshold may be transmitted from an information processing device that transmits the video to be recorded in the recording area, thereby eliminating the need for the storage to calculate the second threshold.
[0098] (6) A video recording system according to the present disclosure includes a storage device and an information processing device. The storage device includes a flash memory having a storage area for recording video, and a controller for controlling the recording of the video to the flash memory. The information processing device is connected to the storage device and transmits video to be recorded in the storage area to the storage device.
[0099] In this video recording system, the recording area is divided into multiple blocks, which are units for erasing data. Furthermore, when a data recording maldistribution degree expressed as the difference between the maximum number of data recordings in blocks among the multiple blocks where video may be recorded and the minimum number of recordings among all the multiple blocks becomes equal to or greater than a first threshold, the controller executes a first wear leveling process as a standard function of the storage, which reduces the data recording maldistribution degree below the first threshold. Furthermore, the information processing device calculates a second threshold, which is a data recording maldistribution degree that prevents the data recording maldistribution degree from reaching the first threshold during video recording. The controller acquires the second threshold from the information processing device, and when the data recording maldistribution degree is equal to or greater than the second threshold, executes a second wear leveling process that reduces the data recording maldistribution degree to equal to or less than the second threshold.
[0100] In the video recording system of the present disclosure, the storage device performs a second wear leveling process to set the data recording unevenness to a second threshold or less, thereby preventing the first wear leveling process, which is performed as a standard function of the storage device, from being performed while video is being recorded. As a result, video can be recorded without interruption in the recording area of the flash memory. Furthermore, the information processing device calculates the second threshold, thereby reducing the processing load on the storage device's controller.
[0101] (7) In the video recording system of (6), the information processing device may calculate the second threshold based on the recording speed at which the video is recorded in the recording area and the time required to record the video in the recording area. This allows the calculation of an appropriate second threshold according to the characteristics of the video to be recorded.
[0102] (8) The video recording systems described in (6) and (7) above may be provided with multiple storage devices. In this case, the multiple storage devices may be configured in a striping configuration. Each storage device may be capable of sending and receiving commands and video to and from an information processing device independently of the other storage devices. This increases the amount of video that can be recorded in the video recording system. Furthermore, while one storage device is performing a process, another storage device can perform another process. As a result, the operational efficiency of the multiple storage devices is improved, and the video recording system becomes faster.
[0103] (9) In the video recording system of (7) above, the information processing device may transmit the second threshold to each storage device at different time periods, causing each storage device to execute the second wear leveling process at a different time period from the other storage devices. This allows other operations to be performed in the other storage devices while the second wear leveling process is being executed in one storage device. As a result, the operational efficiency of the multiple storage devices is improved, and the video recording system becomes faster.
[0104] (10) A storage control method according to the present disclosure is a storage control method having a flash memory having a recording area for recording video. In this storage, when a data recording unevenness expressed as a difference between a maximum number of data recording counts in blocks in which video may be recorded among multiple blocks included in the recording area and a minimum number of recording counts among all the multiple blocks becomes equal to or greater than a first threshold, a first wear leveling process is executed to reduce the data recording unevenness below the first threshold.
[0105] A method for controlling storage having the above configuration includes a step of acquiring a second threshold value, which is a data recording maldistribution degree that prevents the data recording maldistribution degree from reaching the first threshold value during video recording, and a step of executing a second wear leveling process that sets the data recording maldistribution degree to be equal to or less than the second threshold value if the data recording maldistribution degree is greater than the second threshold value.
[0106] In the control method disclosed herein, by executing the second wear leveling process and keeping the data recording unevenness equal to or less than the second threshold, it is possible to prevent the first wear leveling process, which is executed as a standard function of the storage, from being executed while video is being recorded, thereby enabling video to be recorded uninterrupted in the recording area of the flash memory. [Industrial Applicability]
[0107] The present disclosure is applicable to a storage for recording video, a video recording system for recording video in a storage, and a method for controlling a storage for recording video. [Explanation of symbols]
[0108] 100, 100a: Video recording system 1: Video output device 3: Information processing equipment 31: CPU 33: RAM 35: Storage device 37: Video interface 39: I / O interface 41: Display interface 43: Storage interface 5: Storage 51: Access port 53: Flash memory RA: Recording area SA: Spare area UA: Available area 55: Controller 57: Storage section CI: Recording count information TA: Address Allocation Table TH: Threshold 7: Input device 9:Display device BL: Block
Claims
1. A storage device for recording video, a flash memory having a recording area for recording video; a controller for controlling recording of the video into the flash memory; Equipped with The recording area is divided into a plurality of blocks, which are units for erasing data, the controller, when a data recording unevenness expressed as a difference between a maximum value of a data recording count in a block among a plurality of blocks in which the video may be recorded and a minimum value of a data recording count in all of the plurality of blocks, becomes equal to or greater than a first threshold, executes a first wear leveling process as a standard function of the storage to reduce the data recording unevenness to less than the first threshold; The controller obtaining a second threshold value that is a data recording maldistribution degree that prevents the data recording maldistribution degree from reaching the first threshold value during recording of the video; If the data recording unevenness is greater than the second threshold, a second wear leveling process is performed to make the data recording unevenness equal to or less than the second threshold. Storage.
2. The storage according to claim 1 , wherein the second threshold is calculated based on a recording speed at which the video is recorded in the recording area and a required time for recording the video in the recording area.
3. The storage device according to claim 1 , wherein the controller executes the second wear leveling process by utilizing a free time when the video is not being recorded in the flash memory.
4. Further comprising a storage unit, the controller executes a wear leveling process when the data recording unevenness is equal to or greater than a threshold value stored in the storage unit; the controller executes the second wear leveling process by storing the acquired second threshold in the storage unit, and after executing the second wear leveling process, rewrites the second threshold in the storage unit with the first threshold; The storage device according to claim 1 .
5. The storage according to claim 1 , wherein the second threshold value is transmitted from an information processing device that transmits the video to be recorded in the recording area.
6. a storage device including a flash memory having a recording area for recording video and a controller for controlling the recording of the video in the flash memory; an information processing device connected to the storage and configured to transmit to the storage the video to be recorded in the recording area; Equipped with The recording area is divided into a plurality of blocks, which are units for erasing data, the controller, when a data recording unevenness expressed as a difference between a maximum value of a data recording count in a block among a plurality of blocks in which the video may be recorded and a minimum value of a data recording count in all of the plurality of blocks, becomes equal to or greater than a first threshold, executes a first wear leveling process as a standard function of the storage to reduce the data recording unevenness to less than the first threshold; the information processing device calculates a second threshold value, which is a data recording maldistribution degree that prevents the data recording maldistribution degree from reaching the first threshold value during recording of the video; The controller acquiring the second threshold value from the information processing device; If the data recording unevenness is equal to or greater than the second threshold, a second wear leveling process is executed to reduce the data recording unevenness to equal to or less than the second threshold. Video recording system.
7. The video recording system according to claim 6 , wherein the information processing device calculates the second threshold based on a recording speed at which the video is recorded in the recording area and a required time for recording the video in the recording area.
8. A plurality of the storages are provided, The multiple storages are configured in a striping configuration.
7. The video recording system according to claim 6, wherein each storage device is capable of transmitting and receiving commands and the video to and from the information processing device independently of other storage devices.
9. The video recording system of claim 8, wherein the information processing device transmits the second threshold to each storage at different time periods, thereby causing each storage to perform the second wear leveling process at a different time period than other storages.
10. a flash memory having a recording area for recording video; a storage control method for executing a first wear leveling process to reduce the data recording unevenness, the data recording unevenness being expressed as a difference between a maximum value of the number of data recordings in a block in which the video may be recorded among a plurality of blocks included in the recording area and a minimum value of the number of recordings in all of the plurality of blocks, when the data recording unevenness is equal to or greater than a first threshold value, the first wear leveling process being executed to reduce the data recording unevenness to less than the first threshold value; acquiring a second threshold value that is a data recording maldistribution degree that prevents the data recording maldistribution degree from reaching the first threshold value during recording of the video; If the data recording unevenness is greater than the second threshold, executing a second wear leveling process to make the data recording unevenness equal to or less than the second threshold; A control method comprising:
Citation Information
Patent Citations
Memory controller
JP1994222986A
System and method for memory management of electronic equipment, and storage medium stored with memory management program that computer can read
JP1998040176A
Data recording controller and program
JP2004079140A
Video distribution server, SSD control method
JP2013191150A