Data processing method, device and electronic equipment

By generating and verifying ECC codes independently at both the electronic device and storage device levels, the method enhances data verification accuracy by identifying and correcting errors during storage and transmission.

CN117632571BActive Publication Date: 2024-12-31DOUYIN VISION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210957838.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-10
Publication Date
2024-12-31
Estimated Expiration
2042-08-10

AI Technical Summary

Technical Problem

Existing data verification methods in electronic devices fail to accurately identify data errors during the link transmission process, leading to low accuracy of data verification.

Method used

Implement a data processing method where electronic devices and storage devices generate and verify error correction codes (ECC) independently to identify and correct errors during both data storage and transmission processes.

Benefits of technology

Improves the accuracy of data verification by enabling timely correction or interruption of erroneous data, ensuring reliable data transmission and storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117632571B_ABST
    Figure CN117632571B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data processing method, device and electronic device, the method comprising: an electronic device obtains first data and a first error correction code in a storage device, the first error correction code being an error correction code generated when the storage device stores the first data; the electronic device generates a second error correction code according to the first data; the electronic device verifies the first data according to the first error correction code and the second error correction code to obtain a first verification result; the electronic device processes the first data according to the first verification result, so as to improve the accuracy of data verification and the reliability of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the technical field of data storage, and in particular, to a data processing method, device, and electronic device. Background Art

[0002] When electronic devices store data in memory, the reliability of the data can be ensured through error checking and correction (ECC) technology.

[0003] At present, electronic devices can protect the impact of memory particle errors on data through ECC data. For example, the memory can obtain the ECC data corresponding to the data and store the ECC data in an additional memory. When the electronic device reads the data, the memory can generate new ECC data based on the data, and verify it through the new ECC data and the ECC data stored in the additional memory. If the ECC data is different, it means that an error occurred when the data was stored in the memory. However, according to the above method, the electronic device can only identify the situation where the data is wrong when the memory particle fails, but cannot identify the situation where the data is wrong during the link transmission process, which leads to low accuracy of data verification. Summary of the invention

[0004] The present disclosure provides a data processing method, device and electronic device, which are used to solve the technical problem of low accuracy of data verification in the prior art.

[0005] In a first aspect, the present disclosure provides a data processing method, the method comprising:

[0006] The electronic device obtains first data and a first error correction code from a storage device, where the first error correction code is an error correction code generated when the storage device stores the first data;

[0007] The electronic device generates a second error correction code according to the first data;

[0008] The electronic device verifies the first data according to the first error correction code and the second error correction code to obtain a first verification result;

[0009] The electronic device processes the first data according to the first verification result.

[0010] In a second aspect, the present disclosure provides a data processing method, the method comprising:

[0011] The storage device receives first data and a third error correction code sent by an electronic device, where the third error correction code is an error correction code generated by the electronic device according to the first data;

[0012] The storage device generates a first error correction code according to the first data, and verifies the first data according to the first error correction code and the third error correction code to obtain a second verification result;

[0013] The storage device processes the first data and the first error correction code according to the second verification result.

[0014] In a third aspect, the present disclosure provides a data processing device, the data processing device comprising an acquisition module, a generation module, a verification module and a processing module, wherein:

[0015] The acquisition module is used to acquire first data and a first error correction code in a storage device, where the first error correction code is an error correction code generated when the storage device stores the first data;

[0016] The generating module is used to generate a second error correction code according to the first data;

[0017] The verification module is used to verify the first data according to the first error correction code and the second error correction code to obtain a first verification result;

[0018] The processing module is used to process the first data according to the first verification result.

[0019] In a fourth aspect, the present disclosure provides a data processing device, the data processing device comprising a receiving module, a generating module, a verifying module and a processing module, wherein:

[0020] The receiving module is used to receive first data and a third error correction code sent by an electronic device, where the third error correction code is an error correction code generated by the electronic device according to the first data;

[0021] The generating module is used to generate a first error correction code according to the first data;

[0022] The verification module is used to verify the first data according to the first error correction code and the third error correction code to obtain a second verification result;

[0023] The processing module is used to process the first data and the first error correction code according to the second verification result.

[0024] In a fifth aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;

[0025] The memory stores computer-executable instructions;

[0026] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the data processing method as described in the first aspect and various possible aspects of the first aspect.

[0027] In a sixth aspect, an embodiment of the present disclosure provides a storage device, including: a processor and a memory;

[0028] The memory stores computer-executable instructions;

[0029] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the second aspect as well as various data processing methods that may be involved in the second aspect as described above.

[0030] In a seventh aspect, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, any of the above aspects and various data processing methods that may be involved in any of the above aspects are implemented.

[0031] In an eighth aspect, the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above aspects and various data processing methods that may be involved in any of the above aspects.

[0032] The present disclosure provides a data processing method, device and electronic device, wherein the electronic device obtains first data and a first error correction code in a storage device, wherein the first error correction code is an error correction code generated when the storage device stores the first data, the electronic device generates a second error correction code based on the first data, the electronic device verifies the first data based on the first error correction code and the second error correction code to obtain a first verification result, and the electronic device processes the first data based on the first verification result. In the above method, since the first error correction code is an error correction code generated when the storage device stores the first data, and the second error correction code is an error correction code generated when the electronic device obtains the first data from the memory device, the first error correction code and the second error correction code can be used to identify problems that occur during the transmission of the first data and problems that occur during the storage of the first data in the storage device, thereby improving the accuracy of data verification. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0034] Figure 1A schematic diagram of an application scenario provided by an embodiment of the present disclosure;

[0035] Figure 2 A flowchart of a data processing method provided by an embodiment of the present disclosure;

[0036] Figure 3 A schematic diagram of obtaining first data and a first error correction code provided by an embodiment of the present disclosure;

[0037] Figure 4 A schematic diagram of a method for sending first data to a storage device provided in an embodiment of the present disclosure;

[0038] Figure 5A A schematic diagram of sending first data and a third error correction code provided in an embodiment of the present disclosure;

[0039] Figure 5B Another schematic diagram of sending first data and a third error correction code provided by an embodiment of the present disclosure;

[0040] Figure 6 A flowchart of another data processing method provided by an embodiment of the present disclosure;

[0041] Figure 7 A schematic diagram of a method for sending first data provided by an embodiment of the present disclosure;

[0042] Figure 8 A process diagram of a data processing method provided by an embodiment of the present disclosure;

[0043] Fig. 9 A schematic diagram of the structure of a data processing device provided in an embodiment of the present disclosure;

[0044] Fig.10 A structural diagram of another data processing device provided by an embodiment of the present disclosure; and

[0045] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0046] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0047] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0048] To facilitate understanding, the concepts involved in the embodiments of the present disclosure are first described.

