CN112486747A - Memory abnormity detection method and device, electronic equipment and readable storage medium - Google Patents

Memory abnormity detection method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN112486747A
CN112486747A CN202011376353.3A CN202011376353A CN112486747A CN 112486747 A CN112486747 A CN 112486747A CN 202011376353 A CN202011376353 A CN 202011376353A CN 112486747 A CN112486747 A CN 112486747A
Authority
CN
China
Prior art keywords
memory
physical address
data
storage unit
threshold
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
CN202011376353.3A
Other languages
Chinese (zh)
Other versions
CN112486747B (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202011376353.3A priority Critical patent/CN112486747B/en
Publication of CN112486747A publication Critical patent/CN112486747A/en
Application granted granted Critical
Publication of CN112486747B publication Critical patent/CN112486747B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/2273Test methods

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)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention discloses a method and a device for detecting memory abnormity, electronic equipment and a readable storage medium, wherein the method comprises the following steps: reading first data stored in each physical address in a target storage unit of a memory; checking whether each first data is consistent with preset data written in each physical address in advance to obtain a checking result; and determining the memory exception under the condition that the number of the inconsistency of the checking results is greater than a first threshold value. According to the embodiment of the invention, whether the memory in the electronic equipment is abnormal or not can be quickly determined.

Description

Memory abnormity detection method and device, electronic equipment and readable storage medium
Technical Field
The embodiment of the invention relates to the field of information processing, in particular to a memory abnormity detection method and device, electronic equipment and a readable storage medium.
Background
With the continuous development of electronic equipment, convenience is brought to the life of people. The memory is an indispensable component of the electronic device, and stores a large amount of information (such as photos, videos, important data, and the like) of a user. If the memory is abnormal, the electronic equipment cannot be started, so that the information stored in the memory is lost by a user. Therefore, it is necessary to find the abnormal condition of the memory in time.
In the process of implementing the present application, the inventor finds that at least the following problems exist in the prior art: the detection efficiency of memory anomalies is low at present.
Disclosure of Invention
The embodiment of the invention provides a memory abnormity detection method and device, electronic equipment and a readable storage medium, which can solve the problem that the abnormity of a memory in the electronic equipment is difficult to determine quickly.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a memory anomaly detection method, where the method may include:
reading first data stored in each physical address in a target storage unit of a memory; checking whether each first data is consistent with preset data written in each physical address in advance to obtain a checking result; and determining the memory exception under the condition that the number of the inconsistency of the checking results is greater than a first threshold value.
In a second aspect, an embodiment of the present invention provides a memory anomaly detection apparatus, which may include:
the reading module is used for reading first data stored in each physical address in a target storage unit of the memory; the checking module is used for checking whether each first data is consistent with preset data written in each physical address in advance to obtain a checking result; and the determining module is used for determining the memory exception under the condition that the number of the inconsistent check results is greater than the first threshold value.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, where the program or instructions, when executed by the processor, implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present invention provide a readable storage medium on which a program or instructions are stored, which when executed by a processor, implement the steps of the method according to the first aspect.
In a fifth aspect, embodiments of the present application provide a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In the embodiment of the invention, whether the first data stored in each physical address in the target storage unit of the memory is consistent with the preset data written in each physical address in advance is checked, and whether the storage function of the memory is normal can be reflected by the checking result, and the memory is determined to be abnormal under the condition that the inconsistent number in the checking result is greater than the first threshold value, so that whether the memory in the electronic equipment is abnormal can be quickly and accurately determined.
Drawings
The present invention will be better understood from the following description of specific embodiments thereof taken in conjunction with the accompanying drawings, in which like or similar reference characters designate like or similar features.
Fig. 1 is a schematic diagram of an internal structure of a memory according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for detecting memory anomalies according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a method for writing default data according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for detecting memory anomalies according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a memory anomaly detection apparatus according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. 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.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or described herein. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The memory anomaly detection method provided by the embodiment of the invention can be applied to the following application scenarios, which are explained below.
An indispensable component of electronic products is a memory, which plays a crucial role in storing user information (such as photos, videos, data, and the like). If a memory failure (e.g., a crack in a wafer of the memory) occurs after a user purchases an electronic product, the electronic product cannot be booted, and the user information stored therein is lost.
Fig. 1 shows an internal structure of a memory 100, and fig. 1 is a schematic diagram of an internal structure of a memory according to an embodiment of the present invention. The memory 100 includes a controller 110, a substrate 120, a wafer 130, and a crack location 140.
And the controller 110 is responsible for performing communication connection with the processor and performing reading and writing operations on a storage unit in the memory.
The substrate 120, the wiring board inside the memory, serves as signal communication and support for the controller 110, and the wafer inside the memory.
The wafer 130, the physical storage unit inside the memory, is the storage location of the user data.
The cracking position 140 is a cracking position of the wafer due to stress and the like, and the top wafer is cracked most frequently.
If the wafer cracks in the memory, the memory cell corresponding to the wafer is affected, that is, the memory cell is abnormal.
For the problems in the related art, embodiments of the present invention provide a method and an apparatus for detecting memory anomalies, an electronic device, and a storage medium, which can solve the problem in the related art that it is difficult to quickly determine that a memory in an electronic device is anomalous.
The method provided by the embodiment of the invention can be applied to other scenes for detecting the memory exception besides the application scenes.
According to the method provided by the embodiment of the invention, whether the first data stored in each physical address in the target storage unit of the memory is consistent with the preset data written in each physical address in advance is checked, whether the storage function of the memory is normal can be reflected due to the check result, and the memory is determined to be abnormal under the condition that the inconsistent number in the check result is greater than the first threshold value, so that whether the memory in the electronic equipment is abnormal can be determined quickly and accurately.
Based on the application scenario, the following describes in detail a memory anomaly detection method provided by an embodiment of the present invention.
Fig. 2 is a flowchart of a memory anomaly detection method according to an embodiment of the present invention.
As shown in fig. 2, the memory anomaly detection method may include steps 210 to 230, and the method is applied to a memory anomaly detection device, and specifically as follows:
in step 210, the first data stored in each physical address in the target memory location of the memory is read.
Step 220, checking whether each first data is consistent with preset data written in each physical address in advance, and obtaining a checking result.
In step 230, in the case that the number of inconsistent results is greater than the first threshold, it is determined that the memory is abnormal.
In the memory abnormality detection method provided by the embodiment of the invention, whether the first data stored in each physical address in the target storage unit of the memory is consistent with the preset data written in each physical address in advance is checked, and whether the memory function of the memory is normal can be reflected due to the check result, and the memory is determined to be abnormal under the condition that the inconsistent number in the check result is greater than the first threshold value, so that whether the memory in the electronic equipment is abnormal can be quickly and accurately determined.
The contents of steps 210-230 are described below:
first, step 210 is involved.
Wherein the target memory cell referred to above is located at the top layer of the memory.
Since the top wafer of the memory is most stressed and is most prone to cracking, the target memory cell on the top can be detected by the focus.
As mentioned above, a wafer is a kind of physical memory cell inside a memory, and therefore, the target memory cells appearing herein refer to the memory cells inside the memory corresponding to the wafer.
Next, step 220 is involved.
And checking whether each first data is consistent with preset data written in each physical address in advance to obtain a checking result. The checking result is divided into two types: one is that the first data is consistent with the preset data; the other is that the first data and the preset data are not consistent.
Wherein, the first data and the preset data are inconsistent and further comprise: the first data and the preset data are not completely consistent, and the first data can not be read.
Specifically, each first data and preset data written in advance in each physical address may be periodically checked. After time T is passed each time, the first data of the target storage unit is automatically read, the first data and the preset data written in advance are verified, and the number of verification errors is counted.
Here, the verification result is obtained by verifying whether each first data is identical to the preset data written in advance in each physical address. Whether the storage unit is abnormal or not can be quickly and accurately identified.
In a possible embodiment, before step 220, the following steps may be further included:
preset data is written in each physical address in the target memory cell.
Specifically, preset data is written in the target storage unit, and the range may be: 0x00 ~ 0 xFF. As shown in fig. 3, 0xA0a0 is written in each physical address in the target memory location. Wherein, 0x is a prefix of 16 system, and 16 system is a representation method of data in a computer; a hexadecimal 0xFF is binary 11111111. Here, by storing preset data in each physical address in the target storage unit in advance, it is possible to facilitate subsequent quick and accurate verification of the function of the target storage unit.
Finally, step 230 is involved.
In one possible embodiment, in the case that the number of the inconsistency of the checking result is greater than the first threshold value, the memory abnormity prompt message is displayed.
Here, the storage function of the memory is described as being abnormal by the case where the number of the inconsistency is larger than the first threshold value as a result of the check. At this time, the memory abnormity prompt information is displayed, so that the user can be timely and effectively prompted that the current memory is abnormal, and the user can timely backup the key data in the electronic equipment.
In the case of determining a memory exception, the degree of exception of the target memory location may be determined based on the number of inconsistencies resulting from the verification, and the target memory location may then be at least partially masked based on the degree of exception. The following description is made in order:
in a possible embodiment, after the above step of obtaining the test result, the following steps may be further included:
clearing data stored in a first physical address in the target storage unit under the condition that the number is smaller than a first threshold value, wherein the first data stored in the first physical address is inconsistent with preset data; the preset data is stored in the first physical address.
If the number of the inconsistency of the checking result is smaller than the first threshold, which indicates that the checking error is very small, the checking error can be corrected by an internal error correction mechanism. This condition is typically a recoverable failure, and the target memory cell can be restored to normal by re-erasing the target memory cell.
Specifically, a first physical address where stored first data is inconsistent with preset data is determined, and then data stored in the first physical address in a target storage unit is cleared, namely, data erasing is performed on the first physical address; and finally, storing the preset data in the first physical address, namely writing the preset data into the first physical address.
The writing operation is just like writing on paper, and data is written and stored in a hard disk or a memory. Accordingly, the erase operation erases the data in the hard disk or memory as if erasing the words on the paper. Here, when the number of inconsistent data is smaller than the first threshold, that is, when the error is very small, the target memory cell is rewritten by restoring the preset data to the target memory cell, so that the target memory cell can be recovered to normal.
In a possible embodiment, after the step of determining a memory exception mentioned above, the following steps may be further included:
shielding the target storage unit under the condition that the number is larger than a second threshold value; the first threshold is less than the second threshold.
If the number of inconsistent check results is greater than the second threshold, it indicates that the target memory cell is damaged in a large area, and if a user needs to call data of the target memory cell, an error occurs because the replaceable memory cells of the device (i.e., the memory cells used as replacements) are all used up, so that the memory device enters a write-protection state, and the use of the user is affected.
The write protection refers to that some information is only allowed to be used but not to be modified during the operation of the computer, and a protection measure is required to be taken for an area storing the information, and the protection measure is called write protection. I.e. the information for the memory area is only allowed to be read out to be used, but not written to prevent corruption. If the electronic device enters a write-protected state, the user cannot start the electronic device to use, and user data stored in the electronic device cannot be stored.
By shielding the target storage unit, the target storage unit cannot be accessed, so that the electronic product is prevented from entering a write-protected state, and a user can continue to start the electronic device to copy key user data.
Here, when the number of inconsistent data is greater than the second threshold, that is, when the target storage unit is damaged in a large area, the target storage unit is shielded, so that the processor does not access the target storage unit, and the write-protected state of the electronic device is avoided, so that a user can back up the key data in the electronic device.
In a possible embodiment, after the step of determining a memory exception mentioned above, the following steps may be further included:
and shielding the first physical address under the condition that the number is greater than or equal to a first threshold value and less than or equal to a second threshold value, wherein the first data stored in the first physical address is inconsistent with the preset data.
If the number of the inconsistent check results is greater than or equal to the first threshold and less than or equal to the second threshold, the memory is only partially damaged, and only the first physical address with the inconsistent check result needs to be shielded.
In addition, when the number is greater than or equal to the first threshold value and less than or equal to the second threshold value, the method may further include the steps of:
acquiring target data stored in a first physical address and a logical address of the target data; transferring the target data to a second physical address, wherein the first data stored in the second physical address is consistent with the preset data; and establishing a mapping relation between the logical address and the second physical address.
Specifically, the target data stored in the first physical address may be transferred by changing an address management table in the storage unit, where the address management table may control the processor to access the range of the physical address in the memory, and set the address of the damaged area to be invalid, that is, invisible to the processor, thereby achieving the effect of isolation.
The address management table stores a mapping relationship between a logical address and a physical address. The actual address corresponding to a memory location in memory may be referred to as a physical address, which corresponds to a logical address.
When the number of the inconsistency is larger than or equal to a first threshold value and smaller than or equal to a second threshold value, the target data stored in the first physical address is retained by shielding the first physical address where the stored first data is inconsistent with the preset data and transferring the data stored in the first physical address to the second physical address.
In summary, in the embodiment of the present invention, whether the first data stored in each physical address in the target storage unit of the memory is consistent with the preset data written in each physical address in advance is checked, and as the check result can indicate whether the storage function of the memory is normal, and when the number of inconsistencies in the check result is greater than the first threshold, it is determined that the memory is abnormal, and thus, it can be quickly and accurately determined whether the memory in the electronic device is abnormal.
It should be noted that, in the memory abnormality detection method provided in the embodiment of the present application, the execution main body may be a memory abnormality detection device, or a control module in the memory abnormality detection device for executing the load memory abnormality detection method. In the embodiments of the present application, a memory exception detection apparatus is used to perform a load memory exception detection method as an example, and the memory exception detection method provided in the embodiments of the present application is described.
In addition, based on the above memory anomaly detection method, an embodiment of the present invention further provides a method for implementing memory anomaly detection, which is specifically described in detail with reference to fig. 4.
In step 410, the first data stored in each physical address in the target memory location of the memory is read.
Step 420, checking whether each first data is consistent with preset data written in each physical address in advance, and obtaining a checking result.
In step 430, it is determined whether the number of inconsistent results is less than a first threshold.
Step 440, if yes, clearing the data stored in the first physical address in the target memory cell, and storing the preset data in the first physical address.
If not, go to step 450.
And step 450, judging whether the number of inconsistent detection results is greater than a second threshold value.
Step 460, if yes, mask the target memory cell.
If not, go to step 470.
Step 470, acquiring the target data stored in the first physical address and the logical address of the target data; and transferring the target data to a second physical address, and establishing a mapping relation between the logical address and the second physical address.
In summary, in the embodiment of the present invention, whether the first data stored in each physical address in the target storage unit of the memory is consistent with the preset data written in each physical address in advance is checked, and the check result can indicate whether the storage function of the memory is normal, so that the abnormal degree of the memory can be determined according to the number of inconsistent check results, and different measures can be taken for the abnormal degree. So as to realize the purpose of not influencing the use of users to the maximum extent and timely backing up data.
It can be understood that according to the embodiment of the invention, except that the memory is recognized to be abnormal in advance in the process of using the electronic device by the user, the target storage unit is isolated before the user reads the target storage unit, the user can be reminded in advance, and important data can be backed up by the user in advance. The testing efficiency before delivery can be improved, and the effect of reducing the testing cost is achieved. Because the capacity of the current electronic product is larger and larger (for example, the capacity of 256GB or 512GB, there are 8 wafers), if the storage units corresponding to all the wafers are to be tested, the time consumed is longer, the testing efficiency before delivery is low, and the testing cost is high. According to the embodiment of the invention, the electronic equipment with abnormal memory can be quickly and accurately screened out before delivery.
In addition, based on the foregoing memory abnormality detection method, an embodiment of the present invention further provides a memory abnormality detection apparatus, which is specifically described in detail with reference to fig. 5.
Fig. 5 is a schematic structural diagram of a memory anomaly detection device according to an embodiment of the present invention.
As shown in fig. 5, the memory abnormality detection apparatus 500 may include:
the reading module 510 is configured to read first data stored in each physical address in a target storage unit of the memory.
The checking module 520 is configured to check whether each first data is consistent with preset data written in each physical address in advance, so as to obtain a checking result.
The determining module 530 is configured to display a memory exception prompting message when the number of the inconsistency is greater than the first threshold.
In a possible embodiment, the memory anomaly detection apparatus 500 may further include:
and the clearing module is used for clearing the data stored in the first physical address in the target storage unit under the condition that the number is smaller than the first threshold, wherein the first data stored in the first physical address is inconsistent with the preset data.
And the storage module is used for storing the preset data in the first physical address.
In a possible embodiment, the memory anomaly detection apparatus 500 may further include:
the first shielding module is used for shielding the first physical address under the condition that the number is greater than or equal to a first threshold value and less than or equal to a second threshold value, and the first data stored in the first physical address is inconsistent with the preset data.
In a possible embodiment, the memory anomaly detection apparatus 500 may further include:
and the acquisition module is used for acquiring the target data stored in the first physical address and the logical address of the target data.
And the transfer module is used for transferring the target data to a second physical address, and the first data stored in the second physical address is consistent with the preset data.
And the establishing module is used for establishing a mapping relation between the logic address and the second physical address.
In a possible embodiment, the memory anomaly detection apparatus 500 may further include:
the second shielding module is used for shielding the target storage unit under the condition that the number of the target storage units is larger than a second threshold value; the first threshold is less than the second threshold.
In a possible embodiment, the memory anomaly detection apparatus 500 may further include:
and the writing module is used for writing preset data into each physical address in the target storage unit.
Wherein the target memory cell referred to above is located at the top layer of the memory.
The memory abnormality detection device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The memory abnormality detection device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The memory anomaly detection device provided in the embodiment of the present application can implement each process implemented by the memory anomaly detection device in the method embodiments of fig. 2 to fig. 4, and is not described here again to avoid repetition.
To sum up, the memory abnormality detection apparatus provided in the embodiment of the present invention checks whether the first data stored in each physical address in the target storage unit of the memory is consistent with the preset data written in each physical address in advance, and since the check result can indicate whether the storage function of the memory is normal, in the case that the number of inconsistencies in the check result is greater than the first threshold, it is determined that the memory is abnormal, and thus, it can be quickly and accurately determined whether the memory in the electronic device is abnormal.
Fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
The electronic device 600 includes, but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, a processor 610, and the like. Among other things, input unit 604 may include a graphics processor 6041 and a microphone 6042; the display unit 606 may include a display panel 6061; the user input unit 607 may include a touch panel 6071 and other input devices 6072; the memory 609 may include application programs and an operating system.
Those skilled in the art will appreciate that the electronic device 600 may further comprise a power source (e.g., a battery) for supplying power to the various components, and the power source may be logically connected to the processor 610 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 6 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
A processor 610 for reading the first data stored in each physical address in the target memory location of the memory.
The processor 610 is further configured to check whether each first data is consistent with preset data written in each physical address in advance, and obtain a check result.
And the display unit 606 is used for displaying the memory abnormity prompting information under the condition that the number of the inconsistent check results is greater than the first threshold value.
Optionally, the processor 610 is further configured to clear the data stored in the first physical address in the target storage unit when the number is smaller than the first threshold, where the first data stored in the first physical address is inconsistent with the preset data.
And a memory 609 for storing preset data in the first physical address.
Optionally, the processor 610 is further configured to mask the first physical address when the number is greater than or equal to a first threshold and less than or equal to a second threshold, where first data stored in the first physical address is inconsistent with preset data.
Optionally, the processor 610 is further configured to obtain the target data stored in the first physical address and a logical address of the target data.
The processor 610 is further configured to transfer the target data to a second physical address, where the first data stored in the second physical address is consistent with the preset data.
The processor 610 is further configured to establish a mapping relationship between the logical address and the second physical address.
Optionally, the processor 610 is further configured to mask the target storage unit if the number is greater than the second threshold; the first threshold is less than the second threshold.
Optionally, the processor 610 is further configured to write preset data into each physical address in the target storage unit.
In the embodiment of the invention, whether the first data stored in each physical address in the target storage unit of the memory is consistent with the preset data written in each physical address in advance is checked, and whether the storage function of the memory is normal can be reflected by the checking result, and the memory is determined to be abnormal under the condition that the inconsistent number in the checking result is greater than the first threshold value, so that whether the memory in the electronic equipment is abnormal can be quickly and accurately determined. The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the foregoing memory abnormality detection method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the above embodiment of the memory anomaly detection method, and can achieve the same technical effect, and in order to avoid repetition, the description is omitted here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (16)

1. A memory anomaly detection method, comprising:
reading first data stored in each physical address in a target storage unit of a memory;
checking whether each first data is consistent with preset data written in each physical address in advance to obtain a checking result;
and determining the memory exception under the condition that the number of the inconsistent check results is greater than a first threshold value.
2. The method of claim 1, wherein after said obtaining the test result, the method further comprises:
clearing data stored in a first physical address in the target storage unit under the condition that the number is smaller than a first threshold value, wherein the first data stored in the first physical address is inconsistent with the preset data;
and storing the preset data in the first physical address.
3. The method of claim 1, wherein after said determining said memory exception, said method further comprises:
and shielding a first physical address under the condition that the number is greater than or equal to the first threshold and less than or equal to a second threshold, wherein the first data stored in the first physical address is inconsistent with the preset data.
4. The method of claim 3, wherein after said determining said memory exception, said method further comprises:
acquiring target data stored in the first physical address and a logic address of the target data;
transferring the target data to a second physical address, wherein the first data stored in the second physical address is consistent with the preset data;
and establishing a mapping relation between the logic address and the second physical address.
5. The method of claim 1, wherein after said determining said memory exception, said method further comprises:
shielding the target storage unit under the condition that the number is larger than a second threshold value; the first threshold is less than the second threshold.
6. The method according to any one of claims 1-5, wherein before said checking whether each of said first data is consistent with said pre-set data pre-written in each of said physical addresses, said method further comprises:
and writing the preset data into each physical address in the target storage unit.
7. The method of claim 1, wherein the target storage unit is at a top level of the memory.
8. A memory anomaly detection apparatus, the apparatus comprising:
the reading module is used for reading first data stored in each physical address in a target storage unit of the memory;
the checking module is used for checking whether each first data is consistent with preset data written in each physical address in advance to obtain a checking result;
and the determining module is used for determining the memory exception under the condition that the number of the inconsistent check results is greater than a first threshold value.
9. The apparatus of claim 8, further comprising:
a clearing module, configured to clear data stored in a first physical address in the target storage unit when the number is smaller than a first threshold, where the first data stored in the first physical address is inconsistent with the preset data;
and the storage module is used for storing the preset data in the first physical address.
10. The apparatus of claim 8, further comprising:
the first shielding module is used for shielding a first physical address under the condition that the number is greater than or equal to the first threshold and not greater than a second threshold, wherein the first data stored in the first physical address is inconsistent with the preset data.
11. The apparatus of claim 10, further comprising:
an obtaining module, configured to obtain target data stored in the first physical address and a logical address of the target data;
the transfer module is used for transferring the target data to a second physical address, and the first data stored in the second physical address is consistent with the preset data;
and the establishing module is used for establishing the mapping relation between the logic address and the second physical address.
12. The apparatus of claim 8, further comprising:
the second shielding module is used for shielding the target storage unit under the condition that the number is larger than a second threshold value; the first threshold is less than the second threshold.
13. The apparatus of claims 8-12, further comprising:
and the writing module is used for writing the preset data into each physical address in the target storage unit.
14. The apparatus of claim 8, wherein the target storage unit is at a top level of the memory.
15. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the memory anomaly detection method according to any one of claims 1-7.
16. A readable storage medium, on which a program or instructions are stored, which, when executed by a processor, carry out the steps of the memory anomaly detection method according to any one of claims 1-7.
CN202011376353.3A 2020-11-30 2020-11-30 Memory abnormality detection method, device, electronic equipment and readable storage medium Active CN112486747B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011376353.3A CN112486747B (en) 2020-11-30 2020-11-30 Memory abnormality detection method, device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011376353.3A CN112486747B (en) 2020-11-30 2020-11-30 Memory abnormality detection method, device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN112486747A true CN112486747A (en) 2021-03-12
CN112486747B CN112486747B (en) 2024-08-09

Family

ID=74937742

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011376353.3A Active CN112486747B (en) 2020-11-30 2020-11-30 Memory abnormality detection method, device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112486747B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024077825A1 (en) * 2022-10-09 2024-04-18 声龙(新加坡)私人有限公司 Data storage method and apparatus based on ethash algorithm, device, and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105589770A (en) * 2015-07-20 2016-05-18 杭州昆海信息技术有限公司 Fault detection method and apparatus
CN108228398A (en) * 2018-02-11 2018-06-29 维沃移动通信有限公司 A kind of abnormality eliminating method and mobile terminal
CN110597674A (en) * 2019-08-05 2019-12-20 天津华来科技有限公司 Memory detection method, device, video recording system and storage medium
CN110852247A (en) * 2019-11-07 2020-02-28 北京云迹科技有限公司 Abnormality detection method, abnormality detection device, electronic apparatus, and computer-readable storage medium
WO2020124960A1 (en) * 2018-12-18 2020-06-25 盛科网络(苏州)有限公司 Data storage detection method and apparatus, and storage medium and electronic apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105589770A (en) * 2015-07-20 2016-05-18 杭州昆海信息技术有限公司 Fault detection method and apparatus
CN108228398A (en) * 2018-02-11 2018-06-29 维沃移动通信有限公司 A kind of abnormality eliminating method and mobile terminal
WO2020124960A1 (en) * 2018-12-18 2020-06-25 盛科网络(苏州)有限公司 Data storage detection method and apparatus, and storage medium and electronic apparatus
CN110597674A (en) * 2019-08-05 2019-12-20 天津华来科技有限公司 Memory detection method, device, video recording system and storage medium
CN110852247A (en) * 2019-11-07 2020-02-28 北京云迹科技有限公司 Abnormality detection method, abnormality detection device, electronic apparatus, and computer-readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024077825A1 (en) * 2022-10-09 2024-04-18 声龙(新加坡)私人有限公司 Data storage method and apparatus based on ethash algorithm, device, and storage medium

