Image Data Simplified Storage Method and Storage Device

By detecting the continuity of image data in the storage device and recording image summary information, the data coverage and loss problems caused by the limited storage capacity of the traditional storage device are solved, and efficient image data storage and recovery are achieved.

CN119440426BActive Publication Date: 2025-06-10HEFEI CORE STORAGE ELECTRONICS LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510045449.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-06-10
Estimated Expiration
2045-01-13

AI Technical Summary

Technical Problem

When traditional storage devices face massive image data storage, the storage capacity is limited, resulting in frequent data coverage, and the risk of data loss and unrecoverability, affecting the integrity and availability of data.

Method used

By implementing the simplified storage method of image data in the storage device, it detects whether the continuous image data meets the deletion conditions. If so, the image summary information of the second image data is recorded, the first image data is stored, and the image summary information is stored in the system area, and the second image data is discarded.

Benefits of technology

Effectively save storage space, extend the storage cycle of the storage device, improve storage efficiency, and ensure data recovery and improve data integrity and availability through the storage of image digest information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440426B_ABST
    Figure CN119440426B_ABST
Patent Text Reader

Abstract

The present invention provides an image data simplified storage method and a storage device. The method includes: obtaining image data from a host system; detecting whether first image data and second image data that belong to consecutive images in the image data meet a deletion condition; if the first image data and the second image data meet the deletion condition, recording image summary information of the second image data; storing the first image data in a data area of a memory module, and mapping a first logical unit corresponding to the first image data to the data area; discarding the second image data, and storing the image summary information in a system area of the memory module. Thereby, the storage efficiency of the storage device for image data can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of storage technologies, and particularly to a method and a storage device for simplifying the storage of image data. Background Art

[0002] With the rapid development of intelligent transportation systems and Internet of Things technologies, driving recorders, vehicle-mounted cameras, and various surveillance cameras have become an indispensable part of daily life. These devices not only provide a solid guarantee for traffic safety but also offer valuable data support for accident analysis, crime prevention, etc.

[0003] However, when faced with storing a large amount of data, traditional local storage methods usually rely on built-in storage media (such as memory cards or built-in hard disks). Although they have the advantages of immediate availability and low cost, due to limited storage capacity, when the amount of data to be stored is too large, it is usually necessary to frequently manually or automatically overwrite old data.

[0004] To solve this problem, many manufacturers have introduced loop recording technology, that is, when the storage medium is full, the system automatically overwrites the earliest recorded data, so as to achieve continuous data recording without interruption. However, this method has the risk of data loss, that is, frequent data overwriting will cause the early recorded data to be overwritten, which is a serious problem for applications that require long-term preservation of key data (such as accident scene records); in addition, once the data is overwritten, it cannot be restored unless there is a backup, which poses a challenge to the integrity and availability of the data.

[0005] Based on this problem, it is urgent for those skilled in the art to propose new solutions to solve it. Summary of the Invention

[0006] The present invention provides a method and a storage device for simplifying the storage of image data, which can improve the above problems and further improve the storage efficiency of the storage device for image data.

[0007] An embodiment of the present invention provides a method for simplifying the storage of image data, which is used for a storage device, wherein the storage device includes a memory module, and the method for simplifying the storage of image data includes: obtaining image data from a host system; detecting whether first image data and second image data belonging to consecutive images in the image data meet a deletion condition; if the first image data and the second image data meet the deletion condition, recording image summary information of the second image data; storing the first image data in a data area in the memory module, and mapping a first logical unit corresponding to the first image data to the data area; discarding the second image data, and storing the image summary information in a system area in the memory module.

[0008] An embodiment of the present invention further provides a storage device, which includes a connection interface, a memory module, and a memory controller. The connection interface is used to connect to a host system. The memory controller is connected to the connection interface and the memory module. The memory controller is configured to: obtain image data from the host system; detect whether first image data and second image data belonging to consecutive images in the image data meet a deletion condition; if the first image data and the second image data meet the deletion condition, record the image summary information of the second image data; store the first image data in a data area in the memory module, and map a first logical unit corresponding to the first image data to the data area; discard the second image data, and store the image summary information in a system area in the memory module.

[0009] Based on the above, after obtaining image data from the host system, if the first image data and the second image data belonging to consecutive images in the image data are detected to meet the deletion condition, the image summary information of the second image data can be recorded. The first image data can be stored in a data area in the memory module, and the first logical unit corresponding to the first image data can be mapped to the data area. In particular, the second image data can be discarded, and the image summary information can be stored in a system area in the memory module for subsequent use (such as for restoring the second image data). Thus, the problem that the storage space is quickly exhausted due to the need to store a large amount of image data in the traditional storage device can be improved, and further the storage efficiency of the storage device for image data can be increased. Description of the Drawings

[0010] Figure 1 is a schematic diagram of a data storage system shown according to an embodiment of the present invention;

[0011] Figure 2 is a schematic diagram of a memory controller shown according to an embodiment of the present invention;

[0012] Figure 3 is a schematic diagram of a management memory module shown according to an embodiment of the present invention;

[0013] Figure 4 is a schematic diagram of storing the first image data and the image summary data corresponding to the second image data shown according to an embodiment of the present invention;

[0014] Figure 5 is a schematic diagram of restoring the second image data according to the first image data and the image summary data shown according to an embodiment of the present invention;

[0015] Figure 6 is a flowchart of an image data simplified storage method shown according to an embodiment of the present invention. Detailed implementation manners

[0016] Reference will now be made in detail to exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Whenever possible, the same reference numerals will be used in the drawings and the description to refer to the same or like parts.

[0017] Figure 1 is a schematic diagram of a data storage system shown according to an embodiment of the present invention. Please refer to Figure 1 , the data storage system 10 includes a host system 11 and a storage device 12. The storage device 12 can be connected to the host system 11 and can be used to store data from the host system 11. For example, the host system 11 can be a smart phone, a tablet computer, a notebook computer, a desktop computer, an industrial computer, a game console, a server, or a computer system disposed in a specific carrier (such as a vehicle, an aircraft, or a ship), and the type of the host system 11 is not limited thereto. In addition, the storage device 12 can include a solid state drive, a USB flash drive, a memory card, or other types of non-volatile storage devices.

[0018] The storage device 12 includes a connection interface 121, a memory module 122, and a memory controller 123. The connection interface 121 is used to connect the storage device 12 to the host system 11. For example, the connection interface 121 can support an embedded Multi-Media Card (eMMC), a Universal Flash Storage (UFS), a Peripheral Component Interconnect Express (PCIExpress), a Non-Volatile Memory Express (NVM express), a Serial Advanced Technology Attachment (SATA), a Universal Serial Bus (USB), or other types of connection interface standards. Therefore, the storage device 12 can communicate with the host system 11 (such as exchanging signals, instructions, and / or data) via the connection interface 121.

[0019] The memory module 122 is used to store data. For example, the memory module 122 may include one or more rewritable non-volatile memory modules. Each rewritable non-volatile memory module may include one or more arrays of memory cells. The memory cells in the memory cell array store data in the form of voltages (also referred to as threshold voltages). For example, the memory module 122 may include a single-level cell (SLC) NAND flash memory module, a multi-level cell (MLC) NAND flash memory module, a triple-level cell (TLC) NAND flash memory module, a quad-level cell (QLC) NAND flash memory module, and / or other memory modules with the same or similar characteristics.

[0020] The memory controller 123 is connected to the connection interface 121 and the memory module 122. The memory controller 123 can be regarded as the control core of the storage device 12 and is used to control the storage device 12. For example, the memory controller 123 can be used to control or manage the overall or partial operation of the storage device 12. For example, the memory controller 123 may include a central processing unit (CPU), or other programmable general-purpose or special-purpose microprocessors, digital signal processors (DSPs), programmable controllers, application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or other similar devices, or a combination of these devices. In one embodiment, the memory controller 123 may include a flash memory controller.