[0049] Electronic device: a device with wireless transceiver function. Electronic devices can be deployed on land, including indoors or outdoors, handheld, wearable or vehicle-mounted; they can also be deployed on the water (such as ships, etc.). The electronic device can be a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) electronic device, an augmented reality (AR) electronic device, a wireless terminal in industrial control, a vehicle-mounted electronic device, a wireless terminal in self-driving, a wireless electronic device in remote medical, a wireless electronic device in smart grid, a wireless electronic device in transportation safety, a wireless electronic device in smart city, a wireless electronic device in smart home, a wearable electronic device, etc. The electronic device involved in the embodiments of the present disclosure can also be called a terminal, a user equipment (UE), an access electronic device, a vehicle-mounted terminal, an industrial control terminal, a UE unit, a UE station, a mobile station, a mobile station, a remote station, a remote electronic device, a mobile device, a UE electronic device, a wireless communication device, a UE agent or a UE device, etc. Electronic devices may also be fixed or mobile.

[0050] In the related art, electronic devices can verify the data stored in the memory through the ECC technology to avoid data errors during the storage process. At present, electronic devices can identify data errors caused by memory hardware problems. For example, when the memory generates ECC data corresponding to the data, the ECC data can be stored separately in other storage devices. When the electronic device reads the data, the memory can generate the ECC data corresponding to the data again, and then compare the two ECC data. If the ECC data is different, it means that there is a problem with the data during storage in the memory device, and then the business using the data is stopped. However, by additionally saving ECC data, only the situation where the data is caused by memory hardware failure can be identified, and the situation where the data is wrong during the link transmission process cannot be identified. For example, if the data is wrong during the transmission process, the two ECCs generated by the memory device are also the same, which results in low accuracy of data verification.

[0051] In order to solve the technical problem of low accuracy of data verification in the related art, the embodiment of the present disclosure provides a data processing method, wherein an electronic device obtains first data and a first error correction code in a storage device, wherein the first error correction code is an error correction code generated when the storage device stores the first data, the electronic device generates a second error correction code according to the first data, and the electronic device verifies the first data according to the first error correction code and the second error correction code to obtain a first verification result, if the first verification result is that the first data verification fails, the electronic device performs error correction processing on the first data or generates an interrupt signal corresponding to the first data, if the first verification result is that the first data verification passes, the electronic device performs business processing according to the first data. In this way, if an error occurs in the first data, the electronic device can timely correct the first data or generate an interrupt signal for the first data, thereby improving the reliability of the first data, and since the first error correction code is an error correction code generated when the storage device stores the first data, and the second error correction code is an error correction code generated when the electronic device obtains the first data from the memory device, therefore, the first error correction code and the second error correction code can be used to identify problems in the first data transmission process and problems in the first data storage process in the storage device, thereby improving the accuracy of data verification.

[0052] Next, combine Figure 1 , the application scenarios of the embodiments of the present disclosure are described.

[0053] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present disclosure. Figure 1, including: an electronic device. Among them, the electronic device includes a memory and a system on chip. The memory includes 128 bits of data and a first error correction code, wherein the first error correction code is an error correction code generated according to the 128 bits of data when the memory obtains the 128 bits of data. The system on chip receives the 128 bits of data and the first error correction code sent by the memory, and generates a second error correction code according to the 128 bits of data. The system on chip determines that the 128 bits of data are correct according to the first error correction code and the second error correction code, and the electronic device performs business processing according to the 128 bits of data. In the above method, since the first error correction code is an error correction code generated when the storage device stores the first data, and the second error correction code is an error correction code generated when the electronic device obtains the first data from the memory device, therefore, the first error correction code and the second error correction code can be used to determine that there is no error in the 128 bits of data during storage and transmission, thereby improving the accuracy of data verification and data reliability.

[0054] The technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.

[0055] Figure 2 A flowchart of a data processing method provided by an embodiment of the present disclosure. Figure 2 , the method may include:

[0056] S201: An electronic device obtains first data and a first error correction code from a storage device.

[0057] The execution subject of the embodiment of the present disclosure may be an electronic device, or a data processing device disposed in the electronic device. The data processing device may be implemented by software, or the data processing device may be implemented by a combination of software and hardware.

[0058] Optionally, the electronic device can obtain the first data in the memory of the electronic device through a system on chip (System on Chip, SOC). Optionally, the first data is business data pre-stored in the memory of the electronic device. For example, a user uses an electronic device to log in to a business system and modifies user data in the business system, then the modified user data can be the first data, and the electronic device can store the modified user data in the memory. For example, the memory device can be a 5th generation low power double data rate memory (Low Power Double Data Rate SDRAM 5, LPDDR5). Optionally, the storage device can be a storage device inside the electronic device, or it can be a storage device outside the electronic device, which is not limited in the embodiments of the present disclosure.

[0059] Optionally, the first error correction code is used to correct errors in the first data. For example, the first error correction code may be ECC data corresponding to the first data, and the electronic device may determine whether the first data is erroneous through the ECC data. Optionally, the first error correction code is an error correction code generated when the storage device stores the first data. For example, when the SOC stores the first data in the memory, if the memory receives the first data, the memory generates ECC data corresponding to the first data based on the first data, and stores the first data and the ECC data corresponding to the first data.

[0060] Optionally, when the electronic device receives a data acquisition request corresponding to the first data, the electronic device can acquire the first data and the first error correction code from the storage device. For example, the data acquisition request may include an identifier of the data to be acquired. When the electronic device receives the data acquisition request, the electronic device can determine the data that the SOC needs to read according to the identifier of the data to be acquired. When the SOC reads the data from the memory, the memory can send the data and the ECC data corresponding to the data to the SOC in the electronic device.

[0061] Next, combine Figure 3 , a process of an electronic device obtaining first data and a first error correction code in a storage device is described.

[0062] Figure 3 A schematic diagram of obtaining first data and a first error correction code provided by an embodiment of the present disclosure. Figure 3 , including an electronic device. The electronic device includes a system on chip SOC and a memory. When the electronic device receives a request to obtain first data, the system on chip SOC can send a request message for the first data to the memory, and the memory sends the first data and a first error correction code corresponding to the first data to the SOC according to the request message for the first data.

[0063] S202: The electronic device generates a second error correction code according to the first data.

[0064] Optionally, the second error correction code is used to correct errors in the first data. For example, the second error correction code may be ECC data corresponding to the first data, and the electronic device may determine whether the first data is erroneous through the ECC data. Optionally, the second error correction code is an error correction code generated by the electronic device based on the first data after the electronic device obtains the first data from the storage device. For example, the memory may send the first data and the first error correction code corresponding to the first data generated when the memory stores the first data to the electronic device, and when the electronic device receives the first data and the first error correction code sent by the memory, the second error correction code is generated based on the first data.

[0065] S203: The electronic device verifies the first data according to the first error correction code and the second error correction code to obtain a first verification result.

