CN110597674A - Memory detection method, device, video recording system and storage medium - Google Patents

Memory detection method, device, video recording system and storage medium Download PDF

Info

Publication number
CN110597674A
CN110597674A CN201910718665.9A CN201910718665A CN110597674A CN 110597674 A CN110597674 A CN 110597674A CN 201910718665 A CN201910718665 A CN 201910718665A CN 110597674 A CN110597674 A CN 110597674A
Authority
CN
China
Prior art keywords
memory
detection
writing
speed
read
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910718665.9A
Other languages
Chinese (zh)
Other versions
CN110597674B (en
Inventor
叶霆
贾波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Hualai Technology Co Ltd
Original Assignee
Tianjin Hualai Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin Hualai Technology Co Ltd filed Critical Tianjin Hualai Technology Co Ltd
Priority to CN201910718665.9A priority Critical patent/CN110597674B/en
Publication of CN110597674A publication Critical patent/CN110597674A/en
Application granted granted Critical
Publication of CN110597674B publication Critical patent/CN110597674B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/273Tester hardware, i.e. output processing circuits
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The embodiment of the invention discloses a storage detection method, a storage detection device, a video system and a storage medium, wherein the detection method can perform comprehensive performance detection such as read-write detection, video write-in speed detection, file system detection and the like on a storage, and realizes the screening of bad cards and abnormal cards.

Description

Memory detection method, device, video recording system and storage medium
Technical Field
The embodiment of the invention relates to the technical field of security monitoring video storage, in particular to a storage detection method, a storage detection device, a video system and a storage medium.
Background
In the household security camera, the video files are usually stored through storages such as an SD card or a U disk, the SD cards on the market are different in quality, screening of damaged cards is lacked during use, the damaged cards with quality problems can cause a lot of abnormal use problems for users, meanwhile, the video files need to be recorded in real time, the SD card or the U disk can frequently perform writing and reading operations, the service lives of the SD card and the U disk can be greatly influenced, the SD card and the U disk are easily burnt out and cannot be used, and great economic loss can be caused for the users.
Disclosure of Invention
Therefore, embodiments of the present invention provide a method and an apparatus for detecting a storage, a video recording system, and a storage medium, so as to solve the problems that the existing storages such as an SD card or a U disk have uneven quality, are lack of bad card screening, and are easily burned out when being frequently read and written.
In order to achieve the above object, the embodiments of the present invention provide the following technical solutions:
according to a first aspect of the embodiments of the present invention, a method for detecting a memory is provided, the method including:
performing read-write detection on the memory;
detecting the video recording writing speed of the memory;
and carrying out file system detection on the memory.
Further, the performing read-write detection on the memory includes:
writing a set of data at the memory physical address and reading;
randomly extracting a plurality of detection points from the physical address to respectively detect the consistency of the read-write data information;
when the number of the detection points with inconsistent read-write data information is lower than a first preset threshold value, judging that the memory is not damaged;
and when the number of the detection points with inconsistent read-write data information is not lower than a first preset threshold value, judging that the memory is damaged.
Further, the detecting the video recording writing speed of the memory includes:
acquiring frame data from a video acquired by a camera, and detecting the frame acquisition speed;
writing the frame data into the memory, and detecting a writing speed;
comparing the frame taking speed with the writing speed;
if the writing speed is lower than the frame fetching speed, judging that the memory is damaged;
and if the writing speed is not lower than the frame fetching speed, judging that the memory is not damaged.
Further, the performing file system detection on the memory includes:
when the file system of the memory is abnormal, the linked list in the memory is repaired to solve the abnormality, and if the abnormality is solved, the memory is judged to be not damaged.
Further, the method further comprises:
if the unsolved abnormality is repaired through the linked list, formatting the memory;
if the abnormality is solved, judging that the memory is not damaged;
if the exception is not resolved, the memory is determined to be corrupted.
Further, the memory includes at least one of an SD card and a usb disk.
According to a second aspect of the embodiments of the present invention, there is provided a memory detection apparatus, the apparatus including:
the read-write detection module is used for carrying out read-write detection on the memory;
the video writing detection module is used for detecting the video writing speed of the memory;
and the file system detection module is used for carrying out file system detection on the memory.
According to a third aspect of the embodiments of the present invention, a video recording system is provided, where the system includes the above-mentioned memory detection device and video recording writing device;
the video recording writing device is used for starting normal recording when the memory is detected to be undamaged;
pre-caching videos collected by a camera in a memory of the camera;
and when the size of the cache file reaches a second preset threshold value, writing the cache file into the memory.
According to a fourth aspect of embodiments of the present invention, a computer storage medium is provided, the computer storage medium having one or more program instructions embodied therein, the one or more program instructions executing the memory detection method as described above.
The embodiment of the invention has the following advantages:
the detection method can carry out comprehensive performance detection such as read-write detection, video recording write-in speed detection, file system detection and the like on the memory when the memory is used, so as to realize screening of bad cards and abnormal cards.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It should be apparent that the drawings in the following description are merely exemplary, and that other embodiments can be derived from the drawings provided by those of ordinary skill in the art without inventive effort.
Fig. 1 is a schematic flowchart of a memory detection method according to embodiment 1 of the present invention;
fig. 2 is a schematic structural diagram of a memory detection apparatus according to embodiment 2 of the present invention;
fig. 3 is a schematic structural diagram of a video recording system according to embodiment 3 of the present invention.
Detailed Description
The present invention is described in terms of particular embodiments, other advantages and features of the invention will become apparent to those skilled in the art from the following disclosure, and it is to be understood that the described embodiments are merely exemplary of the invention and that it is not intended to limit the invention to the particular embodiments disclosed. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
As shown in fig. 1, the present embodiment proposes a method for detecting a memory, where the memory includes at least one of an SD card and a usb disk, and the method includes:
and S110, performing read-write detection on the memory.
Further, the read-write detection of the memory comprises:
writing a set of data at a physical address of the memory and reading;
randomly extracting a plurality of detection points from the physical address to respectively detect the consistency of the read-write data information;
when the number of the detection points with inconsistent read-write data information is lower than a first preset threshold value, judging that the memory is not damaged;
and when the number of the detection points with inconsistent read-write data information is not lower than a first preset threshold value, judging that the memory is damaged.
In this embodiment, five detection points (i.e. five segments of physical addresses) are randomly extracted, whether the data of the write and read operations are consistent and accurate is detected, and if there are errors at 2 or more than 2 points, it is determined that the memory is damaged.
And S120, detecting the video recording writing speed of the memory.
Further, the detecting the video recording writing speed of the memory comprises:
acquiring frame data from a video acquired by a camera, and detecting the frame acquisition speed;
writing frame data into a memory, and detecting the writing speed;
comparing the frame taking speed with the writing speed;
if the writing speed is lower than the frame fetching speed, judging that the memory is damaged;
and if the writing speed is not lower than the frame fetching speed, judging that the memory is not damaged.
By taking frames of video and audio frame data collected by a camera, if the writing speed of the frame data written into a memory is lower than the frame taking speed, normal video recording cannot be performed, for example, a frame rate is 25/s of data stream, frames are lost when the speed of writing video into an SD card is lower than 40ms, normal video recording cannot be performed, and the card is determined to be a bad card.
And S130, carrying out file system detection on the memory.
Further, performing file system check on the memory, including:
when the file system of the memory is abnormal, the linked list in the memory is repaired to solve the abnormality, and if the abnormality is solved, the memory is judged to be not damaged.
Further, in step S130, the method further includes:
if the unsolved abnormality is repaired through the linked list, formatting the memory;
if the abnormity is solved, judging that the memory is not damaged;
if the exception is still unresolved, then a determination is made that the memory is corrupted.
Detecting a file system on the SD card, for example, when the SD card file system is changed into a read-only file system due to card pulling in a video recording process, firstly judging whether the problems can be solved by repairing linked lists in the SD card, secondly judging whether the problems that some linked lists cannot be repaired can be solved by formatting, and if not, determining that the card is a bad card.
According to the memory detection method provided by the embodiment, when the memory is used, the memory can be subjected to comprehensive performance detection such as read-write detection, video recording write-in speed detection, file system detection and the like, so that bad cards and abnormal cards can be screened.
Example 2
Corresponding to embodiment 1 described above, the present embodiment proposes a memory device detecting apparatus 200 including:
a read-write detection module 210, configured to perform read-write detection on the memory;
a video write detection module 220, configured to perform video write speed detection on the memory;
and the file system detection module 230 is configured to perform file system detection on the memory.
The functions performed by the components in the memory detection apparatus 200 according to the embodiment of the present invention have been described in detail in the memory detection method according to embodiment 1, and will not be described herein again.
Example 3
In correspondence with the above embodiment 2, this embodiment proposes a video recording system, which includes a memory detection device 200 and a video recording writing device 300 as in embodiment 2.
The memory test device 200 is used to perform any one of the method steps of a memory test method as described in embodiment 1.
The video recording and writing device 300 is used for starting normal recording when detecting that the memory is not damaged;
pre-caching videos collected by a camera in a memory of the camera;
and when the size of the cache file reaches a second preset threshold value, writing the cache file into the memory.
In the video recording system with the memory detection device provided by the embodiment, after the memory detection device screens out the bad cards and the abnormal cards, the use efficiency of the memory can be improved, the burning out can be effectively avoided, and the service life of the memory can be prolonged through the safe use storage process with the memory cache.
Example 4
In correspondence with embodiment 1 described above, this embodiment proposes a computer storage medium containing one or more program instructions that implement a memory detection method as described in embodiment 1.
Although the invention has been described in detail above with reference to a general description and specific examples, it will be apparent to one skilled in the art that modifications or improvements may be made thereto based on the invention. Accordingly, such modifications and improvements are intended to be within the scope of the invention as claimed.

Claims (9)

1. A memory sensing method, the method comprising:
performing read-write detection on the memory;
detecting the video recording writing speed of the memory;
and carrying out file system detection on the memory.
2. The method according to claim 1, wherein the performing read-write detection on the memory comprises:
writing a set of data at the memory physical address and reading;
randomly extracting a plurality of detection points from the physical address to respectively detect the consistency of the read-write data information;
when the number of the detection points with inconsistent read-write data information is lower than a first preset threshold value, judging that the memory is not damaged;
and when the number of the detection points with inconsistent read-write data information is not lower than a first preset threshold value, judging that the memory is damaged.
3. The method as claimed in claim 1, wherein said detecting the video recording writing speed of the memory comprises:
acquiring frame data from a video acquired by a camera, and detecting the frame acquisition speed;
writing the frame data into the memory, and detecting a writing speed;
comparing the frame taking speed with the writing speed;
if the writing speed is lower than the frame fetching speed, judging that the memory is damaged;
and if the writing speed is not lower than the frame fetching speed, judging that the memory is not damaged.
4. The memory detection method according to claim 1, wherein the performing file system detection on the memory comprises:
when the file system of the memory is abnormal, the linked list in the memory is repaired to solve the abnormality, and if the abnormality is solved, the memory is judged to be not damaged.
5. The memory sensing method of claim 4, further comprising:
if the unsolved abnormality is repaired through the linked list, formatting the memory;
if the abnormality is solved, judging that the memory is not damaged;
if the exception is not resolved, the memory is determined to be corrupted.
6. The memory detection method according to claim 1, wherein the memory comprises at least one of an SD card and a USB flash disk.
7. A memory sensing apparatus, the apparatus comprising:
the read-write detection module is used for carrying out read-write detection on the memory;
the video writing detection module is used for detecting the video writing speed of the memory;
and the file system detection module is used for carrying out file system detection on the memory.
8. A video recording system comprising a memory detection device and video recording writing device according to claim 7;
the video recording writing device is used for starting normal recording when the memory is detected to be undamaged;
pre-caching videos collected by a camera in a memory of the camera;
and when the size of the cache file reaches a second preset threshold value, writing the cache file into the memory.
9. A computer storage medium comprising one or more program instructions embodied in the computer storage medium, the one or more program instructions to perform the method of any of claims 1-6.
CN201910718665.9A 2019-08-05 2019-08-05 Memory detection method, device, video recording system and storage medium Active CN110597674B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910718665.9A CN110597674B (en) 2019-08-05 2019-08-05 Memory detection method, device, video recording system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910718665.9A CN110597674B (en) 2019-08-05 2019-08-05 Memory detection method, device, video recording system and storage medium

Publications (2)

Publication Number Publication Date
CN110597674A true CN110597674A (en) 2019-12-20
CN110597674B CN110597674B (en) 2023-08-22

Family

ID=68853477

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910718665.9A Active CN110597674B (en) 2019-08-05 2019-08-05 Memory detection method, device, video recording system and storage medium

Country Status (1)

Country Link
CN (1) CN110597674B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486747A (en) * 2020-11-30 2021-03-12 维沃移动通信有限公司 Memory abnormity detection method and device, electronic equipment and readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10207788A (en) * 1997-01-28 1998-08-07 Casio Comput Co Ltd Information recording device and method for managing the data and recording medium
JP2002271745A (en) * 2001-03-08 2002-09-20 Toshiba Corp Video recorder and video recording quality setting method thereof
US20040088614A1 (en) * 2002-11-01 2004-05-06 Ting-Chin Wu Management system for defective memory
JP2011113493A (en) * 2009-11-30 2011-06-09 Mega Chips Corp Inspection device, data storage device, imaging apparatus, monitoring system, non-volatile storage medium, and method for inspecting storage performance of non-volatile storage medium
CN103686355A (en) * 2013-12-27 2014-03-26 珠海迈科电子科技有限公司 Method and system for repairing software fault of set-top box
WO2014107940A1 (en) * 2013-01-11 2014-07-17 深圳市江波龙电子有限公司 Embedded memory management method, embedded memory and electronic device
CN104660968A (en) * 2013-11-22 2015-05-27 南京视威电子科技股份有限公司 Method for storing alarm information by using multiple storage cards
WO2017088399A1 (en) * 2015-11-23 2017-06-01 杭州海康威视数字技术股份有限公司 Sd card, camera and sd card reliability warning system
CN108491740A (en) * 2018-02-01 2018-09-04 珠海全志科技股份有限公司 A kind of TF card performance method of real-time

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10207788A (en) * 1997-01-28 1998-08-07 Casio Comput Co Ltd Information recording device and method for managing the data and recording medium
JP2002271745A (en) * 2001-03-08 2002-09-20 Toshiba Corp Video recorder and video recording quality setting method thereof
US20040088614A1 (en) * 2002-11-01 2004-05-06 Ting-Chin Wu Management system for defective memory
JP2011113493A (en) * 2009-11-30 2011-06-09 Mega Chips Corp Inspection device, data storage device, imaging apparatus, monitoring system, non-volatile storage medium, and method for inspecting storage performance of non-volatile storage medium
WO2014107940A1 (en) * 2013-01-11 2014-07-17 深圳市江波龙电子有限公司 Embedded memory management method, embedded memory and electronic device
CN104660968A (en) * 2013-11-22 2015-05-27 南京视威电子科技股份有限公司 Method for storing alarm information by using multiple storage cards
CN103686355A (en) * 2013-12-27 2014-03-26 珠海迈科电子科技有限公司 Method and system for repairing software fault of set-top box
WO2017088399A1 (en) * 2015-11-23 2017-06-01 杭州海康威视数字技术股份有限公司 Sd card, camera and sd card reliability warning system
CN108491740A (en) * 2018-02-01 2018-09-04 珠海全志科技股份有限公司 A kind of TF card performance method of real-time

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486747A (en) * 2020-11-30 2021-03-12 维沃移动通信有限公司 Memory abnormity detection method and device, electronic equipment and readable storage medium
CN112486747B (en) * 2020-11-30 2024-08-09 维沃移动通信有限公司 Memory abnormality detection method, device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN110597674B (en) 2023-08-22

Similar Documents

Publication Publication Date Title
KR100243314B1 (en) Error log method using defect list
CN100395717C (en) Method and system for monitoring hard-disk damage
CN102147708B (en) Method and device for detecting discs
CN107247636B (en) Method and device for data reconstruction optimization in solid state disk
CN109918022B (en) SSD open card bad block table inheritance method
CN106205731B (en) Information processing method and storage equipment
CN112579327B (en) Fault detection method, device and equipment
CN110764960B (en) Solid state disk firmware testing method
CN107632778B (en) Nand Flash scanning detection method and system
CN110597674B (en) Memory detection method, device, video recording system and storage medium
CN110517718B (en) Method and system for effectively screening new and bad blocks of particles
CN111078151A (en) Solid state disk data re-reading method and device and solid state disk
CN114155906A (en) Data block repairing method, device, equipment and storage medium
CN112270945B (en) Method, device, storage medium and terminal for recording power failure during erasing
CN107301109B (en) Hard disk quality screening method and device
CN106648969B (en) Method and system for inspecting damaged data in disk
CN116705138B (en) Solid state disk testing method and storage medium
CN109444570B (en) Electronic product fault diagnosis module and method based on memory
CN107273296A (en) The method of testing and test device of a kind of software
CN114780317A (en) Hard disk plug-in and pull-out test method, system and related components
CN111552582B (en) Method and device for screening weak flash blocks and solid state disk
CN108231134B (en) RAM yield remediation method and device
CN110767258B (en) Data erasure command test method and related device
US6229743B1 (en) Method of a reassign block processing time determination test for storage device
CN114047879A (en) Data storage method of solid state disk, solid state disk and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 8 / F, Huaqiao Chuangye building, No. 10, Jinping Road, Ya'an Road, Nankai District, Tianjin 300119 (Science Park)

Applicant after: Tianjin Hualai Technology Co.,Ltd.

Address before: 9 / F, huaqiaochuangye building, No.10, Jinping Road, Ya'an Road, Nankai District, Tianjin 300119 (Science and Technology Park)

Applicant before: TIANJIN HUALAI TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant