DE102020207618A1 - Method for fault-tolerant storage of user data - Google Patents

Method for fault-tolerant storage of user data Download PDF

Info

Publication number
DE102020207618A1
DE102020207618A1 DE102020207618.9A DE102020207618A DE102020207618A1 DE 102020207618 A1 DE102020207618 A1 DE 102020207618A1 DE 102020207618 A DE102020207618 A DE 102020207618A DE 102020207618 A1 DE102020207618 A1 DE 102020207618A1
Authority
DE
Germany
Prior art keywords
copy
administrative information
user data
management information
information copy
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.)
Pending
Application number
DE102020207618.9A
Other languages
German (de)
Inventor
Stefan Krieck
Adrian Funk
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.)
Robert Bosch GmbH
Original Assignee
Robert Bosch GmbH
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 Robert Bosch GmbH filed Critical Robert Bosch GmbH
Priority to DE102020207618.9A priority Critical patent/DE102020207618A1/en
Priority to CN202110678527.XA priority patent/CN113821372A/en
Publication of DE102020207618A1 publication Critical patent/DE102020207618A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/78Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
    • G06F21/79Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data in semiconductor storage media, e.g. directly-addressable memories
    • 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/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

Die Erfindung betrifft ein Verfahren zur fehlertoleranten Speicherung von Nutzdaten auf einem nicht-flüchtigen Speichermedium (110), auf dem Schreib-, Lese- und Löschvorgänge ausgeführt werden können, umfassend ein Schreiben (12) der Nutzdaten (120); ein Bestimmen (14) von Verwaltungsinformationen für die geschriebenen Nutzdaten; ein Schreiben (16) einer ersten Verwaltungsinformationskopie (122), die die bestimmten Verwaltungsinformationen beinhaltet, und Bestimmen und Schreiben eines ersten Prüfwerts, mit dem die Gültigkeit der ersten Verwaltungsinformationskopie geprüft werden kann; und danach ein Schreiben (18) einer zweiten Verwaltungsinformationskopie (124), die die bestimmten Verwaltungsinformationen beinhaltet, und Bestimmen und Schreiben eines zweiten Prüfwerts, mit dem die Gültigkeit der zweiten Kopie der Verwaltungsinformationen geprüft werden kann.

Figure DE102020207618A1_0000
The invention relates to a method for fault-tolerant storage of user data on a non-volatile storage medium (110) on which write, read and delete processes can be carried out, comprising writing (12) the user data (120); determining (14) management information for the written user data; writing (16) a first administrative information copy (122) containing the determined administrative information, and determining and writing a first check value with which the validity of the first administrative information copy can be checked; and then writing (18) a second copy of management information (124) containing the determined management information, and determining and writing a second check value with which the validity of the second copy of the management information can be checked.
Figure DE102020207618A1_0000

Description

Die vorliegende Erfindung betrifft ein Verfahren zur fehlertoleranten Speicherung von Nutzdaten sowie eine Recheneinheit und ein Computerprogramm zu dessen Durchführung.The present invention relates to a method for fault-tolerant storage of useful data and to a computing unit and a computer program for its implementation.

Stand der TechnikState of the art

Steuergeräte im Automobilbereich oder im Bereich industrieller Fertigungsanlagen müssen nicht nur den Programmcode einer Steuerungssoftware, sondern auch - zur Laufzeit der Software - Daten nichtflüchtig speichern. Für diesen Zweck werden nicht-flüchtige Speichermedien (NVM, Non-Volatile-Memory), insbesondere EEPROMs oder Flashspeicher, eingesetzt. Es gibt Standards, z.B. des AUTOSAR-Konsortiums, in denen der Funktionsumfang der Software festgelegt ist, nicht jedoch die Art und Weise, in der die Daten auf der Hardware, d.h. auf dem Speichermedium, organisiert werden.Control units in the automotive sector or in the area of industrial production systems not only have to save the program code of a control software, but also - during the runtime of the software - data in a non-volatile manner. For this purpose, non-volatile storage media (NVM, non-volatile memory), in particular EEPROMs or flash memories, are used. There are standards, e.g. of the AUTOSAR consortium, in which the functional scope of the software is specified, but not the way in which the data is organized on the hardware, i.e. on the storage medium.

Bei in den oben genannten Bereichen eingesetzten Steuergeräten ist zu berücksichtigen, dass jeder Lösch- oder Programmiervorgang von Speicherzellen des Speichermediums zu beliebigen Zeitpunkten unterbrochen werden kann, wenn die Spannungsversorgung zusammenbricht. Dies kann zu nicht oder nur schwach gelöschten bzw. programmierten Speicherzellen führen und somit beim Auslesen zu willkürlichen Datenwerten. Insbesondere schwach programmierte Zellen stellen eine Herausforderung dar, da die darin enthaltenen Daten zunächst eine Zeitlang gültig sein können, danach aber auf einen ungültigen Datenwert kippen können (d.h. der gespeicherte Datenwert kann sich unbeabsichtigt ändern, z.B. kann sich auf Bit-Ebene eine logische ‚1‘ in eine logische ‚0‘ ändern). Ebenso können Alterungseffekte, die aufgrund der oftmals hohen Temperaturen im automobilen oder industriellen Umfeld vermehrt auftreten, dazu führen, dass in einzelnen Speicherzellen gespeicherte Datenwerte kippen.In the case of control units used in the above-mentioned areas, it must be taken into account that every erasure or programming process of memory cells of the storage medium can be interrupted at any point in time if the voltage supply breaks down. This can lead to not or only weakly erased or programmed memory cells and thus to arbitrary data values when reading out. In particular, weakly programmed cells pose a challenge, as the data they contain can initially be valid for a while, but can then turn to an invalid data value (i.e. the stored data value can change unintentionally, e.g. a logical '1 'to a logical' 0 '). Aging effects, which occur more frequently due to the often high temperatures in the automotive or industrial environment, can also cause data values stored in individual memory cells to tilt.

Solche Datenfehler sind besonders dann nachteilig, wenn ein Speicherbereich betroffen ist, in dem Verwaltungsinformationen gespeichert sind. Verwaltungsinformationen, die z.B. in Form von sogenannten Headern (Kopfbereichen) oder Footern (Fußbereichen) gespeichert werden, enthalten z.B. Informationen über Ort und Länge oder auch aktuellen Zustand (wie „gelöscht“, defekt“, „bereit“ oder „voll“) von Speicherbereichen, in denen die eigentlichen Nutzdaten liegen. Um die Gültigkeit von Headern/Footern und Nutzdaten erkennen zu können, können diese über Prüfwerte bzw. Prüfsummen - zumeist Cyclic Redundancy Checksummen (CRC) - abgesichert sein. Ist der Prüfwert eines Headers falsch, so sind die entsprechenden Verwaltungsinformationen ungültig, und die damit verwalteten Nutzdatenblöcke dürfen nicht verwendet werden, d.h. deren Inhalt wird verworfen. Ein Datenfehler im Speicherbereich der Verwaltungsinformationen führt also dazu, dass die damit verwalteten Nutzdaten nicht mehr verwendet werden können.Such data errors are particularly disadvantageous when a memory area is concerned in which management information is stored. Administrative information, which is stored in the form of so-called headers or footers, contains information about location and length or the current status (such as "deleted", defective "," ready "or" full ") of memory areas which contain the actual user data. In order to be able to recognize the validity of headers / footers and user data, these can be secured by check values or checksums - mostly cyclic redundancy checksums (CRC). If the check value of a header is incorrect, the corresponding administrative information is invalid and the user data blocks managed with it may not be used, i.e. their content is discarded. A data error in the memory area of the management information means that the user data managed with it can no longer be used.

Offenbarung der ErfindungDisclosure of the invention

Erfindungsgemäß werden ein Verfahren zur fehlertoleranten Speicherung von Nutzdaten sowie eine Recheneinheit und ein Computerprogramm zu dessen Durchführung mit den Merkmalen der unabhängigen Patentansprüche vorgeschlagen. Vorteilhafte Ausgestaltungen sind Gegenstand der Unteransprüche sowie der nachfolgenden Beschreibung.According to the invention, a method for the fault-tolerant storage of useful data and a computing unit and a computer program for its implementation with the features of the independent claims are proposed. Advantageous refinements are the subject matter of the subclaims and the description below.

Durch das Schreiben zweier Verwaltungsinformationskopien auf das Speichermedium, ist, wenn eine der Verwaltungsinformationskopien beschädigt wird, etwa aufgrund unvollständig programmierter Speicherzellen oder aufgrund von Alterungseffekten der Speicherzellen, sichergestellt, dass die Nutzdaten weiterhin verwendet werden können, da die in der anderen Verwaltungsinformationskopie enthaltenen Verwaltungsinformationen verwendet werden können. Dabei kann eine Beschädigung, d.h. eine Ungültigkeit, einer Verwaltungsinformationskopie mit Hilfe des Prüfwerts, der dann nicht mehr korrekt ist, erkannt werden.By writing two copies of management information on the storage medium, if one of the copies of management information is damaged, for example due to incompletely programmed memory cells or due to the aging effects of the memory cells, it is ensured that the user data can continue to be used, since the management information contained in the other management information copy is used be able. Damage, i.e. an invalidation, of an administrative information copy can be detected with the aid of the check value, which is then no longer correct.

Bei den Verwaltungsinformationen handelt es sich um Informationen, die den Zugriff auf die gespeicherten Nutzdaten ermöglichen und/oder Eigenschaften davon betreffen. Die Verwaltungsinformationen umfassen beispielsweise Informationen über Ort und/oder Länge der gespeicherten Nutzdaten oder einen Prüfwert, mit dem die Gültigkeit der Nutzdaten geprüft werden kann.The administrative information is information that enables access to the stored user data and / or relates to properties thereof. The administrative information includes, for example, information about the location and / or length of the stored user data or a check value with which the validity of the user data can be checked.

Bevorzugt erfolgt das Schreiben der Nutzdaten zeitlich vor dem Schreiben der Verwaltungsinformationskopien, so dass, wenn z.B. während des Schreibens der Nutzdaten ein Spannungsausfall auftritt, aus dem Nichtvorhandensein einer Verwaltungsinformationskopie, die nach dem Spannungsausfall nicht mehr geschrieben wird, darauf geschlossen werden kann, dass die Nutzdaten fehlerhaft sind und entsprechend nicht verwendet werden sollten.The user data are preferably written before the administrative information copies are written, so that if, for example, a power failure occurs while the user data is being written, the absence of an administrative information copy that is no longer written after the power failure indicates that the user data is in use are faulty and should therefore not be used.

Das Schreiben der zweiten Verwaltungsinformationskopie wird (zeitlich) nach dem Schreiben der ersten Verwaltungsinformationskopie durchgeführt. Dies ist zweckmäßig, da bei einem gleichzeitigen Schreiben ein Spannungsausfall beide Verwaltungsinformationskopien betreffen würde.The writing of the second management information copy is carried out (in terms of time) after the writing of the first management information copy. This is useful because if writing was done at the same time, a power failure would affect both copies of administrative information.

Die beiden Verwaltungsinformationskopien werden bevorzugt nicht benachbart bzw. aufeinanderfolgend auf das Speichermedium geschrieben, um die Wahrscheinlichkeit einer gleichzeitigen Beschädigung zu verringern. D.h. sie werden so geschrieben, dass sie auf dem Speichermedium räumlich voneinander beabstandet gespeichert werden, z.B. durch Nutzung verschiedener „Wordlines“.The two administrative information copies are preferably not written adjacent or consecutively to the storage medium in order to reduce the likelihood of a simultaneous Reduce damage. This means that they are written in such a way that they are stored spatially separated from one another on the storage medium, for example by using different "Wordlines".

Bei dem nicht-flüchtigen Speichermedium handelt es sich bevorzugt um ein EEPROM, PCM (Phase-change Random Access Memory), MRAM (Magnetoresistive Random Access Memory) oder einen Flashspeicher. Es ist aber ebenso die Verwendung beliebiger anderer nicht-flüchtiger Speichermedien möglich, z.B. einer HDD (Hard Disk Drive, Festplatte) oder einer SSD (Solid State Drive). Falls nicht anderweitig spezifiziert, werden alle in dieser Anmeldung genannten Schreib-, Lese- und Löschvorgänge auf dem nicht-flüchtigen Speichermedium ausgeführt, ohne dass dies gesondert erwähnt wird (d.h. ein Verfahrensschritt „Schreiben“ ist als „Schreiben auf das Speichermedium“ bzw. genauer, als „Schreiben auf das nicht-flüchtige Speichermedium“ zu verstehen, „Löschen“ und „Lesen“ sind analog zu verstehen).The non-volatile storage medium is preferably an EEPROM, PCM (phase change random access memory), MRAM (magnetoresistive random access memory) or a flash memory. However, any other non-volatile storage media can also be used, e.g. an HDD (Hard Disk Drive) or an SSD (Solid State Drive). Unless otherwise specified, all write, read and delete operations mentioned in this application are carried out on the non-volatile storage medium without this being specifically mentioned (ie a process step “writing” is called “writing to the storage medium” or more precisely , to be understood as "writing to the non-volatile storage medium", "erasing" and "reading" are to be understood in the same way).

Als Prüfwert bzw. Prüfsumme ist ein Wert zu verstehen, mit Hilfe dessen Fehler der Daten (hier der Verwaltungsinformationskopien) erkannt werden können. Dieser Prüfwert wird beim Speichern mittels einer geeigneten Funktion aus den Daten bestimmt bzw. berechnet und ebenfalls gespeichert. Bei einem späteren Lesen der Daten wird die Funktion erneut auf die Daten angewendet und so erkannt, ob sich der Prüfwert geändert hat. Typischerweise wird der Prüfwert zusammen mit den Daten gespeichert und optional wird beim Lesen die Funktion auf die Daten und den zusammen damit gespeicherten Prüfwert angewandt. Die Funktion wird dabei normalerweise auf einzelne Bereiche bzw. Blöcke von Daten angewandt und für jeden Datenbereich bzw. -block ein Prüfwert berechnet, so dass im Allgemeinen die Daten zusammen mit mehreren Prüfwerten gespeichert werden. Der Einfachheit halber wird in dieser Anmeldung von einem Prüfwert, mit dem die Gültigkeit einer Verwaltungsinformationskopie geprüft werden kann, gesprochen. Dies ist allerdings im Sinne von wenigstens einem Prüfwert zu verstehen, da die Verwaltungsinformationskopien im Allgemeinen aus mehreren Datenblöcken mit zugehörigen mehreren Prüfwerten bestehen, anders formuliert bildet die Gesamtheit dieser mehreren Prüfwerte einer Verwaltungsinformationskopie den Prüfwert im Sinne dieser Anmeldung (dies ist insbesondere abhängig vom verwendeten Prüfwert-Verfahren). Vorzugsweise wird ein CRC-Wert (CRC = Cyclic Redundancy Check) im Rahmen einer zyklischen Redundanzprüfung als Prüfwert verwendet, dessen Berechnung und Verwendung dem Fachmann bekannt ist.A check value or checksum is to be understood as a value with the aid of which errors in the data (here the administrative information copies) can be recognized. When saving, this test value is determined or calculated from the data by means of a suitable function and is also saved. When the data is read later, the function is applied again to the data and it is thus recognized whether the test value has changed. The test value is typically stored together with the data and optionally the function is applied to the data and the test value stored together with it when reading. The function is normally applied to individual areas or blocks of data and a test value is calculated for each data area or block, so that the data are generally stored together with several test values. For the sake of simplicity, this application speaks of a check value with which the validity of an administrative information copy can be checked. However, this is to be understood in the sense of at least one check value, since the administrative information copies generally consist of several data blocks with associated several check values; in other words, the totality of these several check values of an administrative information copy forms the check value for the purposes of this application (this is particularly dependent on the check value used -Proceedings). A CRC value (CRC = Cyclic Redundancy Check) is preferably used as a check value in the context of a cyclic redundancy check, the calculation and use of which is known to the person skilled in the art.

Bevorzugt kann das Verfahren ein Löschen der zweiten Verwaltungsinformationskopie, danach ein Löschen der ersten Verwaltungsinformationskopie und bevorzugt ein Löschen der Nutzdaten nach dem Löschen der ersten und der zweiten Verwaltungsinformationskopie umfassen. Dadurch können Nutzdaten gelöscht werden, wobei auf ein explizites Löschen der Nutzdaten verzichtet werden kann, da bereits durch das Löschen der beiden Verwaltungsinformationskopien erreicht wird, dass die Nutzdaten nicht mehr verwendet werden. Beim im Prinzip speichermediumabhängigen Löschvorgang eines Speicherbereichs wird z.B. in einer Belegungstabelle des Speichermediums eingetragen, dass der Speicherbereich nicht mehr belegt ist. Weiter können die Speicherzellen des Speicherbereichs jeweils mit einem vorbestimmten Wert beschrieben werden, der anzeigt, dass diese nicht belegt sind, oder auch mit zufälligen Werten beschrieben werden.The method can preferably include deleting the second administrative information copy, then deleting the first administrative information copy, and preferably deleting the useful data after deleting the first and second administrative information copies. As a result, user data can be deleted, and there is no need to explicitly delete the user data, since the deletion of the two administrative information copies already means that the user data is no longer used. In the case of the storage medium-dependent deletion of a storage area, for example, it is entered in an allocation table of the storage medium that the storage area is no longer occupied. Furthermore, the memory cells of the memory area can each be written with a predetermined value, which indicates that they are not occupied, or they can also be written with random values.

Weiter kann das Verfahren bevorzugt ein oder mehrmals die folgenden Schritte umfassen: Lesen der ersten Verwaltungsinformationskopie und des ersten Prüfwertes, und Prüfen der Gültigkeit der gelesenen ersten Verwaltungsinformationskopie mittels des gelesenen ersten Prüfwerts; Lesen der zweiten Verwaltungsinformationskopie und des zweiten Prüfwertes, und Prüfen der Gültigkeit der gelesenen zweiten Verwaltungsinformationskopie mittels des gelesenen zweiten Prüfwerts. Gemäß dieser Ausgestaltung kann die Integrität der gespeicherten Verwaltungsinformationen geprüft werden. Dies kann mehrmals, d.h. zu verschiedenen Zeitpunkten, etwa mit jedem Steuergerätestart oder bei bestimmten Ereignissen, z.B. wenn eine Schwankung der Versorgungsspannung festgestellt wird, und/oder in bestimmten Zeitabständen, etwa Minuten, Stunden, Tagen, Wochen o.ä., erfolgen. Abhängig vom Ergebnis der vorstehend genannten Prüfschritte können gemäß bevorzugten Ausgestaltungen des erfindungsgemäßen Verfahrens verschiedene Schritte durchgeführt werden.Furthermore, the method can preferably comprise one or more times the following steps: reading the first administrative information copy and the first check value, and checking the validity of the read first administrative information copy by means of the read first check value; Reading the second copy of management information and the second check value, and checking the validity of the read second copy of management information by means of the read second check value. According to this embodiment, the integrity of the stored management information can be checked. This can be done several times, i.e. at different times, for example with each control unit start or for certain events, e.g. when a fluctuation in the supply voltage is detected, and / or at certain time intervals, such as minutes, hours, days, weeks or the like. Depending on the result of the above-mentioned test steps, various steps can be carried out according to preferred embodiments of the method according to the invention.

Vorzugsweise umfasst das Verfahren, wenn die gelesene erste und die gelesene zweite Verwaltungsinformationskopie gültig und identisch sind, ein Lesen der Nutzdaten unter Verwendung der ersten oder der zweiten Verwaltungsinformationskopie. Bei Lesevorgängen wird die Gültigkeit und Gleichheit beider Verwaltungsinformationskopien geprüft, sind beide gültig und identisch, werden die Nutzdaten gelesen. Dadurch wird mit jedem Lesevorgang sichergestellt, dass die Verwaltungsinformationskopien weiterhin unverändert sind.If the read first and the read second administrative information copies are valid and identical, the method preferably comprises reading the user data using the first or the second administrative information copy. During read processes, the validity and equality of both administrative information copies is checked; if both are valid and identical, the user data is read. This ensures that the administrative information copies remain unchanged with every read process.

Wenn andererseits die beiden Verwaltungsinformationskopien nicht beide gültig und/oder nicht identisch sind, wird kann, zusätzlich oder alternativ zu einem Lesen der Nutzdaten, eine Reparatur der Verwaltungsinformationskopien durchgeführt werden, um zu erreichen, dass wieder zwei gültige und identische Verwaltungsinformationskopien vorhanden sind und entsprechend selbst bei einer nachfolgenden Beschädigung einer der Verwaltungsinformationskopien die Nutzdaten weiterhin verwendbar sind. Die Reparatur kann im Rahmen eines Lesevorgangs von Nutzdaten erfolgen oder auch im Rahmen eines eigenständigen Reparaturvorgangs, der z.B. mit jedem Start eines Steuergeräts, in dem das Speichermedium verwendet wird, oder regelmäßig erfolgt.If, on the other hand, the two administrative information copies are not both valid and / or not identical, the administrative information copies can be repaired in addition or as an alternative to reading the user data in order to ensure that two valid and identical administrative information copies are available again, and accordingly themselves at a subsequent damage to one of the administrative information copies, the user data can still be used. The repair can take place within the framework of a reading process of user data or also within the framework of an independent repair process, which takes place, for example, every time a control device in which the storage medium is used is started or takes place regularly.

Entsprechend umfasst das Verfahren bevorzugt, wenn die gelesene erste und die gelesene zweite Verwaltungsinformationskopie gültig und nicht identisch sind, wenigstens eines, bevorzugt beides, von:

  1. a) Lesen der Nutzdaten unter Verwendung der ersten Verwaltungsinformationskopie;
  2. b) erneutes Schreiben der zweiten Verwaltungsinformationskopie, wobei die in der ersten Verwaltungsinformationskopie beinhalteten Verwaltungsinformationen verwendet werden, und erneutes Bestimmen und Schreiben des zweiten Prüfwerts, mit dem die Gültigkeit der erneut geschriebenen zweiten Verwaltungsinformationskopie geprüft werden kann.
Accordingly, the method preferably comprises, if the read first and the read second administrative information copies are valid and not identical, at least one, preferably both, of:
  1. a) reading the user data using the first administrative information copy;
  2. b) renewed writing of the second administrative information copy, the administrative information contained in the first administrative information copy being used, and renewed determination and writing of the second check value with which the validity of the newly written second administrative information copy can be checked.

Gemäß dieser Ausgestaltung sind beide Verwaltungsinformationskopien zwar gültig aber nicht identisch, was z.B. auftreten kann, wenn sich der Inhalt zweier Speicherzellen zufällig so ändert, dass sich der Prüfwert nicht ändert. In diesem Fall kann die zweite Verwaltungsinformationskopie unter Verwendung der ersten Verwaltungsinformationskopie repariert werden, da der ersten, älteren, Verwaltungsinformationskopie eine höhere Glaubwürdigkeit zugewiesen wird. Im zusätzlichen oder alternativen Leseschritt wird die erste Verwaltungsinformationskopie verwendet, mit Hilfe derer die Reparatur erfolgt. Vorzugsweise wird beides durchgeführt, das Lesen der Nutzdaten (Schritt a)) und das Reparieren der gespeicherten Verwaltungsinformationen (Schritt b)), da so mit jedem Lesezugriff auf das Speichermedium, bei einer erkannten fehlerhaften Verwaltungsinformationskopie, gleichzeitig eine Reparatur erfolgt, also erkannte Fehler schnellstmöglich behoben werden. Das Lesen der Nutzdaten wird bevorzugt vor dem erneuten Schreiben der zweiten Verwaltungsinformationskopie und dem erneuten Bestimmen und Schreiben des zweiten Prüfwerts durchgeführt, d.h. Schritt a) wird bevorzugt vor Schritt b) durchgeführt, so dass die Nutzdaten möglichst schnell verfügbar sind.According to this embodiment, both copies of management information are valid but not identical, which can occur, for example, if the content of two memory cells happens to change in such a way that the test value does not change. In this case, the second management information copy can be repaired using the first management information copy, since the first, older, management information copy is assigned a higher credibility. In the additional or alternative reading step, the first administrative information copy is used, with the aid of which the repair is carried out. Both the reading of the user data (step a)) and the repair of the stored administrative information (step b)) are preferably carried out, since a repair is carried out at the same time with every read access to the storage medium, i.e. identified errors as quickly as possible be resolved. The user data is preferably read before the second copy of the administrative information is written again and the second check value is determined and written again, i.e. step a) is preferably carried out before step b), so that the user data is available as quickly as possible.

„Erneutes Bestimmen“ eines Prüfwerts kann hier und auch bei weiteren Ausführungsformen ein erneutes Berechnen oder ein Übernehmen bzw. Kopieren des jeweilig anderen Prüfwerts bedeuten. D.h. bei Ausführungsformen, in denen der zweite Prüfwert erneut bestimmt wird (wie der vorstehenden) könnte statt einer Neuberechnung auch der aus der ersten Verwaltungsinformationskopie enthaltene erste Prüfwert als neu bestimmter zweiter Prüfwert übernommen werden (vorausgesetzt natürlich, dass das gleiche Berechnungsverfahren, z.B. CRC-Summe, bei erstem und zweitem Prüfwert zum Einsatz kommt). Analog könnte bei Ausführungsformen, in denen der erste Prüfwert erneut bestimmt wird, statt einer Neuberechnung der zweite Prüfwert als neu bestimmter erster Prüfwert übernommen werden.“New determination” of a test value can mean here and also in further embodiments a new calculation or an acceptance or copying of the respective other test value. In other words, in embodiments in which the second check value is determined again (like the one above), instead of a recalculation, the first check value contained in the first administrative information copy could also be adopted as the newly determined second check value (provided, of course, that the same calculation method, e.g. CRC sum , is used for the first and second test value). Similarly, in embodiments in which the first test value is determined again, the second test value could be adopted as the newly determined first test value instead of a recalculation.

Ist weiterhin genau eine der Verwaltungsinformationskopien ungültig, umfasst das Verfahren bevorzugt: wenn die gelesene erste Verwaltungsinformationskopie gültig ist und die gelesene zweite Verwaltungsinformationskopie nicht gültig ist, wenigstens eines, bevorzugt beides, von:

  • c) Lesen der Nutzdaten unter Verwendung der ersten Verwaltungsinformationskopie;
  • d) erneutes Schreiben der zweiten Verwaltungsinformationskopie, wobei die in der ersten Verwaltungsinformationskopie beinhalteten Verwaltungsinformationen verwendet werden, und erneutes Bestimmen und Schreiben des zweiten Prüfwerts, mit dem die Gültigkeit der erneut geschriebenen zweiten Verwaltungsinformationskopie geprüft werden kann.
If exactly one of the administrative information copies is also invalid, the method preferably comprises: if the read first administrative information copy is valid and the read second administrative information copy is not valid, at least one, preferably both, of:
  • c) reading the user data using the first administrative information copy;
  • d) again writing the second administrative information copy, the administrative information contained in the first administrative information copy being used, and again determining and writing the second check value with which the validity of the newly written second administrative information copy can be checked.

Oder, wenn die gelesene zweite Verwaltungsinformationskopie gültig ist und die gelesene erste Verwaltungsinformationskopie nicht gültig ist, wenigstens eines, bevorzugt beides, von:

  • e) Lesen der Nutzdaten unter Verwendung der zweiten Verwaltungsinformationskopie;
  • f) erneutes Schreiben der ersten Verwaltungsinformationskopie, wobei die in der zweiten Verwaltungsinformationskopie beinhalteten Verwaltungsinformationen verwendet werden, und erneutes Bestimmen und Schreiben des erstes Prüfwerts, mit dem die Gültigkeit der erneut geschriebenen ersten Verwaltungsinformationskopie geprüft werden kann.
Or, if the read second administrative information copy is valid and the read first administrative information copy is not valid, at least one, preferably both, of:
  • e) reading the user data using the second administrative information copy;
  • f) again writing the first administrative information copy, the administrative information contained in the second administrative information copy being used, and again determining and writing the first check value with which the validity of the newly written first administrative information copy can be checked.

Es wird also jeweils die ungültige Verwaltungsinformationskopie mit Hilfe der gültigen Verwaltungsinformationskopie repariert, so dass wieder zwei gültige und identische Verwaltungsinformationskopien vorhanden sind. Auch hier wird bevorzugt sowohl ein Lesen der Nutzdaten (Schritt c) bzw. e)) als auch eine Reparatur der gespeicherten Verwaltungsinformation (Schritt d) bzw. f)) durchgeführt. Ebenso wird der Leseschritt bevorzugt vor dem erneuten Schreiben der zweiten bzw. ersten Verwaltungsinformationskopie und dem erneuten Bestimmen und Schreiben des zweiten bzw. ersten Prüfwerts durchgeführt.The invalid administrative information copy is therefore repaired in each case with the aid of the valid administrative information copy, so that two valid and identical administrative information copies are again available. Here, too, both the reading of the user data (step c) or e)) and the repair of the stored administrative information (step d) or f)) are preferably carried out. Likewise, the reading step is preferably carried out before the second or first administrative information copy is written again and the second or first check value is determined and written again.

Weiter kann das Verfahren bevorzugt umfassen: wenn die gelesene erste Verwaltungsinformationskopie und die gelesene zweite Verwaltungsinformationskopie nicht gültig sind: Löschen der ersten Verwaltungsinformationskopie und, bevorzugt nachfolgend, Löschen der zweiten Verwaltungsinformationskopie. Sind beide Verwaltungsinformationskopien ungültig, also verändert, ist ein Zugriff auf die zugehörigen Nutzdaten nicht mehr möglich, durch Löschen der Verwaltungsinformationskopie wird dies für ein Steuergerät, das darauf zugreifen will, klar erkennbar. Hier kann optional auch ein Löschen der Nutzdaten vorgesehen werden.The method can furthermore preferably comprise: if the read first Management information copy and the read second management information copy are not valid: deletion of the first management information copy and, preferably subsequently, deletion of the second management information copy. If both copies of administrative information are invalid, that is to say changed, access to the associated user data is no longer possible; by deleting the administrative information copy, this is clearly recognizable for a control device that wants to access it. A deletion of the user data can optionally also be provided here.

Eine erfindungsgemäße Recheneinheit, z.B. ein Steuergerät eines Kraftfahrzeugs, ist, insbesondere programmtechnisch, dazu eingerichtet, ein erfindungsgemäßes Verfahren durchzuführen.A computing unit according to the invention, for example a control unit of a motor vehicle, is set up, in particular in terms of programming, to carry out a method according to the invention.

Auch die Implementierung eines erfindungsgemäßen Verfahrens in Form eines Computerprogramms oder Computerprogrammprodukts mit Programmcode zur Durchführung aller Verfahrensschritte ist vorteilhaft, da dies besonders geringe Kosten verursacht, insbesondere wenn ein ausführendes Steuergerät noch für weitere Aufgaben genutzt wird und daher ohnehin vorhanden ist. Geeignete Datenträger zur Bereitstellung des Computerprogramms sind insbesondere magnetische, optische und elektrische Speicher, wie z.B. Festplatten, Flash-Speicher, EEPROMs, DVDs u.a.m. Auch ein Download eines Programms über Computernetze (Internet, Intranet usw.) ist möglich.The implementation of a method according to the invention in the form of a computer program or computer program product with program code for performing all method steps is advantageous, since this causes particularly low costs, especially if an executing control device is used for other tasks and is therefore available anyway. Suitable data carriers for providing the computer program are, in particular, magnetic, optical and electrical memories, such as hard drives, flash memories, EEPROMs, DVDs, etc. A program can also be downloaded via computer networks (Internet, intranet, etc.).

Weitere Vorteile und Ausgestaltungen der Erfindung ergeben sich aus der Beschreibung und der beiliegenden Zeichnung.Further advantages and embodiments of the invention emerge from the description and the accompanying drawing.

Die Erfindung ist anhand von Ausführungsbeispielen in der Zeichnung schematisch dargestellt und wird im Folgenden unter Bezugnahme auf die Zeichnung beschrieben.The invention is shown schematically in the drawing using exemplary embodiments and is described below with reference to the drawing.

FigurenlisteFigure list

  • 1 zeigt einen beispielhaften Schreibvorgang von Nutzdaten und Verwaltungsinformationen gemäß der vorliegenden Erfindung; 1 shows an exemplary write process of user data and management information according to the present invention;
  • 2 zeigt einen beispielhaften Löschvorgang von Nutzdaten und Verwaltungsinformationen gemäß der vorliegenden Erfindung; und 2 shows an exemplary deletion process of user data and management information according to the present invention; and
  • 3 zeigt einen beispielhaften Reparaturvorgang von Verwaltungsinformationen bzw. Lesevorgang von Nutzdaten gemäß der vorliegenden Erfindung. 3 shows an exemplary repair process of management information or reading process of user data according to the present invention.

Ausführungsform(en) der ErfindungEmbodiment (s) of the invention

1 stellt einen beispielhaften Schreibvorgang von Nutzdaten und Verwaltungsinformationen gemäß der vorliegenden Erfindung dar, hier beispielhaft in einer Recheneinheit 100 (z.B. ein Steuergerät oder ein Prozessor eines Steuergeräts) mit einem nicht-flüchtigen Speichermedium 110 (z.B. ein damit verbundener oder darin integrierter Flashspeicher). 1 represents an exemplary writing process of user data and management information according to the present invention, here by way of example in a processing unit 100 (eg a control unit or a processor of a control unit) with a non-volatile storage medium 110 (e.g. a flash memory connected to it or integrated in it).

Dabei werden zunächst in Schritt 12 die zu schreibenden Nutzdaten 120 auf das Speichermedium 110 geschrieben.First in step 12th the user data to be written 120 on the storage medium 110 written.

In Schritt 14, der hier Schritt 12 nachfolgend dargestellt ist, je nach Art der Verwaltungsinformationen aber auch vor oder gleichzeitig mit Schritt 12 erfolgen kann, werden die geschriebenen Nutzdaten betreffende Verwaltungsinformationen bestimmt, welche insbesondere Ort und Länge der geschriebenen Nutzdaten umfassen können.In step 14th who step here 12th is shown below, but also before or at the same time as Step, depending on the type of management information 12th can take place, management information relating to the written useful data is determined, which in particular can include the location and length of the written useful data.

In Schritt 16 wird eine erste Kopie der Verwaltungsinformationen, d.h. eine erste Verwaltungsinformationskopie 122, gespeichert bzw. geschrieben. Auch wird ein erster Prüfwert, mit dem die Gültigkeit der ersten Verwaltungsinformationskopie geprüft werden kann, bestimmt und ebenfalls gespeichert (zusammen mit der ersten Verwaltungsinformationskopie). Das Speichern der ersten Verwaltungsinformationskopie (Schritt 16) sollte erst nach Speichern der Nutzdaten (Schritt 12) erfolgen, so dass, wenn es z.B. während des Speicherns der Nutzdaten zu einer Spannungsunterbrechung kommt, die Verwaltungsinformationen nicht auf das Speichermedium geschrieben sind und damit bei einem eventuellen Leseversuch der Nutzdaten erkennbar ist, dass diese nicht in vollständiger Weise vorhanden sein können, da die zugehörigen Verwaltungsinformationen fehlen.In step 16 becomes a first copy of the management information, ie a first management information copy 122 , saved or written. A first check value, with which the validity of the first administrative information copy can be checked, is also determined and also stored (together with the first administrative information copy). Saving the first administrative information copy (step 16 ) should not take place until after the user data has been saved (step 12th ), so that if, for example, there is a power interruption while the user data is being saved, the management information is not written to the storage medium and, if the user data is attempted to be read, it can be seen that the user data cannot be completely available, as the related administrative information is missing.

In Schritt 18 wird eine zweite Kopie der Verwaltungsinformationen, d.h. eine zweite Verwaltungsinformationskopie 124, gespeichert bzw. geschrieben. Auch wird ein zweiter Prüfwert, mit dem die Gültigkeit der zweiten Verwaltungsinformationskopie geprüft werden kann, bestimmt und ebenfalls gespeichert (zusammen mit der zweiten Verwaltungsinformationskopie). Dieser Schritt 18 (Speichern der zweiten Verwaltungsinformationskopie und des zweiten Prüfwerts) findet zweckmäßigerweise nach Schritt 16 (Speichern der ersten Verwaltungsinformationskopie und des ersten Prüfwerts) statt. Bei der Speicherung der zweiten Verwaltungsinformationskopie 124 wird vorzugsweise sichergestellt, dass diese in einem Bereich des Speichers gespeichert wird, der von dem Bereich, in dem die erste Verwaltungsinformationskopie 122 gespeichert wird, räumlich getrennt ist (wie dargestellt), so dass die Wahrscheinlichkeit, dass ein im Speicher auftretender Fehler beide Verwaltungsinformationskopien betrifft, verringert wird.In step 18th becomes a second copy of the management information, ie a second management information copy 124 , saved or written. A second check value, with which the validity of the second administrative information copy can be checked, is also determined and also stored (together with the second administrative information copy). This step 18th (Saving the second administrative information copy and the second check value) expediently takes place after step 16 (Saving the first administrative information copy and the first check value) instead. When storing the second administrative information copy 124 it is preferably ensured that this is stored in an area of the memory that differs from the area in which the first administrative information copy 122 is stored, is spatially separated (as shown), so that the likelihood that an error occurring in the memory will affect both copies of management information is reduced.

Insgesamt wird durch die Abfolge von Schritten 12-18 gewährleistet, dass Fehler, z.B. Spannungsausfälle, während des Schreibvorgangs erkannt werden können, da keine oder nur unvollständige (d.h. ungültige) Verwaltungsinformationskopien vorhanden sind. Nur wenn wenigstens eine gültige Verwaltungsinformationskopie vorhanden ist, werden die zugehörigen Nutzdaten als gültig angesehen und können verwendet werden.Overall it is made through the sequence of steps 12-18 ensures that errors, e.g. Power failures can be detected during the write process because no or only incomplete (ie invalid) administrative information copies are available. Only if at least one valid administrative information copy is available, the associated user data are regarded as valid and can be used.

2 stellt einen beispielhaften Löschvorgang von Nutzdaten und Verwaltungsinformationen gemäß der vorliegenden Erfindung dar. Zunächst wird in Schritt 22 die zweite Verwaltungsinformationskopie gelöscht. In Schritt 24 wird die erste Verwaltungsinformationskopie gelöscht. Diese beiden Schritte werden bevorzugt in der angegebenen Reihenfolge durchgeführt, es ist aber auch möglich, dass die beiden Schritte in umgekehrter Reihenfolge durchgeführt werden. 2 shows an exemplary deletion process of user data and management information according to the present invention. First, in step 22nd the second copy of management information is deleted. In step 24 the first administrative information copy is deleted. These two steps are preferably carried out in the order given, but it is also possible for the two steps to be carried out in reverse order.

