CN110597674B - 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
CN110597674B
CN110597674B CN201910718665.9A CN201910718665A CN110597674B CN 110597674 B CN110597674 B CN 110597674B CN 201910718665 A CN201910718665 A CN 201910718665A CN 110597674 B CN110597674 B CN 110597674B
Authority
CN
China
Prior art keywords
memory
detection
writing
speed
damaged
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.)
Active
Application number
CN201910718665.9A
Other languages
Chinese (zh)
Other versions
CN110597674A (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 memory detection method, a device, a video recording system and a storage medium, wherein the detection method can carry out comprehensive performance detection such as read-write detection, video recording and writing speed detection, file system detection and the like on a memory, so that bad cards and abnormal cards can be screened.

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 memory detection method, a device, a video recording system and a storage medium.
Background
In a household security camera, video files are usually stored through memories such as an SD card or a USB flash disk, and due to uneven quality of the SD card in the market, screening of bad cards is lacking in use, the bad cards with quality problems can cause a plurality of abnormal use problems for users, meanwhile, due to the fact that the video files are required to be recorded in real time, the SD card or the USB flash disk can frequently execute writing and reading operations, the service lives of the SD card and the USB flash disk can be greatly influenced, and the SD card or the USB flash disk is easy to burn out and cannot be used, so that great economic loss can be caused for the users.
Disclosure of Invention
Therefore, the embodiment of the invention provides a memory detection method, a device, a video recording system and a storage medium, which are used for solving the problems that the quality of the existing memory such as an SD card or a U disk is uneven, bad cards are lack of screening, and frequent reading and writing are easy to burn.
In order to achieve the above object, the embodiment of the present invention provides the following technical solutions:
according to a first aspect of an embodiment of the present invention, there is provided a memory detection method, including:
performing read-write detection on the memory;
detecting the video recording and writing speed of the memory;
and detecting the file system of the memory.
Further, the read-write detection for the memory includes:
writing a set of data on the memory physical address and reading;
a plurality of detection points are randomly extracted from the physical address to respectively detect the consistency of read-write data information;
when the number of 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 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 recording writing speed of the memory includes:
acquiring frame data from video acquired by a camera, and detecting a 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, repairing the linked list in the memory to solve the abnormality, and if the abnormality is solved, judging that the memory is not damaged.
Further, the method further comprises:
if the exception is not solved through linked list restoration, formatting the memory;
if the abnormality is solved, judging that the memory is not damaged;
if the exception is not resolved, the memory corruption is determined.
Further, the memory comprises at least one of an SD card and a U disk.
According to a second aspect of an embodiment of the present invention, there is provided a memory detection apparatus, the apparatus including:
the read-write detection module is used for performing read-write detection on the memory;
the video recording and writing detection module is used for detecting the video recording and writing speed of the memory;
and the file system detection module is used for detecting the file system of the memory.
According to a third aspect of an embodiment of the present invention, a video recording system is provided, the system comprising a memory detection device and a video recording writing device as described above;
the video recording writing device is used for starting normal recording when the memory is detected to be undamaged;
pre-caching video acquired 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 an embodiment of the present invention, a computer storage medium is provided, in which one or more program instructions are contained, the one or more program instructions performing the memory detection method as described above.
The embodiment of the invention has the following advantages:
according to the memory detection method, the device, the video recording system and the storage medium, when the memory is used, the memory can be subjected to comprehensive performance detection such as read-write detection, video recording and writing speed detection and file system detection, bad cards and abnormal cards are screened, and after the bad cards and the abnormal cards are screened out, the video recording system with the memory detection device can improve the use efficiency of the memory through the safe use storage flow with the memory cache, effectively avoid burning out and prolong the service life of the memory.
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 will be apparent to those of ordinary skill in the art that the drawings in the following description are exemplary only and that other implementations can be obtained from the extensions of the drawings provided without inventive effort.
Fig. 1 is a flow chart of a memory detection method provided in embodiment 1 of the present invention;
fig. 2 is a schematic structural diagram of a memory detection device 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
Other advantages and advantages of the present invention will become apparent to those skilled in the art from the following detailed description, which, by way of illustration, is to be read in connection with certain specific embodiments, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the 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 U disk, and the method includes:
s110, performing read-write detection on the memory.
Further, performing read-write detection on the memory includes:
writing a set of data on a memory physical address and reading;
a plurality of detection points are randomly extracted from the physical address to respectively detect the consistency of read-write data information;
when the number of 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 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 writing operation and the reading operation are consistent and accurate is detected, and if there are 2 points or more than 2 points with errors, the memory is determined to be damaged.
S120, detecting the video recording and writing speed of the memory.
Further, performing video recording and writing speed detection on the memory includes:
acquiring frame data from video acquired by a camera, and detecting a frame acquisition speed;
writing frame data into a 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;
if the writing speed is not lower than the frame fetching speed, the memory is judged to be free from damage.
By taking frames from video and audio frame data collected by the video camera, if the writing speed of the frame data written into the memory is lower than the frame taking speed, normal video recording cannot be performed, for example, the frame rate is 25/s, then the frame is lost when the writing speed of video recording in the SD card is lower than 40ms, so that normal video recording cannot be performed, and the card is considered to be a bad card.
S130, detecting a file system of the memory.
Further, performing file system detection on the memory includes:
when the file system of the memory is abnormal, repairing the linked list in the memory to solve the abnormality, and if the abnormality is solved, judging that the memory is not damaged.
Further, in step S130, the method further includes:
if the exception is not resolved through the linked list restoration, formatting the memory;
if the abnormality is solved, judging that the memory is not damaged;
if the exception is not resolved, a determination is made that the memory is corrupted.
The detection of the file system on the SD card, such as pulling the card in the video recording process, causes the SD card file system to become a read-only file system, and the like, firstly judges whether the problems can be solved by repairing the linked list in the SD card, judges whether the problems which cannot be repaired by some linked lists can be solved by formatting, and if the problems cannot be solved, judges that the card is a bad card.
According to the memory detection method provided by the embodiment, when the memory is used, comprehensive performance detection such as read-write detection, video recording and writing speed detection, file system detection and the like can be performed on the memory, so that bad cards and abnormal cards can be screened.
Example 2
Corresponding to the above embodiment 1, this embodiment proposes a memory detection device 200, which includes:
the read-write detection module 210 is configured to perform read-write detection on the memory;
the video writing detection module 220 is configured to detect a video writing speed of the memory;
the file system detection module 230 is configured to perform file system detection on the memory.
The functions performed by each component in the memory detection device 200 according to the embodiment of the present invention are described in detail in a memory detection method according to embodiment 1, and will not be described here again.
Example 3
In correspondence with the above embodiment 2, this embodiment proposes a video recording system including a memory detection apparatus 200 and a video recording/writing apparatus 300 as in embodiment 2.
The memory inspection device 200 is used to perform any one of the method steps of the memory inspection method described in embodiment 1.
The video writing device 300 is used for starting normal recording when the memory is detected to be free from damage;
pre-caching the video collected by the camera in the memory of the camera;
and when the size of the cache file reaches a second preset threshold value, writing the cache file into a memory.
According to the video recording system with the memory detection device, after the bad card and the abnormal card are screened out by the memory detection device, the use efficiency of the memory can be improved, burning out is effectively avoided, and the service life of the memory is prolonged by safely using the memory flow 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 execute a memory detection method as described in embodiment 1.
While the invention has been described in detail in the foregoing general description and specific examples, it will be apparent to those skilled in the art that modifications and improvements can be made thereto. Accordingly, such modifications or improvements may be made without departing from the spirit of the invention and are intended to be within the scope of the invention as claimed.

Claims (5)

1. A method of memory detection, the method comprising:
performing read-write detection on the memory;
detecting the video recording and writing speed of the memory;
detecting a file system of the memory;
the read-write detection of the memory comprises the following steps:
writing a set of data on the memory physical address and reading;
a plurality of detection points are randomly extracted from the physical address to respectively detect the consistency of read-write data information;
when the number of detection points with inconsistent read-write data information is lower than a first preset threshold value, judging that the memory is not damaged;
when the number of detection points with inconsistent read-write data information is not lower than a first preset threshold value, judging that the memory is damaged;
the detecting the video recording and writing speed of the memory comprises the following steps:
acquiring frame data from video acquired by a camera, and detecting a 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;
if the writing speed is not lower than the frame fetching speed, judging that the memory is not damaged;
the file system detection of the memory comprises:
when the file system of the memory is abnormal, repairing a linked list in the memory to solve the abnormality, and if the abnormality is solved, judging that the memory is not damaged;
if the exception is not solved through linked list restoration, formatting the memory;
if the abnormality is solved, judging that the memory is not damaged;
if the exception is not resolved, the memory corruption is determined.
2. The method for detecting a memory according to claim 1, wherein the memory includes at least one of an SD card and a usb disk.
3. A memory detection apparatus, the apparatus comprising:
the read-write detection module is used for performing read-write detection on the memory;
the video recording and writing detection module is used for detecting the video recording and writing speed of the memory;
the file system detection module is used for detecting the file system of the memory;
the read-write detection of the memory comprises the following steps:
writing a set of data on the memory physical address and reading;
a plurality of detection points are randomly extracted from the physical address to respectively detect the consistency of read-write data information;
when the number of detection points with inconsistent read-write data information is lower than a first preset threshold value, judging that the memory is not damaged;
when the number of detection points with inconsistent read-write data information is not lower than a first preset threshold value, judging that the memory is damaged;
the detecting the video recording and writing speed of the memory comprises the following steps:
acquiring frame data from video acquired by a camera, and detecting a 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;
if the writing speed is not lower than the frame fetching speed, judging that the memory is not damaged;
the file system detection of the memory comprises:
when the file system of the memory is abnormal, repairing a linked list in the memory to solve the abnormality, and if the abnormality is solved, judging that the memory is not damaged;
if the exception is not solved through linked list restoration, formatting the memory;
if the abnormality is solved, judging that the memory is not damaged;
if the exception is not resolved, the memory corruption is determined.
4. A video recording system, characterized in that the system comprises a memory detection device as claimed in claim 3 and video recording writing means;
the video recording writing device is used for starting normal recording when the memory is detected to be undamaged;
pre-caching video acquired 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.
5. A computer storage medium, characterized in that it contains one or more program instructions for executing the method according to claim 1 or 2.
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 CN110597674A (en) 2019-12-20
CN110597674B true 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)