Also Published As

Publication number Publication date
CN112486747B (en) 2024-08-09

Similar Documents

Publication Publication Date Title
US10691806B2 (en) Self-measuring nonvolatile memory device systems and methods
US10204698B2 (en) Method to dynamically inject errors in a repairable memory on silicon and a method to validate built-in-self-repair logic
TWI552158B (en) Systems and methods for testing memory
US20050081090A1 (en) Method for automatically and safely recovering BIOS memory circuit in memory device including double BIOS memory circuits
CN110727597A (en) Method for completing use case based on log troubleshooting invalid codes
CN108364670B (en) Read-write pressure testing method, device, equipment and storage medium
CN112486747B (en) Memory abnormality detection method, device, electronic equipment and readable storage medium
CN109491825B (en) Method, device, storage medium and terminal for positioning abnormal starting problem
CN108228611B (en) Document information copying method and device
CN117827554A (en) Test method, test device, computer equipment and storage medium
US20190004903A1 (en) Data Restoration Method and Apparatus, and Terminal
CN102750234B (en) The control method of memorizer and controller
CN110968456A (en) Method and device for processing fault disk in distributed storage system
CN113282435A (en) Application exception processing method and electronic equipment
TW201316340A (en) Flash memory testing method
CN108920205A (en) A kind of control method, device and computer storage medium
JP4339269B2 (en) Mobile phone bus monitor system and method
EP3557422A1 (en) Method for accessing code sram, and electronic device
JP2006338610A (en) Restoration method of registry information and information processor
US11836048B2 (en) Information processing apparatus
CN111459721B (en) Fault processing method, device and computer
CN109918122B (en) White list maintenance method and device and terminal equipment
CN114780276A (en) Memory isolation method and device, electronic equipment and readable storage medium
CN116069576A (en) Abnormal power-down detection method, electronic equipment and storage medium
CN117891668A (en) Mainboard inspection method, device, terminal and readable storage medium

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
GR01 Patent grant
GR01 Patent grant