[0066] Optionally, the first verification result is used to indicate whether the first data obtained by the electronic device from the memory device is erroneous. For example, if the first verification result is that the first data verification is passed, it means that there is no error in the first data during storage and / or transmission; if the first verification result is that the first data verification is not passed, it means that there is an error in the first data during storage and / or transmission.

[0067] Optionally, the first data may be verified according to the following feasible implementation method to obtain a first verification result: the electronic device obtains a first matching degree between the first error correction code and the second error correction code. Optionally, the first matching degree is used to indicate the similarity between the first error correction code and the second error correction code. For example, the bit width of the first error correction code and the second error correction code may be 8 bits, and the first matching degree of the first error correction code and the second error correction code is obtained by performing a bitwise exclusive OR operation on the first error correction code and the second error correction code.

[0068] The electronic device obtains a first verification result based on the first matching degree. Optionally, if the first matching degree is greater than or equal to the first threshold value, the electronic device determines that the first verification result is that the first data verification is passed. For example, if the data of each bit of the first error correction code and the second error correction code are the same, the electronic device determines that the first verification result between the first error correction code and the second error correction code is that the first data verification is passed. For example, if the first error correction code and the second error correction code are the same, it means that there is no error in the first data during storage or transmission, and the electronic device can use the first data for business processing.

[0069] Optionally, if the first matching degree is less than the first threshold, the electronic device determines that the first verification result is that the first data verification fails. For example, if after the bitwise XOR operation of the first error correction code and the second error correction code, the operation result is flipped by 1 bit compared with the preset result (the bitwise XOR operation result when the first error correction code and the second error correction code are exactly the same), it is determined that the first matching degree is less than the first threshold, and the electronic device determines that the first verification result between the first error correction code and the second error correction code is that the first data verification fails. In this way, the electronic device can accurately determine whether the first data is wrong through the first error correction code and the second error correction code, thereby improving the reliability of the data.

[0070] S204: The electronic device processes the first data according to the first verification result.

[0071] Optionally, the electronic device processes the first data according to the first verification result, and there are two situations as follows:

[0072] Case 1: The first verification result is that the first data verification passes.

[0073] Optionally, if the first verification result is that the first data verification is passed, the electronic device performs business processing according to the first data. For example, when the electronic device receives a page display request, the electronic device can obtain page data corresponding to the page in the memory. If the first verification result is that the page data verification is passed, it means that there is no error in the page data during storage or transmission, and the electronic device can display the corresponding page according to the page data.

[0074] Case 2: The first verification result is that the first data verification fails.

[0075] Optionally, if the first verification result is that the first data verification fails, the electronic device performs error correction processing on the first data or generates an interrupt signal corresponding to the first data. Optionally, the interrupt signal is used to instruct the electronic device to stop using the first data. For example, when a page display request is received in an electronic device, the electronic device can obtain the page data corresponding to the page in the memory. If the first verification result is that the page data verification fails, it means that the page data is wrong during the storage or transmission process. If the electronic device can correct the page data, the electronic device displays the corresponding page according to the page data after error correction. If the electronic device cannot correct the page data, the electronic device generates an interrupt signal corresponding to the page data, and stops displaying the page corresponding to the page data through the interrupt signal.

[0076] Optionally, the first data may be error corrected according to the following feasible implementation method: the bit width of the data that is different between the first error correction code and the second error correction code is obtained, and when the bit width is less than or equal to a preset threshold, the first data is error corrected. For example, if there is a 1-bit difference in data between the first error correction code and the second error correction code, the electronic device may perform error correction on the first data (e.g., the first error correction code and the second error correction code are both ECC data, and the electronic device may determine the location of the error in the first data through the parity check bit in the ECC data, and then correct the first data).

[0077] Optionally, an interrupt signal corresponding to the first data may be generated according to the following feasible implementation method: the bit width of the data that is different between the first error correction code and the second error correction code is obtained, and when the bit width is greater than a preset threshold, an interrupt signal corresponding to the first data is generated. For example, if there is a 2-bit difference in data between the first error correction code and the second error correction code, the electronic device cannot perform error correction processing on the first data, and the electronic device may generate an interrupt signal (an interrupt signal may be generated for the SOC or an interrupt signal may be generated for the memory) to stop using the first data.

[0078] The disclosed embodiment provides a data processing method, wherein an electronic device obtains first data and a first error correction code from a storage device, generates a second error correction code based on the first data, verifies the first data based on the first error correction code and the second error correction code, and obtains a first verification result. If the first verification result is that the first data verification fails, the electronic device performs error correction processing on the first data or generates an interrupt signal corresponding to the first data. If the first verification result is that the first data verification passes, the electronic device performs service processing based on the first data. In this way, the electronic device can accurately determine whether the first data is wrong through the first error correction code and the second error correction code, and can correct the first data when the first data is wrong, thereby improving the reliability of the first data. Moreover, since the first error correction code is an error correction code generated when the storage device stores the first data, and the second error correction code is an error correction code generated when the electronic device obtains the first data from the memory device, the first error correction code and the second error correction code can be used to identify problems that occur during the transmission of the first data and problems that occur during the storage of the first data in the storage device, thereby improving the accuracy of data verification.

[0079] exist Figure 2 Based on the embodiment shown in the figure, before the electronic device obtains the first data and the first error correction code in the storage device, the electronic device may also send the first data to the storage device. Figure 4 , a process of sending first data from an electronic device to a memory device is described.

[0080] Figure 4 A schematic diagram of a method for sending first data to a storage device provided by an embodiment of the present disclosure. Figure 4 The method flow includes:

[0081] S401: An electronic device obtains first data, and generates a third error correction code according to the first data.

[0082] Optionally, the third error correction code is used to correct errors in the first data. For example, the third error correction code may be ECC data corresponding to the first data, and the electronic device may determine whether the first data is erroneous through the ECC data. Optionally, the third error correction code is an error correction code generated when the electronic device obtains the first data. For example, when the electronic device needs to write data, the electronic device may obtain the third error correction code of the data.

[0083] S402: The electronic device sends the first data and the third error correction code to the storage device, so that the storage device verifies the first data according to the third error correction code.

[0084] Optionally, the first data and the third error correction code may be sent to the storage device in the following feasible implementation manner: the electronic device obtains the first clock cycle required for the electronic device to send the first data to the storage device. For example, it takes 16 clock cycles for the electronic device to send the first data to the storage device. The electronic device obtains the second clock cycle required for the electronic device to send the third error correction code to the storage device. For example, if it takes 16 clock cycles for the electronic device to send the first data to the storage device, and it takes another 1 clock cycle to send the ECC data to the storage device, then the first clock cycle is 16 clock cycles, and the second clock cycle is 1 clock cycle.