Nachdem die beiden Verwaltungsinformationskopien gelöscht wurden, werden im optionalen Schritt 26 die Nutzdaten gelöscht. Im Prinzip erfolgen die Schritte beim Löschvorgang also in umgekehrter Reihenfolge zu den Schritten beim Schreibvorgang, es wird also sichergestellt, dass eventuell unvollständig gelöschte Nutzdaten (etwa bei einem Spannungsausfall während des Löschvorgangs) als unzulässig und nicht verwendbar erkannt werden, da die zugehörigen Verwaltungsinformationen bereits zuvor gelöscht wurden. Entsprechend kann Schritt 26 optional auch unterbleiben, da, nachdem die beiden Verwaltungsinformationskopien gelöscht sind, die zugehörigen Nutzdaten als unzulässig erkannt werden (da keine Verwaltungsinformationskopie vorhanden ist) und ihre Verwendung unterbunden werden kann.After the two administrative copies of information have been deleted, the optional step 26th the user data is deleted. In principle, the steps during the deletion process are carried out in reverse order to the steps during the write process, so it is ensured that any incompletely deleted user data (e.g. in the event of a power failure during the deletion process) are recognized as inadmissible and unusable, since the associated administrative information is already recognized beforehand have been deleted. Correspondingly can step 26th optionally also omitted, since after the two administrative information copies have been deleted, the associated user data are recognized as inadmissible (since no administrative information copy is available) and their use can be prevented.

3 stellt einen beispielhaften Reparaturvorgang von Verwaltungsinformationen bzw. einen einen Reparaturvorgang einschließenden Lesevorgang von Nutzdaten gemäß der vorliegenden Erfindung dar. Ein Reparaturvorgang von Verwaltungsinformationen kann als eigenständiger Prozess ablaufen (etwa beim Start eines Steuergeräts, in regelmäßigen Abständen oder an Zeitpunkten, an denen die Rechenleistung des Steuergeräts und das Speichermedium nicht anderweitig gebraucht werden), um Fehler in den Verwaltungsinformationskopien zu finden und zu reparieren, oder auch zusammen mit einem Lesevorgang von Nutzdaten stattfinden, d.h. während der Lesezugriffe auf die Nutzdaten wird gleichzeitig die Integrität der Verwaltungsinformationskopien geprüft und die Verwaltungsinformationskopien werden falls möglich repariert. 3 represents an exemplary repair process for management information or a read process for user data that includes a repair process. A repair process for management information can run as an independent process (for example when starting a control unit, at regular intervals or at times when the computing power of the control unit and the storage medium is not used for any other purpose) to find and repair errors in the administrative information copies, or take place together with a read process of user data, i.e. during read access to the user data, the integrity of the administrative information copies is checked at the same time and the administrative information copies are checked if possible repaired.

Dabei werden in Schritt 32 die erste Verwaltungsinformationskopie und der erste Prüfwert und in Schritt 36 die zweite Verwaltungsinformationskopie und der zweite Prüfwert gelesen. In Schritt 34 wird die Gültigkeit der ersten Verwaltungsinformationskopie unter Verwendung des ersten Prüfwerts geprüft und in Schritt 38 wird die Gültigkeit der zweiten Verwaltungsinformationskopie unter Verwendung des zweiten Prüfwerts geprüft. Bei diesen Schritten 32-38 kann, soweit möglich (das Prüfen einer Verwaltungsinformationskopie kann klarerweise nicht vor dem Lesen derselben erfolgen), von der in der Figur gezeigten Reihenfolge abgewichen werden, oder einzelne Schritte können auch gleichzeitig erfolgen.Doing so in step 32 the first management information copy and the first check value and in step 36 read the second copy of management information and read the second check value. In step 34 the validity of the first administrative information copy is checked using the first check value, and in step 38 the validity of the second administrative information copy is checked using the second check value. With these steps 32 - 38 can, as far as possible (the checking of an administrative information copy clearly cannot take place before reading the same), can be deviated from the sequence shown in the figure, or individual steps can also take place simultaneously.

In Schritt 40 werden abhängig von der Gültigkeit der ersten und der zweiten Verwaltungsinformationskopie die folgenden Fälle unterschieden: beide Verwaltungsinformationskopien sind gültig, beide Verwaltungsinformationskopien sind ungültig, oder eine Verwaltungsinformationskopie ist gültig während die andere Verwaltungsinformationskopie ungültig ist.In step 40 the following cases are distinguished depending on the validity of the first and second management information copies: both management information copies are valid, both management information copies are invalid, or one management information copy is valid while the other management information copy is invalid.

Wenn beide Verwaltungsinformationskopien gültig sind, wird in Schritt 42 dahingehend unterschieden, ob die beiden Verwaltungsinformationskopien identisch sind oder nicht. Wenn beide Verwaltungsinformationskopien identisch sind, wird, wenn es sich um einen Lesevorgang handelt, in Schritt 44 mit dem Lesen der Nutzdaten fortgefahren, wobei die erste oder die zweite Verwaltungsinformationskopie (die ja identisch sind) verwendet wird. Handelt es sich um einen reinen Reparaturvorgang, muss nichts weiter gemacht werden bzw. es kann mit der Überprüfung des nächsten Datensatzes von Nutzdaten und zugehörigen Verwaltungsinformationen fortgefahren werden (Anmerkung: Im Allgemeinen sind mehrere verschiedene Datensätze von Nutzdaten mit jeweiligen Verwaltungsinformationen gespeichert und zu überprüfen).If both copies of the management information are valid, step 42 distinguished as to whether the two management information copies are identical or not. If both copies of management information are identical, if it is a read operation in step 44 continue reading the user data, using the first or the second copy of the management information (which are identical). If it is purely a repair process, nothing further needs to be done or the check of the next data set of user data and associated administrative information can be continued (Note: In general, several different data sets of user data with respective administrative information are stored and checked).

Wenn beide Verwaltungsinformationskopien zwar gültig aber nicht identisch sind, wird eine der beiden Verwaltungsinformationskopien unter Verwendung der anderen Verwaltungsinformationskopie neu geschrieben. Dazu findet in Schritt 48 ein erneutes Schreiben der zweiten Verwaltungsinformationskopie statt, wobei die in der ersten Verwaltungsinformationskopie enthaltenen Verwaltungsinformationen verwendet werden, d.h. die erneut geschriebene zweite Verwaltungsinformationskopie beinhaltet die in der ersten Verwaltungsinformationskopie enthaltenen Verwaltungsinformationen, anderes formuliert wird die zweite Verwaltungsinformationskopie sozusagen mit der ersten Verwaltungsinformationskopie überschrieben. Ebenso wird der zweite Prüfwert neu bestimmt und erneut geschrieben, so dass mit diesem die Gültigkeit der neu geschriebenen zweiten Verwaltungsinformationskopie geprüft werden kann. Zusätzlich kann in Schritt 46 ein Lesen der zugehörigen Nutzdaten durchgeführt werden, wobei die in der ersten Verwaltungsinformationskopie enthaltenen Verwaltungsinformationen verwendet werden.If both management information copies are valid but not identical, one of the two management information copies is rewritten using the other management information copy. To do this, see step 48 the second administrative information copy is rewritten, the administrative information contained in the first administrative information copy being used, ie the newly written second administrative information copy contains the administrative information contained in the first administrative information copy; in other words, the second administrative information copy is overwritten, so to speak, with the first administrative information copy. The second check value is also redefined and rewritten so that the validity of the newly written second administrative information copy can be checked with it. In addition, in step 46 the associated user data can be read, using the management information contained in the first management information copy.

Der Schritt des Lesens 46 der Nutzdaten kann nach oder vor dem Schritt 48 des erneuten Schreibens der zweiten Verwaltungsinformationskopie durchgeführt werden. Bevorzugt ist, dass das Lesen vor Schritt 48 (Überschreiben) durchgeführt wird. Weiter bevorzugt kann Schritt 46 bzw. Schritt 44 (beides Lesen der Nutzdaten) bereits vor Schritt 42, dem Unterscheiden ob oder nicht die beiden Verwaltungsinformationskopien identisch sind, durchgeführt werden. Dabei wird der Lese-Schritt 44, 46 vorzugsweise möglichst früh durchgeführt, damit die Nutzdaten möglichst früh verfügbar sind.The step of reading 46 the payload can be after or before the step 48 of rewriting the second copy of management information. It is preferred that reading step before step 48 (Overwrite) is performed. Step 46 or step 44 (both reading the user data) before step 42 , discriminating whether or not the two copies of management information are identical, can be performed. This is where the reading step 44 , 46 preferably carried out as early as possible so that the useful data are available as early as possible.

