Emmc loss degree detection method and device, electronic equipment and storage medium

By selecting a free area in the storage space of the EMMC and using the secondary EMMC to detect the write and read performance parameters of the primary EMMC, the problem of low accuracy in EMMC wear detection is solved, and high-precision wear detection is achieved.

CN114420190BActive Publication Date: 2026-02-10SHENZHEN SKYWORTH RGB ELECTRONICS CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210073136.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-21
Publication Date
2026-02-10
Estimated Expiration
2042-01-21

AI Technical Summary

Technical Problem

The accuracy of EMMC wear detection in the existing technology is low, mainly due to the influence of EMMC batch, operating environment and read/write data size, which leads to errors in the displayed EMMC life status value.

Method used

By selecting a free area in the storage space of the primary EMMC and using the wear detection data of the secondary EMMC, the write and read performance parameters of the primary EMMC are detected, and the wear of the EMMC is determined by combining the write performance parameters and the read performance parameters.

Benefits of technology

It improves the accuracy of EMMC loss detection, avoids the calculation error of EMMC controller, ensures the reliability and accuracy of detection data, and overcomes the error caused by the difference in theoretical read and write times.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114420190B_ABST
    Figure CN114420190B_ABST
Patent Text Reader

Abstract

The application discloses an EMMC loss degree detection method and device, electronic equipment and a storage medium. The EMMC loss degree detection method comprises the following steps: when it is detected that a main EMMC meets a preset detection condition, an idle storage area is selected in a storage space corresponding to the main EMMC; loss degree detection data in a secondary EMMC is stored in the idle storage area, and a write performance parameter corresponding to the main EMMC is detected; the loss degree detection data stored in the idle storage area is read by the secondary EMMC, and a read performance parameter of the main EMMC is detected; and the loss degree of the main EMMC is determined according to the write performance parameter and the read performance parameter. The application solves the technical problem of low accuracy in detecting the loss degree of the EMMC in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to an EMMC loss detection method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the rapid development of smart TVs and mobile terminal devices, data storage chips used to store system operation data and user data are becoming increasingly widely used. Among them, EMMC (Embedded Multi Media Card) has become a commonly used data storage chip in smart TVs and mobile terminal devices due to its advantages such as small size, fast read and write speed, and ease of use. At the same time, the wear and tear of EMMC caused by frequent erasure and read operations during use has become a focus of attention. Currently, the wear and tear is usually indicated by reading the value displayed on the EMMC controller. However, since the value displayed on the EMMC controller is calculated by combining the cumulative number of read and write operations with the theoretical number of read and write operations, the batch of EMMC, the operating environment, and the size of the read and write data can all affect the theoretical number of read and write operations. This leads to errors in the value displayed on the EMMC controller, that is, errors in the displayed EMMC wear and tear. Therefore, the accuracy of detecting EMMC wear and tear is low. Summary of the Invention

[0003] The main objective of this application is to provide a method, apparatus, electronic device, and storage medium for detecting EMMC loss, aiming to solve the technical problem of low accuracy in detecting EMMC loss in the prior art.

[0004] To achieve the above objectives, this application provides an EMMC loss detection method, the EMMC loss detection method comprising:

[0005] When the main EMMC is detected to meet the preset detection conditions, a free storage area is selected from the storage space corresponding to the main EMMC.

[0006] By storing the loss detection data in the secondary EMMC to the free storage area, the write performance parameters corresponding to the primary EMMC are detected.

[0007] The secondary EMMC reads the wear detection data stored in the free storage area and detects the read performance parameters of the primary EMMC.

[0008] The wear level of the primary EMMC is determined based on the write performance parameters and the read performance parameters.

[0009] Optionally, the step of storing the loss detection data in the secondary EMMC to the free storage area and detecting the write performance parameters corresponding to the primary EMMC includes:

[0010] The loss detection data in the sub-EMMC is cyclically stored into the free storage area;

[0011] When it is detected that the free storage area cannot store the wear detection data, the wear detection data that has been cyclically stored in the free storage area is used as the first detection data, and the storage capacity and storage time corresponding to the first detection data are determined.

[0012] The write performance parameters of the primary EMMC are calculated based on the ratio of storage capacity to storage time.

[0013] Optionally, the read performance parameters include a first write performance parameter and a second write performance parameter.

[0014] The step of reading the wear detection data stored in the free storage area through the secondary EMMC and detecting the read performance parameters of the primary EMMC includes:

[0015] The wear detection data stored in the free storage area is read sequentially by the sub-EMMC, and the wear detection data read sequentially by the sub-EMMC is used as the second detection data, and the reading time of the second detection data is determined.

[0016] Based on the ratio of the wear detection data to the read time, calculate the first write performance parameter of the second detection data;

[0017] Based on the first write performance parameters of the second detection data, the first write performance parameters of the main EMMC are determined;

[0018] The second detection data and the loss detection data are compared to obtain the second write performance parameter of the second detection data;

[0019] The second write performance parameter of the main EMMC is determined based on the second write performance parameter of the second detection data.

[0020] Optionally, the step of determining the wear level of the primary EMMC based on the write performance parameters and the read performance parameters includes:

[0021] Determine whether both the write performance parameter and the read performance parameter are not greater than a first preset performance parameter;

[0022] If so, then obtain the second preset performance parameter, and determine the loss degree of the main EMMC based on the write performance parameter, the read performance parameter and the second preset performance parameter;

[0023] If not, the first loss level is taken as the loss level of the main EMMC.

[0024] Before the step of selecting a free storage area in the storage space corresponding to the main EMMC when the main EMMC is detected to meet the preset detection conditions, the EMMC loss detection method further includes:

[0025] Determine whether the usage frequency of the target device corresponding to the main EMMC is greater than the usage frequency threshold;

[0026] If so, when the target device is detected to be in a detection state, the main EMMC is determined to meet the preset detection conditions;

[0027] If not, then update the usage frequency.

[0028] If so, then after determining that the main EMMC meets the preset detection conditions when the target device is detected to be in a detection state, the EMMC loss detection method further includes:

[0029] Determine whether there is reserved detection data from the previous detection cycle in the storage space corresponding to the main EMMC;

[0030] If present, the loss status of the main EMMC is determined by comparing the similarity between the reserved detection data and the loss detection data.

[0031] Optionally, the loss state includes a first loss state and a second loss state.

[0032] The step of determining the loss status of the main EMMC by comparing the similarity between the reserved detection data and the loss detection data includes:

[0033] The bit error rate of the main EMMC is determined by comparing the similarity between the reserved detection data and the loss detection data.

[0034] Determine whether the bit error rate is less than the bit error rate threshold;

[0035] If so, the main EMMC is determined to be in the first loss state;

[0036] If not, then the main EMMC is determined to be in the second loss state.

[0037] To achieve the above objectives, this application also provides an EMMC loss detection device, the EMMC loss detection device comprising:

[0038] The selection module is used to select a free storage area in the storage space corresponding to the main EMMC when the main EMMC is detected to meet the preset detection conditions.

[0039] The first detection module is used to detect the write performance parameters corresponding to the main EMMC by storing the loss detection data in the secondary EMMC into the free storage area.

[0040] The second detection module is used to read the wear detection data stored in the free storage area through the secondary EMMC and detect the read performance parameters of the primary EMMC.

[0041] The wear level determination module is used to determine the wear level of the main EMMC based on the write performance parameters and the read performance parameters.

[0042] Optionally, the first detection module is further configured to:

[0043] The loss detection data in the sub-EMMC is cyclically stored into the free storage area;

[0044] When it is detected that the free storage area cannot store the wear detection data, the wear detection data that has been cyclically stored in the free storage area is used as the first detection data, and the storage capacity and storage time corresponding to the first detection data are determined.

[0045] The write performance parameters of the primary EMMC are calculated based on the ratio of storage capacity to storage time.

[0046] Optionally, the read performance parameters include a first write performance parameter and a second write performance parameter, and the second detection module is further configured to:

[0047] The step of reading the wear detection data stored in the free storage area through the secondary EMMC and detecting the read performance parameters of the primary EMMC includes:

[0048] The wear detection data stored in the free storage area is read sequentially by the sub-EMMC, and the wear detection data read sequentially by the sub-EMMC is used as the second detection data, and the reading time of the second detection data is determined.

[0049] Based on the ratio of the wear detection data to the read time, calculate the first write performance parameter of the second detection data;

[0050] Based on the first write performance parameters of the second detection data, the first write performance parameters of the main EMMC are determined;

[0051] The second detection data and the loss detection data are compared to obtain the second write performance parameter of the second detection data;

[0052] The second write performance parameter of the main EMMC is determined based on the second write performance parameter of the second detection data.

[0053] Optionally, the loss determination module is further configured to:

[0054] Determine whether both the write performance parameter and the read performance parameter are not greater than a first preset performance parameter;

[0055] If so, then obtain the second preset performance parameter, and determine the loss degree of the main EMMC based on the write performance parameter, the read performance parameter and the second preset performance parameter;

[0056] If not, the first loss level is taken as the loss level of the main EMMC.

[0057] Optionally, the EMMC loss detection device is further used for:

[0058] Determine whether the usage frequency of the target device corresponding to the main EMMC is greater than the usage frequency threshold;

[0059] If so, when the target device is detected to be in a detection state, the main EMMC is determined to meet the preset detection conditions;

[0060] If not, then update the usage frequency.

[0061] Optionally, the EMMC loss detection device is further used for:

[0062] Determine whether there is reserved detection data from the previous detection cycle in the storage space corresponding to the main EMMC;

[0063] If present, the loss status of the main EMMC is determined by comparing the similarity between the reserved detection data and the loss detection data.

[0064] Optionally, the loss state includes a first loss state and a second loss state, and the EMMC loss detection device is further used for:

[0065] The bit error rate of the main EMMC is determined by comparing the similarity between the reserved detection data and the loss detection data.

[0066] Determine whether the bit error rate is less than the bit error rate threshold;

[0067] If so, the main EMMC is determined to be in the first loss state;

[0068] If not, then the main EMMC is determined to be in the second loss state.

[0069] This application also provides an electronic device, the electronic device comprising: a memory, a processor, and a program of the EMMC loss detection method stored in the memory and executable on the processor, wherein when the program of the EMMC loss detection method is executed by the processor, it can implement the steps of the EMMC loss detection method as described above.

[0070] This application also provides a computer-readable storage medium storing a program for implementing an EMMC loss detection method, wherein when the program for the EMMC loss detection method is executed by a processor, it implements the steps of the EMMC loss detection method as described above.

[0071] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the EMMC loss detection method described above.

[0072] This application provides an EMMC loss detection method, apparatus, electronic device, and storage medium. Specifically, when the primary EMMC meets preset detection conditions, a free storage area is selected in the storage space corresponding to the primary EMMC. This avoids calculation errors in the EMMC controller, thereby ensuring the accuracy of the loss detection. Then, the loss detection data from the secondary EMMC is stored in the free storage area, and the write performance parameters corresponding to the primary EMMC are detected. Finally, the loss detection data stored in the free storage area is read by the secondary EMMC, and the read performance parameters of the primary EMMC are detected. This achieves the purpose of obtaining the write performance parameters and the read performance parameters through the interaction of loss detection data between the secondary and primary EMMCs. Finally, based on the write performance parameters and the read performance parameters, the loss detection is determined. The wear level of the primary EMMC is determined by copying wear level detection data between the primary and secondary EMMCs, since both write and read performance parameters are obtained through copying wear level detection data. The secondary EMMC has its wear level detection data pre-burned into its preset storage area before the motherboard leaves the factory. Furthermore, the secondary EMMC remains disabled when the wear level detection program is not running to detect the wear level of the primary EMMC. This ensures the reliability of the wear level detection data, and consequently, the reliability of the acquired write and read performance parameters. This achieves the goal of accurately detecting the wear level of the primary EMMC, rather than calculating it based on accumulated read / write counts combined with theoretical read / write counts. Therefore, it overcomes the technical defect in existing technologies where the difference in theoretical read / write counts leads to large errors in the detected wear level, thus improving the accuracy of wear level detection. Attached Figure Description

[0073] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0074] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0075] Figure 1 This is a flowchart illustrating the first embodiment of the EMMC loss detection method of this application;

[0076] Figure 2 This is a schematic diagram of the main EMMC data distribution for the EMMC loss detection method of this application;

[0077] Figure 3This is a schematic diagram of the distribution of EMMC data in the EMMC loss detection method of this application;

[0078] Figure 4 This is a flowchart illustrating the second embodiment of the EMMC loss detection method of this application;

[0079] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the EMMC loss detection method in the embodiments of this application.

[0080] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0081] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0082] Example 1

[0083] This application provides an EMMC loss detection method. In the first embodiment of the EMMC loss detection method of this application, referring to... Figure 1 The EMMC loss detection method includes:

[0084] Step S10: When the main EMMC is detected to meet the preset detection conditions, select an empty storage area in the storage space corresponding to the main EMMC;

[0085] In this embodiment, it should be noted that the detection can be performed by a detection system corresponding to the main EMMC. The detection system is a motherboard system built into the terminal, used to detect the wear level of the main EMMC. The terminal can be a mobile phone or television or other multimedia terminal with a built-in main EMMC and a secondary EMMC. In one implementable embodiment, the motherboard system built into the terminal may include a SOC (System on Chip), DDR (Doublerate synchronous dynamic random access memory), a secondary EMMC, and a main EMMC.

[0086] Additionally, it should be noted that the main EMMC is the EMMC whose wear level needs to be detected. It is used to store system data, user data, and idle data, etc. The main EMMC contains both the main program for system operation and a detection program for detecting EMMC wear level. The preset detection conditions are used to trigger the execution of the detection program. In one feasible approach, refer to... Figure 2 , Figure 2 This diagram illustrates the data distribution of the main EMMC. The "User Data Space" stores system data, user data, and free data. "Boot Space 1" and "Boot Space 2" are boot partition 1 and boot partition 2, respectively. "RPMB Partition" is the replay protection memory block partition. "Total Space - 1" indicates the size of the data area. "0x0000" and "0x00000000" both represent logical addresses of different storage areas. "Storage space is 32GB" indicates that the main EMMC's storage capacity is 32GB.

[0087] For example, when the main EMMC is detected to meet the preset detection conditions, the logical addresses of the storage space of the main EMMC are arranged in a preset order. A free storage area is selected from the arranged storage space. The storage space includes a free storage area and a non-free storage area. The free storage area is a storage space with consecutive logical addresses that does not store user data, system data, or free data. The non-free storage area is a storage space that stores user data, system data, and free data. The preset order is used to ensure that the logical addresses of the free storage area of ​​the main EMMC are consecutive. For example, assuming that the logical addresses of the data stored in the main EMMC are 0x0000, 0x0002, and 0x0003, and the logical address of the free storage area of ​​the main EMMC is 0x0001, then the logical addresses of the stored data arranged in the preset order are 0x0000, 0x0001, and 0x0002.

[0088] Regarding step S10, before the step of selecting a free storage area in the storage space corresponding to the main EMMC when the main EMMC is detected to meet the preset detection conditions, the EMMC loss detection method further includes:

[0089] Step A10: Determine whether the usage frequency of the target device corresponding to the main EMMC is greater than the usage frequency threshold;

[0090] Step A20: If yes, then when the target device is detected to be in a detection state, it is determined that the main EMMC meets the preset detection conditions;

[0091] Step A30: If not, update the usage frequency.

[0092] In this embodiment, it should be noted that the target device can be a multimedia terminal such as a mobile phone or television. The detection state is a standby state to avoid the detection program consuming excessive system resources. The usage frequency can be the interval between runs in days and the interval between power-ons. The interval between runs in days is the interval between runs of the detection program, specifically 1 day, 2 days, 3 days, etc. The interval between runs in days threshold is a user-defined interval between runs of the detection program. The interval between power-ons is the interval between powering on the target device, specifically the first, second, and third power-ons, etc. The interval power-on threshold is a user-defined interval power-on count for the target device. Both the interval running days threshold and the interval power-on count threshold are used to determine whether the main EMMC needs to run a detection program. For example, assuming the interval running days threshold is 50 times and the interval power-on count threshold is 20 days, the detection system automatically records that the interval running days of the detection program is 19 days and the interval power-on count of the detection program is 51 times, then it is determined that the main EMMC needs to perform wear detection. That is, the system background will automatically enter the detection program when the target device is in the detection state.

[0093] For example, it is determined whether the interval running days of the terminal corresponding to the main EMMC is greater than the interval running days of the user-predefined detection program, and whether the interval power-on count of the terminal corresponding to the main EMMC is greater than the interval power-on count of the terminal predefined by the user; if the interval running days of the terminal corresponding to the main EMMC is greater than the interval running days of the user-predefined detection program, and / or

[0094] If the interval number of times the terminal corresponding to the main EMMC is powered on is greater than the user-defined interval number of times the terminal is powered on, then when the terminal is detected to be in standby mode, it is determined that the main EMMC needs to run a detection program; if the interval number of days the terminal corresponding to the main EMMC is powered on is not greater than the interval number of days the detection program is powered on, and the interval number of times the terminal corresponding to the main EMMC is powered on is not greater than the user-defined interval number of times the terminal is powered on, then the interval number of days the detection program is powered on is updated, wherein the update method can be to increase the interval number of days the detection program is powered on by one day.

[0095] Step S20: By storing the loss detection data in the secondary EMMC to the free storage area, the write performance parameters corresponding to the primary EMMC are detected.

[0096] In this embodiment, it should be noted that the write performance parameter is the write speed, which is used to define how fast the primary EMMC writes data. The secondary EMMC is used to assist in detecting the wear level of the primary EMMC. The secondary EMMC data includes pre-burned wear level detection data, which is sample data of the detection program detecting the wear level of the primary EMMC. The wear level detection data is stored in a specific storage area of ​​the secondary EMMC, wherein the storage capacity of the specific storage area is determined by the storage capacity of the wear level detection data. For example, assuming the storage capacity of the wear level detection data is 1.4 Gbytes, then the storage capacity of the specific storage area is 1.4 Gbytes.

[0097] In one feasible approach, refer to Figure 3 , Figure 3 The diagram illustrates the distribution of data in the secondary EMMC. The "User Data Space" includes a "Test Data Storage Area and a Reserved Spare Area." The "Test Data Storage Area" stores loss detection data. "Boot Space 1" and "Boot Space 2" are boot partition 1 and boot partition 2, respectively. "RPMBPartition" is the replay protection memory block partition. "Total Space - 1" indicates the size of the data area. "0x0000" and "0x00000000" both represent logical addresses of different storage areas. "Storage space is 2GB" indicates that the storage capacity of a specific storage area in the secondary EMMC is 2GB.

[0098] For example, by storing the wear detection data of the secondary EMMC to the logical address corresponding to the free storage area, wear detection data stored in the free storage area is obtained. Based on the wear detection data stored in the free storage area, the write speed of the primary EMMC is detected. The wear detection data stored in the free storage area is determined by the correspondence between the free storage area and the wear detection data. For example, assuming the storage capacity of the wear detection data is 1 Gbyte and the storage capacity of the free storage area is 3.4 Gbyte, then the storage capacity of the first detection information is 3 Gbyte.

[0099] Regarding step S20, the step of storing the loss detection data in the secondary EMMC to the free storage area and detecting the write performance parameters corresponding to the primary EMMC includes:

[0100] Step S21: Circularly store the loss detection data in the sub-EMMC into the free storage area;

[0101] Step S22: When it is detected that the free storage area cannot store the wear detection data, the wear detection data that has been cyclically stored in the free storage area is used as the first detection data, and the storage capacity and storage time corresponding to the first detection data are determined.

[0102] Step S23: Calculate the write performance parameters of the main EMMC based on the ratio of storage capacity to storage time.

[0103] For example, the loss detection data in the secondary EMMC is cyclically stored into the free storage area; the loss detection data already cyclically stored in the free storage area is used as the first detection data, and the storage capacity and storage time corresponding to the first detection data are determined. The storage capacity of the first detection data can be an integer determined by the storage capacity of the free storage area and the size of the loss detection data. For example, assuming the storage capacity of the loss detection data is 1 Gbyte and the storage capacity of the free storage area is 3.4 Gbytes, the cyclic reading cycle is 3 times. The detection method can detect the free storage... The method for determining whether the storage area can completely receive the wear detection data in the next cycle is as follows: For example, assuming the wear detection data is 1 Gbyte and the available storage area in the next cycle is 0.8 Gbyte, then the next cycle is stopped; the write performance parameters of the main EMMC are calculated based on the ratio of the storage capacity to the storage time; the write speed of the main EMMC is obtained by calculating the ratio of the storage capacity of the first detection information to the reception time. For example, assuming the storage capacity of the first detection information is 5 Gbyte and the reception time is 100 s, then the write speed of the main EMMC is 0.05 Gbyte / s.

[0104] Step S30: Read the wear detection data stored in the free storage area through the secondary EMMC, and detect the read performance parameters of the primary EMMC;

[0105] In this embodiment, it should be noted that the read performance parameters include a first write performance parameter and a second write performance parameter. The first write performance parameter is the read speed, which defines how fast the main EMMC reads data. The second write performance parameter is the bit error rate, which defines the accuracy of the main EMMC reading data. The preset storage area is used to store the second detection data and wear detection data read by the main EMMC. The second detection data consists of wear detection data that is cyclically stored in the free storage area. The storage capacity of the preset storage area is not less than twice the storage capacity of the wear detection data. For example, assuming the storage capacity of the wear detection data is 1 Gbyte, the storage space of the specific storage area can be 2 Gbyte, 3 Gbyte, 4 Gbyte, etc.

[0106] For example, the read speed and bit error rate of the main EMMC are obtained by sequentially reading the loss detection data stored in the free storage area through the secondary EMMC. The number of sequential reads can be equal to the cycle period of the loss detection data being cyclically stored in the free storage area. For example, assuming that the storage cycle of the cyclic storage is 3 times, then the number of sequential reads is 3 times.

[0107] Regarding step S30, the read performance parameters include a first write performance parameter and a second write performance parameter.

[0108] The step of reading the wear detection data stored in the free storage area through the secondary EMMC and detecting the read performance parameters of the primary EMMC includes:

[0109] Step S31: Read the loss detection data stored in the free storage area sequentially through the sub-EMMC, take the loss detection data that has been read into the sub-EMMC as the second detection data, and determine the reading time of the second detection data;

[0110] Step S32: Calculate the first write performance parameter of the second detection data based on the ratio of the wear detection data to the read time;

[0111] Step S33: Determine the first write performance parameter of the main EMMC based on the first write performance parameter of the second detection data;

[0112] Step S34: Compare the second detection data and the loss detection data to obtain the second write performance parameter of the second detection data;

[0113] Step S35: Determine the second write performance parameter of the main EMMC based on the second write performance parameter of the second detection data.

[0114] For example, the secondary EMMC sequentially reads the wear detection data stored in the free storage area, uses the wear detection data sequentially read into the secondary EMMC as the second detection data, and determines the read time of the second detection data; based on the ratio of the wear detection data to the read time, a first write performance parameter of the second detection data is calculated; the write speed of the primary EMMC is determined by the ratio between the sum of the write speeds corresponding to the second detection data and the sum of the read times of the second detection data; each second detection data and the wear detection data are compared to obtain the bit error rate of the second detection data, wherein the comparison method can be by comparing each byte of the first detection data and the wear detection data one by one; the bit error rate of the primary EMMC is determined by the ratio between the sum of the bit error rates corresponding to the second detection data and the sum of the number of reads of the second detection data.

[0115] In one feasible approach, assuming the storage capacity of the wear detection data is 1 Gbyte, the cycle read frequency of the second detection data is 3 times, the storage capacity of the first detection information is 3 Gbytes, the time for the first read of the second detection data to the secondary EMMC is 10 seconds, the time for the second read of the second detection data to the secondary EMMC is 9.8 seconds, and the time for the third read of the second detection data to the secondary EMMC is 9.7 seconds, the formula for calculating the write speed of the primary EMMC is as follows:

[0116]

[0117] Where v2 is the write speed of the main EMMC, T1 is the storage capacity of the wear detection data, S1 is the time for the first reading of the second detection data to the secondary EMMC, S2 is the time for the second reading of the second detection data to the secondary EMMC, S3 is the time for the third reading of the second detection data to the secondary EMMC, and x is the cycle reading period of the second detection data. The write speed of the main EMMC is calculated to be 0.101711 Gbyte / s.

[0118] Step S40: Determine the wear level of the main EMMC based on the write performance parameters and the read performance parameters.

[0119] For example, the loss of the main EMMC is calculated based on the write speed, read speed, and bit error rate.

[0120] Regarding step S40, the step of determining the wear level of the main EMMC based on the write performance parameters and the read performance parameters includes:

[0121] Step S41: Determine whether both the write performance parameter and the read performance parameter are not greater than the first preset performance parameter;

[0122] Step S42: If yes, then obtain the second preset performance parameter, and determine the loss degree of the main EMMC based on the write performance parameter, the read performance parameter and the second preset performance parameter;

[0123] Step S43: If not, then the first loss degree is taken as the loss degree of the main EMMC.

[0124] In this embodiment, it should be noted that the first preset performance parameter is used to determine whether the main EMMC is completely worn out. Specifically, it includes the write speed of complete wear, the read speed of complete wear, and the bit error rate of complete wear. The specific values ​​of the write speed of complete wear, the read speed of complete wear, and the bit error rate of complete wear are all set by the manufacturer. For example, assuming that the write speed of complete wear is 1 Mbyte / s, the read speed of complete wear is 1.5 Mbyte / s, and the bit error rate of complete wear is 10%, then when the value of any one of the parameters of the main EMMC, the write speed, the read speed, and the bit error rate reaches the value of the corresponding parameter of complete wear, it is considered that the main EMMC is completely worn out.

[0125] Additionally, it should be noted that the first wear level is used to determine the complete wear of the main EMMC, specifically a value of 100%. The second preset performance parameter is used to determine whether the main EMMC is qualified, specifically including qualified write speed, qualified read speed, and qualified bit error rate. The qualified write speed, qualified read speed, and qualified bit error rate are all set by the manufacturer. For example, the qualified write speed is 10 Mbyte / s, the qualified read speed is 10 Mbyte / s, and the qualified bit error rate is 0.

[0126] For example, it is determined whether the write speed, read speed, and bit error rate of the main EMMC are all not greater than the fully worn write speed, fully worn read speed, and fully worn bit error rate. The determination is made by comparing corresponding parameters, for example, comparing the write speed of the main EMMC with the fully worn write speed. If the write speed, read speed, and bit error rate of the main EMMC are all not greater than the fully worn write speed, fully worn read speed, and fully worn bit error rate, then the write wear degree corresponding to the write speed, the read wear degree corresponding to the read speed, and the bit error wear degree corresponding to the bit error rate of the main EMMC are calculated respectively, and the wear degree of the main EMMC is determined based on the write wear degree, read wear degree, and bit error wear degree. If the write speed, read speed, and bit error rate of the main EMMC are not all not greater than the fully worn write speed, fully worn read speed, and fully worn bit error rate, then 100% is taken as the wear degree of the main EMMC.

[0127] The step of calculating the write wear of the main EMMC's write speed includes: extracting the acceptable write speed and the fully worn write speed, and calculating it according to the following formula:

[0128]

[0129] Where m1 is the write wear rate, x1 is the write speed of the main EMMC, x2 is the acceptable write speed, and x3 is the fully worn write speed. For example, if x1 is 1 Gbyte / s, x2 is 1.5 Gbyte / s, and x3 is 0.5 Gbyte / s, then m1 is 1.

[0130] The step of calculating the read wear of the main EMMC read speed includes: extracting the qualified read speed and the fully worn read speed, and calculating it according to the following formula:

[0131]

[0132] Where m2 is the read wear rate, y1 is the read rate of the main EMMC, y2 is the acceptable read rate, and y3 is the fully worn read rate. For example, if y1 is 1 Gbyte / s, y2 is 1.5 Gbyte / s, and y3 is 0.5 Gbyte / s, then m2 is 1.

[0133] The step of calculating the bit error rate wear factor of the main EMMC includes: extracting the qualified bit error rate and the fully worn bit error rate, and calculating it according to the following formula:

[0134]

[0135] Where m3 is the bit error rate wear factor, z1 is the bit error rate of the main EMMC, z2 is the acceptable bit error rate, and z3 is the bit error rate with complete wear. For example, assuming z1 is 1%, z2 is 0%, and z3 is 10%, then m3 is 0.1.

[0136] The step of determining the wear level of the main EMMC based on the write wear level, read wear level, and bit error wear level includes: calculating the weighted write wear level, read wear level, and bit error wear level respectively, and taking the sum of the weighted write wear level, read wear level, and bit error wear level as the wear level of the main EMMC. The calculation formula is as follows:

[0137] m=80%×m1+10%×m2+10%×m3

[0138] Where m is the wear level of the main EMMC, m1 is the write wear level of the write speed, m2 is the read wear level of the read speed, and m3 is the bit error rate wear level of the bit error rate. For example, assuming m1 is 1, m2 is 1, and m3 is 0.1, then the wear level of the main EMMC is 90.01%.

[0139] In one feasible approach, the detection program stores the wear level of each detection cycle in a certain storage area of ​​the detection system. After the step of determining the wear level of the main EMMC based on the write performance parameters and the read performance parameters, the EMMC wear level detection method further includes: obtaining the wear level of the previous detection cycle, wherein the method of obtaining the wear level can be achieved through code invocation; determining the interval wear level of the main EMMC by calculating the difference between the wear level of the previous detection cycle and the current detection cycle, wherein the interval wear level is used to indicate the degree of wear of the main EMMC during the interval between two detection cycles, and the difference is the absolute value of the difference. For example, assuming the wear level of the previous detection cycle is 17.1% and the detection level of the current detection cycle is 18.2%, then the interval wear level is 1.1%, that is, the main EMMC has lost 1.1% of its wear level during the interval between two detection cycles.

[0140] This application provides an EMMC wear level detection method. Specifically, when the primary EMMC meets preset detection conditions, a free storage area is selected in the storage space corresponding to the primary EMMC. This avoids calculation errors by the EMMC controller, thereby ensuring the accuracy of wear level detection. Then, wear level detection data from the secondary EMMC is stored in the free storage area, and the write performance parameters corresponding to the primary EMMC are detected. Finally, the wear level detection data stored in the free storage area is read by the secondary EMMC, and the read performance parameters of the primary EMMC are detected. This achieves the purpose of obtaining write performance parameters and read performance parameters through the interaction of wear level detection data between the secondary and primary EMMCs. Finally, based on the write performance parameters and read performance parameters, the primary EMMC wear level is determined. The wear level of the MMC is obtained by copying wear level detection data between the primary and secondary MMCs, since both write and read performance parameters are obtained through copying wear level detection data between the primary and secondary MMCs. The secondary MMC has the wear level detection data pre-burned into its preset storage area before the motherboard leaves the factory. Furthermore, the secondary MMC remains disabled when the wear level detection program is not running to detect the wear level of the primary MMC. This ensures the reliability of the wear level detection data, and thus guarantees the reliability of the obtained write and read performance parameters. This achieves the goal of accurately detecting the wear level of the primary MMC, rather than calculating the wear level of the primary MMC based on the cumulative number of read and write operations combined with the theoretical number of read and write operations. Therefore, it overcomes the technical defect in the existing technology where the wear level detection has a large error due to the difference in the theoretical number of read and write operations, thus improving the accuracy of wear level detection.

[0141] Example 2

[0142] Furthermore, referring to Figure 4 In another embodiment of this application, the same or similar content as in Embodiment 1 above can be referred to the above description and will not be repeated hereafter. Based on this, after the step of determining that the main EMMC meets the preset detection conditions when the target device is detected to be in a detection state, the EMMC loss detection method further includes:

[0143] Step B10: Determine whether there is reserved detection data from the previous detection cycle in the storage space corresponding to the main EMMC;

[0144] Step B20: If it exists, the loss status of the main EMMC is determined by comparing the similarity between the reserved detection data and the loss detection data.

[0145] In this embodiment, it should be noted that the previous detection cycle refers to the last time the detection program was run, and the reserved detection data is used to detect the data retention capability of the main EMMC. The storage capacity of the reserved detection data is consistent with the storage capacity of the loss detection data. For example, assuming that the storage capacity of the loss detection data is 1 Gbyte, then the storage capacity of the reserved detection data is also 1 Gbyte.

[0146] Additionally, it should be noted that the loss status is used to determine the loss condition of the main EMMC. The loss status is defined by a loss threshold. If the loss degree of the main EMMC reaches the loss threshold, the main EMMC is determined to be in a loss state. If the loss degree of the main EMMC does not reach the loss threshold, the main EMMC is determined not to be in a loss state. For example, assuming the loss threshold is 10%, then when the loss degree of the main EMMC is 9.9%, the main EMMC is determined not to be in a loss state.

[0147] Additionally, it should be noted that there is a corresponding relationship between whether reserved detection data exists in the main EMMC and whether the wear level of the main EMMC has reached the wear threshold. For example, assuming that no reserved detection data is detected in the main EMMC during the current detection program, when the current detection program ends, it is determined whether the wear level of the main EMMC has reached the wear threshold. If the wear level of the main EMMC has not reached the wear threshold, the wear level detection data associated content generated in the free storage area of ​​the main EMMC in the detection program is deleted. If the wear level of the main EMMC has reached the wear threshold, the reserved detection data is saved before exiting the current detection program, and the following step is executed first during the next detection program run: determining the wear status of the main EMMC by comparing the reserved detection data and the wear level detection data. The reserved detection data can be the wear detection data stored in the free storage area during any storage cycle.

[0148] For example, it is determined whether there is reserved detection data from the previous run of the detection program in the storage data of the main EMMC; if the reserved detection data exists in the storage data of the main EMMC, the wear status of the main EMMC is determined by comparing the similarity between the reserved detection data and the wear detection data; if there is no reserved detection data from the previous run of the detection program in the storage data of the main EMMC, it is determined that the main EMMC is not in a wear state.

[0149] Regarding step B20, the loss state includes a first loss state and a second loss state.

[0150] The step of determining the loss status of the main EMMC by comparing the similarity between the reserved detection data and the loss detection data includes:

[0151] Step B21: Determine the bit error rate of the main EMMC by comparing the similarity between the reserved detection data and the loss detection data;

[0152] Step B22: Determine whether the bit error rate is less than the bit error rate threshold;

[0153] Step B23: If yes, then determine that the main EMMC is in the first loss state;

[0154] Step B24: If not, then determine that the main EMMC is in the second loss state.

[0155] In this embodiment, it should be noted that the loss state includes a first loss state and a second loss state. The first loss state is a severe loss state, and the second loss state is a slight loss state. The severe loss state and the slight loss state are defined by the bit error rate threshold. When the bit error rate of the main EMMC reaches the bit error rate threshold, the main EMMC is in a slight loss state. When the bit error rate of the main EMMC does not reach the bit error rate threshold, the main EMMC is in a severe loss state. The bit error rate threshold is determined by the EMMC manufacturer according to the actual situation, and can be 78%, 79%, 79.7%, etc. For example, assuming the bit error rate threshold is 79%, when the loss of the main EMMC is not less than 79%, the main EMMC is determined to be in a slight loss state.

[0156] Additionally, it should be noted that the bit error rate can specifically be 90%, 99%, 99.9%, etc. The bit error rate threshold is used to determine the wear state of the main EMMC. For example, assuming the bit error rate threshold is 99%, when the bit error rate is 99.1%, the main EMMC is in a state of slight wear.

[0157] For example, the bytes of the loss detection data are compared one by one with the bytes of the reserved detection data to obtain the bit error rate of the main EMMC; it is determined whether the bit error rate is less than the bit error rate threshold; if the bit error rate is less than the bit error rate threshold, the main EMMC is determined to be in a state of severe loss; if the bit error rate is not less than the bit error rate threshold, the main EMMC is determined to be in a state of slight loss.

[0158] In one feasible approach, after determining that the main EMMC is in a severely worn state, an alarm interface with a prompting statement is displayed on the terminal corresponding to the main EMMC. The prompting statement may be "The EMMC in the motherboard is severely worn, please repair it." The alarm interface is used to warn the user to avoid the loss of important data.