Families Citing this family (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 (8)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040088614A1 (en) * 2002-11-01 2004-05-06 Ting-Chin Wu Management system for defective memory

Patent Citations (8)

* 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
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

Also Published As

Publication number Publication date
CN110597674A (en) 2019-12-20

Similar Documents

Publication Publication Date Title
TWI479309B (en) Apparatus and method for controlling a solid state disk
CN109918022B (en) SSD open card bad block table inheritance method
CN107918568B (en) Method for preventing Linux system from failing to restart
CN106205731B (en) Information processing method and storage equipment
CN110704287B (en) RAID card abnormal log collection method and system under Linux system and storage medium
CN106682162A (en) Log management method and device
CN110764960B (en) Solid state disk firmware testing method
CN103854704A (en) Automatic detection method and automatic detection device of flash memory bad block
CN102369513A (en) Method for improving stability of computer system and computer system
CN105718330A (en) Linux system backup data recovery method and device
CN110597674B (en) Memory detection method, device, video recording system and storage medium
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
CN109741786A (en) A kind of solid state hard disk monitoring method, device and equipment
CN112270945B (en) Method, device, storage medium and terminal for recording power failure during erasing
CN106648969B (en) Method and system for inspecting damaged data in disk
CN116705138A (en) Solid state disk testing method and storage medium
JP4963847B2 (en) Log information management method
CN113190179B (en) Method for prolonging service life of mechanical hard disk, storage device and system
CN112084097B (en) Disk alarm method and device
CN109375869A (en) Realize the method and system, storage medium of data reliable read write
CN111813748B (en) File system mounting method and device, electronic equipment and storage medium
US6229743B1 (en) Method of a reassign block processing time determination test for storage device
CN108231134B (en) RAM yield remediation method and device
CN112289364A (en) eMMC quality detection and repair method, device and storage medium thereof

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