Wenn beide Verwaltungsinformationskopien nicht gültig sind, werden in Schritt 50 die erste und die zweite Verwaltungsinformationskopie gelöscht. Optional werden in Schritt 52 weiterhin die zugehörigen Nutzdaten gelöscht. Dies kann jedoch auch unterbleiben, da bereits mit Löschen der Verwaltungsinformationskopien die zugehörigen Nutzdaten als ungültig erkennbar sind.If both copies of administrative information are not valid, step 50 the first and second copies of management information are deleted. Optional in step 52 continue to delete the associated user data. However, this can also be omitted, since the associated user data can already be recognized as invalid when the administrative information copies are deleted.

Wenn eine der beiden Verwaltungsinformationskopien gültig ist und die andere ungültig ist, wird die ungültige durch die gültige Verwaltungsinformationskopie überschrieben. Dabei wird, wenn die erste Verwaltungsinformationskopie gültig ist und die zweite Verwaltungsinformationskopie ungültig ist, in Schritt 58 die zweite Verwaltungsinformationskopie erneut geschrieben wobei die in der ersten Verwaltungsinformationskopie enthaltenen Verwaltungsinformationen verwendet werden, d.h. die erneut geschriebene zweite Verwaltungsinformationskopie beinhaltet die in der ersten Verwaltungsinformationskopie enthaltenen Verwaltungsinformationen. Ebenso wird der zweite Prüfwert neu bestimmt und erneut geschrieben, so dass mit diesem die Gültigkeit der neu geschriebenen zweiten Verwaltungsinformationskopie geprüft werden kann. Optional können in Schritt 56 die Nutzdaten gelesen werden, wobei die erste Verwaltungsinformationskopie, d.h. die darin enthaltenen Verwaltungsinformationen, verwendet werden. Dieser Lese-Schritt wird bevorzugt vor dem Schritt 58 des Überschreibens durchgeführt, kann aber auch nach oder gleichzeitig mit diesem durchgeführt werden.If one of the two management information copies is valid and the other is invalid, the invalid management information copy is overwritten by the invalid one. Thereby, if the first management information copy is valid and the second management information copy is invalid, in step 58 the second management information copy is rewritten, the management information contained in the first management information copy being used, that is to say the rewritten second management information copy contains the management information contained in the first management information copy. The second check value is also redefined and rewritten so that the validity of the newly written second administrative information copy can be checked with it. Optionally, in step 56 the user data are read, the first administrative information copy, ie the administrative information contained therein, being used. This reading step is preferred over the step 58 of overwriting, but can also be carried out after or at the same time as this.

Wenn andererseits die erste Verwaltungsinformationskopie ungültig ist und die zweite Verwaltungsinformationskopie gültig ist, wird in Schritt 62 die erste Verwaltungsinformationskopie erneut geschrieben wobei die in der zweiten Verwaltungsinformationskopie enthaltenen Verwaltungsinformationen verwendet werden, d.h. die erneut geschriebene erste Verwaltungsinformationskopie beinhaltet die in der zweiten Verwaltungsinformationskopie enthaltenen Verwaltungsinformationen. Ebenso wird der erste Prüfwert neu bestimmt und erneut geschrieben, so dass mit diesem die Gültigkeit der neu geschriebenen zweiten Verwaltungsinformationskopie geprüft werden kann. Optional können in Schritt 60 die Nutzdaten gelesen werden, wobei die zweite Verwaltungsinformationskopie, d.h. die darin enthaltenen Verwaltungsinformationen, verwendet werden. Dieser Lese-Schritt wird bevorzugt vor dem Schritt 62 des Überschreibens durchgeführt, kann aber auch nach oder gleichzeitig mit diesem durchgeführt werden.On the other hand, if the first copy of management information is invalid and the second copy of management information is valid, step 62 the first administrative information copy is rewritten, the administrative information contained in the second administrative information copy being used, that is to say the newly written first administrative information copy contains the administrative information contained in the second administrative information copy. Likewise, the first check value is newly determined and rewritten so that the validity of the newly written second administrative information copy can be checked with it. Optionally, in step 60 the user data are read, the second administrative information copy, ie the administrative information contained therein, being used. This reading step is preferred over the step 62 of overwriting, but can also be carried out after or at the same time as this.

Claims (12)