[0021] The memory controller 123 can send a sequence of instructions to the memory module 122 to access the memory module 122. For example, the memory controller 123 can send a sequence of write instructions to the memory module 122 to instruct the memory module 122 to store data in a specific storage unit. For example, the memory controller 123 can send a sequence of read instructions to the memory module 122 to instruct the memory module 122 to read data from a specific storage unit. For example, the memory controller 123 can send a sequence of erase instructions to the memory module 122 to instruct the memory module 122 to erase the data stored in a specific storage unit. In addition, the memory controller 123 can also send other types of instruction sequences to the memory module 122 to instruct the memory module 122 to perform other types of operations, which are not limited in the present invention. The memory module 122 can receive the instruction sequence from the memory controller 123 and access the storage units inside the memory module 122 according to this instruction sequence.

[0022] Figure 2 is a schematic diagram of a memory controller shown according to an embodiment of the present invention. Please refer to Figure 1 and Figure 2 , the memory controller 123 includes a host interface 21, a memory interface 22, and a memory control circuit 23. The host interface 21 is used to connect to the host system 11 through the connection interface 121 to communicate with the host system 11. The memory interface 22 is used to connect to the memory module 122 to access the memory module 122.

[0023] The memory control circuit 23 is connected to the host interface 21 and the memory interface 22. The memory control circuit 23 can be used to control or manage the overall or partial operation of the memory controller 123. For example, the memory control circuit 23 can communicate with the host system 11 through the host interface 21 and access the memory module 122 through the memory interface 22. For example, the memory control circuit 23 can include a control circuit such as an embedded controller or a microcontroller. In the following embodiments, the description of the memory control circuit 23 is equivalent to the description of the memory controller 123.

[0024] In one embodiment, the memory controller 123 may further include a buffer memory 24. The buffer memory 24 is connected to the memory control circuit 23 and is used to cache data. For example, the buffer memory 24 can be used to cache instructions from the host system 11, data from the host system 11, and / or data from the memory module 122.

[0025] In one embodiment, the memory controller 123 may further include a decoding circuit 25. The decoding circuit 25 is connected to the memory control circuit 23 and is used to perform encoding and decoding on data to ensure the correctness of the data. For example, the decoding circuit 25 may support various encoding / decoding algorithms such as Low Density Parity Check code (LDPC code), BCH code, Reed-solomon code (RS code), Exclusive OR (XOR) code, etc. In one embodiment, the memory controller 123 may further include various other types of circuit modules (such as a power management circuit, etc.), which are not limited in the present invention.

[0026] Figure 3 is a schematic diagram of managing a memory module shown according to an embodiment of the present invention. Please refer to Figures 1 to 3 , the memory module 122 includes a plurality of physical units 301(1) to 301(B). Each physical unit includes a plurality of memory cells and is used for non-volatile data storage.

[0027] In one embodiment, a physical unit may include one or more physical programming units. For example, a physical programming unit may include a plurality of physical sectors. For example, the data capacity of a physical sector may be 512 bytes (Bytes, B), and a physical programming unit may include 32 physical sectors. However, both the data capacity of a physical sector and / or the total number of physical sectors included in a physical programming unit may be adjusted according to practical requirements, which are not limited in the present invention. In one embodiment, a physical programming unit may be regarded as a physical page. For example, the storage capacity of a physical programming unit may be 16 kilobytes, and the present invention is not limited thereto.

[0028] In one embodiment, a physical programming unit is the minimum unit for synchronously writing data in the memory module 122. For example, when performing a programming operation (also referred to as a write operation) on a physical programming unit to write data into this physical programming unit, multiple memory cells in this physical programming unit may be synchronously programmed to store the corresponding data. For example, when programming a physical programming unit, a write voltage may be applied to this physical programming unit to change the threshold voltage of at least some of the memory cells in this physical programming unit. For example, the threshold voltage of a memory cell may reflect the bit data stored in this memory cell.

[0029] In one embodiment, an entity erasure unit may include a plurality of entity programming units. The plurality of entity programming units in an entity erasure unit may be synchronously erased. For example, when performing an erase operation on an entity erasure unit, an erase voltage may be applied to the plurality of entity programming units in this entity erasure unit to change the threshold voltages of at least some of the storage units in these entity programming units. By performing an erase operation on an entity erasure unit, the data stored in this entity erasure unit can be cleared.

[0030] In one embodiment, the memory control circuit 23 may logically associate the entity units 301(1)~301(A), 301(A + 1)~301(B), and 301(B + 1)~301(C) with the data area 31, the idle area 32, and the system area 33, respectively. The entity units 301(1)~301(A) in the data area 31 all store data (also referred to as user data) from the host system 11. For example, any one of the entity units in the data area 31 may store valid data and / or invalid data. The entity units 301(A + 1)-301(B) in the idle area 32 do not store data (such as valid data). In addition, the entity units 301(B + 1)~301(C) in the system area 33 can be used to store system data (also referred to as management data).

[0031] In one embodiment, if a certain entity unit does not store valid data, this entity unit may be associated with the idle area 32. In addition, the entity units in the idle area 32 can be erased to clear the data in these entity units. In one embodiment, the entity units in the idle area 32 are also referred to as idle entity units. In one embodiment, the idle area 32 is also referred to as a free pool.

[0032] In one embodiment, when data is to be stored, the memory control circuit 23 may select one or more entity units from the idle area 32 and instruct the memory module 122 to store the data in the selected entity units. After storing the data in this entity unit, this entity unit may be associated with the data area 31. In other words, one or more entity units can be alternately used between the data area 31 and the idle area 32.

[0033] In one embodiment, the memory control circuit 23 may configure a plurality of logical units 302(1)~302(D) to map the entity units in the data area 31 (i.e., the entity units 301(1)~301(A)). For example, one logical unit may correspond to one logical block address (LBA) or other logical management unit. One logical unit may be mapped to one or more entity units.

[0034] In one embodiment, if a certain physical unit is currently mapped by any logical unit, the memory control circuit 23 may determine that the data currently stored in this physical unit includes valid data. Conversely, if a certain physical unit is not currently mapped by any logical unit, the memory control circuit 23 may determine that this physical unit does not currently store any valid data.

[0035] In one embodiment, the memory control circuit 23 may record the mapping relationship between the logical unit and the physical unit in at least one management table (also referred to as the logical-to-physical mapping table). In one embodiment, the memory control circuit 23 may, according to the information in this management table (i.e., the logical-to-physical mapping table), instruct the memory module 122 to perform operations such as data reading, writing, or erasing.

[0036] In one embodiment, the memory control circuit 23 may not map any logical unit to the system area 33 (such as physical units 301(B + 1) to 301(C)). Thus, it is possible to prevent the system data stored in the system area 33 from being accidentally modified or deleted by the user.

[0037] In one embodiment, the system data stored in the system area 33 may include a logical-to-physical mapping table, a bad block management table, a valid data management table, a voltage management table, or other types of management tables. The bad block management table can be used to record information related to the physical units (also referred to as bad blocks) that have been damaged in the memory module 122. The valid data management table can be used to record information related to the valid data stored in at least some of the physical units in the memory module 122. The voltage management table can be used to record information related to the read voltages used by the memory module 122.

[0038] In one embodiment, the memory control circuit 23 may obtain image data from the host system 11. For example, the image data may include a plurality of image frames. In addition, the image data may belong to Figure 3 at least one of the logical units 302(1) to 302(D). In one embodiment, the image data may be carried by at least one operation instruction (such as a write instruction) obtained from the host system 11.

[0039] In one embodiment, the memory control circuit 23 may detect whether a plurality of image data belonging to consecutive images in the image data meet the deletion condition. It should be noted that, for the sake of convenience of description below, it is assumed that the plurality of image data belonging to consecutive images in the image data include first image data and second image data. The first image data corresponds to a certain logical unit (also referred to as the first logical unit). The second image data corresponds to another logical unit (also referred to as the second logical unit).