[0159] This application provides an EMMC bit error rate detection method, which involves determining whether reserved detection data from the previous detection cycle exists in the storage space corresponding to the main EMMC. If so, the loss status of the main EMMC is determined by comparing the similarity between the reserved detection data and the loss detection data. Since the main EMMC in an unlossable state will determine whether its loss degree is greater than the loss threshold after the detection cycle, if the loss degree is greater than the loss threshold, a set of reserved detection data will be saved before exiting the detection program. This achieves the purpose of determining the loss status of the main EMMC based on whether reserved detection data exists in the storage space of the main EMMC. When the main EMMC is in a loss state, the data retention capability of the main EMMC can be detected through the reserved detection data saved by the detection program. That is, it can avoid the purpose of the detection program detecting a large error in the loss degree of the EMMC due to the insufficient data retention capability of the main EMMC. Therefore, it lays the foundation for detecting the loss degree of the EMMC in the next detection cycle.

[0160] Example 3

[0161] This application embodiment also provides an EMMC loss detection device, the EMMC loss detection device comprising:

[0162] The selection module is used to select a free storage area in the storage space corresponding to the main EMMC when the main EMMC is detected to meet the preset detection conditions.

[0163] The first detection module is used to detect the write performance parameters corresponding to the main EMMC by storing the loss detection data in the secondary EMMC into the free storage area.

[0164] The second detection module is used to read the wear detection data stored in the free storage area through the secondary EMMC and detect the read performance parameters of the primary EMMC.

[0165] The wear level determination module is used to determine the wear level of the main EMMC based on the write performance parameters and the read performance parameters.

[0166] Optionally, the first detection module is further configured to:

[0167] The loss detection data in the sub-EMMC is cyclically stored into the free storage area;

[0168] When it is detected that the free storage area cannot store the wear detection data, the wear detection data that has been cyclically stored in the free storage area is used as the first detection data, and the storage capacity and storage time corresponding to the first detection data are determined.

[0169] The write performance parameters of the primary EMMC are calculated based on the ratio of storage capacity to storage time.

[0170] Optionally, the read performance parameters include a first write performance parameter and a second write performance parameter, and the second detection module is further configured to:

[0171] The step of reading the wear detection data stored in the free storage area through the secondary EMMC and detecting the read performance parameters of the primary EMMC includes:

[0172] The wear detection data stored in the free storage area is read sequentially by the sub-EMMC, and the wear detection data read sequentially by the sub-EMMC is used as the second detection data, and the reading time of the second detection data is determined.

[0173] Based on the ratio of the wear detection data to the read time, calculate the first write performance parameter of the second detection data;

[0174] Based on the first write performance parameters of the second detection data, the first write performance parameters of the main EMMC are determined;

[0175] The second detection data and the loss detection data are compared to obtain the second write performance parameter of the second detection data;

[0176] The second write performance parameter of the main EMMC is determined based on the second write performance parameter of the second detection data.

[0177] Optionally, the loss determination module is further configured to:

[0178] Determine whether both the write performance parameter and the read performance parameter are not greater than a first preset performance parameter;

[0179] If so, then obtain the second preset performance parameter, and determine the loss degree of the main EMMC based on the write performance parameter, the read performance parameter and the second preset performance parameter;

[0180] If not, the first loss level is taken as the loss level of the main EMMC.

[0181] Optionally, the EMMC loss detection device is further used for:

[0182] Determine whether the usage frequency of the target device corresponding to the main EMMC is greater than the usage frequency threshold;

[0183] If so, when the target device is detected to be in a detection state, the main EMMC is determined to meet the preset detection conditions;

[0184] If not, then update the usage frequency.

[0185] Optionally, the EMMC loss detection device is further used for:

[0186] Determine whether there is reserved detection data from the previous detection cycle in the storage space corresponding to the main EMMC;

[0187] If present, the loss status of the main EMMC is determined by comparing the similarity between the reserved detection data and the loss detection data.

[0188] Optionally, the loss state includes a first loss state and a second loss state, and the EMMC loss detection device is further used for:

[0189] The bit error rate of the main EMMC is determined by comparing the similarity between the reserved detection data and the loss detection data.

[0190] Determine whether the bit error rate is less than the bit error rate threshold;

[0191] If so, the main EMMC is determined to be in the first loss state;

[0192] If not, then the main EMMC is determined to be in the second loss state.

[0193] The EMMC loss detection device provided by this invention employs the EMMC loss detection method described in Embodiment 1 or Embodiment 2 above, solving the technical problem of low accuracy in detecting EMMC loss. Compared with the prior art, the beneficial effects of the EMMC loss detection device provided by this invention are the same as those of the EMMC loss detection method provided in the above embodiments, and other technical features of this EMMC loss detection device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0194] Example 4

[0195] This invention provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the EMMC loss detection method described in Embodiment 1 above.

[0196] The following is for reference. Figure 5 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of the present disclosure. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0197] like Figure 5 As shown, an electronic device may include a processing unit (such as a central processing unit, graphics processing unit, etc.) that can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) or a program loaded from a storage device into random access memory (RAM). The RAM also stores various programs and data required for the operation of the electronic device. The processing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.

[0198] Typically, the following systems can be connected to the I / O interface: input devices including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices including, for example, magnetic tapes, hard disks, etc.; and communication devices. Communication devices allow electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although electronic devices with various systems are shown in the figures, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems may be implemented alternatively.

[0199] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, it performs the functions defined above in the methods of embodiments of this disclosure.

[0200] The electronic device provided by this invention employs the EMMC loss detection method described in Embodiment 1 or Embodiment 2 above, thus solving the technical problem of low accuracy in detecting EMMC loss. Compared with the prior art, the beneficial effects of the electronic device provided by this invention are the same as those of the EMMC loss detection method provided in Embodiment 1 above, and other technical features of this electronic device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0201] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.

[0202] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

[0203] Example 5

[0204] This embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon, which are used to execute the EMMC loss detection method in the first embodiment described above.

[0205] The computer-readable storage medium provided in this embodiment of the invention may be, for example, a USB flash drive, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0206] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.

[0207] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by an electronic device, the electronic device causes the following: when it detects that the main EMMC meets preset detection conditions, it selects a free storage area in the storage space corresponding to the main EMMC; by storing the wear detection data in the secondary EMMC into the free storage area, it detects the write performance parameters corresponding to the main EMMC; by reading the wear detection data stored in the free storage area through the secondary EMMC, it detects the read performance parameters of the main EMMC; and based on the write performance parameters and the read performance parameters, it determines the wear of the main EMMC.