[0085] The electronic device determines the sum of the first clock cycle and the second clock cycle as the transmission cycle for the electronic device to send data to the storage device once. For example, when the SOC reads data from the memory or writes data to the memory, the cycle required to send data once is the transmission cycle. For example, if the first clock cycle is 16 clock cycles and the second clock cycle is 1 clock cycle, the transmission cycle for the electronic device to send data to the storage device once is 17 clock cycles, that is, the minimum granularity of the electronic device to transmit to the memory device is the data sent in 17 clock cycles. In this way, the waste of bandwidth can be avoided (for example, if the first data occupies a transmission cycle, an ECC data needs to be sent in the next transmission cycle. Since the ECC data is small, the data sent in other clock cycles in the transmission cycle is empty, resulting in a waste of bandwidth). The electronic device can send the first data and the third error correction code to the memory device in one transmission cycle, thereby improving the efficiency of data transmission and the flexibility of data transmission.

[0086] Optionally, ecc data can be sent by adding ecc signal lines. For example, if the minimum granularity of a read or write operation performed by the SOC in the memory is 16 beats of business data, then there are 8 signal lines for data transmission, and an additional data transmission signal line can be added to send ecc data. Therefore, through 9 data transmission signal lines, the first data and the third error correction code can be sent in one transmission process (8 signal lines send the first data, and 1 signal line sends the third error correction code).

[0087] Next, combine Figure 5A-Figure 5B , the process of sending the first data and the third error correction code is explained.

[0088] Figure 5A A schematic diagram of sending first data and a third error correction code provided by an embodiment of the present disclosure. Figure 5A, including 17 clock cycles. Among them, the minimum granularity of each data transmission by the electronic device and the memory is 17 clock cycles. Clock cycle 1, clock cycle 2, ..., clock cycle 16 are used to send the first data, and clock cycle 17 is used to send the third error correction code. In this way, the first data and the third error correction code can be sent in a minimum granularity, thereby saving bandwidth and improving the efficiency of data transmission.

[0089] Figure 5B Another schematic diagram of sending first data and third error correction code provided by the embodiment of the present disclosure. Figure 5B , including 9 signal lines. Among them, the electronic device and the memory transmit data at a minimum granularity of 9 signal lines each time. Signal line 1, signal line 2, ..., signal line 8 are used to send 16 beats of the first data, and signal line 9 is used to send 8 beats of the third error correction code. In this way, the first data and the third error correction code can be sent in a minimum granularity, thereby saving bandwidth and improving the efficiency of data transmission.

[0090] Optionally, when the storage device receives the first data and the third error correction code, the first data can be verified by the third error correction code. For example, when the storage device receives the first data and the ECC data corresponding to the first data, the ECC data can be used to verify whether the first data is erroneous during the transmission process, thereby improving the reliability of the first data.

[0091] The disclosed embodiment provides a method for sending first data to a storage device, wherein the electronic device obtains the first data and generates a third error correction code according to the first data, the electronic device obtains a first clock cycle required for the electronic device to send the first data to the storage device, and a second clock cycle required for the electronic device to send the third error correction code to the storage device, the electronic device determines the sum of the first clock cycle and the second clock cycle as a sending cycle for the electronic device to send data to the storage device once, and sends the first data and the third error correction code to the storage device through the sending cycle. In this way, the electronic device can send the first data and the third error correction code to the memory device in one data sending cycle, thereby avoiding bandwidth waste and improving the efficiency and flexibility of data sending.

[0092] Based on any of the above embodiments, the present disclosure also includes another data processing method. Figure 6 , the process of another data processing method is explained.

[0093] Figure 6 A flowchart of another data processing method provided by an embodiment of the present disclosure. Figure 6 The method flow includes:

[0094] S601: A storage device receives first data and a third error correction code sent by an electronic device.

[0095] Optionally, the storage device may receive the first data and the third error correction code sent by the electronic device, wherein the third error correction code is an error correction code generated by the electronic device based on the first data. For example, when the electronic device obtains the first data, it generates ECC data based on the first data and sends the first data and the ECC data to the storage device.

[0096] S602: The storage device generates a first error correction code according to the first data.

[0097] Optionally, when the storage device receives the first data and the third error correction code sent by the electronic device, the storage device may generate the first error correction code according to the first data. For example, when the storage device receives the first data sent by the electronic device and the ECC data corresponding to the first data, it may generate new ECC data according to the first data, and verify the first data according to the ECC data generated by the electronic device and the ECC data generated by the storage device.

[0098] S603: The storage device verifies the first data according to the first error correction code and the third error correction code to obtain a second verification result.

[0099] Optionally, the second verification result is used to indicate whether the first data received by the memory device is erroneous. For example, if the second verification result is that the first data is verified successfully, it means that there is no error in the first data during transmission; if the second verification result is that the first data is not verified successfully, it means that there is an error in the first data during transmission.

[0100] Optionally, the first data may be verified according to the following feasible implementation method to obtain a first verification result: the storage device obtains a second matching degree between the first error correction code and the third error correction code. Optionally, the second matching degree is used to indicate the similarity between the first error correction code and the third error correction code. For example, the bit width of the first error correction code and the third error correction code may be 8 bits, and the second matching degree of the first error correction code and the third error correction code is obtained by comparing each bit of the first error correction code and the third error correction code. For example, the second matching degree may be determined by a bitwise XOR operation between the first error correction code and the third error correction code.

[0101] The storage device obtains a second verification result based on the second matching degree. Optionally, if the second matching degree is greater than or equal to the second threshold value, the storage device determines that the second verification result is that the first data verification is passed. For example, if the data of each bit of the first error correction code and the third error correction code are the same, the storage device determines that the second verification result between the first error correction code and the third error correction code is that the first data verification is passed. For example, if the first error correction code and the third error correction code are the same, it means that there is no error in the first data during the transmission process, and the storage device can store the first data.

[0102] Optionally, if the second matching degree is less than the second threshold, the storage device determines that the second verification result is that the first data verification fails. For example, if there is one bit of data difference between the first error correction code and the third error correction code, the electronic device determines that the second verification result between the first error correction code and the third error correction code is that the first data verification fails. For example, if there are multiple bits of data difference between the first error correction code and the third error correction code, it means that the first data is wrong during the transmission process, and the storage device can perform error correction processing on the first data.

[0103] S604: The storage device processes the first data and the first error correction code according to the second verification result.

[0104] Optionally, the storage device processes the first data according to the second verification result, and there are two situations as follows:

[0105] Case 1: The second verification result is that the first data verification passed.

[0106] Optionally, if the second verification result is that the first data verification is passed, the storage device stores the first data and the first error correction code. For example, when the storage device receives the page data sent by the electronic device and the third error correction code corresponding to the page data, the first error correction code corresponding to the page data can be generated, and the page data can be verified by the first error correction code and the third error correction code. If the verification result is that the page data verification is passed, it means that the electronic device has no error in the process of sending the page data. Therefore, the memory data can store the page data and the first error correction code corresponding to the page data.

[0107] Case 2: The second verification result is that the first data verification fails.

[0108] Optionally, if the second verification result is that the first data verification fails, the storage device performs error correction processing on the first data or generates an interrupt signal corresponding to the first data. Optionally, the interrupt signal is used to instruct the electronic device to stop using the first data. For example, if the second verification result is that the first data verification fails, it means that an error occurs in the process of the electronic device sending the first data to the storage device. If the storage device can correct the page data, the storage device corrects the first data and stores the first data after error correction and the error correction code generated based on the first data after error correction. If the storage device cannot correct the first data, the storage device generates an interrupt signal corresponding to the first data to cause the electronic device to stop the service corresponding to the first data.

[0109] Optionally, the first data may be error corrected according to the following feasible implementation method: the bit width of the data that is different between the first error correction code and the third error correction code is obtained, and when the bit width is less than or equal to a preset threshold, the first data is error corrected. For example, if there is a 1-bit difference in data between the first error correction code and the third error correction code, the storage device may perform error correction on the first data (e.g., the first error correction code and the third error correction code are both ECC data, and the storage device may determine the location of the error in the first data through the parity bit in the ECC data, and then correct the first data).

[0110] Optionally, an interrupt signal corresponding to the first data may be generated according to the following feasible implementation method: obtaining the bit width of the data that is different between the first error correction code and the third error correction code, and generating an interrupt signal corresponding to the first data when the bit width is greater than a preset threshold. For example, if there is a 2-bit difference in data between the first error correction code and the third error correction code, the storage device cannot perform error correction processing on the first data, and the storage device may generate an interrupt signal to stop the electronic device from using the service of the first data.

[0111] The disclosed embodiment provides a data processing method, wherein a storage device receives first data and a third error correction code sent by an electronic device, the storage device generates a first error correction code based on the first data, and verifies the first data based on the first error correction code and the third error correction code to obtain a second verification result, and the storage device processes the first data and the first error correction code based on the second verification result. In this way, since the first error correction code is obtained by the storage device receiving the first data sent by the electronic device, the error of the first data during the transmission process can be found through the first error correction code and the third error correction code, and when the electronic device obtains the first data and the first error correction code from the storage device, since the first error correction code is the error correction code generated before the storage device stores the first data, the error of the first data during the storage process can be found through the first error correction code, thereby improving the accuracy of data verification.

[0112] exist Figure 2 Based on the embodiment shown in FIG. 1 , after the storage device stores the first data and the first error correction code according to the second verification result, the storage device may also send the first data to the electronic device. Figure 7 , a process of a storage device sending first data to an electronic device is described.

[0113] Figure 7 A schematic diagram of a method for sending first data provided by an embodiment of the present disclosure. Figure 7 The method flow includes:

[0114] S701: A storage device receives a data read request for first data sent by an electronic device.

[0115] Optionally, when the electronic device reads the first data, it can send a data read request to the memory device, wherein the data read request may include an identifier of the first data. The memory device can determine the data to be obtained through the identifier of the first data and send the data to the electronic device.

[0116] S702: In response to a data read request, the storage device sends first data and a first error correction code to the electronic device, so that the electronic device verifies the first data according to the first error correction code.

[0117] Optionally, the storage device can obtain the stored first data and the first error correction code corresponding to the first data through the identifier of the first data in the data read request. After the electronic device receives the first data and the first error correction code, it can verify the first data through the first error correction code.

[0118] Optionally, before the storage device sends the first data and the first error correction code to the electronic device, the storage device can generate a fourth error correction code from the first data, and verify the first data through the fourth error correction code and the first error correction code, and then determine whether the first data is erroneous during the storage process through the verification result. For example, before the storage device sends the first data to the electronic device, the storage device can generate a fourth error correction code based on the first data. Since the first error correction code is an error correction code generated before the storage device stores the first data, whether the first data is erroneous during the storage process can be determined through the degree of matching between the first error correction code and the fourth error correction code.

[0119] Optionally, if the first error correction code is the same as the fourth error correction code, it means that the first data is not wrong during the storage process of the storage device; if the first error correction code is different from the fourth error correction code, it means that the first data is wrong during the storage process. When the first data is not wrong, the memory device sends the first data and the first error correction code corresponding to the first data to the electronic device. For example, if the first data is wrong during the storage process, the memory device can correct the first data or generate an interrupt signal; if the first data is not wrong during the storage process, the memory device can send the first data and the first error correction code to the electronic device; the electronic device generates the second error correction code through the first data, and verifies the first data through the first data and the second error correction code; if the first data is not wrong, the electronic device processes the business corresponding to the first data; if the first data is wrong, it means that the first data is wrong during the sending process. In this way, when the first data is wrong, the electronic device can accurately determine the fault location, thereby improving the efficiency of fault repair.

[0120] The disclosed embodiment provides a method for a storage device to send first data to an electronic device, wherein the storage device receives a data read request for the first data sent by the electronic device, and in response to the data read request, the storage device sends the first data and a first error correction code to the electronic device, so that the electronic device verifies the first data according to the first error correction code. In this way, when the electronic device obtains the first data and the first error correction code from the storage device, since the first error correction code is an error correction code generated before the storage device stores the first data, the first error correction code can be used to find out the error of the first data during the storage process and the error during the sending process, thereby improving the accuracy of data verification.

[0121] Based on any of the above embodiments, Figure 8 , the process of the above data processing method is explained.

[0122] Figure 8 A process diagram of a data processing method provided by an embodiment of the present disclosure. Figure 8 , including: a system on chip and a memory. Optionally, the system on chip and the memory are both devices in an electronic device. After the system on chip obtains the first data, it generates a third error correction code according to the first data, and sends the first data and the third error correction code to the memory. When the memory receives the first data and the first error correction code sent by the system on chip, it generates the first error correction code according to the first data, and verifies the first data by using the first error correction code and the third error correction code. When the first data passes the verification, the memory can store the first error correction code and the first data.

[0123] See also Figure 8 When the electronic device needs to use the first data, the system on chip can send a request message for the first data to the memory. When the memory receives the request message for the first data, it can send the first data and the first error correction code corresponding to the first data to the system on chip. After the system on chip receives the first data and the first error correction code, it can generate a second error correction code according to the first data, and verify the first data again through the first error correction code and the second error correction code. When the first data is verified, the electronic device can perform business processing according to the first data. Optionally, during the verification process of the first data by the memory and the system on chip, if the verification fails, the memory and the system on chip can correct the first data, or generate an interrupt signal for the first data, so as to improve the reliability of the data. In this way, since the first error correction code is the error correction code generated when the storage device stores the first data, and the second error correction code is the error correction code generated when the electronic device obtains the first data from the memory device, the first error correction code and the second error correction code can be used to identify problems in the transmission process of the first data and problems in the storage process of the first data in the storage device, thereby improving the accuracy of data verification.