[0040] In one embodiment, the first image data and the second image data belong to consecutive images, which means that the logical units (i.e., the first logical unit and the second logical unit) corresponding to the first image data and the second image data respectively are consecutive.

[0041] In one embodiment, the first image data and the second image data belonging to consecutive images may also mean that the time information (also referred to as the first time information) corresponding to the first image data and the time information (also referred to as the second time information) corresponding to the second image data are consecutive. For example, the first time information may include a timestamp (also referred to as the first timestamp), the second time information may include a timestamp (also referred to as the second timestamp), and the time corresponding to the first timestamp and the time corresponding to the second timestamp are consecutive.

[0042] In one embodiment, in the operation of determining whether the first image data and the second image data belong to consecutive images, it is also possible to determine whether the image data is consecutive based on the characteristic changes on the time axis of the image, that is, it is possible to determine whether there are abnormal jumps or interruptions by analyzing factors such as the timestamp difference between image frames and the frame rate stability. Exemplarily, the memory control circuit 23 or the host system 11 (such as the processor in the host system 11) can check the continuously recorded video / image stream according to the timestamp to ensure that there is no obvious time interval or jump. If there is a large time gap, it may indicate non - consecutive shooting.

[0043] In one embodiment, the memory control circuit 23 or the host system 11 (such as the processor in the host system 11) can analyze the timestamp difference between frames and the frame rate stability according to the following steps. Specifically: Step 1: Obtain and parse the timestamp. For each frame of image data, extract the attached timestamp information; convert the timestamp to a unified time unit (such as milliseconds) for subsequent calculations. Step 2: Calculate the time difference between frames, that is, calculate the time difference between adjacent frames, and save each time difference value for subsequent analysis. Step 3: Set the time difference threshold. According to the frame rate of the device and the application scenario, set a suitable time difference threshold Δt_threshold. For example, for a dash cam with 30 FPS (Frames Per Second, which means the number of frames captured per second), the time difference threshold Δt_threshold = 33 milliseconds can be selected, but the present invention is not limited thereto. Step 4: Conduct a logical judgment. Traverse the time differences between all adjacent frames and check them pair by pair: If the time difference Δt between two frames < the time difference threshold Δt_threshold, then mark these two frames as consecutive frames. Conversely, if the time difference Δt between two frames > the time difference threshold Δt_threshold, then mark these two frames as non - consecutive frames.

[0044] The corresponding abstract generation method and abstract information for the above - mentioned embodiments are as follows:

[0045] Abstract generation method:

[0046] 1. Timestamp parsing and standardization: (1) Timestamp extraction: Extract the timestamp from the metadata of each frame. This usually involves reading the time information in the file header or a specific encoding format. (2) Time unit conversion: Convert all timestamps to a unified time unit, such as milliseconds (ms), to ensure the consistency and accuracy of subsequent calculations.

[0047] 2. Calculate the inter-frame time difference: For each pair of adjacent frames, calculate the time difference between them (Δt = t_next - t_current) and record these differences. This step may require a simple loop or vectorized operations to accelerate the processing of large amounts of data.

[0048] 3. Set the time difference threshold: Determine a reasonable time difference threshold (Δt_threshold) based on the frame rate (FPS) of the device and the requirements of the application scenario. For example, for a dash cam with 30 FPS, since theoretically the interval between each frame is about 33 ms (1000 / 30 ≈ 33.33 ms), Δt_threshold = 33 ms can be selected.

[0049] 4. Continuity marking and anomaly detection: Traverse all inter-frame time differences, and use conditional statements to check whether each Δt is less than or equal to Δt_threshold. If satisfied, it is considered a continuous frame; otherwise, it is regarded as a discontinuous frame and marked accordingly. For discontinuous cases, further analysis is required to determine whether there are jumps or other anomalies.

[0050] Abstract information:

[0051] 1. Select key frames: For sequences of frames marked as continuous, only key frames can be saved. The selection of key frames can be determined according to the scenario requirements, such as selecting one frame every N frames as a representative, or using more complex strategies such as motion vector analysis.

[0052] 2. Store metadata: (1) Association of timestamp and frame number: Retain the timestamp of each key frame and its corresponding frame number (Frame ID) so that the original video stream can be accurately located during reconstruction. (2) Description of inter-frame relationship: For discontinuous points, in addition to saving the key frames at both ends, a list of all frame numbers within this paragraph and their respective timestamps should also be recorded, so that the video structure can be fully represented even after redundant frames are removed.

[0053] 3. Record the increment of updates. (1). Index of changed regions: For frames that have a similar overall background but contain local changes, the changed parts can be identified through image segmentation techniques, and only the information of these regions is recorded instead of the content of the entire frame. (2). Motion compensation parameters: If object movement is involved, parameters used to describe the position change of the object (such as translation and rotation matrices) can also be saved additionally, which is very useful for later editing or analysis.

[0054] 4. Generate hash values. Generate a perceptual hash value for each key frame. It can resist minor visual changes to a certain extent while remaining sensitive to content changes. When the hash values of two frames are close, it means they are very similar visually.

[0055] Technical effects: Based on using timestamp differences and frame rate stability to judge image continuity, the above-mentioned abstract acquisition method and abstract information can help effectively manage and optimize storage resources while ensuring the integrity and availability of important information.

[0056] In one embodiment, in the operation of determining whether the first image data and the second image data belong to consecutive images, the memory control circuit 23 or the host system 11 (such as the processor in the host system 11) can generate an approximate fingerprint for each new photo or video frame captured, and measure its similarity / compare it with the previous frame through the Hamming distance. If the similarity between the frames is very close, these frames are considered consecutive.

[0057] The corresponding abstract generation method and abstract information for the above embodiment are as follows:

[0058] Abstract acquisition method

[0059] 1. Approximate fingerprint generation

[0060] Perceptual hash algorithm selection: Use perceptual hash algorithms such as pHash, aHash (average hash), dHash (difference hash), or tHash (texture hash) to generate a fixed-length binary string for each frame of image as the fingerprint of this frame.

[0061] Fingerprint standardization: Ensure that all fingerprints have the same length and format for subsequent comparison.

[0062] 2. Hamming distance calculation

[0063] Distance calculation: For the newly captured frame, calculate the Hamming distance between its fingerprint and the fingerprint of the previous frame, that is, the number of different bits in the two binary strings. The smaller the Hamming distance, the more similar the two frames are.

[0064] Similarity Threshold Setting: Set a reasonable Hamming distance threshold according to the requirements of the application scenario (for example, set it to 5 or less) to determine whether two frames are similar enough to be considered consecutive.

[0065] 3. Continuity Marking

[0066] Logical Judgment: If the Hamming distance between two frames is less than the set threshold, then these two frames are considered to belong to the same continuous sequence; otherwise, they are regarded as discontinuous.

[0067] Exception Handling: For frames marked as discontinuous, further analyze whether there are rapid movements, scene switches, or other special situations, and decide whether additional processing is required.

[0068] Summary Information

[0069] 1. Key Frame Saving

[0070] Key Frame Selection: For a sequence of frames considered to be continuous, one complete key frame can be selected to be retained every several frames, and only the fingerprint information of the remaining frames is saved.

[0071] Metadata Recording: In addition to the fingerprint, the timestamp, frame number (Frame ID), and any other necessary metadata of each key frame, such as position information, exposure parameters, etc., should also be recorded.

[0072] 2. Fingerprint Database Construction

[0073] Fingerprint Index: Create a database or index table containing all the saved frame fingerprints and their corresponding metadata for quick search and comparison.

[0074] Incremental Update: When new frames are added, only add their fingerprints to the database and compare them with the nearest key frame to determine whether they belong to a continuous sequence.

[0075] 3. Description of Changed Regions

[0076] Local Feature Extraction: For frames with a similar overall background but containing local changes, the changed parts can be identified through image segmentation techniques, and only the feature descriptors of these regions are recorded, rather than the content of the entire frame.

[0077] Motion Compensation Information: If object movement is involved, parameters used to describe the position change of the object (such as translation, rotation matrix) can also be saved additionally, which is very useful for later editing or analysis.

