An input / output error (EIO) processing method, device, and storage medium

By setting the error simulation type of the target partition and generating error data, the processing results are evaluated using the error correction capability of the electronic device. This solves the problem of high complexity in simulating EIO operations in the prior art, achieves more efficient and accurate simulation evaluation, and enhances device stability and user experience.

CN117270767BActive Publication Date: 2026-07-21GUANGDONG XIAOTIANCAI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG XIAOTIANCAI TECH CO LTD
Filing Date
2023-09-05
Publication Date
2026-07-21

Smart Images

  • Figure CN117270767B_ABST
    Figure CN117270767B_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of communication, and disclose an input / output error (EIO) processing method and device and a storage medium, which comprise: setting a target error simulation type of a target partition; running an IO request corresponding to the target partition, simulating errors on original data of the IO request corresponding to the target partition according to the target error simulation type to obtain error data; determining feedback information corresponding to the IO request according to the error data; and determining a processing result of the electronic device for the target error simulation type according to the feedback information, the processing result being used to indicate error correction capability of the electronic device for the error data. By using the embodiments of the present application, multiple input / output error simulations are performed in a manner of setting error simulation types by software, operation complexity is reduced, and the error correction capability of the electronic device itself for input / output errors can be further evaluated, thereby enhancing the stability of the electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, specifically to a method, apparatus, and storage medium for processing input / output error (EIO). Background Technology

[0002] Currently, a certain percentage of Android-based mobile phones, watches, tablets, and other electronic devices exhibit input / output (EIO) errors due to memory malfunctions. These EIO errors can be caused by data jumps or data flips, and may even lead to system crashes or other malfunctions. Therefore, to further investigate the causes of these input / output errors, it is necessary to simulate them.

[0003] In existing technologies, the common approach is to compile the mirror data of a specific partition into hexadecimal format and then tamper with the data to induce data jumps and cause input / output errors. However, this simulation method is highly complex and inherently uncertain. Therefore, simplifying the simulation method and reducing its complexity has become a pressing technical problem. Summary of the Invention

[0004] This application discloses a method, apparatus, and storage medium for processing input / output errors (EIO). The method simulates various input / output errors by setting error simulation types in software, which reduces operational complexity, improves the accuracy of simulation results, and further evaluates the electronic device's own error correction capability for input / output errors through simulation results, thereby enhancing the stability of the electronic device.

[0005] The first aspect of this application discloses a method for handling input / output error (EIO), the method comprising:

[0006] Set the target error simulation type for the target partition;

[0007] Run the IO request corresponding to the target partition, and perform error simulation on the original data of the IO request corresponding to the target partition according to the target error simulation type to obtain error data. The data in at least one target data bit of the error data is different from the data in the corresponding data bit in the original data.

[0008] Based on the error data, determine the feedback information corresponding to the IO request;

[0009] The processing result of the electronic device on the target error simulation type is determined based on the feedback information, and the processing result is used to indicate the error correction capability of the electronic device on the error data.

[0010] In this embodiment, the input / output error simulation can be performed by flexibly setting the error simulation type, which reduces the operational complexity of input / output error simulation, saves time, and can also evaluate the data error correction capability of the electronic device itself, thereby enhancing the stability of the electronic device.

[0011] As an optional implementation, in the first aspect of the embodiments of this application, setting the target error simulation type for the target partition includes:

[0012] Based on the user's actions, obtain the target error simulation type;

[0013] Load command-line parameters corresponding to the target error simulation type to set the target error simulation type for the target partition. The command-line parameters include error simulation type switch parameters and simulation parameters corresponding to the target error simulation type.

[0014] In this embodiment, the user can select the error simulation type by himself, which reduces the complexity of performing error simulation, makes it convenient for the user to simulate the input and output errors of electronic devices in a timely manner, and the error simulation type can be flexibly set.

[0015] As an optional implementation, in the first aspect of the embodiments of this application, after setting the target error simulation type of the target partition, the method further includes:

[0016] Write the target error simulation type into a preset partition.

[0017] In this embodiment, error simulation is performed by setting a preset partition, which allows the electronic device error simulation to be performed normally in the preset partition, improving the accuracy of the simulation results without affecting the normal operation of other functions of the electronic device.

[0018] As an optional implementation, in the first aspect of the embodiments of this application, after the target error simulation type is written to the preset partition, the electronic device enters a restart state, and the method further includes:

[0019] In the restart state, the target error simulation type is obtained from the preset partition;

[0020] Generate and load the command-line arguments corresponding to the target error simulation type.

[0021] In this embodiment of the application, when the electronic device is in a restart state, the error simulation type can be automatically obtained, thereby improving the convenience of error simulation.

[0022] As an optional implementation, in the first aspect of this application, the simulation parameters include a data bit check type and a first jump bit number. The step of performing error simulation on the original data of the IO request corresponding to the target partition according to the target error simulation type to obtain error data includes:

[0023] Obtain the original data from the target partition;

[0024] Based on the first jump bit number, the data on the target data bit in the original data is subjected to jump processing to obtain the first erroneous data. The number of target data bits is determined based on the first jump bit number.

[0025] In this embodiment, various simulation parameters can be flexibly set, and further, errors can be automatically simulated based on the simulation parameters, which can help users quickly identify the cause of input / output errors in electronic devices.

[0026] As an optional implementation, in the first aspect of the embodiments of this application, determining the feedback information corresponding to the IO request based on the error data includes:

[0027] The first erroneous data is corrected, and the feedback information is determined to include the first corrected data after the correction process.

[0028] In this embodiment, the erroneous simulation results can be automatically corrected, which improves the convenience of erroneous simulation and reduces the complexity of operation.

[0029] As an optional implementation, in a first aspect of the embodiments of this application, determining the processing result of the electronic device for the target error simulation type based on the feedback information includes:

[0030] Compare whether the first corrected data is the same as the original data;

