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 problem of traditional storage devices frequently covering old data due to limited storage capacity is solved, and efficient image data storage and data integrity retention are achieved.
Patent Information
- Application Number
- CN202510045449.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2045-01-13
AI Technical Summary
When traditional storage devices face massive image data storage, they are prone to frequently overwrite old data due to limited storage capacity, resulting in data loss and rapid use of storage space.
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 second image data is discarded, and the image summary is used to use the image summary. The information is restored subsequently.
It effectively improves the storage efficiency of image data by the storage device, avoids data loss, extends the service life of the storage space, and ensures data integrity and availability.
Smart Images

Figure CN119440426A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of storage technology, and in particular to a simplified storage method and storage device for image data. Background Art
[0002] With the rapid development of intelligent transportation systems and Internet of Things technologies, driving recorders, car 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 provide valuable data support for accident analysis, crime prevention, etc.
[0003] However, when faced with massive data storage, traditional local storage methods usually rely on built-in storage media (such as memory cards or built-in hard drives). Although it has the advantages of instant 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 circular recording technology, that is, when the storage medium is full, the system automatically overwrites the earliest recorded data, thereby achieving continuous data recording without interruption. However, this method has the risk of data loss, that is, frequent data overwriting will cause early recorded data to be overwritten, which is a serious problem for applications that need to preserve critical data for a long time (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 technical personnel in this field to propose new solutions to solve it. Summary of the invention
[0006] The present invention provides a simplified storage method and storage device for image data, which can improve the above-mentioned problem and further improve the storage efficiency of the storage device for image data.
[0007] An embodiment of the present invention provides a simplified image data storage method, which is used in a storage device, wherein the storage device includes a memory module, and the simplified image data storage method includes: obtaining image data from a host system; detecting whether first image data and second image data belonging to continuous images in the image data meet the 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 used to: obtain image data from the host system; detect whether the first image data and the second image data belonging to a continuous image in the image data meet the 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 the data area of the memory module, and map the 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 the system area of the memory module.
[0009] Based on the above, after the image data is obtained from the host system, if the first image data and the second image data belonging to the continuous image in the image data are detected as meeting the deletion condition, the image summary information of the second image data can be recorded. The first image data can be stored in the data area of 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 the system area of the memory module for subsequent use (for example, for restoring the second image data). In this way, the problem of the storage space being quickly exhausted due to the need to store a large amount of image data in the storage device can be improved, thereby improving the storage efficiency of the storage device for image data. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 is a schematic diagram of a data storage system according to an embodiment of the present invention; Figure 2 is a schematic diagram of a memory controller according to an embodiment of the present invention; Figure 3 is a schematic diagram of a management memory module according to an embodiment of the present invention; Figure 4 is a schematic diagram showing storage of first image data and image summary data corresponding to second image data according to an embodiment of the present invention; Figure 5 is a schematic diagram showing restoration of second image data based on first image data and image summary data according to an embodiment of the present invention; Figure 6 FIG. 4 is a flowchart of a method for simplifying and storing image data according to an embodiment of the present invention. DETAILED DESCRIPTION
[0011] 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 are used in the drawings and the description to refer to the same or like parts.
[0012] Figure 1 is a schematic diagram of a data storage system according to an embodiment of the present invention. 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 may include a solid state drive, a USB flash drive, a memory card, or other types of non-volatile storage devices.
[0013] 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 (embedded Multi-Media Card, eMMC), a universal flash storage (Universal Flash Storage, UFS), a fast peripheral component interconnect (Peripheral Component Interconnect Express, PCIExpress), a fast non-volatile memory (Non-Volatile Memory Express, NVM express), a serial advanced technology attachment (Serial Advanced Technology Attachment, SATA), a universal serial bus (Universal Serial Bus, USB) or other types of connection interface standards. Therefore, the storage device 12 can communicate with the host system 11 via the connection interface 121 (for example, exchange signals, instructions and / or data).
[0014] 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 memory cell arrays. The memory cells in the memory cell array store data in the form of voltage (also called threshold voltage). For example, the memory module 122 may include a single level cell (SLC) NAND type flash memory module, a multi level cell (MLC) NAND type flash memory module, a triple level cell (TLC) NAND type flash memory module, a quad level cell (QLC) NAND type flash memory module and / or other memory modules having the same or similar characteristics.
[0015] 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 entire 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 (DSP), programmable controllers, application-specific integrated circuits (ASIC), programmable logic devices (PLD) or other similar devices or combinations of these devices. In one embodiment, the memory controller 123 may include a flash memory controller.
[0016] The memory controller 123 may send a command sequence to the memory module 122 to access the memory module 122. For example, the memory controller 123 may send a write command sequence 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 may send a read command sequence 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 may send an erase command sequence 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 may also send other types of command sequences to the memory module 122 to instruct the memory module 122 to perform other types of operations, which are not limited by the present invention. The memory module 122 may receive the command sequence from the memory controller 123 and access the storage unit inside the memory module 122 according to the command sequence.
[0017] Figure 2 FIG. 1 is a schematic diagram of a memory controller according to an embodiment of the present invention. 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.
[0018] The memory control circuit 23 is connected to the host interface 21 and the memory interface 22. The memory control circuit 23 may be used to control or manage the whole or part of the operation of the memory controller 123. For example, the memory control circuit 23 may 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 may 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.
[0019] 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 used to cache data. For example, the buffer memory 24 may be used to cache instructions from the host system 11, data from the host system 11, and / or data from the memory module 122.
[0020] 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 the 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 also include various other types of circuit modules (such as power management circuits, etc.), which are not limited by the present invention.
[0021] Figure 3 FIG. 1 is a schematic diagram of a management memory module according to an embodiment of the present invention. 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 storage cells and is used for non-volatile storage of data.
[0022] In one embodiment, a physical unit may include one or more physical programming units. For example, a physical programming unit may include multiple 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, the data capacity of a physical sector and / or the total number of physical sectors included in a physical programming unit can be adjusted according to practical needs, and the present invention is not limited thereto. In one embodiment, a physical programming unit can 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.
[0023] In one embodiment, a physical programming unit is a minimum unit for synchronously writing data in the memory module 122. For example, when a programming operation (also referred to as a write operation) is performed on a physical programming unit to write data to the physical programming unit, multiple memory cells in the physical programming unit may be synchronously programmed to store corresponding data. For example, when programming a physical programming unit, a write voltage may be applied to the physical programming unit to change the threshold voltage of at least some of the memory cells in the physical programming unit. For example, the threshold voltage of a memory cell may reflect the bit data stored in the memory cell.
[0024] In one embodiment, a physical erase unit may include a plurality of physical programming units. The plurality of physical programming units in a physical erase unit may be erased synchronously. For example, when performing an erase operation on a physical erase unit, an erase voltage may be applied to the plurality of physical programming units in the physical erase unit to change the threshold voltage of at least some of the storage cells in the physical programming units. By performing an erase operation on a physical erase unit, the data stored in the physical erase unit may be cleared.
[0025] In one embodiment, the memory control circuit 23 can logically associate the physical units 301(1)-301(A), 301(A+1)-301(B), and 301(B+1)-301(C) to the data area 31, the idle area 32, and the system area 33, respectively. The physical units 301(1)-301(A) in the data area 31 all store data (also called user data) from the host system 11. For example, any physical unit in the data area 31 can store valid data and / or invalid data. The physical units 301(A+1)-301(B) in the idle area 32 do not store data (for example, valid data). In addition, the physical units 301(B+1)-301(C) in the system area 33 can be used to store system data (also called management data).
[0026] In one embodiment, if a physical unit does not store valid data, the physical unit can be associated with the idle area 32. In addition, the physical unit in the idle area 32 can be erased to clear the data in the physical unit. In one embodiment, the physical unit in the idle area 32 is also called an idle physical unit. In one embodiment, the idle area 32 is also called an idle pool.
[0027] In one embodiment, when data is to be stored, the memory control circuit 23 may select one or more physical cells from the idle area 32 and instruct the memory module 122 to store the data in the selected physical cells. After the data is stored in the physical cell, the physical cell may be associated with the data area 31. In other words, one or more physical cells may be used alternately between the data area 31 and the idle area 32.
[0028] In one embodiment, the memory control circuit 23 may configure a plurality of logical units 302(1)-302(D) to map the physical units (i.e., the physical units 301(1)-301(A)) in the data area 31. For example, a logical unit may correspond to a logical block address (LBA) or other logical management units. A logical unit may be mapped to one or more physical units.
[0029] In one embodiment, if a physical unit is currently mapped by any logical unit, the memory control circuit 23 can determine that the data currently stored in the physical unit includes valid data. Conversely, if a physical unit is not currently mapped by any logical unit, the memory control circuit 23 can determine that the physical unit does not currently store any valid data.
[0030] 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 a logical-to-physical mapping table). In one embodiment, the memory control circuit 23 may instruct the memory module 122 to perform operations such as data reading, writing or erasing according to the information in the management table (i.e., the logical-to-physical mapping table).
[0031] In one embodiment, the memory control circuit 23 may not map any logical unit to the system area 33 (eg, physical units 301 (B+1) to 301 (C). This can prevent the system data stored in the system area 33 from being accidentally modified or deleted by the user.
[0032] 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 may be used to record information related to damaged physical units (also referred to as bad blocks) in the memory module 122. The valid data management table may be used to record information related to valid data stored in at least some physical units in the memory module 122. The voltage management table may be used to record information related to the read voltage used by the memory module 122.
[0033] 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 In one embodiment, the image data may be carried by at least one operation instruction (eg, write instruction) obtained from the host system 11.
[0034] In one embodiment, the memory control circuit 23 can detect whether the plurality of image data belonging to the continuous image in the image data meets the deletion condition. It should be noted that, for the convenience of explanation below, it is assumed that the plurality of image data belonging to the continuous image in the image data includes the first image data and the 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).
[0035] In one embodiment, the first image data and the second image data belong to continuous images, which means that the logic units corresponding to the first image data and the second image data respectively (ie, the first logic unit and the second logic unit) are continuous.
[0036] In one embodiment, the first image data and the second image data belong to continuous images, which may also mean that the time information corresponding to the first image data (also referred to as the first time information) and the time information corresponding to the second image data (also referred to as the second time information) are continuous. 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 continuous.
[0037] In one embodiment, in the operation of determining whether the first image data and the second image data are continuous images, it is also possible to determine whether the image data is continuous based on the characteristic changes on the time axis of the image, that is, by analyzing the timestamp difference between the image frames, the frame rate stability and other factors, it is possible to determine whether there is an abnormal jump or interruption. Exemplarily, the memory control circuit 23 or the host system 11 (e.g., the processor in the host system 11) can check the continuously recorded video / image stream based on the timestamp to ensure that there is no obvious time interval or jump. If there is a large time gap, it may indicate non-continuous shooting.
[0038] In one embodiment, the memory control circuit 23 or the host system 11 (e.g., the processor in the host system 11) can analyze the timestamp difference and frame rate stability between frames according to the following steps. Specifically: Step 1: Obtain and parse the timestamp, extract the timestamp information attached to each frame of image data; convert the timestamp into a unified time unit (e.g., 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, and set a suitable time difference threshold Δt_threshold according to the frame rate and application scenario of the device. For example, for a 30 FPS (Frames Per Second, which refers to the number of frames captured per second) dashcam, the time difference threshold Δt_threshold = 33 milliseconds can be selected, but the present invention is not limited to this. Step 4: Perform logical judgment, traverse the time difference between all adjacent frames, and check pair by pair: If the time difference Δt between two frames < the time difference threshold Δt_threshold, then mark the two frames as continuous frames. On the contrary, if the time difference Δt between two frames>the time difference threshold Δt_threshold, the two frames are marked as non-continuous frames.
[0039] The summary generation method and summary information corresponding to the above embodiment are as follows: Summary generation method: 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.
[0040] 2. Calculate the time difference between frames. 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 speed up processing of large batches of data.
[0041] 3. Set the time difference threshold. According to the frame rate (FPS) of the device and the requirements of the application scenario, determine a reasonable time difference threshold (Δt_threshold). For example, for a 30 FPS dashcam, since the theoretical interval between each frame is about 33 ms (1000 / 30 ≈ 33.33 ms), you can choose Δt_threshold = 33 ms.
[0042] 4. Continuity marking and anomaly detection, traverse all inter-frame time differences, and apply conditional statements to check whether each Δt is less than or equal to Δt_threshold. If it is satisfied, it is considered a continuous frame; otherwise, it is considered a discontinuous frame and marked accordingly. For discontinuous situations, further analysis is required to determine whether there are jumps or other abnormalities.
[0043] Summary Information: 1. Select key frames. For a sequence of frames marked as continuous, only key frames can be saved. The selection of key frames can be determined according to the scene requirements, such as selecting one frame as a representative every N frames, or using more complex strategies such as motion vector analysis.
[0044] 2. Storing metadata, (1). Timestamp and frame number association: keep the timestamp of each key frame and its corresponding frame number (Frame ID) so that it can be accurately located when reconstructing the original video stream. (2). Description of the relationship between frames: For non-continuous points, in addition to saving the key frames at both ends, a list of all frame numbers in the segment and their respective timestamps should also be recorded, so that the video structure can be fully represented even after removing redundant frames.
[0045] 3. Record the updated increments. (1) Change region index: For frames with similar overall background but local changes, image segmentation technology can be used to identify the changed parts and only record the information of these areas instead of the content of the entire frame. (2) Motion compensation parameters: If object movement is involved, additional parameters used to describe the change in object position (such as translation and rotation matrices) can be saved, which is very useful for later editing or analysis.
[0046] 4. Generate a hash value, generate a perceptual hash value for each key frame, which can resist slight visual changes to a certain extent while remaining sensitive to content changes. When the hash values of two frames are close, it means that they are visually very similar.
[0047] Technical effect: Based on the use of timestamp differences and frame rate stability to judge image continuity, the above summary acquisition method and summary information can help effectively manage and optimize storage resources while ensuring the integrity and availability of important information.
[0048] 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 (e.g., a processor in the host system 11) may generate an approximate fingerprint for each photo or video frame each time a new photo or video frame is taken, and measure its similarity / compare it with the previous frame by the Hamming distance. If the similarity between the frames is very close, the frames are considered to be continuous.
[0049] The summary generation method and summary information corresponding to the above embodiment are as follows: Abstract acquisition method 1. Approximate fingerprint generation Perceptual hashing algorithm selection: Use perceptual hashing algorithms such as pHash, aHash (average hashing), dHash (difference hashing), or tHash (texture hashing) to generate a fixed-length binary string for each frame of image as the fingerprint of the frame.
[0050] Fingerprint normalization: Ensure that all fingerprints have the same length and format for subsequent comparison.
[0051] 2. Hamming distance calculation Distance calculation: For a newly captured frame, calculate the Hamming distance between it and the previous frame fingerprint, that is, the number of different bits in the two binary strings. The smaller the Hamming distance, the more similar the two frames are.
[0052] Similarity threshold setting: A reasonable Hamming distance threshold (e.g., 5 or less) is set according to the requirements of the application scenario to determine whether two frames are similar enough to be considered continuous.
[0053] 3. Continuity Marking Logical judgment: If the Hamming distance between two frames is less than the set threshold, the two frames are considered to belong to the same continuous sequence; otherwise, they are considered discontinuous.
[0054] Exception handling: For frames marked as non-continuous, further analysis is performed to determine whether there is fast motion, scene switching, or other special circumstances, and whether additional processing is required.
[0055] Summary Information 1. Keyframe saving Key frame selection: For a frame sequence that is considered to be continuous, you can choose to keep a complete key frame every few frames, and only save the fingerprint information of the remaining frames.
[0056] Metadata recording: In addition to the fingerprint, the timestamp, frame number (Frame ID) and any other necessary metadata of each keyframe should also be recorded, such as position information, exposure parameters, etc.
[0057] 2. Fingerprint database construction Fingerprint indexing: Create a database or index table containing all saved frame fingerprints and their corresponding metadata for quick search and comparison.
[0058] Incremental update: When a new frame is added, its fingerprint is simply added to the database and compared with the most recent keyframe to determine whether it belongs to a continuous sequence.
[0059] 3. Description of the changed area Local feature extraction: For frames with similar overall background but containing local changes, image segmentation techniques can be used to identify the changed parts and record only the feature descriptors of these areas instead of the content of the entire frame.
[0060] Motion compensation information: If object movement is involved, additional parameters describing the change in object position (such as translation and rotation matrices) can be saved, which is very useful for later editing or analysis.
[0061] 4. Feature vector compression 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.
[0062] 5. Perceptual Hash Storage Hash value recording: Generate a perceptual hash value for each keyframe and save it with other metadata of the frame. When the hash values of two frames are close, it means that they are visually very similar.
[0063] Version control: Since hash algorithms may be updated or improved over time, a version control system is introduced to ensure that hash values of different versions can be correctly matched and parsed.
[0064] Technical effect: The method can not only effectively determine whether the image data is continuous, but also realize efficient resource management and retrieval functions through a carefully designed summary information structure. This method is particularly suitable for devices such as driving recorders and surveillance cameras, and minimizes the storage of redundant data while ensuring that important information is not lost.
[0065] 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 (e.g., a processor in the host system 11) can periodically calculate the brightness, contrast, and structure information values between the two images between adjacent frames. If the brightness, contrast, and structure information values between the two images are higher than a certain threshold, the frames are considered to be continuous; otherwise, there may be significant changes.
[0066] The summary generation method and summary information corresponding to the above embodiment are as follows: Abstract acquisition method 1. Image attribute extraction Brightness analysis: Use methods such as Average Brightness and Histogram Matching to quantify the brightness distribution of each frame.
[0067] Contrast measurement: Apply standard deviation, local contrast, or gradient-based methods such as the Sobel operator to evaluate the contrast of an image.
[0068] Structural information extraction: Use algorithms such as Structural Similarity Index Measure (SSIM) and Multi-Scale Structural Similarity (MS-SSIM) to capture structural features in images.
[0069] 2. Similarity metric calculation Comprehensive score: Combine the above three attributes (brightness, contrast, and structural information) into a comprehensive score, which can be a simple weighted sum or a more complex nonlinear model.
[0070] Threshold setting: Set a reasonable similarity threshold according to the needs of the application scenario to determine whether two frames are similar enough to be considered continuous. For example, for surveillance cameras, if the comprehensive score is higher than 0.95, the two frames are considered to belong to the same continuous sequence; otherwise, they are considered non-continuous.
[0071] 3. Continuity labeling and anomaly detection Logical judgment: traverse all adjacent frame pairs and apply conditional statements to check whether each comprehensive score is greater than the set threshold. If it is satisfied, it is considered to be a continuous frame; otherwise, it is considered to be a non-continuous frame and marked accordingly.
[0072] Exception handling: For frames marked as non-continuous, further analysis is performed to determine whether there is fast motion, scene switching, or other special circumstances, and whether additional processing is required.
[0073] Summary Information 1. Keyframe saving Key frame selection: For a frame sequence that is considered to be continuous, you can choose to retain a complete key frame every few frames, and only save the simplified description information of the remaining frames.
[0074] Metadata recording: In addition to the simplified description information, the timestamp, frame number (Frame ID) and any other necessary metadata such as position information, exposure parameters, etc. of each key frame should also be recorded.
[0075] 2. Property change records Incremental update: For frames that have similar overall backgrounds but contain local changes, image segmentation technology can be used to identify the changed parts and only record the changes in the attributes of these areas (such as the changes in brightness, contrast, and structural information).
[0076] Motion compensation information: If object movement is involved, additional parameters describing the change in object position (such as translation and rotation matrices) can be saved, which is very useful for later editing or analysis.
[0077] 3. Construction of comprehensive scoring database Rating Index: Create a database or index table of all saved frames and their combined ratings for quick lookup and comparison.
[0078] Version control: Since the scoring algorithm may be updated or improved over time, a version control system is introduced to ensure that different versions of the scores can be correctly matched and parsed.
[0079] 4. Feature vector compression 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. Structural Information Summary Structural Similarity Hash: Generates a structural similarity-based hash value for each keyframe and saves it with other metadata for the frame. When the hash values of two frames are close, it means that they are very similar visually.
[0081] Technical effect: It can not only effectively determine whether the image data is continuous, but also realize efficient resource management and retrieval functions through a carefully designed summary information structure. This method is particularly suitable for devices such as driving recorders and surveillance cameras. It minimizes the storage of redundant data while ensuring that important information is not lost. At the same time, this method can sensitively capture subtle changes in the scene, which is helpful for subsequent video analysis and event detection.
[0082] In one embodiment, in the operation of determining whether the first image data and the second image data belong to a continuous image, the memory control circuit 23 or the host system 11 (e.g., a processor in the host system 11) can calculate the movement direction and speed of the pixels in the image sequence when the user takes a series of photos, and infer the movement of the object in the scene. The relative displacement between each two adjacent photos is detected. If the displacement is small, it is considered that these photos belong to the same continuous sequence.
[0083] The summary generation method and summary information corresponding to the above embodiment are as follows: Abstract acquisition method 1. Optical flow calculation Optical flow estimation: Use algorithms such as Lucas-Kanade, Farneback, or DeepFlow to estimate the pixel-level motion vector field between adjacent frames. These vectors describe the displacement of each pixel from one frame to the next.
[0084] Sparse and dense optical flow: You can choose to calculate dense optical flow for all pixels, or sparse optical flow only at feature points, depending on performance requirements and application scenarios.
[0085] 2. Motion Analysis Motion vector statistics: Perform 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.
[0086] Region segmentation: Divide the image into multiple regions with consistent motion based on the consistency of motion vectors, which helps to distinguish different objects in the background and foreground.
[0087] 3. Relative displacement measurement Displacement threshold setting: Set a reasonable displacement threshold (DisplacementThreshold) according to the needs of the application scenario to determine whether two frames belong to the same continuous sequence. If the average displacement is less than the threshold, it is considered a continuous frame; otherwise, it is considered a non-continuous frame.
[0088] Logical judgment: traverse all adjacent frame pairs and apply conditional statements to check whether each average displacement is less than the set threshold. If it is satisfied, it is considered to be a continuous frame; otherwise, it is considered to be a non-continuous frame and marked accordingly.
[0089] Summary Information 1. Keyframe saving Key frame selection: For a frame sequence that is considered to be continuous, you can choose to retain a complete key frame every few frames, and only save the simplified description information of the remaining frames.
[0090] 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.
[0091] 2. Motion Vector Summary 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 record the motion vector summary information of these areas.
[0092] Motion compensation information: If object movement is involved, additional parameters describing the change in object position (such as translation and rotation matrices) can be saved, which is very useful for later editing or analysis.
[0093] 3. Regional Movement Mode Motion Pattern Indexing: Creates a database or index table of all saved frames and their motion patterns (such as motion vector statistics) for quick lookup and comparison.
[0094] Version control: Since motion analysis algorithms 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.
[0095] 4. Feature vector compression 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.
[0096] 5. Motion Vector Hashing Motion hash generation: Generates a motion vector-based hash value (Motion Hash) for each keyframe and saves it with other metadata of the frame. When the hash values of two frames are close, it means that they are very similar in motion.
[0097] Technical effect: The method can not only effectively determine whether the image data is continuous, but also realize 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 repeated backgrounds or scenes with high similarity, thereby reducing the storage of redundant data while ensuring the integrity of important information. In addition, this method can sensitively capture the subtle movements of objects in the scene, which is helpful for subsequent photo editing and event detection.
[0098] 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., CNN model) in the storage device 12 or the host system 11 (e.g., the processor in the host system 11), and the lightweight CNN model may distinguish between a static background and a dynamic foreground. When the model predicts that there is no significant change between consecutive frames, only the first complete frame may be saved, and subsequent frames may be stored in summary form.
[0099] The summary generation method and summary information corresponding to the above embodiment are as follows: Abstract acquisition method 1. Lightweight CNN model deployment Model selection: Choose a lightweight and efficient CNN architecture, such as MobileNet, ShuffleNet, SqueezeNet, etc. These models reduce the demand for computing resources while ensuring performance.
[0100] Model optimization: Use technologies 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, and surveillance cameras).
[0101] Model deployment: Deploy the optimized model to the processor of the target device to ensure real-time processing capabilities.
[0102] 2. Separation of static background and dynamic foreground Background modeling: Use the CNN model to classify each frame and identify which parts belong to the static background and which parts are dynamic foreground.
[0103] Foreground detection: For areas marked as dynamic foreground, additional target detection algorithms (such as YOLO, SSD) can be applied to further analyze the object category and its motion status.
[0104] 3. Assessment of the degree of change Change Threshold Setting: Set a reasonable threshold (Change Threshold) according to the needs 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 area between the previous and next frames.
[0105] 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, it is considered to be a continuous frame; otherwise, it is considered to be a non-continuous frame and marked accordingly.
[0106] Summary Information 1. Keyframe saving Key frame selection: For a frame sequence that is considered to be continuous, only the first complete key frame is saved, and only simplified description information is saved for the remaining frames.
[0107] 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.
[0108] 2. Dynamic Foreground Summary Incremental updates: For frames that contain local changes despite a similar overall background, image segmentation techniques can be used to identify the changed parts and record only the information of these areas, rather than the contents of the entire frame. This includes: Foreground Mask: Indicates which pixels belong to the dynamic foreground.
[0109] Feature Descriptor of Changed Areas: Describes the unique features of the changed areas, such as color histogram, texture features, etc.
[0110] Motion Vectors: Capture the direction and speed of movement of objects within a moving area.
[0111] 3. Deep Feature Summary Deep feature extraction: The last layer or the last few layers of the CNN model are used to extract the deep feature vectors of each frame, and these high-dimensional vectors are compressed 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.
[0112] Feature hash generation: Generate a deep feature-based hash value (Deep FeatureHash) for each keyframe and save it with other metadata of the frame. When the hash values of two frames are close, it means that they are visually very similar.
[0113] 4. Metadata Enhancement Scene description: Combine contextual information (such as time, location, weather conditions, etc.) to add richer metadata descriptions to each keyframe for later retrieval and analysis.
[0114] Event label: If there is a specific event (such as a traffic accident, intrusion, etc.), add the corresponding event label to the relevant frame to improve the retrieval efficiency.
[0115] Technical effect: It can not only effectively determine whether the image data is continuous, but also realize efficient resource management and retrieval functions through a carefully designed summary information structure. This method is particularly suitable for devices such as mobile phones, dashcams and surveillance cameras. When users take a series of photos or videos, it can intelligently identify and process media files with repeated backgrounds or scenes with high similarity, thereby reducing the storage of redundant data while ensuring the integrity of important information. In addition, the use of deep learning models can sensitively capture subtle changes in the scene, which is helpful for subsequent photo editing and event detection.
[0116] In one embodiment, in the operation of determining whether the first image data and the second image data belong to a continuous image, the memory control circuit 23 or the host system 11 (e.g., a processor in the host system 11) can, when receiving the video stream, use a pre-built background model and compare each frame of the image with the model to identify the moving object in the foreground and check whether the current frame is consistent with the background model. If they are consistent, it is considered to be a continuous part and only the difference information is saved.
[0117] The summary generation method and summary information corresponding to the above embodiment are as follows: Abstract acquisition method 1. Background model construction Background modeling: Use statistical methods (such as Gaussian Mixture Model, GMM), adaptive thresholding, or deep learning-based methods (such as Autoencoders) to build a stable background model.
[0118] Model updating: Based on environmental changes, the background model needs to be updated periodically or dynamically to maintain its accuracy and robustness.
[0119] 2. Foreground detection and motion analysis Foreground segmentation: Compare each frame of the image with the background model to extract the foreground objects. This can be achieved through simple pixel-level difference calculations, morphological operations, etc.
[0120] Motion vector estimation: For the detected foreground area, optical flow or other motion estimation algorithms can be further applied to capture the movement of the object.
[0121] 3. Continuity Marking Consistency assessment: If a frame image is highly consistent with the background model, the frame is considered to be part of a continuous frame; otherwise, if there is a significant difference, it is considered a discontinuous frame.
[0122] Threshold setting: Set a reasonable similarity threshold (SimilarityThreshold) according to the needs 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 (MSE) or structural similarity index (SSIM, Structural Similarity IndexMeasure) at the pixel level.
[0123] 4. Preservation of difference information Incremental update: For a frame sequence that is considered to be continuous, only the first complete key frame is saved, and the remaining frames only save the changed parts relative to the background model (i.e., the foreground objects and their motion information).
[0124] Compression coding: Efficiently compress and encode foreground objects and their motion information (such as JPEG, PNG, H.264 / AVC) to reduce storage space usage.
[0125] Summary Information 1. Keyframe saving Key frame selection: For a frame sequence that is considered to be continuous, only the first complete key frame is saved, and only simplified description information is saved for the remaining frames.
[0126] 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.
[0127] 2. Foreground Object Summary Foreground Mask: Indicates which pixels belong to the foreground object.
[0128] Feature Descriptor of Changed Areas: Describes the unique features of the changed areas, such as color histogram, texture features, etc.
[0129] Motion Vectors: Capture the direction and speed of movement of objects within a moving area.
[0130] 3. Storage of difference information Differential Coding: For the parts that have changed in consecutive frames, differential coding is used to save these difference information. This can greatly save storage space while retaining important information.
[0131] Incremental Update Log: records the new or changed content during each update to facilitate the subsequent reconstruction of the complete video stream.
[0132] 4. Metadata Enhancement Scene description: Combine contextual information (such as time, location, weather conditions, etc.) to add richer metadata descriptions to each keyframe for later retrieval and analysis.
[0133] Event label: If there is a specific event (such as a traffic accident, intrusion, etc.), add the corresponding event label to the relevant frame to improve the retrieval efficiency.
[0134] Technical effect: The method can not only effectively determine whether the image data is continuous, but also realize efficient resource management and retrieval functions through a carefully designed summary information structure. This method is particularly suitable for devices such as driving recorders and surveillance cameras. It minimizes the storage of redundant data while ensuring that important information is not lost. At the same time, the use of background subtraction technology can sensitively capture subtle changes in the scene, which is helpful for subsequent photo editing and event detection.
[0135] In one embodiment, in determining whether the first image data and the second image data are continuous images, the memory control circuit 23 or the host system 11 (e.g., a processor in the host system 11) can check the continuously recorded video streams according to the timestamps to ensure that there is no obvious time interval or jump. If there is a large time gap, it may indicate non-continuous shooting.
[0136] The summary generation method and summary information corresponding to the above embodiment are as follows: Abstract acquisition method 1. Timestamp parsing and standardization 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.
[0137] Time unit conversion: Convert all timestamps to a unified time unit, such as milliseconds (ms), to ensure consistency and accuracy of subsequent calculations.
[0138] 2. Calculate the time difference between frames 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 speed up processing large batches of data.
[0139] Anomaly detection: Iterates through all time differences and identifies whether there are significant time intervals or jumps, such as time gaps that exceed a preset threshold.
[0140] 3. Continuity Marking Threshold setting: Determine a reasonable time difference threshold (Δt_threshold) based on the device's frame rate (FPS) and the requirements of the application scenario. For example, for a 30 FPS dashcam, since the theoretical interval between each frame is about 33 ms (1000 / 30 ≈ 33.33 ms), you can choose Δt_threshold = 33 ms.
[0141] Logical judgment: If the time difference between two frames is less than or equal to the set threshold, they are considered to be continuous frames; otherwise, they are considered to be non-continuous frames and marked accordingly.
[0142] 4. Abnormal frame processing Further analysis: For frames marked as non-continuous, further analysis is performed to determine whether there is fast motion, scene switching, or other special situations, and whether additional processing is required.
[0143] Metadata update: For discontinuous points, in addition to saving the key frames at both ends, a list of all frame numbers within the segment and their respective timestamps should also be recorded, so that the video structure can be fully represented even after redundant frames are removed.
[0144] Summary Information 1. Keyframe saving Key frame selection: For a frame sequence that is considered to be continuous, you can choose to retain a complete key frame every few frames, and only save the simplified description information of the remaining frames.
[0145] 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.
[0146] 2. Time difference index Time Difference Database: Create a database or index table of all saved frames and their time differences for quick lookup and comparison.
[0147] Version control: As the timestamp parsing algorithm may be updated or improved over time, a version control system is introduced to ensure that the time differences between different versions can be correctly matched and parsed.
[0148] 3. Non-continuous event labels Event tagging: For frames marked as non-continuous, add specific event tags (Event Tags), such as "fast movement", "scene switching", etc., to facilitate later retrieval and analysis.
[0149] Contextual information: Combine contextual information (such as time, location, weather conditions, etc.) to add richer descriptions to each non-continuous event and improve retrieval efficiency.
[0150] 4. Metadata Enhancement Scene description: Combine contextual information (such as time, location, weather conditions, etc.) to add richer metadata descriptions to each keyframe for later retrieval and analysis.
[0151] Event label: If there is a specific event (such as a traffic accident, intrusion, etc.), add the corresponding event label to the relevant frame to improve the retrieval efficiency.
[0152] Technical Effect: The above method can not only effectively determine whether the image data is continuous, but also realize efficient resource management and retrieval functions through a carefully designed summary information structure. This method is particularly suitable for devices such as driving recorders and surveillance cameras. It minimizes 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, which is helpful for subsequent video analysis and event detection.
[0153] 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 belong to continuous images that meet the deletion condition.
[0154] In one embodiment, the image summary information may reflect that the first logical unit and the second logical unit are continuous logical units. In one embodiment, the image summary information may reflect the order of the first image data and the second image data. In one embodiment, the image summary information may reflect whether the second image data (or the second logical unit) is ordered before or after the first image data (or the first logical unit). In one embodiment, the image summary information may also include any information that can be used to restore (e.g., reconstruct) the second image data, which is not limited by the present invention.
[0155] 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 logical unit corresponding to the first image data (i.e., the first logical 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 logical 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).
[0156] 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 the management table in the system area 33. In addition, the memory control circuit 23 may discard the second image data.
[0157] In one embodiment, when the first image data and the second image data meet the deletion condition, the storage space of the storage device 12 can be effectively saved by storing the first image data (and the image summary information) and discarding (i.e., not storing) the second image data. In addition, when necessary, 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.
[0158] 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 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 may be read from the data area 31 (e.g., the second physical unit).
[0159] 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 a 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 the management table (i.e., the mapping information).
[0160] In one embodiment, the memory control circuit 23 may obtain a read instruction from the host system 11. The read instruction indicates to read the second logical unit. Alternatively, from another perspective, the read instruction is used to indicate to read the second image data (or a continuous image containing 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 31.
[0161] In one embodiment, the memory control circuit 23 can 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 can copy the first image data to obtain the copied image data corresponding to the first image data. For example, the data content of the copied image data can be the same as the data content of the first image data. Then, the memory control circuit 23 can set the copied image data as the restored second image data. After obtaining the restored second image data, the memory control circuit 23 can return the second image data to the host system 11 to respond to the read command.
[0162] In one embodiment, the memory control circuit 23 can actively reduce the amount of image data to be stored without the knowledge of the host system 11 (or without the need for control 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 that the host system 11 can subsequently access (e.g., read) the image data normally.
[0163] Figure 4 FIG. 1 is a schematic diagram showing storage of first image data and image summary data corresponding to second image data according to an embodiment of the present invention. Figure 4 , it is assumed 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 (ie, first image data) and 402 (ie, second image data).
[0164] In particular, image frames 401 and 402 belong to consecutive images in image data 41. For example, image frame 401 corresponds to logic unit LBA(x) (i.e., the first logic unit). Image frame 402 corresponds to logic unit LBA(y) (i.e., the second logic unit). Logical unit LBA(y) follows logical unit LBA(x).
[0165] In one embodiment, after obtaining the image data 41, the memory control circuit 23 may store the image frame 401 in the data area 31 (e.g., the first physical unit) in the memory module, and map the logical unit LBA (x) to the data area 31 (e.g., the first physical unit). At the same time, the memory control circuit 23 may detect whether the image frames 401 and 402 belonging to consecutive images in the image data 41 meet the deletion condition.
[0166] In one embodiment, after detecting that the image frames 401 and 402 meet the deletion condition, the memory control circuit 23 may record the image summary information 42 corresponding to the image frame 402. For example, the image summary information 42 may reflect that the image frames 401 and 402 are continuous images that meet the deletion condition. In addition, the image summary information 42 may also reflect that the image frame 402 is subsequent to the image frame 401, etc., and the present invention is not limited thereto.
[0167] 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 in 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 to storing the image frame 402, storing the image summary information 42 may 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.
[0168] Figure 5 is a schematic diagram showing restoration of second image data based on first image data and image summary data according to an embodiment of the present invention. Figure 5 , continued by Figure 4 In one embodiment, it is assumed that a read instruction from the host system 11 instructs to read the image data 41. According to the read instruction, the memory control circuit 23 can 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 unit LBA (x) to be read as instructed by the read instruction, the memory control circuit 23 can read the image frame 401 from the data area 31 (i.e., the first physical unit). In addition, according to the logical unit LBA (y) to be read as instructed by the read instruction, the memory control circuit 23 can query the management table 43 in the system area 33. Then, the memory control circuit 23 can obtain the image summary information 42 from the system area 33 according to the query result.
[0169] In one embodiment, after obtaining the image frame 401 and the image summary information 42, the memory control circuit 23 can 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 can 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 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 transmit the image data 41 back to the host system 11 in response to the read command.
[0170] In one embodiment, the memory control circuit 23 can store data in the memory module 122 based on multiple write modes. For example, the write mode includes 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 can be higher than the reliability of the data stored in the memory module 122 based on the second write mode.
[0171] 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 writing mode. Thus, the reliability of the stored image summary information and / or the ability to store the image summary information may be improved. 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 writing modes (e.g., the second writing mode).
[0172] In one embodiment, after performing a programming operation on at least one physical unit to store data based on a first write mode, one storage unit in the programmed physical unit is used to store a certain number (also referred to as a first number) of bit data. In addition, after performing a programming operation on at least one physical unit to store data based on a second write mode, one storage unit in the programmed physical unit is used to store another number (also referred to as a second number) of bit data. The first number may be less than the second number. For example, the first number may be "1", and the second number may be "2", "3", "4", or other values greater than "1".
[0173] In one embodiment, the first writing mode may be an SLC mode or a virtual SLC mode. In one embodiment, the second writing mode may be one of MLC, TLC or QLC. It should be noted that the first writing mode and the second writing mode may also be adjusted according to practical needs, and the present invention is not limited thereto.
[0174] 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 (e.g., 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.
[0175] In one embodiment, the pixel change ratio may reflect the amount of change in 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 to the amount of change in color (or color distribution) between the images respectively presented by the first image data and the second image data. That is, if the amount of change in color (or color distribution) between the images respectively presented by the first image data and the second image data is greater (i.e., the difference in color (or color distribution) between the images respectively presented by the first image data and the second image data is greater), the pixel change ratio may be greater.
[0176] In one embodiment, the memory control circuit 23 may detect the image data through image detection technology to determine whether the first image data and the second image data meet the deletion condition. For example, the image detection technology 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 based on the detection result. It should be noted that the actual operation of the image detection technology belongs to the prior art and can be designed according to practical needs, and will not be elaborated here.
[0177] In one embodiment, the memory control circuit 23 may obtain 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 may determine that the first image data and the second image data meet the deletion condition. Figure 4 For example, the memory control circuit 23 may determine the logical unit LBA(y) (i.e., the second logical unit) according to the identification information. Then, in the process of storing the image data 41, the memory control circuit 23 may 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 may discard the image frame 402 and store the image summary information 42 in the system area 33 in the memory module 122. For details of the relevant operation, please refer to Figure 4 The embodiments of the present invention will not be repeated here.
[0178] Figure 6 FIG. 1 is a flowchart of a method for simplifying and storing image data according to an embodiment of the present invention. Figure 6 In step S601, image data is obtained from a host system. In step S602, whether first image data and second image data belonging to continuous images in the image data meet the deletion condition is detected. 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 a data area in a memory module, and a 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 a system area in the memory module.
[0179] However, Figure 6 The steps in the above are described in detail, so I will not repeat them here. It is worth noting that Figure 6Each step in the above process can be implemented as multiple program codes or circuits, and the present invention is not limited thereto. Figure 6 The method can be used in conjunction with the above exemplary embodiments or can be used alone, and the present invention is not limited thereto.
[0180] In summary, the image data simplified storage method and storage device proposed in the embodiment of the present invention can simplify the storage of the first image data and the second image data that meet the deletion condition in the image data (for example, image summary information corresponding to the second image data is stored instead of storing the complete second image data). As a result, 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 storage device can be improved, thereby improving the storage efficiency of the storage device for image data.
[0181] 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 it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to 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; 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 logic unit corresponding to the first image data to the data area; The second image data is discarded, and the image summary information is stored in a system area in the memory module.
2. The image data simplified storage method according to claim 1, wherein the step of storing the image summary information in the system area in the memory module comprises: determining a second logical unit corresponding to the second image data; Establishing mapping information between the second logic unit and the image summary information; as well as The mapping information is stored in a management table.
3. The image data simplified storage method according to claim 2, 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.
4. The image data simplified storage method according to claim 3, 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.
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: 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.
6. 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 a second logical unit from the host system, wherein the second logical unit corresponds to the second image data; 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.
7. 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.
8. The image data simplified storage method according to claim 1, further comprising: storing the image summary information to the system area based on a first writing mode, The reliability of data stored based on the first writing mode is higher than the reliability of data stored based on the second writing mode.
9. 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.
10. 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; 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 logic unit corresponding to the first image data to the data area; The second image data is discarded, and the image summary information is stored in a system area in the memory module.
11. The storage device according to claim 10, wherein the operation of the memory controller storing the image summary information in the system area in the memory module comprises: determining a second logical unit corresponding to the second image data; Establishing mapping information between the second logic unit and the image summary information; as well as The mapping information is stored in a management table.
12. The storage device according to claim 11, 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.
13. The storage device according to claim 12, 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.
14. The storage device according to claim 10, 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.
15. The storage device according to claim 10, 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 a second logical unit from the host system, wherein the second logical unit corresponds to the second image data; 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.
16. The storage device according to claim 10, 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.
17. The storage device according to claim 10, wherein the memory controller is further configured to: storing the image summary information to the system area based on a first writing mode, The reliability of data stored based on the first writing mode is higher than the reliability of data stored based on the second writing mode.
18. The storage device according to claim 10, 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
An image storage and processing method
CN101261740A
Method and device for storing video surveillance image
CN103327306A
Method and device for recording images
CN104539864A
Image compression method
CN105376580A
Infrared image data processing method, device, system and equipment and storage medium
CN114168551A
Cited By
Quality detection method and device for image acquisition of humanoid robot
CN120088258A
Control panel detection method, device and system and computer readable storage medium
CN120448209A
Control panel detection method, device, system and computer-readable storage medium
CN120448209B