[0078] 4. Feature Vector Compression

[0079] Deep Feature Summary: Use pre-trained deep learning models (such as VGG, ResNet) to extract deep feature vectors for each frame, and compress these high-dimensional vectors into low-dimensional representations through principal component analysis (PCA) or other dimensionality reduction techniques. This compact representation not only saves storage space but also facilitates fast search and comparison.

[0080] 5. Perceptual Hashing Storage

[0081] Hash Value Recording: Generate a perceptual hash value for each key frame and save it together with other metadata of the frame. When the hash values of two frames are close, it means they are very similar visually.

[0082] Version Control: Since the hash algorithm may be updated or improved over time, introduce a version control system to ensure that hash values of different versions can be correctly matched and parsed.

[0083] Technical Effect: The method can not only effectively determine whether image data is continuous but also achieve efficient resource management and retrieval functions through a carefully designed summary information structure. This method is particularly suitable for devices such as dash cams and surveillance cameras, minimizing the storage of redundant data while ensuring that important information is not lost.

[0084] In one embodiment, in the operation of determining whether the first image data and the second image data belong to consecutive images, the memory control circuit 23 or the host system 11 (such as the processor in the host system 11) can regularly calculate the values of brightness, contrast, and structural information between adjacent frames to measure the two images. If the values of brightness, contrast, and structural information between the two images are higher than a certain threshold, these frames are considered consecutive; otherwise, there may be significant changes.

[0085] The corresponding summary generation method and summary information for the above embodiments are as follows:

[0086] Summary Acquisition Method

[0087] 1. Image Attribute Extraction

[0088] Brightness Analysis: Use methods such as Average Brightness and Histogram Matching to quantify the brightness distribution of each frame.

[0089] Contrast Measurement: Apply methods such as Standard Deviation, Local Contrast, or gradient-based methods (such as the Sobel operator) to evaluate the contrast of the image.

[0090] Structural information extraction: Algorithms such as the Structural Similarity Index Measure (SSIM) and Multi-Scale Structural Similarity (MS-SSIM) are used to capture the structural features in images.

[0091] 2. Similarity metric calculation

[0092] Comprehensive scoring: Combine the above three attributes (brightness, contrast, structural information) into a comprehensive score, which can be a simple weighted sum or a more complex non-linear model.

[0093] Threshold setting: Set a reasonable similarity threshold (Threshold) according to the requirements of the application scenario to determine whether two frames are similar enough to be considered consecutive. For example, for a surveillance camera, if the comprehensive score is higher than 0.95, the two frames are considered to belong to the same consecutive sequence; otherwise, they are regarded as non-consecutive.

[0094] 3. Continuity marking and anomaly detection

[0095] Logical judgment: Traverse all adjacent frame pairs and use conditional statements to check whether each comprehensive score is greater than the set threshold. If it is satisfied, it is considered a consecutive frame; otherwise, it is regarded as a non-consecutive frame and marked accordingly.

[0096] Anomaly handling: For frames marked as non-consecutive, further analyze whether there are fast movements, scene switches, or other special situations and decide whether additional processing is required.

[0097] Summary information

[0098] 1. Key frame saving

[0099] Key frame selection: For a frame sequence considered to be consecutive, one complete key frame can be selected every several frames, and only the simplified description information of the remaining frames is saved.

[0100] Metadata recording: In addition to the simplified description information, the timestamp, frame number (Frame ID) of each key frame, and any other necessary metadata, such as location information, exposure parameters, etc., should also be recorded.

[0101] 2. Attribute change recording

[0102] Incremental update: For frames that are overall similar in background but contain local changes, image segmentation techniques can be used to identify the changed parts and only record the attribute changes (such as the change amounts of brightness, contrast, and structural information) in these areas.

[0103] Motion compensation information: If object movement is involved, parameters for describing the change in object position (such as translation and rotation matrices) can also be saved additionally, which is very useful for later editing or analysis.

[0104] 3. Comprehensive scoring database construction

[0105] Scoring index: Create a database or index table that contains all saved frames and their comprehensive scores for easy and quick searching and comparison.

[0106] Version control: Since the scoring algorithm may be updated or improved over time, introduce a version control system to ensure that scores of different versions can be correctly matched and parsed.

[0107] 4. Feature vector compression

[0108] Deep feature summary: Use pre-trained deep learning models (such as VGG, ResNet) to extract deep feature vectors for each frame, and compress these high-dimensional vectors into low-dimensional representations through principal component analysis (PCA) or other dimensionality reduction techniques. This compact representation not only saves storage space but also facilitates fast searching and comparison.

[0109] 5. Structural information summary

[0110] Structural similarity hash: Generate a hash value based on structural similarity (Structural Similarity Hash) for each key frame and save it together with other metadata of the frame. When the hash values of two frames are close, it means they are very similar visually.

[0111] Technical effect: It can not only effectively determine whether image data is continuous, but also achieve efficient resource management and retrieval functions through a carefully designed summary information structure. This method is particularly applicable to devices such as dash cams and surveillance cameras, minimizing redundant data storage while ensuring that important information is not lost. At the same time, this method can sensitively capture subtle changes in the scene, contributing to subsequent video analysis and event detection.

[0112] In one embodiment, in the operation of determining whether the first image data and the second image data belong to continuous images, the memory control circuit 23 or the host system 11 (such as the processor in the host system 11) can calculate the movement direction and speed of pixel points in the image sequence when the user takes a series of photos, and infer the movement of the object in the scene. Detect the relative displacement between every two adjacent photos. If the displacement is small, these photos are considered to belong to the same continuous sequence.

[0113] The corresponding summary generation method and summary information for the above embodiment are as follows:

[0114] Abstract Acquisition Method

[0115] 1. Optical Flow Calculation

[0116] Optical Flow Estimation: Use algorithms such as Lucas-Kanade, Farneback, or DeepFlow to estimate the motion vector field at the pixel level between adjacent frames. These vectors describe the displacement of each pixel from one frame to the next.

[0117] Sparse and Dense Optical Flow: One can choose to calculate the dense optical flow for all pixel points, or only calculate the sparse optical flow at feature points, depending on performance requirements and application scenarios.

[0118] 2. Motion Analysis

[0119] Motion Vector Statistics: Conduct statistical analysis on the obtained motion vectors, such as calculating the average motion vector length, direction distribution histogram, etc., to quantify the overall motion situation.

[0120] Region Segmentation: Divide the image into multiple regions with consistent motion according to the consistency of motion vectors, which helps to distinguish different objects in the background and foreground.

[0121] 3. Relative Displacement Measurement

[0122] Displacement Threshold Setting: Set a reasonable displacement threshold (DisplacementThreshold) according to the requirements of the application scenario to determine whether two frames belong to the same continuous sequence. If the average displacement is less than this threshold, they are considered continuous frames; otherwise, they are regarded as discontinuous frames.

[0123] Logical Judgment: Traverse all adjacent frame pairs and apply conditional statements to check whether each average displacement is less than the set threshold. If satisfied, they are considered continuous frames; otherwise, they are regarded as discontinuous frames and marked accordingly.

[0124] Abstract Information

[0125] 1. Key Frame Saving

[0126] Key Frame Selection: For a frame sequence considered to be continuous, one can choose to retain a complete key frame every several frames, and only save the simplified description information for the remaining frames.

[0127] Metadata Recording: In addition to the simplified description information, necessary metadata such as the timestamp, frame ID, position information, exposure parameters, etc. of each key frame should also be recorded.

[0128] 2. Motion Vector Summary

[0129] Incremental Update: For frames that have similar overall backgrounds but contain local changes, image segmentation techniques can be used to identify the changed parts, and only the motion vector summary information of these regions is recorded.

[0130] Motion Compensation Information: If object movement is involved, parameters for describing the position change of the object (such as translation and rotation matrices) can also be saved additionally, which is very useful for later editing or analysis.

[0131] 3. Regional Motion Patterns