[0031] Under the same conditions, the processing result is determined to include the first jump number, and the more the first jump number, the stronger the error correction capability.

[0032] In this embodiment, the data error correction capability of the electronic device itself can be automatically evaluated, making it convenient for users to understand the error correction capability of the electronic device for input and output errors in a timely manner, thus optimizing the user experience.

[0033] As an optional implementation, in the first aspect of the embodiments of this application, after comparing whether the corrected data is the same as the original data, the method further includes:

[0034] In cases where they are not the same, obtain the adjusted second jump change number, where the second jump change number is less than the first jump change number;

[0035] Based on the second jump bit, the original data is subjected to jump processing to obtain the second erroneous data;

[0036] The second erroneous data is corrected, and the feedback information is determined to include the second corrected data after the correction process, wherein the second corrected data corresponds to the second erroneous data.

[0037] If the second error-corrected data is the same as the original data, the processing result is determined to include the second jump bit.

[0038] In this embodiment, simulation parameters can be flexibly modified to simulate various input / output errors, which can help users understand the error correction capabilities of electronic devices.

[0039] As an optional implementation, in the first aspect of the embodiments of this application, before generating and loading the command-line parameters corresponding to the target error simulation type, the method further includes:

[0040] When the target error simulation type is the same as one of at least one preset error simulation types;

[0041] The process of generating and loading the command-line parameters corresponding to the target error simulation type includes:

[0042] If the target error simulation type is the same as one of at least one preset error simulation types, the command line parameters corresponding to the target error simulation type are generated and loaded.

[0043] In this embodiment, the target error simulation type is determined to be valid only when the target error simulation type is at least one of the preset types, thereby improving the reliability of the error simulation process and the accuracy of the simulation results.

[0044] As an optional implementation, in the first aspect of the embodiments of this application, before performing error simulation on the original data of the IO request corresponding to the target partition according to the target error simulation type, the method further includes:

[0045] Determine whether the error simulation type switch parameter is in the on state;

[0046] Based on the target error simulation type, error simulation is performed on the raw data of the IO request corresponding to the target partition, including:

[0047] When the error simulation type switch parameter is enabled, error simulation is performed on the original data of the IO request corresponding to the target partition according to the target error simulation type.

[0048] In this embodiment, error simulation is performed only when the simulation type switch is in the on state, which improves the reliability of the error simulation process.

[0049] As an optional implementation, in a first aspect of the present application, after determining the processing result of the electronic device on the target error simulation type, the method further includes:

[0050] Based on the processing results, optimization suggestions are output to improve the error correction capability of the electronic device.

[0051] In this embodiment, the error correction capability evaluation result of the electronic device can be output to the user, and optimization suggestions for improving the error correction capability of the electronic device can be output based on the evaluation result, thereby enhancing the stability of the electronic device and further improving the user experience.

[0052] A second aspect of this application discloses an input / output error (EIO) processing apparatus, comprising: a setting module, a simulation module, a determining module, and a processing module, wherein:

[0053] The settings module is used to set the target error simulation type for the target partition;

[0054] The simulation module is used to run an IO request corresponding to the target partition, and to perform error simulation on the original data of the IO request corresponding to the target partition according to the target error simulation type to obtain error data. The data in at least one target data bit of the error data is different from the data in the corresponding data bit in the original data.

[0055] The determining module is used to determine the feedback information corresponding to the IO request based on the error data;

[0056] The processing module is used to determine the processing result of the electronic device on the target error simulation type based on the feedback information, and the processing result is used to indicate the error correction capability of the electronic device on the error data.

[0057] For any content not described in the embodiments of this application, please refer to the relevant descriptions in the aforementioned first aspect of the disclosed embodiments, which will not be repeated here.

[0058] A third aspect of this application discloses an apparatus for processing input / output error (EIO), comprising:

[0059] Memory containing executable program code;

[0060] A processor coupled to the memory;

[0061] The processor calls the executable program code stored in the memory to execute the steps of an input / output error (EIO) processing method in any optional embodiment of the first aspect of this application.

[0062] The fourth aspect of this application discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it implements the steps of an input / output error (EIO) processing method in any optional embodiment of the first aspect of this application. Attached Figure Description

[0063] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0064] Figure 1 This is a flowchart illustrating a method for handling input / output error (EIO) disclosed in an embodiment of this application;

[0065] Figure 2 This is a schematic diagram of the system architecture of the electronic device disclosed in the embodiments of this application;

[0066] Figure 3 This is another flowchart illustrating a method for handling input / output error (EIO) disclosed in an embodiment of this application;

[0067] Figure 4 This is a schematic diagram of the structure of an input / output error (EIO) processing device disclosed in an embodiment of this application;

[0068] Figure 5 This is another schematic diagram of an input / output error (EIO) processing device disclosed in an embodiment of this application. Detailed Implementation

[0069] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0070] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0071] In the following description, references to "one embodiment," "an embodiment," or "some embodiments" mean that a specific feature, structure, or characteristic related to an embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment," "in one embodiment," or "some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application. The above-described multiple embodiments are not necessarily multiple independent embodiments; the division into multiple embodiments is only used to highlight different technical features in different embodiments. Those skilled in the art should understand that the above-described multiple embodiments can also be combined arbitrarily.

[0072] It should be noted that the terms "first," "second," and "third" used in the embodiments of this application are used to distinguish similar or different objects and are not related to a specific order of the objects being described. It is understood that "first," "second," and "third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0073] The terms “comprising” and “having”, and any variations thereof, in this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or device.

[0074] The terms "exemplary" or "for example" used in the embodiments of this application are intended to represent examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0075] Currently, a certain percentage of Android-based mobile phones, watches, tablets, and other electronic devices on the market suffer from EIO devices due to malfunctions or anomalies in embedded multimedia card (EMMC) or universal flash storage (UFS) memory. These EIO devices cannot properly perform read or write data (input / output) requests. The cause of this EIO issue could be data jumps in the EMC or UFS, or bit flips in double-data-rate (DDR) synchronous dynamic random access memory. For example, a data jump refers to a sudden, discontinuous, or inconsistent change in data values ​​during reading or writing. When a data jump occurs, the data read or written by the electronic device may become unreliable or incomplete. This can lead to data transmission failures, read / write timeouts, data corruption, data loss, application crashes, slow electronic device operation, or inability to boot, all of which negatively impact user experience and device performance.

[0076] Therefore, to further identify the causes of input / output errors, it is necessary to simulate these errors to obtain simulation results and help users promptly identify problems and propose solutions. Current technologies typically involve compiling the mirror data of a specific partition into hexadecimal format and then modifying that data to induce jumps and cause input / output errors. However, this simulation method is highly complex and inherently uncertain. Therefore, simplifying the simulation method and reducing operational complexity has become a pressing technical problem.

[0077] Therefore, embodiments of this application provide a method, apparatus, and storage medium for processing input / output errors (EIO). In this application's technical solution, a target error simulation type is set for a target partition; an IO request corresponding to the target partition is run; according to the target error simulation type, error simulation is performed on the original data of the IO request corresponding to the target partition to obtain error data, wherein at least one target data bit of the error data differs from the corresponding data bit in the original data; feedback information corresponding to the IO request is determined based on the error data; and the processing result of the electronic device on the target error simulation type is determined based on the feedback information, the processing result indicating the electronic device's error correction capability for the error data.

[0078] To make the purpose and technical solution of this application clearer and more intuitive, the following describes in detail, with reference to the accompanying drawings, a method for handling input / output error EIO disclosed in this application.

[0079] Please see Figure 1 This is a flowchart illustrating an input / output error (EIO) processing method disclosed in an embodiment of this application. Figure 1 The method shown is applied to electronic devices.

[0080] It should be understood that the electronic devices involved in the embodiments of this application may be mobile phones, tablet computers, laptop computers, mobile internet devices (MID), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, headphones, terminals in industrial control, terminals in self-driving vehicles, personal digital assistants (PDAs), etc., and the embodiments of this application are not limited to these.

[0081] For example, Figure 2 This is a schematic diagram of the system architecture of the electronic device provided in an embodiment of this application. Figure 2 As shown, the electronic device includes components such as a processor 201, a transceiver 202, a register 203, a memory 204, an input unit 205, a display unit 206, a sensor 207, and a power module 208.

[0082] The processor 201 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. It performs various functions and processes data by running or executing software programs and / or modules stored in registers 203 and memory 204, and by calling data stored in registers 203 and memory 204. Optionally, the processor 201 may include one or more processing units; optionally, the processor 201 may integrate an application processor, which mainly handles operating devices, user interfaces, and application programs. Of course, it may also include other processors, which are not listed here.

[0083] Transceiver 202 can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), and near field communication (NFC). Transceiver 202 can be one or more devices integrating at least one communication processing module; for example, it can integrate an antenna with a baseband processor, or it can integrate an antenna with a modem processor, etc., without limitation.

[0084] Register 203 is used to store and execute instructions and process data. Different processors 201 have different sets of registers and functions, including but not limited to: status registers, used to store the status indicators of the processor 201; data registers, also known as general-purpose registers, used to store and manipulate data; address registers, used to store memory addresses or pointers for accessing data in memory; and the program counter, also known as the instruction register, used to store the address of the currently executing instruction and indicate the location of the next instruction to be executed.

[0085] The memory 204 can be used to store software programs and modules. The processor 201 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 204. The memory 220 mainly includes a program storage area and a data storage area. The program storage area can store the operating device and the application program required for at least one function (such as sound playback function, image playback function, etc.). The data storage area can store data created according to the use of the electronic device (such as audio data, telephone book, etc.). In addition, the memory 204 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0086] Input unit 205 can be used to receive input digital or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, input unit 205 can collect user operations on or near it and drive corresponding connected devices according to a pre-set program. Furthermore, input unit 205 may include a touch panel, which can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave touch panels. In addition to the touch panel, input unit 250 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of function keys (such as volume control buttons, power buttons, etc.), trackballs, joysticks, etc.

[0087] The display unit 206 can be used to display information input by the user or information provided to the user, as well as various menus of the electronic device. The display unit 206 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or other similar devices, and is not limited thereto.

[0088] The electronic device may also include at least one sensor 207, such as a gyroscope sensor, a motion sensor, and other sensors. The motion sensor may include an accelerometer sensor for detecting the magnitude of acceleration in various directions, and when stationary, it can detect the magnitude and direction of gravity, which can be used for applications that identify the attitude of the electronic device, such as screen orientation switching, related games, magnetometer attitude calibration, etc. Other sensors that may be configured in the electronic device, such as pressure gauges, barometers, hygrometers, thermometers, infrared sensors, fingerprint sensors, etc., will not be described in detail here.

[0089] The electronic device also includes a power module 208 that supplies power to the various components. Optionally, the power module 208 can be logically connected to the processor 201 through a power management device, thereby enabling functions such as charging, discharging, and power consumption management through the power management device.

[0090] Although not shown, the electronic device may also include a camera. Optionally, the camera may be positioned in the front or rear of the electronic device, and this application embodiment does not limit this.

[0091] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0092] The method described in this application includes the following steps:

[0093] 101. Set the target error simulation type for the target partition.

[0094] In this embodiment, a target error simulation type can be set for the target partition, which essentially enables the target partition to simulate input / output errors. Specifically, the target error simulation type of the electronic device can be set in advance in the target partition. When it is necessary to simulate input / output errors of the electronic device, the electronic device can quickly respond to and simulate input / output errors by setting the target error simulation type in the target partition.

[0095] It should be noted that the target error simulation type can be a simulation of EMMC data transition, UFS data transition, or DDR data bit flip. Those skilled in the art can set different simulation types according to the actual simulation scenario to facilitate flexible simulation of various input and output errors, which is not limited here.

[0096] It should also be noted that the target partition is used to store the raw data of the IO request, indicating that error simulation needs to be performed on the raw data of the target partition. Furthermore, a target error simulation type is set for the target partition, meaning that each piece of raw data in the target partition has a corresponding target error simulation type. It can be understood that this application simulates the raw data of the target partition according to the corresponding target error simulation type. The target partition may include multiple sub-partitions, the number of which is determined by the number of target error simulation types, wherein each target error simulation type corresponds one-to-one with a sub-partition.

[0097] As an optional implementation, the setting of the target error simulation type for the target partition includes:

[0098] Based on the user's actions, obtain the target error simulation type;

[0099] Load command-line parameters corresponding to the target error simulation type to set the target error simulation type for the target partition. The command-line parameters include error simulation type switch parameters and simulation parameters corresponding to the target error simulation type.

[0100] It should be noted that in the above implementation, the target error simulation type can be obtained based on the user's operation, thereby completing the setting of the target error simulation type for the target partition. Specifically, developers can set up simulation control software to control the activation of input / output error simulation, and the simulation control software may include an error simulation start switch, error simulation type options, etc.

[0101] For example, when a user wants to simulate input / output errors on an electronic device, the user can operate on the simulation control software (e.g., turn on the error simulation switch, select the error simulation type, etc.), and then the electronic device responds to the user's operation. Finally, the electronic device obtains the target error simulation type according to the user's operation to set the target error simulation type for the target partition.

[0102] Alternatively, the target error simulation type can be set without the user actively operating the simulation control software. For example, when the electronic device detects an input / output error, the target error simulation type for the target partition can be automatically set; alternatively, it can be automatically activated when a specific application is detected being used by the user—this is not limited to any particular scenario. Specifically, the simulation can be triggered actively by the user, automatically by the electronic device detecting an input / output error, or automatically by the user using a specific application, etc.—this is not limited to any particular scenario.

[0103] It should also be noted that, in the above implementation, after obtaining the target error simulation type, command-line parameters corresponding to the target error simulation type are loaded to set the target error simulation type for the target partition. Each target error simulation type corresponds to different command-line parameters, which include error simulation type switch parameters and simulation parameters corresponding to the target error simulation type. For example, if the target error simulation type is EMMC data transition, the corresponding command-line parameters include EMMC data transition simulation switch parameters and data transition bit width.

[0104] It should be understood that if the user selects a certain target error simulation type, the corresponding target error simulation type will be set, and the target command line parameters corresponding to the target error simulation type will be loaded. The target command line parameters include the target error simulation type switch parameters and the corresponding target simulation parameters.

[0105] Using the above implementation method, users can select the error simulation type themselves, which reduces the operational complexity of error simulation, makes it convenient for users to simulate input and output errors of electronic devices in a timely manner, and the error simulation type can be flexibly set.

[0106] 102. Run the IO request corresponding to the target partition, and perform error simulation on the original data of the IO request corresponding to the target partition according to the target error simulation type to obtain error data. The data in at least one target data bit of the error data is different from the data in the corresponding data bit in the original data.

[0107] In this embodiment, when an I / O request is executed on a target partition of an electronic device, a target error simulation type corresponding to the target partition is determined based on the correspondence between the target partition and the target error simulation type. Further, error simulation is performed on the original data of the I / O request corresponding to the target partition according to the target error simulation type to obtain error data. Specifically, at least one target data bit in the error data differs from the corresponding data bit in the original data; that is, as long as at least one bit in the error data differs from the original data, the error simulation is considered complete. For example, suppose an I / O request with original data 0000 is subjected to error simulation, where the error simulation type is a data transition simulation, and the simulation parameter is changing the least significant bit from 0 to 1. After error simulation, the output is error data 0001. Those skilled in the art can flexibly perform various error simulations according to the EIO device in the actual application scenario, and no limitation is made here.

[0108] 103. Determine the feedback information corresponding to the IO request based on the error data.

[0109] In this embodiment of the application, since the electronic device itself has EIO error correction capability, after the electronic device has an input / output error, the electronic device can perform EIO error correction through various data repair algorithms, such as error correction code (ECC) for data transmission and storage, forward error correction (FEC) for data transmission and storage, etc.

[0110] Furthermore, in this embodiment, after simulating errors in the original data of the IO request corresponding to the target partition to obtain erroneous data, the electronic device will further perform error correction processing on the erroneous data. Specifically, determining the feedback information corresponding to the IO request based on the erroneous data includes: performing error correction processing on the erroneous data, and determining that the feedback information includes the error-corrected data after error correction processing.

[0111] It should be noted that the error correction process involves repairing the erroneous data. After the error data is corrected, feedback information is obtained. This feedback information includes the corrected data, which may be the original data (i.e., correct data) or it may be a different erroneous data. The feedback information reflects whether the error correction was successful. Additionally, the feedback information may also include a success or error message. This message could indicate successful error correction, complete error correction failure, or partial error correction failure. In other words, if error correction fails, the electronic device will be notified that the error correction failed, and the electronic device will be in a frozen or stagnant state.

[0112] 104. Based on the feedback information, determine the processing result of the electronic device for the target error simulation type, and the processing result is used to indicate the error correction capability of the electronic device for the error data.

[0113] In this embodiment of the application, after completing the error simulation, it is necessary to further verify the electronic device's own error correction capability for input and output errors, that is, whether the electronic device can perform error correction processing on the erroneous data, and the maximum number of data jumps that the electronic device can successfully correct. For example, when there are too many data jumps, making it impossible for the electronic device to correctly correct the erroneous data, the error correction capability of the electronic device, that is, its data repair capability, can be evaluated.