Verfahren zur fehlertoleranten Speicherung von Nutzdaten auf einem nicht-flüchtigen Speichermedium (110), auf dem Schreib-, Lese- und Löschvorgänge ausgeführt werden können, umfassend Schreiben (12) der Nutzdaten (120); Bestimmen (14) von Verwaltungsinformationen für die geschriebenen Nutzdaten; Schreiben (16) einer ersten Verwaltungsinformationskopie (122), die die bestimmten Verwaltungsinformationen beinhaltet, und Bestimmen und Schreiben eines ersten Prüfwerts, mit dem die Gültigkeit der ersten Verwaltungsinformationskopie geprüft werden kann; und danach Schreiben (18) einer zweiten Verwaltungsinformationskopie (124), die die bestimmten Verwaltungsinformationen beinhaltet, und Bestimmen und Schreiben eines zweiten Prüfwerts, mit dem die Gültigkeit der zweiten Kopie der Verwaltungsinformationen geprüft werden kann.A method for fault-tolerant storage of user data on a non-volatile storage medium (110) on which write, read and delete operations can be carried out, comprising Writing (12) the user data (120); Determining (14) management information for the written user data; Writing (16) a first administrative information copy (122) which contains the determined administrative information, and determining and writing a first check value with which the validity of the first administrative information copy can be checked; and then Writing (18) a second administrative information copy (124) which contains the determined administrative information, and determining and writing a second check value with which the validity of the second copy of the administrative information can be checked. Verfahren nach Anspruch 1, umfassend Löschen (22) der zweiten Verwaltungsinformationskopie (124); danach Löschen (24) der ersten Verwaltungsinformationskopie (122); und bevorzugt Löschen (26) der Nutzdaten (120) nach dem Löschen der ersten Verwaltungsinformationskopie.Procedure according to Claim 1 comprising deleting (22) the second copy of management information (124); thereafter deleting (24) the first administrative information copy (122); and preferably deleting (26) the user data (120) after deleting the first administrative information copy. Verfahren nach einem der vorhergehenden Ansprüche, umfassend ein- oder mehrmals: Lesen (32) der ersten Verwaltungsinformationskopie (122) und des ersten Prüfwertes und Prüfen (34) der Gültigkeit der gelesenen ersten Verwaltungsinformationskopie mittels des gelesenen ersten Prüfwerts; und Lesen (36) der zweiten Verwaltungsinformationskopie (124) und des zweiten Prüfwertes und Prüfen der Gültigkeit (38) der gelesenen zweiten Verwaltungsinformationskopie mittels des gelesenen zweiten Prüfwerts.Method according to one of the preceding claims, comprising one or more times: Reading (32) the first administrative information copy (122) and the first check value and checking (34) the validity of the read first administrative information copy by means of the read first check value; and Reading (36) the second administrative information copy (124) and the second check value and checking the validity (38) of the read second administrative information copy by means of the read second check value. Verfahren nach Anspruch 3, umfassend, wenn die gelesene erste Verwaltungsinformationskopie (122) gültig ist und die gelesene zweite Verwaltungsinformationskopie (124) nicht gültig ist, Lesen (56) der Nutzdaten (120) unter Verwendung der ersten Verwaltungsinformationskopie; und/oder erneutes Schreiben (58) der zweiten Verwaltungsinformationskopie, wobei die in der ersten Verwaltungsinformationskopie beinhalteten Verwaltungsinformationen verwendet werden, und erneutes Bestimmen und Schreiben des zweiten Prüfwerts, mit dem die Gültigkeit der erneut geschriebenen zweiten Verwaltungsinformationskopie geprüft werden kann.Procedure according to Claim 3 comprising, if the read first management information copy (122) is valid and the read second management information copy (124) is not valid, reading (56) the user data (120) using the first management information copy; and / or rewrite (58) the second copy of the management information, the in the first Management information copy contained management information are used, and again determining and writing the second check value with which the validity of the rewritten second management information copy can be checked. Verfahren nach einem der Ansprüche 3 oder 4, umfassend, wenn die gelesene zweite Verwaltungsinformationskopie (124) gültig ist und die gelesene erste Verwaltungsinformationskopie (122) nicht gültig ist, Lesen (60) der Nutzdaten (120) unter Verwendung der zweiten Verwaltungsinformationskopie; und/oder erneutes Schreiben (62) der ersten Verwaltungsinformationskopie, wobei die in der zweiten Verwaltungsinformationskopie beinhalteten Verwaltungsinformationen verwendet werden, und erneutes Bestimmen und Schreiben des ersten Prüfwerts, mit dem die Gültigkeit der erneut geschriebenen ersten Verwaltungsinformationskopie geprüft werden kann.Method according to one of the Claims 3 or 4th comprising, if the read second management information copy (124) is valid and the read first management information copy (122) is not valid, reading (60) the user data (120) using the second management information copy; and / or rewriting (62) the first administrative information copy, wherein the administrative information contained in the second administrative information copy is used, and again determining and writing the first check value with which the validity of the rewritten first administrative information copy can be checked. Verfahren nach einem der Ansprüche 3 bis 5, umfassend, wenn die gelesene erste und die gelesene zweite Verwaltungsinformationskopie (122, 124) gültig und identisch sind, Lesen (44) der Nutzdaten (120) unter Verwendung der ersten oder der zweiten Verwaltungsinformationskopie.Method according to one of the Claims 3 until 5 comprising, if the read first and the read second management information copies (122, 124) are valid and identical, reading (44) the user data (120) using the first or the second management information copy. Verfahren nach einem der Ansprüche 3 bis 6, umfassend, wenn die gelesene erste und die gelesene zweite Verwaltungsinformationskopie (122, 124) gültig und nicht identisch sind, Lesen (46) der Nutzdaten (120) unter Verwendung der ersten Verwaltungsinformationskopie; und/oder erneutes Schreiben (48) der zweiten Verwaltungsinformationskopie, wobei die in der ersten Verwaltungsinformationskopie beinhalteten Verwaltungsinformationen verwendet werden, und erneutes Bestimmen und Schreiben des zweiten Prüfwerts, mit dem die Gültigkeit der erneut geschriebenen zweiten Verwaltungsinformationskopie geprüft werden kann.Method according to one of the Claims 3 until 6th comprising, if the read first and second management information copies (122, 124) are valid and not identical, reading (46) the user data (120) using the first management information copy; and / or rewriting (48) the second administrative information copy, wherein the administrative information contained in the first administrative information copy is used, and again determining and writing the second check value with which the validity of the rewritten second administrative information copy can be checked. Verfahren nach einem der Ansprüche 3 bis 7, umfassend, wenn die gelesene erste Verwaltungsinformationskopie (122) und die gelesene zweite Verwaltungsinformationskopie (124) nicht gültig sind, Löschen (50) der ersten Verwaltungsinformationskopie und der zweiten Verwaltungsinformationskopie und bevorzugt Löschen (52) der Nutzdaten.Method according to one of the Claims 3 until 7th comprising, if the read first administrative information copy (122) and the read second administrative information copy (124) are not valid, deleting (50) the first administrative information copy and the second administrative information copy and preferably deleting (52) the user data. Verfahren nach einem der vorhergehenden Ansprüche, wobei die Verwaltungsinformationen Informationen über Ort und/oder Länge der gespeicherten Nutzdaten oder eine Prüfsumme, mit der die Gültigkeit der Nutzdaten geprüft werden kann, umfassen.Method according to one of the preceding claims, wherein the administrative information includes information about the location and / or length of the stored user data or a checksum with which the validity of the user data can be checked. Recheneinheit (100), die dazu eingerichtet ist, alle Verfahrensschritte eines Verfahrens nach einem der vorstehenden Ansprüche durchzuführen.Computing unit (100) which is set up to carry out all method steps of a method according to one of the preceding claims. Computerprogramm, das eine Recheneinheit (100) dazu veranlasst, alle Verfahrensschritte eines Verfahrens nach einem der Ansprüche 1 bis 9 durchzuführen, wenn es auf der Recheneinheit ausgeführt wird.Computer program that causes a processing unit (100) to perform all method steps of a method according to one of the Claims 1 until 9 to be carried out when it is executed on the processing unit. Maschinenlesbares Speichermedium mit einem darauf gespeicherten Computerprogramm nach Anspruch 11.Machine-readable storage medium with a computer program stored thereon Claim 11 .
DE102020207618.9A 2020-06-19 2020-06-19 Method for fault-tolerant storage of user data Pending DE102020207618A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
DE102020207618.9A DE102020207618A1 (en) 2020-06-19 2020-06-19 Method for fault-tolerant storage of user data
CN202110678527.XA CN113821372A (en) 2020-06-19 2021-06-18 Method for fault-tolerant storage of user data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE102020207618.9A DE102020207618A1 (en) 2020-06-19 2020-06-19 Method for fault-tolerant storage of user data

Publications (1)

Publication Number Publication Date
DE102020207618A1 true DE102020207618A1 (en) 2021-12-23

Family

ID=78822966

Family Applications (1)

Application Number Title Priority Date Filing Date
DE102020207618.9A Pending DE102020207618A1 (en) 2020-06-19 2020-06-19 Method for fault-tolerant storage of user data

Country Status (2)

Country Link
CN (1) CN113821372A (en)
DE (1) DE102020207618A1 (en)

Also Published As

Publication number Publication date
CN113821372A (en) 2021-12-21

Similar Documents

Publication Publication Date Title
DE112011103295B4 (en) Decoding in solid-state storage devices
DE102008003944B4 (en) Memory system and programming method for a memory system
DE102005045031B4 (en) Programming method and program resumption method for a nonvolatile memory device
DE102007016460A1 (en) Non-volatile memory device, non-volatile memory system and reading method for a nonvolatile memory device
DE102006036070B4 (en) Cargo trap storage device and method for its manufacture and operation
DE102011075814B4 (en) Memory buffer with accessible information after a write error
DE112008001151B4 (en) Multi-bit programming device and method for multi-bit programming
DE102010037290A1 (en) Memory systems and methods for detecting a distribution of unstable memory cells
DE19839680B4 (en) Method and device for modifying the memory contents of control units
DE69930439T2 (en) Electrical device with integrated flash memory
DE112021004294T5 (en) METHOD AND APPARATUS FOR DETERMINING WHEN THE ACTUAL WEAR OF A FLASH MEMORY DEVICE VARIES FROM RELIABILITY CONDITIONS FOR THE FLASH MEMORY DEVICE
DE69820164T2 (en) Storage device and data reading and writing methods
DE602005003778T2 (en) A method and apparatus for rewriting a sector with bootloader software in a sector-erasable non-volatile semiconductor memory
DE102015210651B4 (en) Circuit and method for testing an error correction capability
DE112008003409T5 (en) Redundant bit patterns for column defect coding
DE102006009214A1 (en) Contents writing method for e.g. uniform channel programming electrically erasable ROM, involves writing contents of output memory to target memory if selection memory indicates to output memory that target memory is not written
DE102016107285B4 (en) METHOD FOR USING A MEMORY DEVICE, MEMORY DEVICE AND MEMORY DEVICE ARRANGEMENT
DE102020207618A1 (en) Method for fault-tolerant storage of user data
DE102018219877A1 (en) Device and method for generating error correction information
DE10148047B4 (en) Method and device for securing data in a memory module and memory module
EP2003566B1 (en) Method and control device for operating a non-volatile memory, in particular for use in motor vehicles
DE112015002881B4 (en) Storage device, flash memory controller and program
DE102007051061B4 (en) Non-volatile semiconductor memory system and corresponding method for performing a programming operation
DE102020209236A1 (en) Method of operating a non-volatile memory device
EP2002446B1 (en) Method for operating a memory unit comprising the marking of memory blocks that are identified as defective