[0132] Motion Pattern Index: Create a database or index table that contains all the saved frames and their motion patterns (such as the results of motion vector statistics) for easy and quick search and comparison.

[0133] Version Control: Since the motion analysis algorithm may be updated or improved over time, a version control system is introduced to ensure that different versions of motion patterns can be correctly matched and parsed.

[0134] 4. Feature Vector Compression

[0135] Deep Feature Summary: Use pre-trained deep learning models (such as VGG, ResNet) to extract the deep feature vectors of each frame, and compress these high-dimensional vectors into a low-dimensional representation form through principal component analysis (PCA) or other dimensionality reduction techniques. This compact representation not only saves storage space but also facilitates fast search and comparison.

[0136] 5. Motion Vector Hashing

[0137] Motion Hash Generation: Generate a hash value (Motion Hash) based on the motion vector for each key frame and save it together with other metadata of the frame. When the hash values of two frames are close, it means they are very similar in terms of motion.

[0138] Technical Effects: The method can not only effectively determine whether the image data is continuous but also achieve efficient resource management and retrieval functions through a carefully designed summary information structure. This method is particularly suitable for mobile phone cameras. When users take a series of photos, it can intelligently identify and process media files with repetitive backgrounds or extremely high scene similarities, thereby reducing the storage of redundant data while ensuring the integrity of important information. In addition, this method can sensitively capture the subtle movement of objects in the scene, which is helpful for subsequent photo editing and event detection.

[0139] In one embodiment, in the operation of determining whether the first image data and the second image data belong to consecutive images, the memory control circuit 23 or the host system 11 (e.g., the processor in the host system 11) may deploy a pre-trained lightweight neural network model (e.g., a CNN model) in the storage device 12 or the host system 11 (e.g., the processor in the host system 11). This lightweight CNN model can distinguish between static backgrounds and dynamic foregrounds. When the model predicts that there is no significant change between consecutive frames, only the first complete frame may be saved, and subsequent frames are stored in summary form.

[0140] The corresponding abstract generation method and abstract information for the above embodiment are as follows:

[0141] Abstract acquisition method

[0142] 1. Lightweight CNN model deployment

[0143] Model selection: Select a lightweight and efficient CNN architecture, such as MobileNet, ShuffleNet, SqueezeNet, etc. These models reduce the demand for computing resources while ensuring performance.

[0144] Model optimization: Use techniques such as quantization and pruning to further compress the model size and ensure that it can run efficiently on edge devices (such as mobile phones, dash cams, surveillance cameras).

[0145] Model deployment: Deploy the optimized model to the processor of the target device to ensure real-time processing capabilities.

[0146] 2. Separation of static background and dynamic foreground

[0147] Background modeling: Use the CNN model to classify each frame and identify which parts belong to the static background and which are the dynamic foreground.

[0148] Foreground detection: For the regions marked as dynamic foreground, additional object detection algorithms (such as YOLO, SSD) can be applied to further analyze the object categories and their motion states.

[0149] 3. Degree of change evaluation

[0150] Change threshold setting: Set a reasonable threshold (Change Threshold) according to the requirements of the application scenario to determine whether the change between two frames is significant. For example, it can be determined by comparing the change ratio of the dynamic foreground region between consecutive frames.

[0151] Logical Judgment: Traverse all adjacent frame pairs and apply conditional statements to check whether each change ratio is less than the set threshold. If it is satisfied, they are considered consecutive frames; otherwise, they are regarded as non-consecutive frames and marked accordingly.

[0152] Abstract Information

[0153] 1. Key Frame Saving

[0154] Key Frame Selection: For a sequence of frames considered to be consecutive, only save the first complete key frame, and only save the simplified description information for the remaining frames.

[0155] Metadata Recording: In addition to the simplified description information, necessary metadata such as the timestamp, frame number (Frame ID), location information, exposure parameters, etc. of each key frame should also be recorded.

[0156] 2. Dynamic Foreground Summary

[0157] Incremental Update: For frames that have a similar overall background but contain local changes, image segmentation techniques can be used to identify the changed parts, and only record the information of these areas instead of the content of the entire frame. This includes:

[0158] Foreground Mask: Indicates which pixels belong to the dynamic foreground.

[0159] Feature Descriptor of Changed Areas: Describes the unique features of the changed areas, such as color histograms, texture features, etc.

[0160] Motion Vectors: Capture the motion direction and speed of objects within the changed areas.

[0161] 3. Deep Feature Summary

[0162] Deep Feature Extraction: Use the last layer or the last few layers of the CNN model to extract the deep feature vectors of each frame, and compress these high-dimensional vectors into a low-dimensional representation form through principal component analysis (PCA) or other dimensionality reduction techniques. This compact representation not only saves storage space but also facilitates fast search and comparison.

[0163] Feature Hash Generation: Generate a hash value (Deep FeatureHash) based on the deep features for each key frame and save it together with other metadata of the frame. When the hash values of two frames are close, it means they are very similar visually.

[0164] 4. Metadata Enhancement

[0165] Scene description: Combine context information (such as time, location, weather conditions, etc.) to add richer metadata descriptions to each key frame for easier later retrieval and analysis.

[0166] Event tags: If there are specific events (such as traffic accidents, intrusion behaviors, etc.), add corresponding event tags to relevant frames to improve retrieval efficiency.

[0167] Technical effects: It can not only effectively determine whether image data is continuous, but also achieve efficient resource management and retrieval functions through a carefully designed summary information structure. This method is particularly applicable to devices such as mobile phones, dash cams, and surveillance cameras. When users take a series of photos or videos, it can intelligently identify and process media files with repetitive backgrounds or extremely high scene similarities, thereby reducing the storage of redundant data while ensuring the integrity of important information. In addition, using a deep learning model can sensitively capture subtle changes in the scene, which helps with subsequent photo editing and event detection.

[0168] In one embodiment, in the operation of determining whether the first image data and the second image data belong to continuous images, the memory control circuit 23 or the host system 11 (such as the processor in the host system 11) can, when receiving a video stream, pass through a pre-constructed background model and compare each frame of the image with the model to identify moving objects in the foreground and check whether the current frame is consistent with the background model. If it is consistent, it is considered to be part of the continuity, and only the difference information is saved.

[0169] The corresponding summary generation method and summary information for the above embodiment are as follows:

[0170] Summary acquisition method

[0171] 1. Background model construction

[0172] Background modeling: Use statistical methods (such as Gaussian Mixture Model, GMM), adaptive thresholding methods (Adaptive Thresholding), or deep learning-based methods (such as Autoencoders) to establish a stable background model.

[0173] Model update: According to environmental changes, the background model needs to be updated regularly or dynamically to maintain its accuracy and robustness.

[0174] 2. Foreground detection and motion analysis

[0175] Foreground Segmentation: Compare each frame of the image with the background model to extract the objects that belong to the foreground (Foreground Objects). This can be achieved through simple pixel-level difference calculations, morphological operations (Morphological Operations), etc.

[0176] Motion Vector Estimation: For the detected foreground regions, optical flow or other motion estimation algorithms can be further applied to capture the movement of the objects.

[0177] 3. Continuity Marking

[0178] Consistency Evaluation: If a frame of the image is highly consistent with the background model, then this frame is considered to be part of the continuity; otherwise, if there are significant differences, it is regarded as a discontinuous frame.

[0179] Threshold Setting: Set a reasonable similarity threshold (Similarity Threshold) according to the requirements of the application scenario to determine whether the difference between two frames is significant. For example, it can be quantified by calculating the mean squared error (Mean Squared Error, MSE) or the structural similarity index (SSIM, Structural Similarity Index Measure) at the pixel level.

[0180] 4. Difference Information Saving

[0181] Incremental Update: For the frame sequences considered to be continuous, only save the first complete key frame, and for the remaining frames, only save the part of their changes relative to the background model (i.e., the foreground objects and their motion information).

[0182] Compression Encoding: Efficiently compress and encode the foreground objects and their motion information (such as JPEG, PNG, H.264 / AVC) to reduce the storage space occupancy.