[0208] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0209] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0210] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0211] The computer-readable storage medium provided by this invention stores computer-readable program instructions for executing the above-described EMMC loss detection method, thus solving the technical problem of low accuracy in detecting EMMC loss. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this invention are the same as those of the EMMC loss detection method provided in Embodiment 1 or Embodiment 2, and will not be repeated here.

[0212] Example 6

[0213] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the EMMC loss detection method described above.

[0214] The computer program product provided in this application solves the technical problem of low accuracy in detecting EMMC loss. Compared with the prior art, the beneficial effects of the computer program product provided in this embodiment are the same as those of the EMMC loss detection method provided in Embodiment 1 or Embodiment 2 above, and will not be repeated here.

[0215] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent scope of this application.

Claims

1. A method for detecting EMMC loss, characterized in that, The EMMC loss detection method includes: When the main EMMC is detected to meet the preset detection conditions, a free storage area is selected from the storage space corresponding to the main EMMC. By storing the loss detection data in the secondary EMMC to the free storage area, the write performance parameters corresponding to the primary EMMC are detected. The secondary EMMC reads the wear detection data stored in the free storage area and detects the read performance parameters of the primary EMMC. The wear level of the main EMMC is determined based on the write performance parameters and the read performance parameters. The method further includes, after the step of detecting that the main EMMC meets the preset detection conditions: Determine whether there is reserved detection data from the previous detection cycle in the storage space corresponding to the main EMMC; If it exists, the loss status of the main EMMC is determined by comparing the similarity between the reserved detection data and the loss detection data; The loss state includes a first loss state and a second loss state. The step of determining the loss state of the main EMMC by comparing the similarity between the reserved detection data and the loss degree detection data includes: The bit error rate of the main EMMC is determined by comparing the similarity between the reserved detection data and the loss detection data. Determine whether the bit error rate is less than the bit error rate threshold; If so, the main EMMC is determined to be in the first loss state; If not, the main EMMC is determined to be in the second loss state, the first loss state is a severe loss state, and the second loss state is a slight loss state. The severe loss state and the slight loss state are defined by the bit error rate threshold.

2. The EMMC loss detection method as described in claim 1, characterized in that, The step of storing the loss detection data in the secondary EMMC to the free storage area and detecting the write performance parameters corresponding to the primary EMMC includes: The loss detection data in the sub-EMMC is cyclically stored into the free storage area; When it is detected that the free storage area cannot store the wear detection data, the wear detection data that has been cyclically stored in the free storage area is used as the first detection data, and the storage capacity and storage time corresponding to the first detection data are determined. The write performance parameters of the primary EMMC are calculated based on the ratio of storage capacity to storage time.

3. The EMMC loss detection method as described in claim 1, characterized in that, The read performance parameters include a first write performance parameter and a second write performance parameter. The step of reading the wear detection data stored in the free storage area through the secondary EMMC and detecting the read performance parameters of the primary EMMC includes: The wear detection data stored in the free storage area is read sequentially by the sub-EMMC, and the wear detection data read sequentially by the sub-EMMC is used as the second detection data, and the reading time of the second detection data is determined. Based on the ratio of the wear detection data to the read time, calculate the first write performance parameter of the second detection data; Based on the first write performance parameters of the second detection data, the first write performance parameters of the main EMMC are determined; The second detection data and the loss detection data are compared to obtain the second write performance parameter of the second detection data; The second write performance parameter of the main EMMC is determined based on the second write performance parameter of the second detection data.

4. The EMMC loss detection method as described in claim 1, characterized in that, The step of determining the wear level of the primary EMMC based on the write performance parameters and the read performance parameters includes: Determine whether both the write performance parameter and the read performance parameter are not greater than a first preset performance parameter, wherein the first preset performance parameter is used to determine whether the main EMMC is completely worn out; If so, then the second preset performance parameter is obtained, and the loss of the main EMMC is determined based on the write performance parameter, the read performance parameter and the second preset performance parameter, wherein the second preset performance parameter is used to determine whether the main EMMC is qualified; If not, the first loss degree is taken as the loss degree of the main EMMC, wherein the first loss degree is used to determine the complete loss of the main EMMC.

5. The EMMC loss detection method as described in claim 1, characterized in that, Before the step of selecting a free storage area in the storage space corresponding to the main EMMC when the main EMMC is detected to meet the preset detection conditions, the EMMC loss detection method further includes: Determine whether the usage frequency of the target device corresponding to the main EMMC is greater than the usage frequency threshold; If so, when the target device is detected to be in a detection state, the main EMMC is determined to meet the preset detection conditions; If not, then update the usage frequency.

6. An EMMC loss detection device, characterized in that, The EMMC loss detection device includes: The selection module is used to select a free storage area in the storage space corresponding to the main EMMC when the main EMMC is detected to meet the preset detection conditions. The first detection module is used to detect the write performance parameters corresponding to the main EMMC by storing the loss detection data in the secondary EMMC into the free storage area. The second detection module is used to read the wear detection data stored in the free storage area through the secondary EMMC and detect the read performance parameters of the primary EMMC. The wear level determination module is used to determine the wear level of the main EMMC based on the write performance parameters and the read performance parameters. The selection module is further configured to: determine whether there is reserved detection data from the previous detection cycle in the storage space corresponding to the main EMMC; if so, determine the loss status of the main EMMC by comparing the similarity between the reserved detection data and the loss detection data; The loss state includes a first loss state and a second loss state. The selection module is further configured to: determine the bit error rate of the main EMMC by comparing the similarity between the reserved detection data and the loss degree detection data; determine whether the bit error rate is less than the bit error rate threshold; if so, determine that the main EMMC is in the first loss state; if not, determine that the main EMMC is in the second loss state. The first loss state is a severe loss state, and the second loss state is a slight loss state. The severe loss state and the slight loss state are defined by the bit error rate threshold.

7. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the steps of the EMMC loss detection method according to any one of claims 1 to 5.

8. A readable storage medium, characterized in that, The readable storage medium stores a program for implementing the EMMC loss detection method, which is executed by a processor to implement the steps of the EMMC loss detection method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Built-in self testing of a flash memory

    CN101632131A

  • Method for detecting service life of EMMC (embedded multi-media card) chip

    CN103514958A

  • Data storage method, data storage device and storage device

    CN112068772A