[go: up one dir, main page]

CN101178675A - Method and device for verifying data - Google Patents

Method and device for verifying data Download PDF

Info

Publication number
CN101178675A
CN101178675A CNA2007101609750A CN200710160975A CN101178675A CN 101178675 A CN101178675 A CN 101178675A CN A2007101609750 A CNA2007101609750 A CN A2007101609750A CN 200710160975 A CN200710160975 A CN 200710160975A CN 101178675 A CN101178675 A CN 101178675A
Authority
CN
China
Prior art keywords
data
check code
verifying
module
verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CNA2007101609750A
Other languages
Chinese (zh)
Other versions
CN100562857C (en
Inventor
宋端智
侯超
顾新
秦晓鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2007101609750A priority Critical patent/CN100562857C/en
Publication of CN101178675A publication Critical patent/CN101178675A/en
Priority to PCT/CN2008/073460 priority patent/WO2009089716A1/en
Application granted granted Critical
Publication of CN100562857C publication Critical patent/CN100562857C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Detection And Correction Of Errors (AREA)

Abstract

The invention discloses a method and a device for verifying the data which belongs to the field of data storage. The method comprises: a CPU makes the wrong check of the verifying data and the corrected verifying code; the data is stored in the memory that a target chip uses; the verifying code is stored; wrong check and corrected verifying are made to the data according to the data and the verifying code by the CPU. The device comprises a disposing module, a storage module and a verifying module. The invention can correctly judge the correctness of data in the memory used by the target chip. Compared with the prior art, the invention overcomes the defect that the target chip hardware does not support the ECC verifying function, protects the data in the memory used by the target chip and improves the reliability of data.

Description

校验数据的方法和装置 Method and device for verifying data

技术领域technical field

本发明涉及数据存储领域,特别涉及一种校验数据的方法和装置。The invention relates to the field of data storage, in particular to a method and device for verifying data.

背景技术Background technique

ECC(Error Checking and Correcting,错误检查和纠正)是指存储数据时,在数据位额外的位存储一个ECC计算结果,即ECC校验码,当重新读取已存储的数据时,根据ECC校验码对该数据进行校验,如果发现该数据有错误,则进行相应的处理。如当检查出有1个比特位错误时,则进行纠正,当检查出有多个比特位错误时,则产生告警信息。ECC (Error Checking and Correcting, Error Checking and Correcting) means that when storing data, an ECC calculation result is stored in the extra bit of the data bit, that is, the ECC check code. When the stored data is re-read, it is checked according to the ECC The code checks the data, and if an error is found in the data, it will be processed accordingly. For example, when one bit error is detected, it is corrected, and when multiple bit errors are detected, an alarm message is generated.

现有技术中ECC功能一般由芯片的内存控制器来完成,当在内存中存储数据时,内存控制器进行ECC计算得到ECC校验码,并将该ECC校验码也存储在内存中,当从内存中读取该数据时,根据已存储的ECC校验码对该数据进行校验,如果该数据发生错误则进行相应的纠正和保护。In the prior art, the ECC function is generally completed by the memory controller of the chip. When storing data in the memory, the memory controller performs ECC calculation to obtain the ECC check code, and stores the ECC check code in the memory. When the data is read from the memory, the data is verified according to the stored ECC check code, and if the data is wrong, corresponding correction and protection are carried out.

在实现本发明的过程中,发明人发现上述现有技术至少具有以下缺点:In the process of realizing the present invention, the inventors have found that the above-mentioned prior art has at least the following disadvantages:

并非所有芯片的内存控制器都具有ECC功能,当这种硬件上不支持ECC功能的芯片在内存中存储和读取数据时,无法根据ECC校验码对数据进行ECC校验,因此,当发生异常情况时,无法对存储的数据进行保护,可能导致重要的数据遭到破坏。如当由于某种原因发生一个比特位跳变而使内存中的数据发生软失效时,无法对该数据进行校验和保护。Not all memory controllers of chips have the ECC function. When a chip that does not support the ECC function on this hardware stores and reads data in the memory, it cannot perform ECC verification on the data according to the ECC check code. Therefore, when the In abnormal situations, the stored data cannot be protected, which may lead to the destruction of important data. For example, when a bit jump occurs for some reason and the data in the memory has a soft failure, the data cannot be checked and protected.

发明内容Contents of the invention

为了提高数据的可靠性,本发明实施例提供了一种校验数据的方法和装置。所述技术方案如下:In order to improve data reliability, embodiments of the present invention provide a method and device for verifying data. Described technical scheme is as follows:

一方面,本发明实施例提供了一种校验数据的方法,所述方法包括:On the one hand, an embodiment of the present invention provides a method for verifying data, the method comprising:

CPU生成待校验的数据的错误检查和纠正的校验码,所述数据存储在目标芯片所使用的内存中;The CPU generates error checking and correcting check codes for the data to be checked, and the data is stored in the internal memory used by the target chip;

存储所述校验码;storing the check code;

CPU根据所述数据和校验码对所述数据进行错误检查和纠正校验。The CPU performs error checking and correction checking on the data according to the data and the check code.

另一方面,本发明实施例还提供了一种校验数据的装置,所述装置包括:On the other hand, an embodiment of the present invention also provides a device for verifying data, the device comprising:

处理模块,用于生成待校验的数据的错误检查和纠正的校验码,所述数据存储在所述装置中的目标芯片所使用的内存中;A processing module, configured to generate a check code for error checking and correction of the data to be checked, the data being stored in the memory used by the target chip in the device;

存储模块,用于存储所述处理模块生成的校验码;a storage module, configured to store the check code generated by the processing module;

校验模块,用于根据所述数据和所述存储模块存储的校验码,对所述数据进行错误检查和纠正校验。The verification module is configured to perform error checking and correction verification on the data according to the data and the verification code stored in the storage module.

本发明实施例提供的技术方案的有益效果是:The beneficial effects of the technical solution provided by the embodiments of the present invention are:

通过预先生成ECC校验码并在校验时根据读取的数据与该ECC校验码对该数据进行ECC校验,可以正确判断出目标芯片所使用的内存中的数据的正确性。与现有技术相比,克服了目标芯片硬件不支持ECC校验功能的缺陷,可以及时检测出目标芯片所使用的内存中的数据是否遭到破坏,并对其进行保护,提高了数据的可靠性。By generating an ECC check code in advance and performing an ECC check on the data according to the read data and the ECC check code during the check, the correctness of the data in the memory used by the target chip can be correctly judged. Compared with the existing technology, it overcomes the defect that the target chip hardware does not support the ECC verification function, can detect in time whether the data in the memory used by the target chip is damaged, and protect it, improving the reliability of the data sex.

附图说明Description of drawings

图1是本发明实施例1提供的校验数据的方法流程图;FIG. 1 is a flowchart of a method for verifying data provided in Embodiment 1 of the present invention;

图2是本发明实施例1提供的芯片与内存的关系示意图;FIG. 2 is a schematic diagram of the relationship between the chip and the memory provided by Embodiment 1 of the present invention;

图3是本发明实施例1提供的CPU对NP所使用的内存中的数据进行保护的示意图;FIG. 3 is a schematic diagram of the CPU protecting the data in the memory used by the NP according to Embodiment 1 of the present invention;

图4是本发明实施例2提供的校验数据的装置结构图。FIG. 4 is a structural diagram of a device for verifying data provided by Embodiment 2 of the present invention.

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。In order to make the object, technical solution and advantages of the present invention clearer, the implementation manner of the present invention will be further described in detail below in conjunction with the accompanying drawings.

本发明实施例通过在目标芯片所使用的内存中存储数据时生成并存储该数据的ECC校验码,校验时读取该数据和ECC校验码,根据该数据和ECC校验码对该数据进行ECC校验。The embodiment of the present invention generates and stores the ECC check code of the data when storing the data in the internal memory used by the target chip, reads the data and the ECC check code during verification, and checks the data according to the data and the ECC check code. The data is checked by ECC.

实施例1Example 1

参见图1,本发明实施例提供了一种校验数据的方法,具体包括:Referring to Fig. 1, an embodiment of the present invention provides a method for verifying data, which specifically includes:

S101:在目标芯片所使用的内存中存储数据。S101: Store data in the memory used by the target chip.

S102:生成并存储该数据的ECC校验码;S102: Generate and store the ECC check code of the data;

其中,生成ECC校验码的步骤可以由软件实现,本实施例中,执行该软件代码的过程由CPU来实现。该ECC校验码可以存储在CPU所使用的内存中,也可以存储在其他存储器中,例如目标芯片所使用的内存。本实施例中,该ECC校验码存储在CPU所使用的内存中。Wherein, the step of generating the ECC check code can be realized by software, and in this embodiment, the process of executing the software code is realized by CPU. The ECC check code can be stored in the memory used by the CPU, or in other memories, such as the memory used by the target chip. In this embodiment, the ECC check code is stored in the memory used by the CPU.

S103:从目标芯片所使用的内存中读取数据,从CPU所使用的内存中读取ECC校验码。S103: Read data from the memory used by the target chip, and read an ECC check code from the memory used by the CPU.

其中,可以在使用该数据时,对该数据进行ECC校验,也可以定时对内存中的数据进行校验,如5ms或10ms等等。Wherein, when the data is used, the ECC check can be performed on the data, and the data in the memory can also be checked periodically, such as 5ms or 10ms and so on.

S104:根据读取的数据和ECC校验码,对该数据进行ECC校验。S104: Perform an ECC check on the data according to the read data and the ECC check code.

其中,对数据进行ECC校验的方法,可以是在读取所述数据时按照相同的算法重新计算得到新的ECC校验码,将新的ECC校验码与S102中生成的ECC校验码进行比较,若两个ECC校验码不相同,则说明所述数据出现了错误;若两个ECC校验码相同,则说明所述数据正确。其中,比较两个ECC校验码是否相同的方法有多种。例如,对S102中生成的ECC校验码和计算得到的新ECC校验码进行按位异或,若结果为0,则表示该数据正确;否则,表示该数据错误。Wherein, the method for performing ECC verification on data may be to recalculate a new ECC verification code according to the same algorithm when reading the data, and combine the new ECC verification code with the ECC verification code generated in S102 For comparison, if the two ECC check codes are different, it means that the data has an error; if the two ECC check codes are the same, it means that the data is correct. Among them, there are multiple methods for comparing whether two ECC check codes are the same. For example, bitwise XOR is performed on the ECC check code generated in S102 and the calculated new ECC check code, if the result is 0, it means that the data is correct; otherwise, it means that the data is wrong.

若经过ECC校验之后,发现所述数据发生了错误,还可以对该数据进行纠正或告警等处理,例如,如果发生一个比特位的错误,则进行纠正处理;如果发生多个比特位的错误,则进行告警处理。If after the ECC check, it is found that the data has an error, the data can also be corrected or alarmed, for example, if a bit error occurs, correct it; if multiple bit errors occur , then perform alarm processing.

参见图2,校验时,CPU通过目标芯片从目标芯片所使用的内存中读取数据,CPU从其所使用的内存中读取已存储的ECC校验码,并根据该ECC校验码和来自目标芯片的数据对该数据进行ECC校验,从而验证目标芯片所使用的内存中存储的数据的正确性。Referring to Figure 2, when verifying, the CPU reads data from the memory used by the target chip through the target chip, and the CPU reads the stored ECC check code from the memory used by it, and according to the ECC check code and The data from the target chip performs an ECC check on the data, thereby verifying the correctness of the data stored in the memory used by the target chip.

为了避免由于频繁进行校验而过多地占用芯片的资源,进一步地,上述方法中还可以增加下面的步骤:In order to avoid excessive occupation of chip resources due to frequent verification, further, the following steps can also be added to the above method:

在目标芯片所使用的内存中存储数据之前,将目标芯片所使用的内存划分成至少一块,通常分为多块,当存储数据时,将数据存储在划分好的块中,并将存有数据的块的状态记录为已使用。如可以设计一个数据结构,存储数据时将生成的ECC校验码和该数据所在的内存块的使用状态均存储在该数据结构中;此时,若ECC校验码也存储在目标芯片所使用的内存中,则该ECC校验码和所述数据存储在不同的块中。Before storing data in the memory used by the target chip, divide the memory used by the target chip into at least one block, usually into multiple blocks, when storing data, store the data in the divided block, and store the data The state of the block is recorded as used. For example, a data structure can be designed to store the generated ECC check code and the usage status of the memory block where the data is stored in the data structure; at this time, if the ECC check code is also stored in the target chip In the internal memory, the ECC check code and the data are stored in different blocks.

校验时采用定时校验的方式,定时检查存储数据的各个块的状态,如果当前块为已使用,则从该块中读取数据,并从存储ECC校验码的块中读取该ECC校验码,根据读取的数据和ECC校验码对该数据进行ECC校验。其中,根据实际情况,对于存储数据的各个块,可以每次检查部分内存块,也可以每次检查所有的内存块。进一步地,当从内存中删除已存储的数据时,可以将该数据所在的内存块的状态修改为未使用,以方便后续使用。When verifying, the method of timing verification is adopted to regularly check the status of each block storing data. If the current block is used, the data is read from this block, and the ECC is read from the block storing the ECC check code. Check code, perform ECC check on the data according to the read data and ECC check code. Wherein, according to the actual situation, for each block storing data, some memory blocks may be checked each time, or all memory blocks may be checked each time. Further, when the stored data is deleted from the memory, the state of the memory block where the data is located can be modified to be unused, so as to facilitate subsequent use.

上述过程S101至S104可以用来对比较重要的数据涉及的内存进行ECC管理和保护。例如,参见图3,CPU生成和下发NP(Network Processor,网络处理器)报文转发过程中应用到的各种表项给NP,NP收到后根据表项内容进行报文分类、过滤、业务处理和路由转发等处理,图中的内存为NP所使用的内存,其中保存有表项的具体内容。当CPU下发表项时,CPU的驱动程序将表项写入内存中,同时触发调用预注册在驱动程序中的回调函数,回调函数计算出该表项的ECC校验码,并将ECC校验码保存在CPU分配的ECC数据结构中,该数据结构可以存储在CPU所使用的内存中,也可以存储在图中所示NP所使用的内存中。另外,CPU启动一个定时检查任务,读取NP内存中的表项并与存储在ECC数据结构内的ECC校验码一起对该表项进行ECC校验,如果校验的结果为表项正确,表示NP内存区未发生软失效,系统可正常运行;如果校验的结果为表项错误,表示NP内存区发生失效;检查任务根据保存的ECC校验码进行纠错,如果不能纠错,则检查任务通过告警模块告知上层,上层根据表项地址、重要程度确定处理策略。The above-mentioned processes S101 to S104 can be used to perform ECC management and protection on memory related to more important data. For example, referring to Figure 3, the CPU generates and sends various table entries applied in the NP (Network Processor, network processor) message forwarding process to the NP, and the NP performs packet classification, filtering, and Processing such as business processing and route forwarding, the memory in the figure is the memory used by NP, which stores the specific content of the entry. When the CPU publishes an entry, the driver of the CPU writes the entry into the memory, and at the same time triggers the call of the callback function pre-registered in the driver. The callback function calculates the ECC check code of the entry and checks the ECC The code is stored in the ECC data structure allocated by the CPU, which can be stored in the memory used by the CPU or in the memory used by the NP shown in the figure. In addition, the CPU starts a regular inspection task, reads the entry in the NP memory and performs ECC verification on the entry together with the ECC check code stored in the ECC data structure. If the result of the verification is that the entry is correct, Indicates that the NP memory area has no soft failure, and the system can run normally; if the verification result is an entry error, it indicates that the NP memory area has failed; the inspection task performs error correction according to the saved ECC check code, if the error cannot be corrected, then The inspection task is notified to the upper layer through the alarm module, and the upper layer determines the processing strategy according to the address and importance of the entry.

本实施例针通过预先生成ECC校验码并在校验时根据数据与该ECC校验码进行ECC校验,可以正确判断出目标芯片所使用的内存中的数据的正确性。与现有技术相比,克服了目标芯片硬件不支持ECC校验功能的缺陷,可以及时检测出目标芯片所使用的内存中的数据是否遭到破坏,并对其进行保护,提高了数据的可靠性。对内存进行分块存储和ECC校验,可以节省ECC校验所占用的宝贵资源,提高了效率和实用性。In this embodiment, the correctness of the data in the memory used by the target chip can be correctly judged by generating the ECC check code in advance and performing the ECC check according to the data and the ECC check code during the check. Compared with the existing technology, it overcomes the defect that the target chip hardware does not support the ECC verification function, can detect in time whether the data in the memory used by the target chip is damaged, and protect it, improving the reliability of the data sex. Block storage and ECC verification of memory can save precious resources occupied by ECC verification and improve efficiency and practicability.

实施例2Example 2

参见图4,本发明实施例还提供了一种校验数据的装置,具体包括:Referring to Fig. 4, the embodiment of the present invention also provides a device for verifying data, which specifically includes:

处理模块,用于生成待校验的数据的错误检查和纠正的校验码,数据存储在目标芯片所使用的内存中;在本实施例中目标芯片及目标芯片所使用的内存均位于所述装置中;The processing module is used to generate error checking and correcting check codes for the data to be checked, and the data is stored in the memory used by the target chip; in this embodiment, the target chip and the memory used by the target chip are located in the device;

存储模块,用于存储处理模块生成的校验码;The storage module is used to store the verification code generated by the processing module;

校验模块,用于根据数据和存储模块存储的校验码,对数据进行错误检查和纠正校验。The verification module is used for checking and correcting the data according to the data and the verification code stored in the storage module.

进一步地,校验模块具体包括:Further, the verification module specifically includes:

读取单元,用于定时从内存中读取数据,或使用数据时,从内存中读取数据,还用于读取存储模块存储的校验码;The reading unit is used to regularly read data from the memory, or when using data, read data from the memory, and is also used to read the check code stored in the storage module;

校验单元,用于根据读取单元读取的数据和校验码,对数据进行错误检查和纠校验。The checking unit is used for checking and correcting the data according to the data read by the reading unit and the check code.

进一步地,上述装置还包括:Further, the above-mentioned device also includes:

划分模块,用于将目标芯片所使用的内存划分为至少一块;A division module, configured to divide the memory used by the target chip into at least one piece;

数据存储模块,用于将待校验的数据存储在划分模块划分的块中;The data storage module is used to store the data to be verified in the blocks divided by the division module;

记录模块,用于将数据存储模块存储数据的块的状态记录为已使用;A recording module, configured to record the state of the block storing data in the data storage module as used;

相应地,校验模块具体包括:Correspondingly, the verification module specifically includes:

检查单元,用于检查划分模块划分的块的状态;A checking unit is used to check the state of the blocks divided by the division module;

校验单元,用于当检查单元检查出至少一块的状态为已使用时,读取状态为已使用的块,根据该块中存储的数据和存储模块存储的校验码对数据进行错误检查和纠正校验。The checking unit is used to read the used block when the checking unit detects that at least one block is in use, and perform error checking and summing on the data according to the data stored in the block and the check code stored in the storage module Correct the checksum.

进一步地,上述装置还包括:Further, the above-mentioned device also includes:

纠正模块,用于当校验模块校验出数据错误时,对数据进行纠正或告警处理。The correction module is used to correct the data or process an alarm when the verification module detects a data error.

本实施例通过预先生成ECC校验码并在校验时根据数据与该ECC校验码进行ECC校验,可以正确判断出目标芯片所使用的内存中的数据的正确性。与现有技术相比,克服了目标芯片硬件不支持ECC校验功能的缺陷,可以及时检测出目标芯片所使用的内存中的数据是否遭到破坏,并对其进行保护,提高了数据的可靠性。In this embodiment, the correctness of the data in the memory used by the target chip can be correctly judged by generating the ECC check code in advance and performing the ECC check according to the data and the ECC check code during the check. Compared with the existing technology, it overcomes the defect that the target chip hardware does not support the ECC verification function, can detect in time whether the data in the memory used by the target chip is damaged, and protect it, improving the reliability of the data sex.

本发明实施例可以利用软件实现,相应的软件可以存储在可读取的存储介质中,如芯片或内存中。The embodiment of the present invention can be realized by software, and the corresponding software can be stored in a readable storage medium, such as a chip or a memory.

以上仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection scope of the present invention Inside.

Claims (9)

1.一种校验数据的方法,其特征在于,所述方法包括:1. A method for verifying data, characterized in that the method comprises: CPU生成待校验的数据的错误检查和纠正的校验码,所述数据存储在目标芯片所使用的内存中;The CPU generates error checking and correcting check codes for the data to be checked, and the data is stored in the internal memory used by the target chip; 存储所述校验码;storing the check code; CPU根据所述数据和校验码对所述数据进行错误检查和纠正校验。The CPU performs error checking and correction checking on the data according to the data and the check code. 2.根据权利要求1所述的校验数据的方法,其特征在于,所述存储所述校验码,具体为:2. The method for verifying data according to claim 1, wherein the storing the verification code is specifically: 将所述校验码存储在CPU所使用的内存中,或者将所述校验码存储在所述目标芯片所使用的内存中。The check code is stored in the memory used by the CPU, or the check code is stored in the memory used by the target chip. 3.根据权利要求1所述的校验数据的方法,其特征在于,所述CPU根据所述数据和校验码对所述数据进行错误检查和纠正校验,具体为:3. The method for verifying data according to claim 1, wherein the CPU performs error checking and correcting verification on the data according to the data and the verification code, specifically: 定时读取所述数据和校验码,对所述数据进行错误检查和纠正校验;Reading the data and check code regularly, and performing error check and correction check on the data; 或使用所述数据时,读取所述数据和所述校验码,对所述数据进行错误检查和纠正校验。Or when using the data, read the data and the check code, and perform error checking and correction check on the data. 4.根据权利要求3所述的校验数据的方法,其特征在于,所述CPU生成待校验的数据的错误检查和纠正的校验码之前,还包括:4. The method for verifying data according to claim 3, wherein, before the CPU generates the error checking and correcting check code of the data to be verified, it also includes: 将目标芯片所使用的内存划分成至少一块,将待校验的数据存储在所述块中,记录存储所述数据的块的状态为已使用;Divide the memory used by the target chip into at least one block, store the data to be verified in the block, and record the state of the block storing the data as used; 相应地,所述CPU根据所述数据和所述校验码对所述数据进行错误检查和纠正校验,具体包括:Correspondingly, the CPU performs error checking and correction checking on the data according to the data and the check code, specifically including: CPU检查所述划分的块的状态,如果为已使用,则根据所述校验码和所述块中存储的数据对所述数据进行错误检查和纠正校验。The CPU checks the state of the divided block, and if it is used, performs error checking and correction checking on the data according to the check code and the data stored in the block. 5.根据权利要求1至4中任一权利要求所述的校验数据的方法,其特征在于,所述方法还包括:5. The method for verifying data according to any one of claims 1 to 4, wherein the method further comprises: 当CPU根据所述数据和校验码对所述数据进行错误检查和纠正校验,发现所述数据错误时,对所述数据进行纠正或告警处理。When the CPU performs error checking and correction checking on the data according to the data and the check code, and finds that the data is erroneous, it performs correction or alarm processing on the data. 6.一种校验数据的装置,其特征在于,所述装置包括:6. A device for verifying data, characterized in that the device comprises: 处理模块,用于生成待校验的数据的错误检查和纠正的校验码,所述数据存储在目标芯片所使用的内存中;A processing module, configured to generate a check code for error checking and correction of the data to be checked, and the data is stored in the memory used by the target chip; 存储模块,用于存储所述处理模块生成的校验码;a storage module, configured to store the check code generated by the processing module; 校验模块,用于根据所述内存中的数据和所述存储模块存储的校验码,对所述数据进行错误检查和纠正校验。A verification module, configured to perform error checking and correction verification on the data according to the data in the internal memory and the verification code stored in the storage module. 7.根据权利要求6所述的校验数据的装置,其特征在于,所述校验模块具体包括:7. The device for verifying data according to claim 6, wherein the verification module specifically includes: 读取单元,用于定时从所述内存中读取所述数据,或使用所述数据时,从所述内存中读取所述数据,还用于读取所述存储模块存储的校验码;The reading unit is used to regularly read the data from the memory, or when using the data, read the data from the memory, and is also used to read the check code stored in the storage module ; 校验单元,用于根据所述读取单元读取的数据和校验码,对所述数据进行错误检查和纠校验。The verification unit is configured to perform error checking and correction on the data according to the data read by the reading unit and the verification code. 8.根据权利要求6所述的校验数据的装置,其特征在于,所述装置还包括:8. The device for verifying data according to claim 6, wherein the device further comprises: 划分模块,用于将所述目标芯片所使用的内存划分为至少一块;A division module, configured to divide the memory used by the target chip into at least one piece; 数据存储模块,用于将待校验的数据存储在所述划分模块划分的块中;a data storage module, configured to store the data to be verified in the blocks divided by the division module; 记录模块,用于将所述数据存储模块存储所述数据的块的状态记录为已使用;a recording module, configured to record the state of the block storing the data in the data storage module as used; 相应地,所述校验模块具体包括:Correspondingly, the verification module specifically includes: 检查单元,用于检查所述划分模块划分的块的状态;a check unit, configured to check the state of the blocks divided by the division module; 校验单元,用于当所述检查单元检查出至少一块的状态为已使用时,读取所述状态为已使用的块,根据所述块中存储的数据和所述存储模块存储的校验码对所述数据进行错误检查和纠正校验。A checking unit, configured to read the used block when the checking unit checks that the status of at least one block is used, according to the data stored in the block and the checksum stored in the storage module The code performs error checking and correction checks on the data. 9.根据权利要求6至8中任一权利要求所述的校验数据的装置,其特征在于,所述装置还包括:9. The device for verifying data according to any one of claims 6 to 8, wherein the device further comprises: 纠正模块,用于当所述校验模块校验出所述数据错误时,对所述数据进行纠正或告警处理。The correction module is used to correct or warn the data when the verification module detects that the data is wrong.
CNB2007101609750A 2007-12-14 2007-12-14 Method and device for verifying data Expired - Fee Related CN100562857C (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CNB2007101609750A CN100562857C (en) 2007-12-14 2007-12-14 Method and device for verifying data
PCT/CN2008/073460 WO2009089716A1 (en) 2007-12-14 2008-12-11 Data checking method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007101609750A CN100562857C (en) 2007-12-14 2007-12-14 Method and device for verifying data

Publications (2)

Publication Number Publication Date
CN101178675A true CN101178675A (en) 2008-05-14
CN100562857C CN100562857C (en) 2009-11-25

Family

ID=39404936

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007101609750A Expired - Fee Related CN100562857C (en) 2007-12-14 2007-12-14 Method and device for verifying data

Country Status (2)

Country Link
CN (1) CN100562857C (en)
WO (1) WO2009089716A1 (en)

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009089716A1 (en) * 2007-12-14 2009-07-23 Huawei Technologies Co., Ltd. Data checking method and device
CN103019883A (en) * 2012-12-31 2013-04-03 华为技术有限公司 Internal memory error correction method and system
CN103198269A (en) * 2012-01-06 2013-07-10 上海华虹集成电路有限责任公司 Anti-failure key storage module
CN103246574A (en) * 2012-02-10 2013-08-14 阿里巴巴集团控股有限公司 Verification method and verification device for data accuracy
CN103534704A (en) * 2012-10-31 2014-01-22 华为技术有限公司 Method of treatment failure packets, network device and processor
CN103577275A (en) * 2013-10-24 2014-02-12 华为技术有限公司 Method, equipment and system for data verification
CN105224415A (en) * 2015-09-25 2016-01-06 北京奇虎科技有限公司 For realizing generation method and the device of the code of business task
CN105589823A (en) * 2014-10-22 2016-05-18 乐视移动智能信息技术(北京)有限公司 Method, apparatus and circuit for realizing USB (universal serial bus) interface multiplexing MHL (mobile high-definition link)
CN106792183A (en) * 2016-12-16 2017-05-31 深圳Tcl数字技术有限公司 The data error-correcting method and system of television set
CN106775476A (en) * 2016-12-19 2017-05-31 中国人民解放军理工大学 Mixing memory system and its management method
CN108037753A (en) * 2017-12-15 2018-05-15 北京经纬恒润科技有限公司 A kind of data detection method and device
CN110825557A (en) * 2019-04-23 2020-02-21 上海安路信息科技有限公司 Storage method and storage system
CN111078462A (en) * 2019-12-26 2020-04-28 海光信息技术有限公司 Data checking method and circuit
CN111176884A (en) * 2019-12-30 2020-05-19 西安智多晶微电子有限公司 SEC (Security and Security) verification method and device for FPGA (field programmable Gate array) configuration memory
CN111443887A (en) * 2020-03-26 2020-07-24 京东方科技集团股份有限公司 Display driving chip and data processing method thereof
WO2020192343A1 (en) * 2019-03-25 2020-10-01 深圳忆联信息系统有限公司 Hardware-based end-to-end data protection method and apparatus, and computer device
CN111949433A (en) * 2019-05-15 2020-11-17 北京兆易创新科技股份有限公司 Processing method of working parameters of nonvolatile memory, control device and memory
CN112164356A (en) * 2020-09-21 2021-01-01 昆山龙腾光电股份有限公司 Error detection method and lighting fixture
CN112306410A (en) * 2020-10-29 2021-02-02 珠海格力电器股份有限公司 Data processing method and device for electric energy meter, storage medium and electric energy meter
CN112631823A (en) * 2020-12-30 2021-04-09 锐捷网络股份有限公司 File processing method and device
CN112804031A (en) * 2021-04-01 2021-05-14 广州征安电子科技有限公司 Data transmission remote terminal system capable of correcting error data
CN113868012A (en) * 2021-08-27 2021-12-31 山东云海国创云计算装备产业创新中心有限公司 Method and device for realizing error checking and code correcting functions
CN117032579A (en) * 2023-08-21 2023-11-10 上海合芯数字科技有限公司 Slave starting method, device and storage medium

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109358981B (en) * 2018-09-25 2022-07-05 珠海市杰理科技股份有限公司 Memory read error correction method, system, computer device, and storage medium
CN111240886A (en) * 2019-12-29 2020-06-05 上海诺为科技有限公司 Method for improving reliability of multi-block storage
CN111158948B (en) * 2019-12-30 2024-04-09 深信服科技股份有限公司 Data storage and verification method and device based on deduplication and storage medium
CN112948165B (en) * 2021-02-26 2024-02-13 许继集团有限公司 Relay protection device memory data reliability guarantee method
CN114721867A (en) * 2022-02-14 2022-07-08 阿里巴巴(中国)有限公司 Data verification method and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5459742A (en) * 1992-06-11 1995-10-17 Quantum Corporation Solid state disk memory using storage devices with defects
CN101060015A (en) * 2007-05-23 2007-10-24 北京芯技佳易微电子科技有限公司 A multi-bit flash memory and its error detection and remedy method
CN100562857C (en) * 2007-12-14 2009-11-25 华为技术有限公司 Method and device for verifying data

Cited By (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009089716A1 (en) * 2007-12-14 2009-07-23 Huawei Technologies Co., Ltd. Data checking method and device
CN103198269A (en) * 2012-01-06 2013-07-10 上海华虹集成电路有限责任公司 Anti-failure key storage module
CN103198269B (en) * 2012-01-06 2017-05-10 上海华虹集成电路有限责任公司 Anti-failure key storage system
CN103246574B (en) * 2012-02-10 2015-11-11 阿里巴巴集团控股有限公司 The method of calibration of data accuracy and device
CN103246574A (en) * 2012-02-10 2013-08-14 阿里巴巴集团控股有限公司 Verification method and verification device for data accuracy
CN103534704A (en) * 2012-10-31 2014-01-22 华为技术有限公司 Method of treatment failure packets, network device and processor
CN103019883A (en) * 2012-12-31 2013-04-03 华为技术有限公司 Internal memory error correction method and system
CN103019883B (en) * 2012-12-31 2015-08-26 华为技术有限公司 A kind of internal memory error correction and system
WO2015058591A1 (en) * 2013-10-24 2015-04-30 华为技术有限公司 Data checking method, device and system
CN103577275A (en) * 2013-10-24 2014-02-12 华为技术有限公司 Method, equipment and system for data verification
CN105589823A (en) * 2014-10-22 2016-05-18 乐视移动智能信息技术(北京)有限公司 Method, apparatus and circuit for realizing USB (universal serial bus) interface multiplexing MHL (mobile high-definition link)
CN105224415A (en) * 2015-09-25 2016-01-06 北京奇虎科技有限公司 For realizing generation method and the device of the code of business task
CN105224415B (en) * 2015-09-25 2018-01-09 北京奇虎科技有限公司 For the generation method and device of the code for realizing business task
CN106792183A (en) * 2016-12-16 2017-05-31 深圳Tcl数字技术有限公司 The data error-correcting method and system of television set
CN106775476A (en) * 2016-12-19 2017-05-31 中国人民解放军理工大学 Mixing memory system and its management method
CN108037753B (en) * 2017-12-15 2019-10-15 北京经纬恒润科技有限公司 A kind of data detection method and device
CN108037753A (en) * 2017-12-15 2018-05-15 北京经纬恒润科技有限公司 A kind of data detection method and device
WO2020192343A1 (en) * 2019-03-25 2020-10-01 深圳忆联信息系统有限公司 Hardware-based end-to-end data protection method and apparatus, and computer device
CN110825557A (en) * 2019-04-23 2020-02-21 上海安路信息科技有限公司 Storage method and storage system
CN111949433A (en) * 2019-05-15 2020-11-17 北京兆易创新科技股份有限公司 Processing method of working parameters of nonvolatile memory, control device and memory
CN111078462A (en) * 2019-12-26 2020-04-28 海光信息技术有限公司 Data checking method and circuit
CN111078462B (en) * 2019-12-26 2023-09-22 海光信息技术股份有限公司 Data verification method and circuit
CN111176884B (en) * 2019-12-30 2023-05-16 西安智多晶微电子有限公司 SEC (SEC) verification method and device for FPGA (field programmable Gate array) configuration memory
CN111176884A (en) * 2019-12-30 2020-05-19 西安智多晶微电子有限公司 SEC (Security and Security) verification method and device for FPGA (field programmable Gate array) configuration memory
CN111443887A (en) * 2020-03-26 2020-07-24 京东方科技集团股份有限公司 Display driving chip and data processing method thereof
CN112164356A (en) * 2020-09-21 2021-01-01 昆山龙腾光电股份有限公司 Error detection method and lighting fixture
CN112306410A (en) * 2020-10-29 2021-02-02 珠海格力电器股份有限公司 Data processing method and device for electric energy meter, storage medium and electric energy meter
CN112631823A (en) * 2020-12-30 2021-04-09 锐捷网络股份有限公司 File processing method and device
CN112804031B (en) * 2021-04-01 2021-06-22 广州征安电子科技有限公司 Data transmission remote terminal system capable of correcting error data
CN112804031A (en) * 2021-04-01 2021-05-14 广州征安电子科技有限公司 Data transmission remote terminal system capable of correcting error data
CN113868012A (en) * 2021-08-27 2021-12-31 山东云海国创云计算装备产业创新中心有限公司 Method and device for realizing error checking and code correcting functions
CN117032579A (en) * 2023-08-21 2023-11-10 上海合芯数字科技有限公司 Slave starting method, device and storage medium

Also Published As

Publication number Publication date
CN100562857C (en) 2009-11-25
WO2009089716A1 (en) 2009-07-23

Similar Documents

Publication Publication Date Title
CN101178675A (en) Method and device for verifying data
KR100645058B1 (en) Memory Management Techniques to Improve Data Reliability
CN102567134B (en) Error checking and correcting system and method for memory module
KR100681429B1 (en) Semiconductor memory device and bit error detection method thereof
WO2007097019A1 (en) Cache controller and cache control method
CN103077095B (en) Error correction method and device for stored data and computer system
WO2017215377A1 (en) Method and device for processing hard memory error
CN101546291A (en) Access method and device for increasing robustness of memory data
TWI857980B (en) Memory system
US9191030B2 (en) Memory controller, data storage device, and memory controlling method
CN101373640A (en) Flash memory device and error correction method
JP2002007225A (en) Address parity error processing method, information processing device and storage device
JP2009295252A (en) Semiconductor memory device and its error correction method
CN105027084B (en) The apparatus and method of control memory in mobile communication system
CN114203252A (en) Bad block detection method, device, equipment and storage medium of nonvolatile memory
JP2005196658A (en) External storage device
JP5361826B2 (en) Recording unit and faulty chip identification method
US11726864B2 (en) Data processing device and data processing method
JP2012003569A (en) Memory controller, flash memory system including memory controller, and method of controlling flash memory
CN115421962A (en) Processing method, system, storage medium and terminal capable of correcting memory fault
CN103365737B (en) Data read-write method, read-write equipment and data-storage system
JP4853083B2 (en) Computer system, data normality confirmation method, and program
US11809272B2 (en) Error correction code offload for a serially-attached memory device
KR102828487B1 (en) Memory module, memory system including the same and error correcting method thereof
JP2025054822A (en) Control device, detection method, and detection program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20091125

Termination date: 20151214

EXPY Termination of patent right or utility model