[0183] Summary Information

[0184] 1. Key Frame Saving

[0185] Key Frame Selection: For the frame sequences considered to be continuous, only save the first complete key frame, and for the remaining frames, only save their simplified description information.

[0186] Metadata Recording: In addition to the simplified description information, necessary metadata such as the timestamp, frame ID (Frame ID), location information, exposure parameters, etc. of each key frame should also be recorded.

[0187] 2. Foreground Object Summary

[0188] Foreground Mask: Indicates which pixels belong to the foreground object.

[0189] Feature Descriptor of Changed Areas: Describes the unique features of the changed areas, such as color histograms, texture features, etc.

[0190] Motion Vectors: Captures the motion direction and speed of objects within the changed areas.

[0191] 3. Storage of Difference Information

[0192] Differential Coding: For the parts that change in consecutive frames, differential coding is used to save this difference information. This can greatly save storage space while retaining important information.

[0193] Incremental Update Log: Records the newly added or changed content during each update to facilitate the subsequent reconstruction of the complete video stream.

[0194] 4. Enhancement of Metadata

[0195] Scene Description: Combining context information (such as time, location, weather conditions, etc.), richer metadata descriptions are added to each key frame for easier later retrieval and analysis.

[0196] Event Tags: If there are specific events (such as traffic accidents, intrusion behaviors, etc.), corresponding event tags are added to the relevant frames to improve the retrieval efficiency.

[0197] Technical Effect: The method can not only effectively determine whether the image data is continuous, but also achieve efficient resource management and retrieval functions through a carefully designed summary information structure. This method is particularly suitable for devices such as dash cams and surveillance cameras, minimizing the storage of redundant data while ensuring that important information is not lost. At the same time, the background subtraction technology can sensitively capture subtle changes in the scene, which helps with subsequent photo editing and event detection.

[0198] In one embodiment, in the operation of determining whether the first image data and the second image data belong to continuous images, the memory control circuit 23 or the host system 11 (such as the processor in the host system 11) can check the continuously recorded video stream according to the time stamp to ensure that there are no obvious time intervals or jumps. If there is a large time gap, it may indicate non - continuous shooting.

[0199] The corresponding summary generation method and summary information for the above - mentioned embodiment are as follows:

[0200] Abstract acquisition method

[0201] 1. Timestamp parsing and standardization

[0202] Timestamp extraction: Extract the timestamp from the metadata of each frame. This usually involves reading the time information in the file header or a specific encoding format.

[0203] Time unit conversion: Convert all timestamps to a unified time unit, such as milliseconds (ms), to ensure the consistency and accuracy of subsequent calculations.

[0204] 2. Calculate the time difference between frames

[0205] Time difference calculation: For each pair of adjacent frames, calculate the time difference between them (Δt = t_next - t_current) and record these differences. This step may require a simple loop or use vectorized operations to accelerate the processing of large amounts of data.

[0206] Anomaly detection: Traverse all the time differences to identify whether there are significant time intervals or jumps, such as time gaps exceeding a preset threshold.

[0207] 3. Continuity marking

[0208] Threshold setting: Determine a reasonable time difference threshold (Δt_threshold) according to the frame rate (FPS) of the device and the requirements of the application scenario. For example, for a dash cam with 30 FPS, since theoretically the interval between each frame is about 33 ms (1000 / 30 ≈ 33.33 ms), Δt_threshold = 33 ms can be selected.

[0209] Logical judgment: If the time difference between two frames is less than or equal to the set threshold, they are considered consecutive frames; otherwise, they are regarded as non - consecutive frames and marked accordingly.

[0210] 4. Processing of abnormal frames

[0211] Further analysis: For frames marked as non - consecutive, further analyze whether there are fast movements, scene switches, or other special situations, and decide whether additional processing is required.

[0212] Metadata update: For non - consecutive points, in addition to saving the key frames at both ends, the list of all frame numbers within this segment and their respective timestamps should also be recorded so that the video structure can be fully represented even after removing redundant frames.

[0213] Abstract information

[0214] 1. Key frame saving

[0215] Key frame selection: For a sequence of frames considered to be continuous, one complete key frame can be selected every several frames, and only the simplified description information of the remaining frames is saved.

[0216] Metadata recording: In addition to the simplified description information, necessary metadata such as the timestamp, frame number (Frame ID), location information, exposure parameters, etc. of each key frame should be recorded.

[0217] 2. Time difference index

[0218] Time difference database: Create a database or index table that contains all the saved frames and their time differences for quick searching and comparison.

[0219] Version control: Since the timestamp parsing algorithm may be updated or improved over time, introduce a version control system to ensure that the time differences of different versions can be correctly matched and parsed.

[0220] 3. Discontinuous event tags

[0221] Event marking: For frames marked as discontinuous, add specific event tags (Event Tag), such as "fast movement", "scene switch", etc., for easy later retrieval and analysis.

[0222] Context information: Combine context information (such as time, location, weather conditions, etc.) to add richer descriptions to each discontinuous event to improve the retrieval efficiency.

[0223] 4. Metadata enhancement

[0224] Scene description: Combine context information (such as time, location, weather conditions, etc.) to add richer metadata descriptions to each key frame for easy later retrieval and analysis.

[0225] Event tags: If there are specific events (such as traffic accidents, intrusion behaviors, etc.), add corresponding event tags to the relevant frames to improve the retrieval efficiency.

[0226] Technical effect: The above method can not only effectively determine whether the image data is continuous, but also achieve efficient resource management and retrieval functions through a carefully designed summary information structure. This method is particularly suitable for devices such as dash cams and surveillance cameras, minimizing the storage of redundant data while ensuring that important information is not lost. At the same time, this method can sensitively capture abnormal situations on the timeline, contributing to subsequent video analysis and event detection.

[0227] In one embodiment, if the first image data and the second image data meet the deletion condition, the memory control circuit 23 may record the image summary information of the second image data. In one embodiment, the image summary information may reflect that the first image data and the second image data are consecutive images that meet the deletion condition.

[0228] In one embodiment, the image summary information may reflect that the first logic unit and the second logic unit are consecutive logic units. In one embodiment, the image summary information may reflect the sorting of the first image data and the second image data. In one embodiment, the image summary information may reflect that the second image data (or the second logic unit) is sorted before or after the first image data (or the first logic unit). In one embodiment, the image summary information may further include any information that can be used to restore (e.g., reconstruct) the second image data, which is not limited in the present invention.

[0229] In one embodiment, after obtaining the image data, the memory control circuit 23 may instruct the memory module 122 to store the first image data in the data area 31 and map the logic unit corresponding to the first image data (i.e., the first logic unit) to the data area 31. For example, assuming that the first image data is stored in at least one physical unit (also referred to as the first physical unit) in the data area 31, the first logic unit may be mapped to the first physical unit. Thereafter, the first image data may be read from the data area 31 (e.g., the first physical unit).

[0230] In one embodiment, if the first image data and the second image data meet the deletion condition, after recording the image summary information of the second image data, the memory control circuit 23 may instruct the memory module 122 to store the image summary information in the system area 33. For example, the memory control circuit 23 may instruct the memory module 122 to store the image summary information in a management table in the system area 33. In addition, the memory control circuit 23 may discard the second image data.

[0231] In one embodiment, in the case where the first image data and the second image data meet the deletion condition, by storing the first image data (and the image summary information) and discarding (i.e., not storing) the second image data, the storage space of the storage device 12 can be effectively saved. In addition, when needed, the second image data can be automatically restored (or reconstructed) in the storage device 12 based on the first image data and the image summary information. Therefore, discarding (i.e., not storing) the second image data in the storage device 12 does not affect the subsequent access of the host system 11 to the image data.