[0114] Further, in this embodiment of the application, determining the processing result of the electronic device for the target error simulation type based on the feedback information includes:

[0115] Compare whether the corrected data is the same as the original data;

[0116] Under the same conditions, this means that the electronic device can correct all data errors.

[0117] Specifically, in this application, the error correction result of the electronic device is determined by comparing whether the error correction data is the same as the original data. Only when the error correction data is the same as the original data is the error correction considered successful. The verification method for the error correction result is not limited here.

[0118] As an optional implementation, after determining the processing result of the electronic device on the target error simulation type, the method further includes:

[0119] Based on the processing results, optimization suggestions are output to improve the error correction capability of the electronic device.

[0120] It should be noted that the optimization suggestions may include optimization suggestions for the electronic device's memory, or optimization suggestions for improving the EIO error correction capability of the electronic device. For example, based on the EIO error correction results, the effectiveness of the currently used error correction algorithm can be evaluated, and it may be suggested to consider adopting a higher-level error correction algorithm; or, it may be suggested to adopt a more complex encoding scheme, such as repeated encoding or encrypted encoding, to increase redundancy in the data and improve error correction capability; or, it may be suggested to optimize the signal transmission environment by reducing electromagnetic interference and improving signal transmission quality, so as to reduce the possibility of EIO. Specific optimization suggestions are not limited in this application.

[0121] By adopting the above implementation method, the error correction capability evaluation results of the electronic device can be output to the user, and optimization suggestions for improving the error correction capability of the electronic device can be output based on the evaluation results, thereby enhancing the stability of the electronic device and further improving the user experience.

[0122] As can be seen, by implementing the embodiments of this application, various input and output error simulations can be performed by flexibly setting the error simulation type in the software. This reduces the operational complexity of input and output error simulation, saves time, and improves the accuracy of simulation results. Furthermore, the simulation results can be used to further evaluate the electronic device's own error correction capability for input and output errors, thereby enhancing the stability of the electronic device.

[0123] Please see Figure 3 This is another flowchart illustrating a method for handling input / output error (EIO) disclosed in an embodiment of this application. Figure 3 The method shown includes the following implementation steps:

[0124] 301. Set the target error simulation type for the target partition.

[0125] For details on step 301, please refer to the relevant description in step 101 of the aforementioned embodiments, which will not be repeated here.

[0126] 302. Write the target error simulation type into the preset partition.

[0127] In this embodiment, after setting the target error simulation type for the target partition, the target error simulation type is written into a preset partition. The preset partition is a specific partition used for error simulation. Specifically, writing the target error simulation type into the preset partition indicates that error simulation needs to be performed on the original data in the target partition within the preset partition. This can be simulating all the original data or simulating a portion of it; no limitation is made here.

[0128] By using the embodiments of this application, error simulation is performed by setting preset partitions, which allows the electronic device error simulation to be performed normally in the preset partitions, improving the accuracy of the simulation results without affecting the normal operation of other functions of the electronic device.

[0129] 303. The electronic device enters a restart state.

[0130] It should be noted that after the target error simulation type is written to the preset partition, the electronic device automatically enters a restart state.

[0131] 304. In the restart state, obtain the target error simulation type from the preset partition.

[0132] In this embodiment, when the electronic device is in a reboot state, the target error simulation type can be automatically read from a preset partition. For example, in the reboot state, the electronic device can read the target error simulation type from the preset partition during the boot loader (BL) stage. It should be understood that the BL stage, which runs before the operating system kernel, can initialize the electronic device and establish a memory space mapping, thereby bringing the operating system's hardware and software environment to a suitable state to prepare the correct environment for the final call to the operating system kernel.

[0133] In some embodiments, before the electronic device enters a restart state, the method may further include: setting the target error simulation type in the identifier bit of the preset partition, wherein the target error simulation type corresponds one-to-one with the preset partition. Further, when the electronic device is in a restart state, it is determined whether the identifier bit of the preset partition is the target error simulation type; if the identifier bit of the preset partition is the target error simulation type, error simulation is performed on the original data of the IO request corresponding to the preset partition according to the target error simulation type.

[0134] By employing the embodiments of this application, when an electronic device is in a restart state, the error simulation type can be automatically obtained, improving the convenience of error simulation.

[0135] 305. Generate and load the command line parameters corresponding to the target error simulation type, wherein the simulation parameters include the data bit check type and the first jump number.

[0136] In this embodiment of the application, after the electronic device obtains the target error simulation type from the preset partition in the reboot state, the electronic device can generate and load the command line parameters corresponding to the target error simulation type.

[0137] For example, after the electronic device reads the target error simulation type from the preset partition during the boot process (BL) stage, it further passes the corresponding command-line parameters of the target error simulation type to the operating system's kernel command line (cmdline). This ensures that the kernel command line contains the command-line parameters corresponding to the target error simulation type. These command-line parameters include an error simulation type switch and simulation parameters corresponding to the error simulation type (e.g., data bit check type and first jump bit number). This passing step guides the operating system's kernel startup. The cmdline is a fixed-size buffer used to store the command-line parameters passed during kernel startup, facilitating kernel access and parsing of these parameters. During startup, the kernel can read the command-line parameters to guide the electronic device to further drive the loading of the error simulation type switch and the corresponding simulation parameters, ultimately completing the error simulation of the original data within the preset partition.

[0138] In this embodiment, the simulation parameters include the data bit verification type and the first transition bit number. The data bit verification type can include any verification type such as parity check (PC), cyclic redundancy check (CRC), Hamming code (HC), and repetition code (RC), used to verify the integrity of data during data transmission or storage. Further, the first transition bit number refers to the number of transition bits used to process the original data. The number of transition bits can be arbitrarily set; all bits of the original data can be transitioned, or only some bits of the original data can be transitioned. No limitation is imposed here.