[0124] Fig. 9A schematic diagram of the structure of a data processing device provided by an embodiment of the present disclosure. Fig. 9 The data processing device 90 includes an acquisition module 91, a generation module 92, a verification module 93 and a processing module 94, wherein:

[0125] The acquisition module 91 is used to acquire first data and a first error correction code in a storage device, where the first error correction code is an error correction code generated when the storage device stores the first data;

[0126] The generating module 92 is used to generate a second error correction code according to the first data;

[0127] The verification module 93 is used to verify the first data according to the first error correction code and the second error correction code to obtain a first verification result;

[0128] The processing module 94 is used to process the first data according to the first verification result.

[0129] In a possible implementation manner, the processing module 94 is specifically configured to:

[0130] If the first verification result is that the first data verification is passed, the electronic device performs business processing according to the first data;

[0131] If the first verification result is that the first data verification fails, the electronic device performs error correction processing on the first data or generates an interrupt signal corresponding to the first data, and the interrupt signal is used to instruct the electronic device to stop using the first data.

[0132] In a possible implementation, the verification module 93 is specifically used to:

[0133] The electronic device obtains a first matching degree between the first error correction code and the second error correction code;

[0134] The electronic device obtains the first verification result according to the first matching degree.

[0135] In a possible implementation, the verification module 93 is specifically used to:

[0136] If the first matching degree is greater than or equal to a first threshold, the electronic device determines that the first verification result is that the first data verification is passed;

[0137] If the first matching degree is less than the first threshold, the electronic device determines that the first verification result is that the first data verification fails.

[0138] In a possible implementation manner, the acquisition module 91 is further configured to:

[0139] The electronic device acquires the first data, and generates a third error correction code according to the first data;

[0140] The electronic device sends the first data and the third error correction code to the storage device, so that the storage device verifies the first data according to the third error correction code.

[0141] In a possible implementation manner, the acquisition module 91 is specifically configured to:

[0142] The electronic device obtains a first clock cycle required for the electronic device to send the first data to the storage device;

[0143] The electronic device obtains a second clock cycle required for the electronic device to send the third error correction code to the storage device;

[0144] The electronic device determines the sum of the first clock cycle and the second clock cycle as a sending cycle for the electronic device to send data once to the storage device;

[0145] The first data and the third error correction code are sent to the storage device through the sending cycle.

[0146] The data processing device provided in the embodiment of the present disclosure may be used to execute the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, which will not be described in detail in this embodiment.

[0147] Fig.10 This is a schematic diagram of the structure of another data processing device provided by an embodiment of the present disclosure. Fig.10 The data processing device 100 includes a receiving module 101, a generating module 102, a verifying module 103 and a processing module 104, wherein:

[0148] The receiving module 101 is used to receive first data and a third error correction code sent by an electronic device, where the third error correction code is an error correction code generated by the electronic device according to the first data;

[0149] The generating module 102 is used to generate a first error correction code according to the first data;

[0150] The verification module 103 is used to verify the first data according to the first error correction code and the third error correction code to obtain a second verification result;

[0151] The processing module 104 is configured to process the first data and the first error correction code according to the second verification result.

[0152] In a possible implementation manner, the processing module 104 is specifically configured to:

[0153] If the second verification result is that the first data verification is passed, the storage device stores the first data and the first error correction code;

[0154] If the second verification result is that the first data verification fails, the storage device performs error correction processing on the first data or generates an interrupt signal corresponding to the first data.

[0155] In a possible implementation, the verification module 103 is specifically used to:

[0156] The storage device obtains a second matching degree between the first error correction code and the third error correction code;

[0157] The storage device obtains the second verification result according to the second matching degree.

[0158] In a possible implementation, the verification module 103 is specifically used to:

[0159] If the second matching degree is greater than or equal to a second threshold, the storage device determines that the second verification result is that the first data verification is passed;

[0160] If the second matching degree is less than the second threshold, the storage device determines that the second verification result is that the first data verification fails.

[0161] In a possible implementation manner, the receiving module 101 is further configured to:

[0162] The storage device receives a data read request for the first data sent by the electronic device;

[0163] In response to the data read request, the storage device sends the first data and the first error correction code to the electronic device, so that the electronic device verifies the first data according to the first error correction code.

[0164] The data processing device provided in the embodiment of the present disclosure may be used to execute the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, which will not be described in detail in this embodiment.

[0165] Fig.11 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Fig.11, which shows a schematic diagram of the structure of an electronic device 1100 suitable for implementing the embodiment of the present disclosure, and the electronic device 1100 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.11 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0166] like Fig.11 As shown, the electronic device 1100 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage device 1108 to a random access memory (RAM) 1103. Various programs and data required for the operation of the electronic device 1100 are also stored in the RAM 1103. The processing device 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.

[0167] Typically, the following devices may be connected to the I / O interface 1105: input devices 1106 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 1107 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1108 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1109. The communication devices 1109 may allow the electronic device 1100 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.11 The electronic device 1100 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0168] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1109, or installed from the storage device 1108, or installed from the ROM 1102. When the computer program is executed by the processing device 1101, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0169] The present disclosure provides a storage device, which may include: a transceiver, a memory, and a processor. The transceiver may include: a transmitter and / or a receiver. The transmitter may also be referred to as a transmitter, a transmitter, a transmission port, a transmission interface, or similar descriptions, and the receiver may also be referred to as a receiver, a receiver, a reception port, a reception interface, or similar descriptions. Exemplarily, the transceiver, the memory, and the processor are interconnected via a bus.

[0170] The memory is used to store program instructions;

[0171] The processor is used to execute the program instructions stored in the memory, so as to enable the storage device to execute any of the above-mentioned data processing methods.

[0172] The transceiver is used to perform the transceiver function of the storage device in the above data processing method.

[0173] An embodiment of the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the computer-executable instructions are used to implement the above-mentioned data processing method.

[0174] The embodiments of the present disclosure may also provide a computer program product, which may be executed by a processor. When the computer program product is executed, the data processing method executed by any of the above-mentioned terminal devices may be implemented.

[0175] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0176] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0177] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0178] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0179] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0180] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0181] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0182] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0183] In a first aspect, one or more embodiments of the present disclosure provide a data processing method, the method comprising:

[0184] The electronic device obtains first data and a first error correction code from a storage device, where the first error correction code is an error correction code generated when the storage device stores the first data;

[0185] The electronic device generates a second error correction code according to the first data;

[0186] The electronic device verifies the first data according to the first error correction code and the second error correction code to obtain a first verification result;

[0187] The electronic device processes the first data according to the first verification result.

[0188] According to one or more embodiments of the present disclosure, the electronic device processes the first data according to the first verification result, including:

[0189] If the first verification result is that the first data verification is passed, the electronic device performs data processing based on the first data;

[0190] If the first verification result is that the first data verification fails, the electronic device performs error correction processing on the first data or generates an interrupt signal corresponding to the first data, and the interrupt signal is used to instruct the electronic device to stop using the first data.

[0191] According to one or more embodiments of the present disclosure, the electronic device verifies the first data according to the first error correction code and the second error correction code to obtain a first verification result, including:

[0192] The electronic device obtains a first matching degree between the first error correction code and the second error correction code;

[0193] The electronic device obtains the first verification result according to the first matching degree.

[0194] According to one or more embodiments of the present disclosure, the electronic device obtains the first verification result according to the first matching degree, including:

[0195] If the first matching degree is greater than or equal to a first threshold, the electronic device determines that the first verification result is that the first data verification is passed;

[0196] If the first matching degree is less than the first threshold, the electronic device determines that the first verification result is that the first data verification fails.

[0197] According to one or more embodiments of the present disclosure, before the electronic device obtains the first data and the first error correction code from the storage device, the method further includes:

[0198] The electronic device acquires the first data, and generates a third error correction code according to the first data;

[0199] The electronic device sends the first data and the third error correction code to the storage device, so that the storage device verifies the first data according to the third error correction code.

[0200] According to one or more embodiments of the present disclosure, the electronic device sends the first data and the third error correction code to the storage device, including:

[0201] The electronic device obtains a first clock cycle required for the electronic device to send the first data to the storage device;

[0202] The electronic device obtains a second clock cycle required for the electronic device to send the third error correction code to the storage device;

[0203] The electronic device determines the sum of the first clock cycle and the second clock cycle as a sending cycle for the electronic device to send data once to the storage device;

[0204] The first data and the third error correction code are sent to the storage device based on the sending cycle.

[0205] In a second aspect, one or more embodiments of the present disclosure provide a data processing method, the method comprising:

[0206] The storage device receives first data and a third error correction code sent by an electronic device, where the third error correction code is an error correction code generated by the electronic device according to the first data;

[0207] The storage device generates a first error correction code according to the first data, and verifies the first data according to the first error correction code and the third error correction code to obtain a second verification result;

[0208] The storage device processes the first data and the first error correction code according to the second verification result.

[0209] According to one or more embodiments of the present disclosure, the storage device processes the first data and the first error correction code according to the second verification result, including:

[0210] If the second verification result is that the first data verification is passed, the storage device stores the first data and the first error correction code;

[0211] If the second verification result is that the first data verification fails, the storage device performs error correction processing on the first data or generates an interrupt signal corresponding to the first data.

[0212] According to one or more embodiments of the present disclosure, verifying the first data according to the first error correction code and the third error correction code to obtain a second verification result includes:

[0213] The storage device obtains a second matching degree between the first error correction code and the third error correction code;

[0214] The storage device obtains the second verification result according to the second matching degree.

[0215] According to one or more embodiments of the present disclosure, the storage device obtains the second verification result according to the second matching degree, including:

[0216] If the second matching degree is greater than or equal to a second threshold, the storage device determines that the second verification result is that the first data verification is passed;

[0217] If the second matching degree is less than the second threshold, the storage device determines that the second verification result is that the first data verification fails.

[0218] According to one or more embodiments of the present disclosure, after the storage device performs storage processing on the first data and the first error correction code according to the second verification result, the method further includes:

[0219] The storage device receives a data read request for the first data sent by the electronic device;

[0220] In response to the data read request, the storage device sends the first data and the first error correction code to the electronic device, so that the electronic device verifies the first data according to the first error correction code.

[0221] In a third aspect, one or more embodiments of the present disclosure provide a data processing device, the data processing device comprising an acquisition module, a generation module, a verification module and a processing module, wherein:

[0222] The acquisition module is used to acquire first data and a first error correction code in a storage device, where the first error correction code is an error correction code generated when the storage device stores the first data;

[0223] The generating module is used to generate a second error correction code according to the first data;

[0224] The verification module is used to verify the first data according to the first error correction code and the second error correction code to obtain a first verification result;

[0225] The processing module is used to process the first data according to the first verification result.

[0226] According to one or more embodiments of the present disclosure, the processing module is specifically used for:

[0227] If the first verification result is that the first data verification is passed, the electronic device performs business processing according to the first data;

[0228] If the first verification result is that the first data verification fails, the electronic device performs error correction processing on the first data or generates an interrupt signal corresponding to the first data, and the interrupt signal is used to instruct the electronic device to stop using the first data.

[0229] According to one or more embodiments of the present disclosure, the verification module is specifically used to:

[0230] The electronic device obtains a first matching degree between the first error correction code and the second error correction code;

[0231] The electronic device obtains the first verification result according to the first matching degree.

[0232] According to one or more embodiments of the present disclosure, the verification module is specifically used to:

[0233] If the first matching degree is greater than or equal to a first threshold, the electronic device determines that the first verification result is that the first data verification is passed;

[0234] If the first matching degree is less than the first threshold, the electronic device determines that the first verification result is that the first data verification fails.

[0235] According to one or more embodiments of the present disclosure, the acquisition module is further used to:

[0236] The electronic device acquires the first data, and generates a third error correction code according to the first data;

[0237] The electronic device sends the first data and the third error correction code to the storage device, so that the storage device verifies the first data according to the third error correction code.

[0238] According to one or more embodiments of the present disclosure, the acquisition module is specifically used to:

[0239] The electronic device obtains a first clock cycle required for the electronic device to send the first data to the storage device;

[0240] The electronic device obtains a second clock cycle required for the electronic device to send the third error correction code to the storage device;

[0241] The electronic device determines the sum of the first clock cycle and the second clock cycle as a sending cycle for the electronic device to send data once to the storage device;

[0242] The first data and the third error correction code are sent to the storage device through the sending cycle.

[0243] In a fourth aspect, one or more embodiments of the present disclosure provide a data processing device, the data processing device comprising a receiving module, a generating module, a verifying module and a processing module, wherein:

[0244] The receiving module is used to receive first data and a third error correction code sent by an electronic device, where the third error correction code is an error correction code generated by the electronic device according to the first data;

[0245] The generating module is used to generate a first error correction code according to the first data;

[0246] The verification module is used to verify the first data according to the first error correction code and the third error correction code to obtain a second verification result;

[0247] The processing module is used to process the first data and the first error correction code according to the second verification result.

[0248] According to one or more embodiments of the present disclosure, the processing module is specifically used for:

[0249] If the second verification result is that the first data verification is passed, the storage device stores the first data and the first error correction code;

[0250] If the second verification result is that the first data verification fails, the storage device performs error correction processing on the first data or generates an interrupt signal corresponding to the first data.

[0251] According to one or more embodiments of the present disclosure, the verification module is specifically used to:

[0252] The storage device obtains a second matching degree between the first error correction code and the third error correction code;

[0253] The storage device obtains the second verification result according to the second matching degree.

[0254] According to one or more embodiments of the present disclosure, the verification module is specifically used to:

[0255] If the second matching degree is greater than or equal to a second threshold, the storage device determines that the second verification result is that the first data verification is passed;

[0256] If the second matching degree is less than the second threshold, the storage device determines that the second verification result is that the first data verification fails.

[0257] According to one or more embodiments of the present disclosure, the receiving module is further used for:

[0258] The storage device receives a data read request for the first data sent by the electronic device;

[0259] In response to the data read request, the storage device sends the first data and the first error correction code to the electronic device, so that the electronic device verifies the first data according to the first error correction code.

[0260] In a fifth aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;

[0261] The memory stores computer-executable instructions;

[0262] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the data processing method as described in the first aspect and various possible aspects of the first aspect.

[0263] In a sixth aspect, an embodiment of the present disclosure provides a storage device, including: a processor and a memory;

[0264] The memory stores computer-executable instructions;

[0265] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the second aspect as well as various data processing methods that may be involved in the second aspect as described above.

[0266] In the seventh aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the image processing method as described in any one of the above aspects and any various possible aspects is implemented.

[0267] In an eighth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above aspects and any of the various image processing methods that may be involved.

[0268] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0269] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0270] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A data processing method, characterized in that: include: The electronic device determines a transmission cycle for sending data to the storage device once; The electronic device sends the first data and a third error correction code to the storage device based on the sending cycle, where the third error correction code is an error correction code generated by the electronic device according to the first data; The electronic device obtains first data and a first error correction code from the storage device, where the first error correction code is an error correction code generated by the storage device according to the first data sent by the electronic device, and a second matching degree between the first error correction code and the third error correction code is greater than or equal to a second threshold; The electronic device generates a second error correction code according to the first data; The electronic device verifies the first data according to the first error correction code and the second error correction code to obtain a first verification result; The electronic device processes the first data according to the first verification result.

2. The method according to claim 1, characterized in that The electronic device processes the first data according to the first verification result, including: If the first verification result is that the first data verification is passed, the electronic device performs data processing based on the first data; If the first verification result is that the first data verification fails, the electronic device performs error correction processing on the first data or generates an interrupt signal corresponding to the first data, and the interrupt signal is used to instruct the electronic device to stop using the first data.

3. The method according to claim 1, characterized in that The electronic device verifies the first data according to the first error correction code and the second error correction code to obtain a first verification result, including: The electronic device obtains a first matching degree between the first error correction code and the second error correction code; The electronic device obtains the first verification result according to the first matching degree.

4. The method according to claim 3, characterized in that The electronic device obtains the first verification result according to the first matching degree, including: If the first matching degree is greater than or equal to a first threshold, the electronic device determines that the first verification result is that the first data verification is passed; If the first matching degree is less than the first threshold, the electronic device determines that the first verification result is that the first data verification fails.

5. The method according to any one of claims 1 to 4, characterized in that: The electronic device sends the first data and the third error correction code to the storage device based on the sending cycle, including: The electronic device acquires the first data; The electronic device generates a third error correction code according to the first data; The electronic device sends the first data and the third error correction code to the storage device within the sending cycle, so that the storage device verifies the first data according to the third error correction code.

6. The method according to claim 5, characterized in that The electronic device determines a sending period for sending data to the storage device once, including: The electronic device obtains a first clock cycle required for the electronic device to send the first data to the storage device; The electronic device obtains a second clock cycle required for the electronic device to send the third error correction code to the storage device; The electronic device determines the sum of the first clock cycle and the second clock cycle as a sending cycle for the electronic device to send data once to the storage device.

7. A data processing method, characterized in that: include: The storage device receives first data and a third error correction code sent by the electronic device based on a sending cycle, wherein the sending cycle is a sending cycle in which the electronic device sends data once to the storage device, and the third error correction code is an error correction code generated by the electronic device according to the first data; The storage device generates a first error correction code according to the first data, and verifies the first data according to the first error correction code and the third error correction code to obtain a second verification result; If the second verification result is that the first data verification is passed, the storage device stores the first data and the first error correction code; The storage device sends the first data and the first error correction code to the electronic device, so that the electronic device verifies the first data according to the first error correction code.

8. The method according to claim 7, characterized in that The method further comprises: If the second verification result is that the first data verification fails, the storage device performs error correction processing on the first data or generates an interrupt signal corresponding to the first data.

9. The method according to claim 7, characterized in that: Verifying the first data according to the first error correction code and the third error correction code to obtain a second verification result includes: The storage device obtains a second matching degree between the first error correction code and the third error correction code; The storage device obtains the second verification result according to the second matching degree.

10. The method according to claim 9, characterized in that The storage device obtains the second verification result according to the second matching degree, including: If the second matching degree is greater than or equal to a second threshold, the storage device determines that the second verification result is that the first data verification is passed; If the second matching degree is less than the second threshold, the storage device determines that the second verification result is that the first data verification fails.

11. The method according to any one of claims 8 to 10, characterized in that: The storage device sends the first data and the first error correction code to the electronic device, including: The storage device receives a data read request for the first data sent by the electronic device; In response to the data read request, the storage device sends the first data and the first error correction code to the electronic device.

12. A data processing device, characterized in that: It includes an acquisition module, a generation module, a verification module and a processing module, among which: The acquisition module is used to determine a sending period for sending data to the storage device once; The acquisition module is further used to send the first data and a third error correction code to the storage device based on the sending cycle, where the third error correction code is an error correction code generated by the electronic device according to the first data; The acquisition module is further used to acquire first data and a first error correction code in a storage device, where the first error correction code is an error correction code generated by the storage device according to the first data sent by the electronic device, and a second matching degree between the first error correction code and the third error correction code is greater than or equal to a second threshold; The generating module is used to generate a second error correction code according to the first data; The verification module is used to verify the first data according to the first error correction code and the second error correction code to obtain a first verification result; The processing module is used to process the first data according to the first verification result.

13. A data processing device, characterized in that: It includes a receiving module, a generating module, a verifying module and a processing module, wherein: The receiving module is used to receive first data and a third error correction code sent by the electronic device based on a sending cycle, wherein the sending cycle is a sending cycle in which the electronic device sends data once to the storage device, and the third error correction code is an error correction code generated by the electronic device according to the first data; The generating module is used to generate a first error correction code according to the first data; The verification module is used to verify the first data according to the first error correction code and the third error correction code to obtain a second verification result; The processing module is configured to, if the second verification result is that the first data verification is passed, store the first data and the first error correction code in the storage device; The first data and the first error correction code are sent to the electronic device, so that the electronic device verifies the first data according to the first error correction code.

14. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the data processing method according to any one of claims 1 to 6.

15. A storage device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the data processing method according to any one of claims 7 to 11.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the data processing method according to any one of claims 1 to 6 is implemented, or the data processing method according to any one of claims 7 to 11 is implemented.

17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the data processing method according to any one of claims 1 to 6, or implements the data processing method according to any one of claims 7 to 11.