[0232] In one embodiment, if the first image data and the second image data do not meet the deletion condition, the memory control circuit 23 may not record (and not store) the image summary information. In one embodiment, if the first image data and the second image data do not meet the deletion condition, the memory control circuit 23 may instruct the memory module 122 to store the second image data in the data area 31, and map the logical unit corresponding to the second image data (i.e., the second logical unit) to the data area 31. For example, assuming that the second image data is stored in at least one physical unit (also referred to as the second physical unit) in the data area 31, the second logical unit may be mapped to the second physical unit. Thereafter, the second image data can be read from the data area 31 (e.g., the second physical unit).

[0233] In one embodiment, when the first image data and the second image data meet the deletion condition, the memory control circuit 23 may determine the logical unit corresponding to the second image data (i.e., the second logical unit). The memory control circuit 23 may establish mapping information between the second logical unit and the image summary information. Then, the memory control circuit 23 may store the mapping information in the management table in the system area 33. Thereafter, the memory control circuit 23 may restore (or reconstruct) the second image data according to the information in this management table (i.e., the mapping information).

[0234] In one embodiment, the memory control circuit 23 may obtain a read instruction from the host system 11. The read instruction instructs to read the second logical unit. Or, from another perspective, the read instruction is used to instruct to read the second image data (or consecutive images including the second image data or the image data). According to the read instruction, the memory control circuit 23 may obtain the mapping information (i.e., the mapping information between the second logical unit and the image summary information) from the management table. For example, the memory control circuit 23 may query the management table according to the second logical unit to obtain the mapping information. According to the mapping information, the memory control circuit 23 may obtain the image summary information from the system area 33.

[0235] In one embodiment, the memory control circuit 23 may restore the second image data according to the first image data and the image summary information. For example, according to the first image data and the image summary information, the memory control circuit 23 may perform data replication on the first image data to obtain replicated image data corresponding to the first image data. For example, the data content of the replicated image data may be the same as the data content of the first image data. Then, the memory control circuit 23 may set the replicated image data as the restored second image data. After obtaining the restored second image data, the memory control circuit 23 may send the second image data back to the host system 11 to respond to the read instruction.

[0236] In one embodiment, the memory control circuit 23 can actively reduce the amount of image data to be stored without the host system 11 being aware (or without being controlled by the host system 11). In addition, even if the image data is stored in a simplified manner in the storage device 12, the memory control circuit 23 can still ensure the subsequent normal access (such as reading) of the image data by the host system 11.

[0237] Figure 4 It is a schematic diagram showing the storage of the first image data and the image digest data corresponding to the second image data according to an embodiment of the present invention. Please refer to Figure 4 , assuming that the memory control circuit 23 obtains the image data 41 from the host system 11. The image data 41 at least includes image frames 401 (i.e., the first image data) and 402 (i.e., the second image data).

[0238] In particular, the image frames 401 and 402 are consecutive images in the image data 41. For example, the image frame 401 corresponds to the logical unit LBA(x) (i.e., the first logical unit). The image frame 402 corresponds to the logical unit LBA(y) (i.e., the second logical unit). The logical unit LBA(y) follows the logical unit LBA(x).

[0239] In one embodiment, after obtaining the image data 41, the memory control circuit 23 can store the image frame 401 in the data area 31 (such as the first physical unit) in the memory module, and map the logical unit LBA(x) to the data area 31 (such as the first physical unit). At the same time, the memory control circuit 23 can detect whether the image frames 401 and 402, which are consecutive images in the image data 41, meet the deletion condition.

[0240] In one embodiment, after detecting that the image frames 401 and 402 meet the deletion condition, the memory control circuit 23 can record the image digest information 42 corresponding to the image frame 402. For example, the image digest information 42 can reflect that the image frames 401 and 402 are consecutive images that meet the deletion condition. In addition, the image digest information 42 can also reflect that the image frame 402 follows the image frame 401, etc., and the present invention is not limited thereto.

[0241] In one embodiment, after obtaining the image summary information 42, the memory control circuit 23 may store the image summary information 42 in the system area 33 of the memory module 122. For example, the memory control circuit 23 may store the image summary information 42 in the management table 43 in the system area 33. Then, the memory control circuit 23 may immediately discard (i.e., not store) the image frame 402. In one embodiment, compared with storing the image frame 402, storing the image summary information 42 can effectively save the storage space of the memory module 122, thereby delaying the time point when the storage space of the memory module 122 is exhausted.

[0242] Figure 5 It is a schematic diagram for restoring the second image data according to the first image data and the image summary data shown in the embodiment of the present invention. Please refer to Figure 5 , following Figure 4 In the embodiment of, in one embodiment, assume that the read instruction from the host system 11 indicates reading the image data 41. According to this read instruction, the memory control circuit 23 may read the image frame 401 from the data area 31 (i.e., the first physical unit) in the memory module 122, and read the image summary information 42 from the system area 33 in the memory module 122. For example, according to the logical block address LBA(x) indicated by this read instruction, the memory control circuit 23 may read the image frame 401 from the data area 31 (i.e., the first physical unit). In addition, according to the logical block address LBA(y) indicated by this read instruction, the memory control circuit 23 may query the management table 43 in the system area 33. Then, the memory control circuit 23 may obtain the image summary information 42 from the system area 33 according to the query result.

[0243] In one embodiment, after obtaining the image frame 401 and the image summary information 42, the memory control circuit 23 may restore the image frame 501 (i.e., the restored second image data) according to the image frame 401 and the image summary information 42. For example, the memory control circuit 23 may set the copied image data corresponding to the image frame 401 as the image frame 501. For example, the image frame 501 can be used to replace Figure 4 the original image frame 402 in. The memory control circuit 23 may reconstruct the image data 41 according to the image frame 401 and the image frame 501. Then, the memory control circuit 23 may return the image data 41 to the host system 11 in response to the read instruction.

[0244] In one embodiment, the memory control circuit 23 may store data in the memory module 122 based on multiple write modes. For example, the write modes include a first write mode and a second write mode. The reliability of the data stored in the memory module 122 based on the first write mode may be higher than the reliability of the data stored in the memory module 122 based on the second write mode.

[0245] In one embodiment, the memory control circuit 23 may store the image summary information in the system area of the memory module 122 based on the first write mode. Thereby, the reliability of the stored image summary information can be improved and / or the preservation ability of the image summary information can be enhanced. Alternatively, in one embodiment, the memory control circuit 23 may also store the image summary information in the system area of the memory module 122 based on other write modes (such as the second write mode).

[0246] In one embodiment, after performing a programming operation on at least one physical unit based on the first write mode to store data, one of the programmed storage units in the physical unit is used to store a certain quantity (also referred to as the first quantity) of bit data. In addition, after performing a programming operation on at least one physical unit based on the second write mode to store data, one of the programmed storage units in the physical unit is used to store another quantity (also referred to as the second quantity) of bit data. The first quantity may be less than the second quantity. For example, the first quantity may be "1", and the second quantity may be "2", "3", "4" or other values greater than "1".

[0247] In one embodiment, the first write mode may be the SLC mode or the virtual SLC mode. In one embodiment, the second write mode may be one of MLC, TLC or QLC. It should be noted that the first write mode and the second write mode can also be adjusted according to practical requirements, and the present invention is not limited thereto.

[0248] In one embodiment, the deletion condition includes: the pixel change ratio between the first image data and the second image data is less than a critical value. That is, if the pixel change ratio between the first image data and the second image data is less than the critical value, the memory control circuit 23 may determine that the first image data and the second image data meet the deletion condition. However, if the pixel change ratio between the first image data and the second image data is not less than (such as greater than or equal to) the critical value, the memory control circuit 23 may determine that the first image data and the second image data do not meet the deletion condition.

[0249] In one embodiment, the pixel change ratio may reflect the change amount of the color (or color distribution) between the images respectively presented by the first image data and the second image data. For example, the pixel change ratio may be positively correlated with the change amount of the color (or color distribution) between the images respectively presented by the first image data and the second image data. That is, if the change amount of the color (or color distribution) between the images respectively presented by the first image data and the second image data is larger (i.e., the difference in the color (or color distribution) between the images respectively presented by the first image data and the second image data is larger), then the pixel change ratio may be larger.