[0139] In some embodiments, after obtaining the target error simulation type from the preset partition in the reboot state, the electronic device may further verify whether the target error simulation type in the preset partition is valid. If it is valid, then the command line parameters corresponding to the target error simulation type will be generated and loaded.

[0140] As an optional implementation, before generating and loading the command-line arguments corresponding to the target error simulation type, the method further includes:

[0141] When the target error simulation type is the same as one of at least one preset error simulation types;

[0142] The process of generating and loading the command-line parameters corresponding to the target error simulation type includes:

[0143] If the target error simulation type is the same as one of at least one preset error simulation types, the command line parameters corresponding to the target error simulation type are generated and loaded.

[0144] It should be noted that the at least one preset error simulation type can be a planned error type set by the user in advance. Only when the target error simulation type in the preset partition is the same as the at least one preset error simulation type will the verification pass, and then the command line parameters corresponding to the target error simulation type will be generated and loaded.

[0145] By adopting one of the above optional implementation methods, the target error simulation type is determined to be valid only when the target error simulation type is at least one of the preset types, thereby improving the reliability of the error simulation process and the accuracy of the simulation results.

[0146] In some embodiments, after generating and loading the command line parameters corresponding to the target error simulation type, the electronic device may further verify whether the error simulation type switch parameter in the command line parameters is valid. If it is valid (i.e., the error simulation type switch is in the on state), then further error simulation will be performed.

[0147] As another optional implementation, before performing error simulation on the original data of the IO request corresponding to the target partition according to the target error simulation type, the method further includes:

[0148] Determine whether the error simulation type switch parameter is in the on state;

[0149] Based on the target error simulation type, error simulation is performed on the raw data of the IO request corresponding to the target partition, including:

[0150] When the error simulation type switch parameter is enabled, error simulation is performed on the original data of the IO request corresponding to the target partition according to the target error simulation type.

[0151] It should be understood that if the error simulation type switch parameter is not in the on state, then no error simulation will be performed.

[0152] In the alternative implementation described above, error simulation is only performed when the analog type switch is in the on state, which improves the reliability of the error simulation process.

[0153] 306. Obtain the original data from the target partition.

[0154] It should be understood that the target partition is used to store the raw data of IO requests, so it is necessary to obtain the raw data from the target partition.

[0155] 307. Based on the first jump bit, perform jump processing on the data at the target data bit in the original data to obtain the first erroneous data.

[0156] In this embodiment, the first transition bit refers to the number of transition bits used to process the original data. The number of transition bits can be arbitrarily set; all bits of the original data can be transitioned, or only some bits of the original data can be transitioned. For example, suppose an IO request with original data 0000 is processed with transition bits, where the first transition bit is 1, the target data bit is the least significant bit, and the least significant bit is changed from 0 to 1. After the transition processing, the first error data 0001 is output.

[0157] 308. Perform error correction processing on the first erroneous data, and determine that the feedback information includes the first corrected data after error correction processing.

[0158] In this embodiment, after simulating errors in the original data of the IO request corresponding to the target partition and obtaining erroneous data, the electronic device further performs error correction processing on the erroneous data to obtain feedback information. The feedback information includes error correction data, error correction results, etc., which are not limited here. For example, suppose that an IO request with original data of 0000 is processed according to the first jump bit, and the first error data 0001 is output. Then, the error data 0001 is further corrected to obtain the first error correction data 0000, and the error correction result is "successful error correction".

[0159] Other details regarding step 308 can be found in the relevant description of step 103 in the aforementioned embodiments, and will not be repeated here.

[0160] 309. Compare whether the first error-corrected data is the same as the original data.

[0161] 310. Under the same conditions, the processing result is determined to include the first jump number, and the more the first jump number, the stronger the error correction capability.

[0162] In this embodiment of the application, after completing the error simulation, it is necessary to further verify the electronic device's own error correction capability for input and output errors, that is, whether the electronic device can perform error correction processing on the erroneous data, and the maximum number of data jumps that the electronic device can successfully correct. For example, when there are too many data jumps, making it impossible for the electronic device to correctly correct the erroneous data, the error correction capability of the electronic device, that is, its data repair capability, can be evaluated.

[0163] It should be understood that full error correction does not necessarily mean that the electronic device has strong error correction capabilities. The error correction capabilities of the electronic device need to be determined comprehensively based on factors such as the number of data errors and the error correction results. For example, when 4 data bits are incorrect, the electronic device can correct all errors. When 5 data bits are incorrect, the electronic device can still correct all errors. Only when it is verified that 5 data bits are incorrect and all errors are corrected can it be considered that the electronic device has strong error correction capabilities.

[0164] As an optional implementation, after comparing whether the corrected data is the same as the original data, the method further includes:

[0165] In cases where they are not the same, obtain the adjusted second jump change number, where the second jump change number is less than the first jump change number;

[0166] Based on the second jump bit, the original data is subjected to jump processing to obtain the second erroneous data;

[0167] The second erroneous data is corrected, and the feedback information is determined to include the second corrected data after the correction process, wherein the second corrected data corresponds to the second erroneous data.

[0168] If the second error-corrected data is the same as the original data, the processing result is determined to include the second jump bit.

[0169] It should be noted that in this application, the error correction result of the electronic device is determined by comparing whether the error correction data is the same as the original data. If the error correction data is different from the original data, it indicates that the error correction has failed.

[0170] Furthermore, when the corrected data differs from the original data, to verify the electronic device's own error correction capability for input / output errors, the number of transition bits can be adjusted. The adjusted number of transition bits is smaller than the originally set number of transition bits. Further, the electronic device performs error simulation (transition processing) on ​​the original data based on the adjusted number of transition bits to obtain erroneous data. The electronic device then corrects the erroneous data to obtain corrected data, until it is verified that the corrected data is identical to the original data. At this point, a processing result is obtained, including the adjusted number of transition bits, which can be used to indicate the error correction capability of the electronic device. This application does not limit the number of adjustments.

[0171] By employing one of the above optional implementation methods, simulation parameters can be flexibly modified to simulate various input / output errors, which can help users clarify the error correction capabilities of electronic devices.

[0172] For other details regarding steps 309 to 310, please refer to the relevant description in step 104 of the aforementioned embodiments, which will not be repeated here.

[0173] As can be seen, implementing the embodiments of this application allows for flexible setting of error simulation types to simulate various input / output errors, reducing the operational complexity of input / output error simulation, saving time, and improving the accuracy of simulation results. The simulation results can also be used to further evaluate the electronic device's own error correction capabilities for input / output errors, enhancing the stability of the electronic device. Multiple simulation parameters can be flexibly set, and error simulation can be automatically performed based on these parameters, helping users quickly identify the causes of input / output errors in the electronic device. Automatic error correction of simulation results improves the convenience of error simulation and reduces operational complexity. Automatic evaluation of the electronic device's own data error correction capabilities allows users to promptly understand the electronic device's error correction capabilities for input / output errors, optimizing the user experience.

[0174] Based on the foregoing embodiments, this application discloses an input / output error (EIO) processing device. The device includes various modules and units included in each module, which can be implemented by a processor; of course, it can also be implemented by specific logic circuits. In the implementation process, the processor can be a central processing unit (CPU), microprocessor (MPU), digital signal processor (DSP), or field programmable gate array (FPGA), etc.

[0175] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an input / output error (EIO) processing device disclosed in an embodiment of this application. Figure 4 As shown, the device includes: a setting module 401, a simulation module 402, a determining module 403, and a processing module 404, wherein:

[0176] The setting module 401 is used to set the target error simulation type of the target partition;

[0177] The simulation module 402 is used to run an IO request corresponding to the target partition, and to perform error simulation on the original data of the IO request corresponding to the target partition according to the target error simulation type to obtain error data. The data in at least one target data bit of the error data is different from the data in the corresponding data bit in the original data.

[0178] The determining module 403 is used to determine the feedback information corresponding to the IO request based on the error data;

[0179] The processing module 404 is used to determine the processing result of the electronic device on the target error simulation type based on the feedback information, and the processing result is used to indicate the error correction capability of the electronic device on the error data.

[0180] In some embodiments, the processing apparatus for an input / output error (EIO) further includes an acquisition module:

[0181] The acquisition module is used to acquire the target error simulation type based on user operations;

[0182] The processing module 404 is further configured to load command-line parameters corresponding to the target error simulation type to set the target error simulation type of the target partition. The command-line parameters include error simulation type switch parameters and simulation parameters corresponding to the target error simulation type.

[0183] In some embodiments, the processing apparatus for an input / output error (EIO) includes:

[0184] The processing module 404 is further configured to write the target error simulation type into a preset partition.

[0185] In some embodiments, the processing apparatus for an input / output error (EIO) includes:

[0186] The acquisition module is further configured to acquire the target error simulation type from the preset partition during the reboot state;

[0187] The processing module 404 is also used to generate and load command line parameters corresponding to the target error simulation type.

[0188] In some embodiments, the processing apparatus for an input / output error (EIO) includes:

[0189] The acquisition module is further configured to acquire the original data from the target partition;

[0190] The processing module 404 is further configured to perform jump processing on the data in the target data bit of the original data according to the first jump bit number to obtain the first erroneous data, wherein the number of the target data bits is determined according to the first jump bit number.

[0191] In some embodiments, the processing apparatus for an input / output error (EIO) includes:

[0192] The processing module 404 is further configured to perform error correction processing on the first erroneous data and determine that the feedback information includes the first error-corrected data after error correction processing.

[0193] In some embodiments, the processing device for an input / output error (EIO) further includes a judgment module:

[0194] The judgment module is used to compare whether the first error-corrected data is the same as the original data;

[0195] The processing module 404 is further configured to determine, under the same conditions, that the processing result includes the first jump number, and the more the first jump number, the stronger the error correction capability.

[0196] In some embodiments, the processing apparatus for an input / output error (EIO) includes:

[0197] The acquisition module is further configured to acquire, under different conditions, the adjusted second jump change number, wherein the second jump change number is less than the first jump change number;

[0198] The processing module 404 is further configured to perform jump processing on the original data according to the second jump bit number to obtain the second erroneous data;

[0199] The processing module 404 is further configured to perform error correction processing on the second error data, and determine that the feedback information includes the second error correction data after error correction processing, wherein the second error correction data corresponds to the second error data;

[0200] The processing module 404 is further configured to determine that the processing result includes the second jump bit number when the second error correction data is the same as the original data.

[0201] In some embodiments, the processing apparatus for an input / output error (EIO) includes:

[0202] The processing module 404 is further configured to generate and load command line parameters corresponding to the target error simulation type when the target error simulation type is the same as one of at least one preset error simulation types.

[0203] In some embodiments, the processing apparatus for an input / output error (EIO) includes:

[0204] The judgment module is also used to determine whether the error simulation type switch parameter is in the on state;

[0205] The simulation module 402 is further configured to, when the error simulation type switch parameter is in the on state, perform error simulation on the original data of the IO request corresponding to the target partition according to the target error simulation type.

[0206] In some embodiments, the processing apparatus for an input / output error (EIO) includes:

[0207] The processing module 404 is further configured to output optimization suggestions based on the processing results, the optimization suggestions being used to improve the error correction capability of the electronic device.

[0208] The description of the above embodiment of the input / output error (EIO) processing apparatus is similar to the description of the above method embodiment and has similar beneficial effects. For technical details not disclosed in the embodiment of the input / output error (EIO) processing apparatus of this application, please refer to the description of the method embodiment of this application for understanding, and will not be repeated here.

[0209] It should be noted that, in the embodiments of this application... Figure 4 The module division shown in the EIO (Error Input / Output) processing device is illustrative and represents only one logical functional division. In actual implementation, there may be other division methods.

[0210] Please see Figure 5 This is another schematic diagram of an input / output error (EIO) processing device disclosed in an embodiment of this application. Figure 5 As shown, the input / output error (EIO) processing device includes:

[0211] Memory 501 storing executable program code;

[0212] Processor 502 coupled to the memory;

[0213] The processor 502 calls the executable program code stored in the memory 501 to execute any one of the input / output error (EIO) handling methods in the above method embodiments.

[0214] This application further discloses a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements all or part of the steps of an input / output error (EIO) processing method in the above-described method embodiments.

[0215] The above provides a detailed description of a method, apparatus, and storage medium for handling input / output errors (EIO) disclosed in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of the application.

Claims

1. A method for handling input / output error (EIO), characterized in that, Applied to electronic devices, the method includes: Set the target error simulation type for the target partition; Run the IO request corresponding to the target partition, and perform error simulation on the original data of the IO request corresponding to the target partition according to the target error simulation type to obtain error data. The data in at least one target data bit of the error data is different from the data in the corresponding data bit in the original data. Based on the error data, determine the feedback information corresponding to the IO request; The processing result of the electronic device on the target error simulation type is determined based on the feedback information, and the processing result is used to indicate the error correction capability of the electronic device for the error data; The target error simulation type for setting the target partition includes: Obtain the target error simulation type; Load command-line parameters corresponding to the target error simulation type to set the target error simulation type for the target partition. The command-line parameters include error simulation type switch parameters and simulation parameters corresponding to the target error simulation type.

2. The method according to claim 1, characterized in that, The step of obtaining the target error simulation type includes: Based on the user's actions, obtain the target error simulation type.

3. The method according to claim 2, characterized in that, After setting the target error simulation type for the target partition, the method further includes: Write the target error simulation type into a preset partition.

4. The method according to claim 3, characterized in that, After the target error simulation type is written to the preset partition, the electronic device enters a reboot state, and the method further includes: In the restart state, the target error simulation type is obtained from the preset partition; Generate and load the command-line arguments corresponding to the target error simulation type.

5. The method according to claim 4, characterized in that, The simulation parameters include a data bit check type and a first hop bit length. The step involves simulating errors on the original data of the IO request corresponding to the target partition based on the target error simulation type to obtain error data, including: Obtain the original data from the target partition; Based on the first jump bit number, the data on the target data bit in the original data is subjected to jump processing to obtain the first erroneous data. The number of target data bits is determined based on the first jump bit number.

6. The method according to claim 5, characterized in that, The step of determining the feedback information corresponding to the IO request based on the error data includes: The first erroneous data is corrected, and the feedback information is determined to include the first corrected data after the correction process.

7. The method according to claim 6, characterized in that, The step of determining the processing result of the electronic device for the target error simulation type based on the feedback information includes: Compare whether the first corrected data is the same as the original data; Under the same conditions, the processing result is determined to include the first jump number, and the more the first jump number, the stronger the error correction capability.

8. The method according to claim 7, characterized in that, After comparing whether the first error-corrected data is the same as the original data, the method further includes: In cases where they are not the same, obtain the adjusted second jump change number, where the second jump change number is less than the first jump change number; Based on the second jump bit, the original data is subjected to jump processing to obtain the second erroneous data; The second erroneous data is corrected, and the feedback information is determined to include the second corrected data after the correction process, wherein the second corrected data corresponds to the second erroneous data. If the second error-corrected data is the same as the original data, the processing result is determined to include the second jump bit.

9. The method according to claim 4, characterized in that, Before generating and loading the command-line arguments corresponding to the target error simulation type, the method further includes: When the target error simulation type is the same as one of at least one preset error simulation types; The command-line parameters corresponding to the target error simulation type that are generated and loaded include: If the target error simulation type is the same as one of at least one preset error simulation types, the command line parameters corresponding to the target error simulation type are generated and loaded.

10. The method according to claim 2, characterized in that, Before performing error simulation on the raw data of the IO request corresponding to the target partition according to the target error simulation type, the method further includes: Determine whether the error simulation type switch parameter is in the on state; Based on the target error simulation type, error simulation is performed on the raw data of the IO request corresponding to the target partition, including: When the error simulation type switch parameter is enabled, error simulation is performed on the original data of the IO request corresponding to the target partition according to the target error simulation type.

11. The method according to claim 10, characterized in that, After determining the processing result of the electronic device for the target error simulation type, the method further includes: Based on the processing results, optimization suggestions are output to improve the error correction capability of the electronic device.

12. An apparatus for processing input / output error (EIO), characterized in that, include: The module includes a setup module, a simulation module, a determination module, a processing module, and an acquisition module, among which: The settings module is used to set the target error simulation type for the target partition; The simulation module is used to run an IO request corresponding to the target partition, and to perform error simulation on the original data of the IO request corresponding to the target partition according to the target error simulation type to obtain error data. The data in at least one target data bit of the error data is different from the data in the corresponding data bit in the original data. The determining module is used to determine the feedback information corresponding to the IO request based on the error data; The processing module is used to determine the processing result of the electronic device on the target error simulation type based on the feedback information, and the processing result is used to indicate the error correction capability of the electronic device for the error data; The acquisition module is used to acquire the target error simulation type; The processing module is further configured to load command-line parameters corresponding to the target error simulation type to set the target error simulation type of the target partition. The command-line parameters include error simulation type switch parameters and simulation parameters corresponding to the target error simulation type.

13. An apparatus for processing input / output error (EIO), characterized in that, include: Memory containing executable program code; A processor coupled to the memory; The processor invokes the executable program code stored in the memory to execute the method as described in any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that, include: The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the method as described in any one of claims 1 to 11.