[0250] In an embodiment, the memory control circuit 23 may detect the image data through an image detection technique to determine whether the first image data and the second image data meet the deletion condition. For example, the image detection technique can be used to analyze the image data and generate a detection result. The detection result can reflect whether the first image data and the second image data meet the deletion condition. Therefore, the memory control circuit 23 can determine whether the first image data and the second image data meet the deletion condition according to the detection result. It should be noted that the actual operation method of the image detection technique belongs to the prior art and can be designed according to practical needs, so it will not be elaborated here.

[0251] In an embodiment, the memory control circuit 23 may obtain the identification information corresponding to the second logical unit from the host system 11. For example, the identification information may be obtained from the host system 11 along with the image data. For example, the identification information may include an identification code corresponding to the second logical unit. Based on the identification information, the memory control circuit 23 can determine that the first image data and the second image data meet the deletion condition. Figure 4 For example, the memory control circuit 23 can determine the logical unit LBA(y) (i.e., the second logical unit) according to the identification information. Then, during the process of storing the image data 41, the memory control circuit 23 can store the image frame 401 and record the image summary information 42 of the image frame 402 corresponding to the logical unit LBA(y). Then, the memory control circuit 23 can discard the image frame 402 and store the image summary information 42 in the system area 33 in the memory module 122. For the relevant operation details, reference can be made to Figure 4 the embodiment, and it will not be repeated here.

[0252] Figure 6 is a flowchart of the image data simplified storage method shown according to an embodiment of the present invention. Please refer to Figure 6 , in step S601, image data is obtained from the host system. In step S602, it is detected whether the first image data and the second image data belonging to consecutive images in the image data meet the deletion condition. In step S603, if the first image data and the second image data meet the deletion condition, the image summary information of the second image data is recorded. In step S604, the first image data is stored in the data area in the memory module, and the first logical unit corresponding to the first image data is mapped to the data area. In step S605, the second image data is discarded, and the image summary information is stored in the system area in the memory module.

[0253] However, Figure 6 the steps have been described in detail above, so they will not be elaborated here. It should be noted that Figure 6Each step in the present invention can be implemented as multiple pieces of code or circuits, and the present invention does not impose any limitations. In addition, Figure 6 The method of Figure 6 can be used in conjunction with the above exemplary embodiments or used alone, and the present invention does not impose any limitations.

[0254] In summary, the image data simplified storage method and storage device proposed in the embodiments of the present invention can simplify the storage of the first image data and the second image data that meet the deletion conditions in the image data (for example, storing the image summary information corresponding to the second image data instead of storing the complete second image data). Thus, the problem that the storage space of the storage device is quickly exhausted due to the need to store a large amount of image data in the conventional art can be improved, and further, the storage efficiency of the storage device for image data can be increased.

[0255] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for simplifying and storing image data, characterized in that: Used in a storage device, wherein the storage device comprises a memory module, and the image data simplified storage comprises: Obtain image data from a host system; Detecting whether first image data and second image data belonging to continuous images in the image data meet a deletion condition; determining a first logical unit corresponding to the first image data; determining a second logical unit corresponding to the second image data; If the first image data and the second image data meet the deletion condition, record image summary information of the second image data, wherein the image summary information reflects whether the second logical unit is sorted before or after the first logical unit; storing the first image data in a data area in the memory module, and mapping a first logic unit corresponding to the first image data to the data area; discarding the second image data and storing the image summary information in a system area in the memory module, wherein the system area is not mapped by any logical unit, The step of storing the image summary information in the system area of ​​the memory module comprises: Establishing mapping information between the second logic unit and the image summary information; storing the mapping information in a management table in the system area, wherein the management table is used to restore the second image data; and The image summary information is stored in the system area based on a first writing mode, wherein reliability of the data stored based on the first writing mode is higher than reliability of the data stored based on the second writing mode.

2. The image data simplified storage method according to claim 1, further comprising: Obtain a read instruction from the host system, wherein the read instruction indicates to read the second logical unit; According to the read instruction, obtaining the mapping information from the management table; According to the mapping information, obtaining the image summary information from the system area; Restoring the second image data according to the first image data and the image summary information; as well as The second image data is sent back to the host system in response to the read instruction.

3. The image data simplified storage method according to claim 2, wherein the step of restoring the second image data according to the first image data and the image summary information comprises: performing data duplication on the first image data to obtain duplicate image data corresponding to the first image data; as well as The copied image data is set as the second image data.

4. The image data simplified storage method according to claim 1, wherein the step of detecting whether the first image data and the second image data belonging to the continuous image in the image data meet the deletion condition comprises: The image data is detected by using image detection technology to determine whether the first image data and the second image data meet the deletion condition.

5. The image data simplified storage method according to claim 1, wherein the step of detecting whether the first image data and the second image data belonging to the continuous image in the image data meet the deletion condition comprises: obtaining identification information corresponding to the second logical unit from the host system; as well as Based on the identification information, it is determined that the first image data and the second image data meet the deletion condition.

6. The image data simplified storage method according to claim 1, wherein the deletion condition comprises: A pixel change ratio between the first image data and the second image data is less than a critical value.

7. The image data simplified storage method according to claim 1, further comprising: Whether the first image data and the second image data belong to the continuous image is determined based on feature changes on a time axis of the first image data and the second image data.

8. A storage device, characterized in that: include: A connection interface for connecting to a host system; Memory module; as well as a memory controller connected to the connection interface and the memory module, The memory controller is used to: Obtaining image data from the host system; Detecting whether first image data and second image data belonging to continuous images in the image data meet a deletion condition; determining a first logical unit corresponding to the first image data; determining a second logical unit corresponding to the second image data; If the first image data and the second image data meet the deletion condition, record image summary information of the second image data, wherein the image summary information reflects whether the second logical unit is sorted before or after the first logical unit; storing the first image data in a data area in the memory module, and mapping a first logic unit corresponding to the first image data to the data area; discarding the second image data and storing the image summary information in a system area in the memory module, wherein the system area is not mapped by any logical unit, The operation of storing the image summary information in the system area of ​​the memory module includes: Establishing mapping information between the second logic unit and the image summary information; storing the mapping information in a management table in the system area, wherein the management table is used to restore the second image data; and The image summary information is stored in the system area based on a first writing mode, wherein reliability of the data stored based on the first writing mode is higher than reliability of the data stored based on the second writing mode.

9. The storage device according to claim 8, wherein the memory controller is further configured to: Obtain a read instruction from the host system, wherein the read instruction indicates to read the second logical unit; According to the read instruction, obtaining the mapping information from the management table; According to the mapping information, obtaining the image summary information from the system area; Restoring the second image data according to the first image data and the image summary information; as well as The second image data is sent back to the host system in response to the read instruction.

10. The storage device according to claim 9, wherein the operation of the memory controller restoring the second image data according to the first image data and the image summary information comprises: performing data duplication on the first image data to obtain duplicate image data corresponding to the first image data; as well as The copied image data is set as the second image data.

11. The storage device according to claim 8, wherein the operation of the memory controller detecting whether the first image data and the second image data belonging to the continuous image in the image data meet the deletion condition comprises: The image data is detected by using image detection technology to determine whether the first image data and the second image data meet the deletion condition.

12. The storage device according to claim 8, wherein the operation of the memory controller detecting whether the first image data and the second image data belonging to the continuous image in the image data meet the deletion condition comprises: obtaining identification information corresponding to the second logical unit from the host system; as well as Based on the identification information, it is determined that the first image data and the second image data meet the deletion condition.

13. The storage device according to claim 8, wherein the deletion condition comprises: A pixel change ratio between the first image data and the second image data is less than a critical value.

14. The storage device according to claim 8, wherein the memory controller is further configured to: Whether the first image data and the second image data belong to the continuous image is determined based on feature changes on a time axis of the first image data and the second image data.

Citation Information

Patent Citations

  • Image compression method

    CN105376580A