DE102014224186B4 - Procedure for reloading an application onto a document - Google Patents

Procedure for reloading an application onto a document Download PDF

Info

Publication number
DE102014224186B4
DE102014224186B4 DE102014224186.3A DE102014224186A DE102014224186B4 DE 102014224186 B4 DE102014224186 B4 DE 102014224186B4 DE 102014224186 A DE102014224186 A DE 102014224186A DE 102014224186 B4 DE102014224186 B4 DE 102014224186B4
Authority
DE
Germany
Prior art keywords
memory
document
reloading
occupied
memory area
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.)
Active
Application number
DE102014224186.3A
Other languages
German (de)
Other versions
DE102014224186A1 (en
Inventor
Elke Filzhuth
Matthias Schwan
Frank Müller
Danny Hesse
Klaus-Dieter Wirth
Steffen Scholze
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.)
Bundesdruckerei GmbH
Original Assignee
Bundesdruckerei 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 Bundesdruckerei GmbH filed Critical Bundesdruckerei GmbH
Priority to DE102014224186.3A priority Critical patent/DE102014224186B4/en
Publication of DE102014224186A1 publication Critical patent/DE102014224186A1/en
Application granted granted Critical
Publication of DE102014224186B4 publication Critical patent/DE102014224186B4/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Abstract

Verfahren zum Nachladen einer Anwendung (128) in einen Speicher (112) eines Dokuments (102), wobei der Speicher (112) unbelegte Speicherbereiche (212, 214...) und mit relokierbarem Programmcode belegte Speicherbereiche (204, 206,...) umfasst, wobei das Nachladen der Anwendung (128) umfasst:• Ermitteln der notwendigen Länge (220) eines unbelegten zusammenhängenden Speicherbereichs, um die Anwendung (128) in dem Speicher (112) zu speichern,• Ermitteln, ob der Speicher (112) einen zusammenhängenden unbelegten Speicherbereich aufweist, dessen Länge mindestens der zuvor ermittelten Länge (220) entspricht,• Falls der Speicher (112) keinen zusammenhängenden unbelegten Speicherbereich der zuvor ermittelten Länge (220) aufweist, Defragmentieren des Speichers (112), wobei das Defragmentieren ein Umordnen des in den belegten Speicherbereichen gespeicherten relokierbaren Programmcodes umfasst, sodass mehrere der unbelegten Speicherbereiche einen zusammenhängenden unbelegten Speicherbereich bilden, der zumindest die zuvor ermittelte Länge (220) aufweist,• Nachladen der Anwendung (128) in den unbelegten Speicherbereich, wobei das Defragmentieren das Umordnen des in den belegten Speicherbereichen (204, 206,...) gespeicherten relokierbaren Programmcodes durch physikalisches Verschieben des relokierbaren Programmcodes umfasst und/oderwobei die logische Reihenfolge der Speicherbereiche des Speichers (112) durch eine Zuordnungstabelle festgelegt ist, wobei das Defragmentieren das Umordnen eines Teils der belegten Speicherbereiche (204, 206,...) durch Manipulation der Zuordnungstabelle umfasstwobei das Defragmentieren ferner das Definieren eines Schwellwertes für die Länge eines belegten Speicherbereiches (204, 206,...) umfasst, wobei das Verschieben von in belegten Speicherbereichen (204, 206,...) gespeicherten relokierbaren Programmcodes mit einer Länge, die größer ist als der Schwellwert durch Manipulation der Zuordnungstabelle erfolgt und wobei das Verschieben von in belegten Speicherbereichen (204, 206,...) gespeicherten relokierbaren Programmcodes mit einer Länge, die kleiner ist als der Schwellwert durch physikalisches Verschieben des relokierbaren Programmcodes der belegten Speicherbereiche erfolgt (204, 206,...).Method for reloading an application (128) into a memory (112) of a document (102), the memory (112) containing unoccupied memory areas (212, 214...) and memory areas (204, 206,...) occupied with relocatable program code. ) comprises, wherein the reloading of the application (128) comprises:• Determining the necessary length (220) of an unoccupied contiguous memory area in order to store the application (128) in the memory (112),• Determining whether the memory (112) has a contiguous, unoccupied memory area whose length corresponds at least to the previously determined length (220),• If the memory (112) does not have a contiguous, unoccupied memory area of the previously determined length (220), defragmenting the memory (112), the defragmenting involving rearranging of the relocatable program code stored in the occupied memory areas, so that several of the unoccupied memory areas form a contiguous unoccupied memory area, which has at least the previously determined length (220),• reloading the application (128) into the unoccupied memory area, the defragmenting reorganizing the relocatable program code stored in the occupied memory areas (204, 206,...) by physically moving the relocatable includes program codes and/orwherein the logical order of the memory areas of the memory (112) is determined by an allocation table, the defragmenting comprising rearranging part of the occupied memory areas (204, 206,...) by manipulating the allocation table, the defragmenting further comprising defining a threshold value for the length of an occupied memory area (204, 206,...), wherein the shifting of relocatable program codes stored in occupied memory areas (204, 206,...) with a length that is greater than the threshold value through manipulation the assignment table is done and the shifting of occupied Speic stored relocatable program codes with a length that is smaller than the threshold value by physically shifting the relocatable program code of the occupied memory areas (204, 206,...).

Description

Die Erfindung betrifft ein Verfahren zum Nachladen einer Anwendung in einen Speicher eines Dokuments, sowie ein Dokument und ein System aus einem Nachladeautomaten zum Nachladen einer Anwendung auf ein Dokument und einem Dokument.The invention relates to a method for reloading an application into a memory of a document, as well as a document and a system comprising a reloading machine for reloading an application onto a document and a document.

Im Stand der Technik ist eine Vielzahl von Dokumenten, insbesondere Sicherheits- oder Ausweisdokumente bekannt, welche als Chipkarte mit einer Rechenlogik ausgeführt sind. Dabei wird üblicherweise in einem nichtflüchtigen Speicherbereich der Chipkarte eine Anwendung gespeichert, welche durch einen Prozessor der Chipkarte ausgeführt werden kann.A large number of documents, in particular security or identification documents, are known in the prior art, which are designed as chip cards with arithmetic logic. In this case, an application that can be executed by a processor of the chip card is usually stored in a non-volatile memory area of the chip card.

Im Folgenden wird unter einem belegten Speicherbereich die Menge aller Speicheradressen verstanden, die einer einzelnen Anwendung zugeordnet sind.In the following, an occupied memory area is understood to mean the set of all memory addresses that are assigned to an individual application.

Anwendungen für Chipkarten sind meist so aufgebaut, dass sie als zusammenhängendes Programmmodul in den Speicher einer Chipkarte geladen werden müssen. Wir gehen zusätzlich davon aus, dass das Betriebssystem über Mechanismen verfügt, welche das Speichern und Ausführen von Programmmodulen an beliebige Speicheradressen im Anwendungsspeicher gestattet. Das heißt, dass insbesondere ggf. genutzte Einsprungpunkte für die Programmodule in geeigneter Weise verwaltet werden.Applications for smart cards are usually structured in such a way that they have to be loaded into the memory of a smart card as a coherent program module. We also assume that the operating system has mechanisms that allow program modules to be stored and executed at any memory address in the application memory. This means that, in particular, entry points that may be used for the program modules are managed in a suitable manner.

Die Verschiebbarkeit von Programmmodulen wird unter anderem dadurch erreicht, dass innerhalb des Programmcodes der Anwendung anstelle absoluter physikalischer Speicheradressen innerhalb des Chipkartenspeichers nur relative Sprungadressen verwendet werden, sodass sich auch bei einer Verschiebung des Programmcodes innerhalb des Chipkartenspeichers bei einem Sprungbefehl effektiv dieselben Sprungziele innerhalb des Programmcodes ergeben. Die so erreichte Verschiebbarkeit eines Programmcodes für Chipkarten wird auch als Relozierbarkeit bezeichnet.One of the ways in which program modules can be moved is that within the program code of the application, only relative jump addresses are used instead of absolute physical memory addresses within the chip card memory, so that even if the program code is moved within the chip card memory, a jump instruction effectively results in the same jump destinations within the program code . The mobility of a program code for chip cards achieved in this way is also referred to as relocatability.

Die Forderung nach Relozierbarkeit von Anwendungen unter Beibehaltung der relativen Sprungadressen innerhalb der Anwendung für Chipkarten bedingt gleichzeitig, dass eine Anwendung stets als logisch zusammenhängender Block innerhalb eines Chipkartenspeichers abgelegt werden muss, da andernfalls die relativen Sprungadressen innerhalb des Programmcodes ihre Gültigkeit verlieren.The requirement for applications to be relocatable while retaining the relative jump addresses within the application for chip cards means that an application must always be stored as a logically connected block within a chip card memory, otherwise the relative jump addresses within the program code will lose their validity.

Die DE 600 19 364 T2 zeigt ein Verfahren zur Speicherdefragmentierung auf Chipkarten, um einen zusammenhängenden Speicherplatz für eine Anwendung bereitzustellen.the DE 600 19 364 T2 shows a method for memory defragmentation on chip cards in order to provide a contiguous memory space for an application.

Der vorliegenden Erfindung liegt nun die Aufgabe zugrunde, ein verbessertes Verfahren zum Nachladen einer Anwendung auf ein Dokument zu schaffen.The present invention is now based on the object of creating an improved method for reloading an application onto a document.

Diese Aufgabe wird jeweils mit den Merkmalen der unabhängigen Patentansprüche gelöst. Ausführungsformen der Erfindung sind mit den abhängigen Patentansprüchen angegeben. Sofern nicht ausdrücklich Gegenteiliges zum Ausdruck gebracht wird, können Ausführungsformen der Erfindung frei miteinander kombiniert werden.This object is achieved in each case with the features of the independent patent claims. Embodiments of the invention are indicated with the dependent patent claims. Unless expressly stated to the contrary, embodiments of the invention can be freely combined with one another.

Unter einem „Dokument“ wird hier insbesondere ein tragbares elektronisches Gerät verstanden, welches zumindest einen Datenspeicher zur Speicherung zumindest eines Attributs und eine Kommunikationsschnittstelle zum Auslesen des Attributs aufweist. Vorzugsweise hat das Dokument einen gesicherten Speicherbereich zur Speicherung des zumindest einen Attributs um zu verhindern, dass das in dem Speicherbereich gespeicherte Attribut in unerlaubter Weise verändert oder ohne die dafür erforderliche Berechtigung ausgelesen wird.A “document” is understood here to mean in particular a portable electronic device which has at least one data memory for storing at least one attribute and a communication interface for reading out the attribute. The document preferably has a secure memory area for storing the at least one attribute in order to prevent the attribute stored in the memory area from being changed in an unauthorized manner or read out without the authorization required for this.

Insbesondere kann es sich bei dem Dokument um ein Wert- oder Sicherheitsdokument handeln. Unter einem Dokument werden erfindungsgemäß papierbasierte und/oder kunststoffbasierte Dokumente verstanden, wie zum Beispiel elektronische Ausweisdokumente, insbesondere Reisepässe, Personalausweise, Visa sowie Führerscheine, Fahrzeugscheine, Fahrzeugbriefe, Firmenausweise, Gesundheitskarten oder andere ID-Dokumente sowie auch Chipkartenzahlungsmittel, insbesondere Banknoten, Bankkarten und Kreditkarten, Frachtbriefe oder sonstige Berechtigungsnachweise, in die ein Datenspeicher zur Speicherung des zumindest einen Attributs integriert ist.In particular, the document can be a value or security document. According to the invention, a document is understood to mean paper-based and/or plastic-based documents, such as electronic ID documents, in particular passports, identity cards, visas and driving licenses, vehicle registration documents, vehicle registration documents, company ID cards, health cards or other ID documents, as well as chip card payment methods, in particular banknotes, bank cards and credit cards , bills of lading or other proof of authorization, in which a data memory for storing the at least one attribute is integrated.

In einem Aspekt betrifft die Erfindung ein Verfahren zum Nachladen einer Anwendung in einen Speicher eines Dokuments. Dabei umfasst der Speicher des Dokuments unbelegte Speicherbereiche und Speicherbereiche welche mit relokierbarem Programmcode belegt sind. Das Nachladen der Anwendung umfasst dann zunächst das Ermitteln der notwendigen Länge eines unbelegten zusammenhängenden Speicherbereichs um die Anwendung in dem Speicher des Dokuments zu speichern. Anschließend wird ermittelt, ob der Speicher des Dokuments einen zusammenhängenden unbelegten Speicherbereich aufweist, dessen Länge mindestens der zuvor ermittelten Länge entspricht. Sollte dies nicht der Fall sein, d.h. kein zusammenhängender unbelegter Speicherbereich mit mindestens der zuvor ermittelten Länge gefunden werden, wird in einem nachfolgenden Schritt der Speicher des Dokuments defragmentiert. Dabei umfasst das Defragmentieren ein Umordnen des in den belegten Speicherbereichen gespeicherten relokierbaren Programmcodes, sodass mehrere der unbelegten Speicherbereiche einen zusammenhängenden unbelegten Speicherbereich bilden, der zumindest die zuvor ermittelte Länge aufweist. Anschließend wird die Anwendung in den unbelegten Speicherbereich nachgeladen. Das Defragmentieren umfasst das Umordnen des in den belegten Speicherbereichen gespeicherten relokierbaren Programmcodes durch ein physikalisches Verschieben des relokierbaren Programmcodes und/oder die logische Reihenfolge der Speicherbereiche des Speichers des Dokuments ist durch eine Zuordnungstabelle festgelegt und das Defragmentieren des Speicherbereichs des Dokuments umfasst das Umordnen der belegten Speicherbereiche durch Manipulation der Zuordnungstabelle. Ferner wird ein Schwellwert für die Länge eines belegten Speicherbereichs definiert, wobei das Verschieben von in belegten Speicherbereichen gespeicherten relokierbaren Programmcodes mit einer Länge, die größer ist als der Schwellwert durch Manipulation der Zuordnungstabelle erfolgen und wobei das Verschieben von in belegten Speicherbereichen gespeicherten relokierbaren Programmcodes mit einer Länge, die kleiner oder gleich dem Schwellwert ist durch physikalisches Verschieben des relokierbaren Programmcodes erfolgt.In one aspect, the invention relates to a method for reloading an application into a memory of a document. The memory of the document includes unoccupied memory areas and memory areas that are occupied with relocatable program code. Reloading the application then firstly includes determining the necessary length of an unoccupied, contiguous memory area in order to store the application in the memory of the document. It is then determined whether the memory of the document has a contiguous, unoccupied memory area whose length corresponds at least to the previously determined length. If this is not the case, ie no contiguous, unoccupied memory area are found with at least the previously determined length, the memory of the document is defragmented in a subsequent step. In this case, the defragmentation includes rearranging the relocatable program code stored in the occupied memory areas, so that several of the unoccupied memory areas form a contiguous, unoccupied memory area that has at least the previously determined length. The application is then reloaded into the unoccupied memory area. Defragmenting includes rearranging the relocatable program code stored in the occupied memory areas by physically moving the relocatable program code and/or the logical order of the memory areas of the document memory is defined by an allocation table and defragmenting the memory area of the document includes rearranging the occupied memory areas by manipulating the mapping table. Furthermore, a threshold value for the length of an occupied memory area is defined, with relocatable program codes stored in occupied memory areas being moved with a length that is greater than the threshold value by manipulating the assignment table, and with relocatable program codes stored in occupied memory areas being moved with a Length less than or equal to the threshold is done by physically moving the relocatable program code.

Zusätzlich kann zunächst vor Beginn des Defragmentiervorgangs geprüft werden, ob die Gesamtheit aller freien Speicherbereiche zusammengenommen ausreichen würde, die Anwendung aufzunehmen. Dabei wird ein Defragmentiervorgang nur dann angestoßen, wenn zuvor ermittelt wurde, dass die Gesamtheit aller freien Speicherbereiche ausreicht um die Anwendung aufzunehmen, da andernfalls auch eine Defragmentierung nicht dazu führen würde, dass eine Anwendung nachgeladen werden kann.In addition, before starting the defragmentation process, it can be checked whether the total of all free memory areas together would be sufficient to accommodate the application. A defragmentation process is only triggered if it has previously been determined that the total of all free memory areas is sufficient to accommodate the application, since otherwise even defragmentation would not result in an application being able to be reloaded.

Es sei an dieser Stelle angemerkt, dass unter einem zusammenhängenden Speicherbereich neben einem physikalisch zusammenhängenden Speicherbereich auch ein logisch zusammenhängender Speicherbereich mit fortlaufenden Speicheradressen zu verstehen ist. Dabei können die physikalischen Adressen eines logisch zusammenhängenden Speichers auch nicht zusammenhängend sein, beispielsweise infolge eines bei Chipkarten üblichen Scramblings des Speichers.It should be noted at this point that a contiguous memory area is to be understood not only as a physically contiguous memory area but also as a logically contiguous memory area with consecutive memory addresses. In this case, the physical addresses of a logically connected memory can also not be connected, for example as a result of memory scrambling which is usual in chip cards.

Ein Verschieben kann entsprechend logisch oder physikalisch umgesetzt sein.A shift can be correspondingly implemented logically or physically.

Ausführungsformen der Erfindung könnten den Vorteil haben, dass es aufgrund des Defragmentierungsvorgangs möglich wird, eine Anwendung auch dann in den Speicher eines Dokuments nachzuladen, wenn dieser zunächst keinen ausreichend großen zusammenhängenden unbelegten Speicherbereich aufweist, um die Anwendung zu speichern. Durch den Defragmentierungsvorgang ist also die Ausnutzung eines Speichers eines Dokuments, welcher zumeist ohnehin sehr begrenzt ist, in verbesserter Art und Weise möglich. Somit können auch über einen längeren Zeitraum wiederholt Anwendungen von dem Dokument entfernt und neue Anwendungen in dem Speicher des Dokuments nachgeladen werden wobei vermieden wird, dass aufgrund einer Fragmentierung des Speichers der effektiv nutzbare Speicher des Dokuments schrumpft.Embodiments of the invention could have the advantage that the defragmentation process makes it possible to reload an application into the memory of a document even if this initially does not have a sufficiently large, contiguous, unoccupied memory area to store the application. As a result of the defragmentation process, the use of a memory in a document, which is usually very limited anyway, is possible in an improved manner. This means that applications can be repeatedly removed from the document over a longer period of time and new applications can be reloaded in the memory of the document, with the effectively usable memory of the document being prevented from shrinking due to fragmentation of the memory.

Der relokierbare Programmcode wird bei einem physikalischen Verschieben von seinem ursprünglichen Speicherbereich an einen neuen, unbelegten Speicherbereich kopiert und in seinem ursprünglichen Speicherbereich gelöscht. Dabei kann der in einem belegten Speicherbereich abgelegte Programmcode auch in einen angrenzenden Bereich verschoben werden, der zunächst nicht ausreichend groß ist, um den gesamten Datenblock aufzunehmen. In diesem Fall würde während des Verschiebens ein erster Teil des Programmcodes von seiner ursprünglichen Speicheradresse an eine neue Speicheradresse verschoben. Wird dies für folgende weitere Teile des Programmcodes wiederholt, ist es irgendwann möglich, dass ein Teil des Programmcodes in einen Speicherbereich kopiert wird, in dem ein Teil des grade zu verschiebenden Programmcodes ursprünglich abgelegt war. Hierdurch wird der ursprüngliche Programmcode nach und nach überschrieben. Dies birgt jedoch die Gefahr, dass bei einem Stromausfall während des Verschiebevorgangs ein segmentierter und nicht mehr funktionsfähiger Programmcode entsteht.In the event of a physical move, the relocatable program code is copied from its original memory area to a new, unoccupied memory area and its original memory area is deleted. The program code stored in an occupied memory area can also be moved to an adjacent area that is initially not large enough to accommodate the entire data block. In this case, during the relocation, a first part of the program code would be relocated from its original memory address to a new memory address. If this is repeated for the following further parts of the program code, it is possible at some point that a part of the program code is copied into a memory area in which a part of the program code to be moved was originally stored. This gradually overwrites the original program code. However, this harbors the risk that in the event of a power failure during the move process, a segmented and no longer functional program code will be created.

Bei einer Manipulation der Zuordnungstabelle kann in dem Dokument eine Speicherverwaltungseinheit (Memory Management Unit MMU) vorgesehen sein, welche die Adressierung des Speichers durch den Prozessor anhand der Zuordnungstabelle umsetzt.If the assignment table is manipulated, a memory management unit (Memory Management Unit MMU) can be provided in the document, which implements the addressing of the memory by the processor using the assignment table.

Sowohl das zuvor beschriebene Defragmentieren durch physikalisches Verschieben von Speicherbereichen als auch das Defragmentieren durch Manipulation einer Zuordnungstabelle kann unter bestimmten Umständen vorteilhaft sein. So kann durch einfaches logisches Umsortieren der Speicherbereiche des Speichers durch Manipulation der Zuordnungstabelle ein Speicher sehr schnell defragmentiert werden. Beispielsweise kann in den Zuordnungstabellen eine zusätzliche Sprungadresse eingefügt werden, sodass bei einem Aufruf einer Speicheradresse durch den Chipkartenprozessor der Chipkartenprozessor durch die MMU an die Speicherposition verwiesen wird, an der der entsprechende relokierbare Programmcode nach der Defragmentierung abgelegt ist. Allerdings kann es hier vorkommen, dass bei wiederholtem Defragmentieren durch Manipulation der Zuordnungstabelle eine Verkettung von Sprungbefehlen entsteht, sodass die Zugriffszeit, welche ein Prozessor eines Dokuments benötigt, um den relokierbaren Programmcode im Speicher zu adressieren, zunimmt.Both the previously described defragmentation by physically moving memory areas and the defragmentation by manipulating an assignment table can be advantageous under certain circumstances. Thus, a memory can be defragmented very quickly by simply logically rearranging the memory areas of the memory by manipulating the assignment table. For example, an additional jump address can be inserted in the assignment tables, so that when a memory address by the chip card processor the chip card processor is referred by the MMU to the memory position where the corresponding relocatable program code is stored after defragmentation. However, repeated defragmentation can result in chaining of jump instructions as a result of manipulation of the assignment table, so that the access time that a processor of a document needs to address the relocatable program code in the memory increases.

Das Defragmentieren durch physikalisches Verschieben umgeht hingegen dieses Problem, da keine zusätzlichen Sprungbefehle in einer Zuordnungstabelle entstehen, sondern der Programmcode tatsächlich im physikalischen Speicher verschoben wird. Handelt es sich allerdings bei dem zu verschiebenden relokierbaren Programmcode um sehr viele und/oder sehr große Speicherbereiche, ist ein physikalisches Verschieben mit einem erheblichen Aufwand verbunden. Ferner ist das Kopieren und anschließende Löschen von Programmcodes fehleranfällig, da während des Kopierens unter Umständen auch Fehler in den Programmcode eingefügt werden könnten beziehungsweise bei nicht-atomaren Verschiebungsvorgängen Programmblöcke oder -teile gelöscht oder verdoppelt werden könnten.On the other hand, defragmenting by physically moving avoids this problem, since no additional jump commands are created in an allocation table, but the program code is actually moved in the physical memory. However, if the relocatable program code to be moved involves a large number and/or very large memory areas, a physical move involves considerable effort. Furthermore, the copying and subsequent deletion of program codes is error-prone, since errors could also be inserted into the program code during copying or, in the case of non-atomic shifting processes, program blocks or parts could be deleted or duplicated.

Daher ist es vorgesehen, je nach Situation eines der beiden vorgenannten Defragmentierungsverfahren zu verwenden. Die Entscheidung, ob ein belegter Speicherbereich durch Manipulation der Zuordnungstabelle oder durch physikalisches Verschieben defragmentiert werden soll, hängt von dem besagten Schwellwert ab. Somit kann je nach Anwendungsfall das jeweils beste Verfahren zur Defragmentierung des Speichers ausgewählt werden.It is therefore planned to use one of the two defragmentation methods mentioned above, depending on the situation. The decision as to whether an occupied memory area should be defragmented by manipulating the allocation table or by physically moving it depends on the said threshold value. Depending on the application, the best method for defragmenting the memory can be selected.

Ebenso sind andere Strategien möglich nach denen für die Verschiebung eines einzelnen Blocks festgelegt werden kann, ob die Umordnung des Blockes logisch oder physikalisch erfolgen soll. Dabei kann die Entscheidung, ob ein ein Block physikalisch oder logisch verschoben werden soll, einer beliebig gestaltbaren Heuristik unterliegen.Other strategies are also possible, according to which it can be determined for the shifting of an individual block whether the rearrangement of the block should take place logically or physically. The decision as to whether a block should be moved physically or logically can be subject to any heuristic that can be designed.

Nach einer weiteren Ausführungsform der Erfindung umfasst das Defragmentieren zunächst das Ermitteln einer ersten Position eines im Sinne der Speicheradressierung ersten, unbelegten Speicherbereichs, d.h. des Blocks mit der kleinsten Speicheradresse. Anschließend wird eine zweite Position eines zweiten, belegten Speicherbereichs ermittelt, wobei der zweite belegte Speicherbereich im Speicher dem ersten freien Speicherbereich bezüglich der Speicheradressierung direkt nachfolgt. Anschließend wird der im zweiten belegten Speicherbereich gespeicherte, relokierbare Programmcode an die zuvor ermittelte erste Position verschoben. Dabei kann das Verschieben sowohl logisch als auch physikalisch erfolgen. Die Schritte des Ermitteln eines unbelegten Speicherbereiches sowie des dem unbelegten Speicherbereich nachfolgenden belegten Speicherbereichs und das Verschieben des in dem so ermittelten belegten Speicherbereich abgelegten relokierbaren Programmcodes können dabei so lange wiederholt werden, bis auf den ermittelten ersten unbelegten Speicherbereich kein belegter Speicherbereich mehr folgt. Alternativ kann im Laufe einer Iteration der beschrieben Schritte fortlaufend geprüft werden, ob zwischenzeitlich ein ausreichend großer, zusammenhängender, freier Speicherbereich entstanden ist, sodass die Anwendung nachgeladen werden kann. In diesem Fall kann auch vorgesehen sein, dass die Defragmentierung abgebrochen wird, sobald der verfügbare, zusammenhängende, freie Speicher ausreichend groß ist, um die nachzuladende Anwendung aufzunehmen.According to a further embodiment of the invention, the defragmentation initially comprises determining a first position of a first, unoccupied memory area in terms of memory addressing, i.e. the block with the smallest memory address. A second position of a second, occupied memory area is then determined, with the second occupied memory area in the memory directly following the first free memory area with regard to memory addressing. The relocatable program code stored in the second occupied memory area is then moved to the previously determined first position. The shifting can be both logical and physical. The steps of determining an unoccupied memory area and the occupied memory area following the unoccupied memory area and moving the relocatable program code stored in the occupied memory area determined in this way can be repeated until there is no occupied memory area following the first unoccupied memory area determined. Alternatively, in the course of an iteration of the steps described, it can be checked continuously whether a sufficiently large, contiguous, free memory area has arisen in the meantime so that the application can be reloaded. In this case, provision can also be made for the defragmentation to be terminated as soon as the available, contiguous, free memory is large enough to accommodate the application to be reloaded.

Ausführungsformen der Erfindung könnten den Vorteil haben, dass durch den beschriebenen Algorithmus auf einfache Art und Weise ein Speicher eines Dokuments defragmentiert werden kann. Somit kann die entsprechende Logik zur Durchführung des Defragmentierungsvorgangs in dem Dokument mit einfachen Mitteln realisiert werden.Embodiments of the invention could have the advantage that a memory of a document can be defragmented in a simple manner by the algorithm described. The corresponding logic for carrying out the defragmentation process in the document can thus be implemented using simple means.

Nach einer weiteren Ausführungsform umfasst das Defragmentieren zunächst das Ermitteln der jeweiligen Positionen und Längen der belegten Speicherbereiche und das Ermitteln der jeweiligen Positionen und Längen der unbelegten Speicherbereiche. Anschließend wird ausgehend von der niedrigsten Speicheradresse der erste unbelegte Speicherbereich bestimmt und überprüft, ob einer der nachfolgenden Blöcke die gleiche Länge besitzt. Sollte dies der Fall sein, wird dieser Block in den unbelegten Speicherbereich verschoben. Ausgehend von diesem veränderten Speicher wird das Verfahren für den nächsten, dem verschobenen Block nachfolgenden freien Speicherbereich iteriert. Die Iteration erfolgt bis ein unbelegter Speicherbereich erreicht ist, dem kein belegter Speicherbereich mehr folgt. Alternativ kann die Iteration auch dann abgebrochen werden, wenn nach dem Verschieben eines belegten Speicherbereichs ein unbelegter, zusammenhängender Speicherbereich entstanden ist, der ausreichend groß ist, die nachzuladende Anwendung aufzunehmen. Nach einer weiteren Ausführungsform könnten belegte Speicherbereiche an die Positionen von unbelegten Speicherbereichen gleicher oder größerer Länge verschoben werden.According to a further embodiment, the defragmentation initially includes determining the respective positions and lengths of the occupied memory areas and determining the respective positions and lengths of the unoccupied memory areas. Then, starting from the lowest memory address, the first unoccupied memory area is determined and a check is made as to whether one of the following blocks has the same length. If this is the case, this block is moved to the unallocated memory area. Starting from this changed memory, the method is iterated for the next free memory area following the shifted block. The iteration takes place until an unoccupied memory area is reached, which is not followed by an occupied memory area. Alternatively, the iteration can also be aborted if, after an occupied memory area has been moved, an unoccupied, contiguous memory area has arisen that is large enough to accommodate the application to be reloaded. According to a further embodiment, occupied memory areas could be moved to the positions of unoccupied memory areas of the same or greater length.

Ausführungsformen der Erfindung könnten den Vorteil haben, dass die Zahl der Verschiebungsvorgänge durch das beschriebene Defragmentierungsverfahren gegenüber einem Verfahren, in dem die belegten Speicherbereiche sukzessive aneinandergeschoben werden, reduziert werden kann. So kann es beispielsweise vorkommen, dass nach einem ersten belegten Speicherbereich ein unbelegter Speicherbereich einer definierten Länge existiert, wobei auf den unbelegten Speicherbereich eine Kette von belegten Speicherbereichen folgt. Entspricht dabei beispielsweise die Länge des letzten belegten Speicherbereichs der Kette der Länge des unbelegten Speicherbereichs nach dem ersten belegten Speicherbereich, so kann die Defragmentierung gemäß dem zuvor beschriebenen Verfahren dadurch umgesetzt werden, dass einzig und allein der letzte belegte Speicherbereich an die Position des unbelegten Speicherbereichs verschoben wird. Alle übrigen belegten Speicherbereiche müssen hierbei nicht verschoben werden. Somit kann vermieden werden, dass während eines Defragmentierungsvorgangs jeder einzelne belegte Speicherbereich in der Kette verschoben wird.Embodiments of the invention could have the advantage that the number of shifting operations by the defragmentation method described compared to a method in which the occupied memory areas are successively added to each other to be pushed can be reduced. For example, it can happen that after a first occupied memory area there is an unoccupied memory area of a defined length, with the unoccupied memory area being followed by a chain of occupied memory areas. If, for example, the length of the last occupied memory area in the chain corresponds to the length of the unoccupied memory area after the first occupied memory area, defragmentation can be implemented according to the method described above by simply moving the last occupied memory area to the position of the unoccupied memory area will. All other occupied memory areas do not have to be moved. In this way, it can be avoided that every single occupied memory area in the chain is moved during a defragmentation process.

Nach einer weiteren Ausführungsform der Erfindung umfasst das Defragmentieren ferner das Erzeugen einer Protokolldatei, wobei die Protokolldatei die während eines Defragmentiervorgangs erfolgten Verschiebungen von Speicherbereichen wiedergibt.According to a further embodiment of the invention, the defragmentation also includes the creation of a log file, the log file reflecting the shifts in memory areas that took place during a defragmentation process.

Dies kann den Vorteil haben, dass bei einem unerwarteten Abbruch des Defragmentiervorgangs entweder der Defragmentiervorgang zu einem späteren Zeitpunkt an der gleichen Stelle fortgesetzt, oder anhand der Protokolldatei der Ursprungszustand vor Beginn des Defragmentierungvorgangs rekonstruiert werden kann.This can have the advantage that if the defragmentation process is aborted unexpectedly, either the defragmentation process can be continued at a later point in time at the same point, or the original state before the start of the defragmentation process can be reconstructed using the log file.

Bei atomarer Ausführung der nur auf einen Speicherbereich bezogenen einzelnen Verschiebungsschritte kann zusätzlich vermieden werden, dass ein Dokument aufgrund eines unvollendeten Defragmentiervorgangs, welcher die in dem Dokument gespeicherten Anwendungen beschädigen könnte, unbrauchbar wird.With atomic execution of the individual shifting steps related only to a memory area, it can also be avoided that a document becomes unusable due to an incomplete defragmentation process, which could damage the applications stored in the document.

Die zuvor beschriebenen Ausführungsformen einer Speicherumordnung können ferner so modifiziert werden, dass der Defragmentierungsvorgang abgebrochen wird, beispielsweise, sobald ein unbelegter Speicherbereich der nötigen Größe frei ist.The previously described embodiments of a memory rearrangement can be further modified in such a way that the defragmentation process is aborted, for example as soon as an unoccupied memory area of the required size is free.

Nach einer weiteren Ausführungsform der Erfindung ist der Speicher des Dokuments in mindestens zwei Speicherbereiche aufgeteilt, wobei ein erster Speicherbereich einen relokierbaren Programmcode mit relativen Sprungadressen beinhaltet und ein zweiter Speicherbereich hierarchisch gespeicherte Nutzdaten mit absoluten Sprungadressen beinhaltet. Die Defragmentierung wird dann ausschließlich auf dem ersten Speicherbereich ausgeführt.According to a further embodiment of the invention, the memory of the document is divided into at least two memory areas, with a first memory area containing relocatable program code with relative jump addresses and a second memory area containing hierarchically stored useful data with absolute jump addresses. The defragmentation is then only carried out on the first storage area.

Ausführungsformen der Erfindung könnten den Vorteil haben, dass Nutzdaten mit absoluten Sprungadressen nicht ohne Weiteres durch Verschieben defragmentiert werden können. Aufgrund der absoluten Sprungadressen der Nutzdaten würden bei einer Verschiebung aufgrund eines Defragmentiervorgangs sämtliche Querverweise der Nutzdaten fehlerhaft und die Nutzdaten selbst somit unbrauchbar. Durch Einschränken des Defragmentiervorgangs auf jenen Speicherbereich, in dem relokierbarer Programmcode abgelegt ist, könnte dieses Problem umgangen werden.Embodiments of the invention could have the advantage that payload data with absolute jump addresses cannot be easily defragmented by shifting. Due to the absolute jump addresses of the user data, all cross-references of the user data would be incorrect in the event of a shift due to a defragmentation process, and the user data itself would therefore be unusable. This problem could be circumvented by restricting the defragmentation process to the memory area in which relocatable program code is stored.

Nach einer weiteren Ausführungsform der Erfindung handelt es sich bei der nachgeladenen Anwendung um eine sicherheitsrelevante Anwendung. In dem Speicher des Dokuments ist dann mindestens ein kryptografischer Schlüssel gespeichert, wobei die sicherheitsrelevante Anwendung unter Verwendung des kryptografischen Schlüssels dazu ausgebildet ist, einen Authentifizierungsvorgang durchzuführen. Beispielsweise kann der kryptografische Schlüssel genutzt werden, um das Dokument im Zuge eines Challenge-Response-Verfahrens gegenüber einem Lesegerät zu authentifizieren.According to a further embodiment of the invention, the subsequently loaded application is a security-relevant application. At least one cryptographic key is then stored in the memory of the document, with the security-relevant application being designed to carry out an authentication process using the cryptographic key. For example, the cryptographic key can be used to authenticate the document to a reader as part of a challenge-response process.

In einem weiteren Aspekt betrifft die Erfindung ein Dokument mit Speichermitteln, Prozessormitteln und einer Kommunikationsschnittstelle, insbesondere einer kontaktlosen Kommunikationsschnittstelle. Das Dokument ist dabei dazu ausgebildet, über die Kommunikationsschnittstelle eine Anwendung zum Nachladen in die Speichermittel des Dokuments zu empfangen. Dabei sind die Prozessormittel und die Speichermittel des Dokuments dazu ausgebildet, das Verfahren, welches zuvor beschrieben wurde, auszuführen. Bei der Kommunikationsschnittstelle kann es sich hier sowohl um eine kontaktbehaftete Schnittstelle als auch um eine kontaktlose Schnittstelle handeln. Beispielweise kann die Schnittstelle dabei gemäß ISO 14443 ausgebildet sein. Insbesondere kann es sich bei der Kommunikationsschnittstelle um eine NFC-Schnittstelle handeln. Über die Kommunikationsschnittstelle kann ferner Energie zum Betrieb des Dokuments durch eine externe Energiequelle, beispielsweise ein Terminal, in das Dokument eingekoppelt werden.In a further aspect, the invention relates to a document with storage means, processor means and a communication interface, in particular a contactless communication interface. In this case, the document is designed to receive an application for reloading into the storage means of the document via the communication interface. In this case, the processor means and the storage means of the document are designed to carry out the method which was previously described. The communication interface can be either an interface with contacts or a contactless interface. For example, the interface can be designed according to ISO 14443. In particular, the communication interface can be an NFC interface. Energy for operating the document can also be coupled into the document via the communication interface using an external energy source, for example a terminal.

Dabei kann die Verwendung einer kontaktlosen Schnittstelle den Vorteil haben, dass eine Kontaktlosschnittstelle deutlich weniger anfällig für Verschleißerscheinungen ist, als eine kontaktbehaftete Schnittstelle. Speziell bei Verwendung einer kontaktbehafteten Schnittstelle in Kombination mit einer mechanischen Aufnahme eines Terminals würden durch die Reibung der kontaktbehafteten Schnittstelle innerhalb der Aufnahme die Kontakte schnell abgenutzt, wodurch eine Benutzung des Dokuments unmöglich würde. Durch die Verwendung einer kontaktlosen Schnittstelle könnte daher die Lebensdauer eines Dokuments verbessert werden.The use of a contactless interface can have the advantage that a contactless interface is significantly less susceptible to wear and tear than an interface with contacts. Especially when using an interface with contacts in combination with a mechanical receptacle of a terminal, the contacts would quickly wear out due to the friction of the interface with contacts within the receptacle, making it impossible to use the document. By using a kon tactless interface could therefore improve the lifetime of a document.

In einem weiteren Aspekt betrifft die Erfindung ein System aus einem Nachladeautomaten zum Nachladen einer Anwendung auf ein Dokument und einem solchen Dokument. Der Nachladeautomat umfasst dabei eine Kommunikationsschnittstelle und ist dazu ausgebildet, über die Kommunikationsschnittstelle Daten mit dem Dokument auszutauschen. Der Nachladeautomat ist ferner dazu ausgebildet über die Kommunikationsschnittstelle die Anwendung auf das Dokument nachzuladen.In a further aspect, the invention relates to a system comprising a reloading machine for reloading an application onto a document and such a document. The reloading machine includes a communication interface and is designed to exchange data with the document via the communication interface. The reloading machine is also designed to reload the application onto the document via the communication interface.

Nach einer Ausführungsform der Erfindung umfasst der Nachladeautomat ferner eine mechanische Aufnahme für das Dokument, wobei die mechanische Aufnahme dazu ausgebildet ist, bei einem Nachladevorgang das Dokument so lange vor einem Entfernen aus dem Nachladeautomaten zu schützen, bis das Nachladen der Anwendung auf das Dokument gegebenenfalls einschließlich der Defragmentierung abgeschlossen ist.According to one embodiment of the invention, the automatic reloader also includes a mechanical holder for the document, the mechanical holder being designed to protect the document from being removed from the automatic reloader during a reloading process until the application on the document is reloaded, possibly including defragmentation is complete.

Insbesondere bei Chipkarten erfolgt üblicherweise die Stromversorgung der Prozessormittel der Chipkarte über eine RFID-Schnittstelle durch den Nachladeautomaten. Würde nun das Dokument während eines Defragmentierungs- bzw. Nachladevorgangs zu früh aus dem Nachladeautomaten entnommen, würde die Stromversorgung des Dokuments unterbrochen und ein möglicherweise angestoßener Defragmentiervorgang könnte nicht fertiggestellt werden. Hierdurch könnte unter Umständen das Dokument unbrauchbar werden. Ausführungsformen der Erfindung könnten den Vorteil haben, dass dieses Risiko effektiv vermieden werden könnte, indem das Dokument beispielsweise in einem Schlitz oder einer andersartigen mechanischen Aufnahme des Nachladeautomaten vollständig aufgenommen und somit vor einem Zugriff durch einen Benutzer geschützt ist. Nach Beenden des Nachladevorgangs könnte dann das Dokument aus der mechanischen Aufnahme des Nachladeautomaten ausgeworfen werden.In the case of chip cards in particular, the power supply for the processor means of the chip card usually takes place via an RFID interface by the reloading machine. If the document were to be removed from the reloading machine too early during a defragmentation or reloading process, the power supply to the document would be interrupted and any defragmentation process that might have been initiated could not be completed. This could potentially make the document unusable. Embodiments of the invention could have the advantage that this risk could be effectively avoided by the document being completely accommodated, for example, in a slot or some other type of mechanical receptacle of the automatic reloading device and thus being protected against access by a user. After the end of the reloading process, the document could then be ejected from the mechanical receptacle of the reloading machine.

Dabei kann bei Verwendung einer kontaktlosen Kommunikation zwischen Nachladeautomat und Dokument trotz Verwendung einer mechanischen Aufnahme der Verschleiß des Dokuments auf ein Minimum reduziert werden. Die Kontaktfläche zwischen Dokument und Aufnahme des Nachladeautomaten ist für die Kommunikation zwischen Dokument und Nachladeautomat, sowie für die Einkopplung von Energie zum Betrieb des Dokuments irrelevant. Somit führen Reibungseffekte auf der Oberfläche des Dokumentenkörpers nicht zu einer Beeinträchtigung der Funktionsfähigkeit des Dokuments. Gleichzeitig kann durch die Kombination einer mechanischen Aufnahme mit einer kontaktlosen Kommunikation die Integrität der auf dem Dokument gespeicherten Daten gewahrt werden, da ein vorzeitiges Entfernen des Dokuments aus dem Nachladeautomaten ausgeschlossen werden kann. Hierdurch kann während des Nachladevorgangs eine unterbrechungsfreie Kommunikation und Energiezufuhr gewährleistet werden.When using contactless communication between the reloading machine and the document, the wear and tear on the document can be reduced to a minimum despite the use of a mechanical receptacle. The contact surface between the document and the receptacle of the automatic reloader is irrelevant for the communication between the document and the automatic reloader, as well as for the coupling of energy for operating the document. Thus, friction effects on the surface of the document body do not impair the functionality of the document. At the same time, the integrity of the data stored on the document can be maintained through the combination of mechanical recording with contactless communication, since premature removal of the document from the automatic reloading machine can be ruled out. This ensures uninterrupted communication and power supply during the reloading process.

Nach einer weiteren Ausführungsform erfolgt ein Zugriff des Nachladeautomaten auf das Dokument erst nach erfolgreicher Überprüfung einer kryptografischen Zugangsbedingung, was beispielsweise durch das Übermitteln eines Zertifikats, das Durchführen eines Challenge-Response-Verfahrens oder einen anderweitigen Authentifizierungsvorgang realisiert sein kann. Somit könnte ein unbefugtes Aufspielen von möglicherweise schadhaftem Programmcode auf das Dokument vermieden werden.According to a further embodiment, the reloading machine accesses the document only after a cryptographic access condition has been successfully checked, which can be implemented, for example, by transmitting a certificate, carrying out a challenge-response method or some other authentication process. In this way, unauthorized uploading of possibly defective program code to the document could be avoided.

Nach einer Ausführungsform umfasst der Nachladeautomat einen Nachladetoken, wobei der Nachladetoken die auf das Dokument nachzuladende Anwendung beinhaltet, wobei der Nachladetoken als austauschbarer physischer Datenträger ausgebildet ist. Beispielsweise kann es sich bei dem Datenträger um eine Chipkarte handeln.According to one embodiment, the automatic reloading device comprises a reloading token, the reloading token containing the application to be reloaded onto the document, the reloading token being designed as an exchangeable physical data medium. For example, the data carrier can be a chip card.

Ausführungsformen könnten den Vorteil haben, dass ein und derselbe Nachladeautomat für das Nachladen einer Vielzahl verschiedener Anwendungen und Software-Konfigurationen genutzt werden könnte. Um eine andere Anwendung auf ein Dokument nachladen zu können müsste lediglich der Nachladetoken des Nachladeautomaten ausgetauscht werden.Embodiments could have the advantage that one and the same automatic reloader could be used for reloading a variety of different applications and software configurations. In order to be able to reload another application onto a document, only the reload token of the reload machine would have to be exchanged.

Nach einer Ausführungsform umfasst der Nachladeautomat ein Authentisierungstoken, wobei der Authentisierungstoken Daten für eine Authentisierung eines Benutzers des Nachladeautomaten beinhaltet, wobei der Authentisierungstoken als austauschbarer physischer Datenträger ausgebildet ist. Auch hier kann es sich bei dem Datenträger beispielsweise um eine Chipkarte handeln.According to one embodiment, the automatic reloader includes an authentication token, the authentication token containing data for authenticating a user of the automatic reloader, the authentication token being designed as an exchangeable physical data carrier. Here, too, the data carrier can be a chip card, for example.

Ausführungsformen könnten den Vorteil haben, dass durch Austausch des Authentisierungstoken der Nachladeautomat von einer Vielzahl verschiedener Benutzer verwendet werden kann. Dabei ist jedoch auch sichergestellt, dass nur derjenige Benutzer den Nachladeautomaten nutzen kann, dessen Authentisierungstoken aktuell mit dem Nachladeautomaten verbunden ist. Dabei kann vorgesehen sein, dass der Nachladeautomat selbstständig prüft, ob ein Benutzer, dessen Authentisierungstoken grade in den Nachladeautomat eingesetzt ist auch tatsächlich zu einer Nutzung des Nachladeautomaten berechtigt ist.Embodiments could have the advantage that the reloading machine can be used by a large number of different users by exchanging the authentication token. However, it is also ensured that only the user whose authentication token is currently connected to the reloading machine can use the reloading machine. It can be provided that the reloading machine independently checks whether a user whose authentication token has just been inserted into the reloading machine is actually authorized to use the reloading machine.

Nach einer Ausführungsform umfasst der der Nachladeautomat eine Energiequelle, wobei es sich bei der Energiequelle um eine abgeschlossene interne Energiequelle und/oder um eine externe Energiequelle handelt.According to one embodiment, the automatic reloader comprises an energy source, the energy source being a closed internal energy source and/or an external energy source.

Ausführungsformen könnten den Vorteil haben, dass bei Verwendung einer internen Energiequelle der Nachladeautomat als tragbares Gerät ausgeführt sein kann, welches vollständig autark ist. Eine solche Autarkie würde die Sicherheit des Nachladeautomaten gegen Zugriff durch Unbefugte verbessern, da eine Kommunikation lediglich zwischen Dokument und Nachladeautomat erfolgt. Ferner kann eine Kombination von interner Energiequelle, wie beispielsweise einer Batterie und externer Energiequelle, wie beispielsweise einem Netzanschluss die Ausfallsicherheit des Nachladeautomaten verbessern, da die Wahrscheinlichkeit, dass beide Energiequellen versagen geringer ist als die Wahrscheinlichkeit des Ausfalls einer der Energiequellen.Embodiments could have the advantage that when using an internal energy source, the automatic reloader can be designed as a portable device that is completely self-sufficient. Such a self-sufficiency would improve the security of the reloading machine against access by unauthorized persons, since communication only takes place between the document and the reloading machine. Furthermore, a combination of an internal energy source, such as a battery, and an external energy source, such as a mains connection, can improve the reloading machine's reliability against failure, since the probability of both energy sources failing is lower than the probability of one of the energy sources failing.

Im Folgenden werden bevorzugt Ausführungsformen der Erfindung anhand der Zeichnungen näher erläutert. Es zeigen:

  • 1 ein Blockdiagramm eines erfindungsgemäßen Systems aus Dokument und Nachladeautomat,
  • 2 eine schematische Darstellung eines ersten Defragmentierungsverfahrens,
  • 3 schematische Darstellung eines zweiten Defragmentierungsverfahrens,
Preferred embodiments of the invention are explained in more detail below with reference to the drawings. Show it:
  • 1 a block diagram of a system according to the invention made up of document and reloading machine,
  • 2 a schematic representation of a first defragmentation method,
  • 3 schematic representation of a second defragmentation process,

Im Folgenden werden einander ähnliche Elemente mit gleichen Bezugszeichen gekennzeichnet.Elements that are similar to one another are identified below with the same reference symbols.

Die 1 zeigt ein Blockdiagramm eines erfindungsgemäßen Systems 100 zum Nachladen einer Anwendung auf ein Dokument 102 durch einen Nachladeautomaten 104. Dabei umfasst das Dokument 102 eine Kommunikationsschnittstelle 106. Ferner umfasst das Dokument 102 Prozessormittel 110 sowie Speichermittel. Bei den Speichermitteln 112 kann es sich beispielsweise um einen nichtflüchtigen Flash-basierten Speicher handeln. Die Speichermittel 112 beinhalten in der hier dargestellten Ausführungsform eine logische Datenstruktur (LDS). In der logischen Datenstruktur sind neben einem Chipkartenbetriebssystem 120 und Nutzdaten 108 auch die Anwendungen 114 des Dokuments 102 enthalten.the 1 shows a block diagram of a system 100 according to the invention for reloading an application onto a document 102 by a reloading machine 104. The document 102 includes a communication interface 106. The document 102 also includes processor means 110 and storage means. The storage means 112 can be a non-volatile flash-based memory, for example. In the embodiment shown here, the storage means 112 contain a logical data structure (LDS). In addition to a chip card operating system 120 and user data 108, the logical data structure also contains the applications 114 of the document 102.

Der Nachladeautomat 104 umfasst ebenfalls eine Kommunikationsschnittstelle 116, sowie Prozessormittel 118. Bei den Prozessormitteln 118 kann es sich um einen oder mehrere Ein- oder Mehrkernprozessoren handeln. Ferner umfasst der hier dargestellte Nachladeautomat 104 ein Steuermodul 138, sowie ein Authentisierungstoken 130, ein Nachladetoken 132, eine zweite Kommunikationsschnittstelle 134 sowie eine Energiequelle 136.The reloading machine 104 also includes a communication interface 116 and processor means 118. The processor means 118 can be one or more single-core or multi-core processors. Furthermore, the automatic reloading machine 104 shown here comprises a control module 138, as well as an authentication token 130, a reloading token 132, a second communication interface 134 and an energy source 136.

Bei der Energiequelle 136 kann es sich beispielsweise um eine Batterie oder eine stromerzeugende Einheit wie beispielsweise eine Brennstoffzelle oder eine Solarzelle handeln. Die Verwendung einer solchen abgeschlossenen Energiequelle 134 könnte den Vorteil haben, dass der Nachladeautomat 104 zum einen vollständig autark und zum anderen auch portabel gestaltet werden kann. Es kann sich bei der Energiequelle 134 jedoch auch um ein Netzteil oder eine andersartige Verbindung zu einer externen Energieversorgung handeln. Ferner ist auch eine Kombination aus externer und interner Energieversorgung möglich, dass die Ausfallsicherheit des Nachladeautomaten 104 verbessern würde.The energy source 136 can be, for example, a battery or a power-generating device such as a fuel cell or a solar cell. The use of such a closed energy source 134 could have the advantage that the automatic reloader 104 can be made completely self-sufficient on the one hand and portable on the other. However, the energy source 134 can also be a power pack or some other type of connection to an external energy supply. Furthermore, a combination of external and internal energy supply is also possible, which would improve the reliability of the automatic reloading device 104 .

Die zweite Kommunikationsschnittstelle 134 des Nachladeautomaten 104 kann beispielsweise zur Administration des Nachladeautomaten 104 ausgebildet sein. Es kann sich beispielsweise bei der Kommunikationsschnittstelle 134 um einen Ethernet-Anschluss handeln. Der Authentisierungstoken 130 sowie auch der Nachladetoken 132 können sowohl als Softwaretoken als auch als Hardwaretoken zum Beispiel in Form einer Chipkarte zum Einstecken in den Nachladeautomaten 104 ausgeprägt sein. Beispielsweise kann der Nachladetoken 132 von einem Hersteller des Dokuments 102 auf das eine Anwendung 128 nachgeladen werden soll bereitgestellt werden und enthält dann die nachzuladende Anwendung 128. Es ist jedoch auch möglich, dass der Nachladetoken 132 fest in dem Nachladeautomaten 104 eingebaut ist, so dass eine herstellerspezifische Nachladesoftware 128 über die Kommunikationsschnittstelle 134 auf den Nachladeautomaten 104 übertragen werden müsste. Der Nachladetoken 132 kann dabei auch als Speicherbereich innerhalb des Nachladeautomaten 104 ausgebildet sein.The second communication interface 134 of the automatic reloading machine 104 can be designed for the administration of the automatic reloading machine 104, for example. For example, the communication interface 134 can be an Ethernet connection. The authentication token 130 and also the reloading token 132 can be in the form of both a software token and a hardware token, for example in the form of a chip card for insertion into the reloading machine 104 . For example, the reload token 132 can be provided by a manufacturer of the document 102 on which an application 128 is to be reloaded and then contains the application 128 to be reloaded manufacturer-specific reloading software 128 would have to be transferred to the reloading machine 104 via the communication interface 134 . The reloading token 132 can also be designed as a storage area within the automatic reloading device 104 .

Die Kommunikationsschnittstelle116, über welche eine Kommunikation des Nachladeautomaten 104 mit dem Dokument 102 gewährleistet werden soll, kann zusätzlich eine mechanische Aufnahme zur teilweisen oder vollständigen Aufnahme des Dokuments 102 in den Nachladeautomaten 104 besitzen. Dabei kann die Aufnahme dergestalt sein, dass er das Dokument 102 zumindest für die Dauer des Nachladevorgangs vor einer Entnahme aus dem Nachladeautomaten 104 durch einen Dokumentenbenutzer schützt. Hierdurch kann während des Nachladevorgangs eine unterbrechungsfreie Kommunikation und Energiezufuhr gewährleistet werden.The communication interface 116, via which communication between the automatic reloading device 104 and the document 102 is to be ensured, can additionally have a mechanical receptacle for partially or completely receiving the document 102 in the automatic reloading device 104. The receptacle can be such that it protects the document 102 from being removed from the automatic reloading device 104 by a document user, at least for the duration of the reloading process. This ensures uninterrupted communication and power supply during the reloading process.

Der Nachladeautomat 104 ist dazu ausgebildet, über die Kommunikationsschnittstelle 116 mit dem Dokument 102 zu kommunizieren und Daten auszutauschen. Hierzu kann die Kommunikationsschnittstelle 116 eine Datenverbindung 122 mit der Kommunikationsschnittstelle 106des Dokuments 102 aufbauen. Dabei kann die Datenverbindung 122 zwischen Dokument 102 und Nachladeautomat 104 über die Kommunikationsschnittstellen 116 und 106 beispielsweise gemäß ISO 14443 ausgebildet sein. Zum Aufbau einer solchen Datenverbindung 122 kann es vorgesehen sein, dass zunächst ein Identifizierungs- und Authentifizierungsvorgang zwischen dem Dokument 102 und dem Nachladeautomat 104 ausgeführt wird. Hierzu kann ein entsprechendes Programmmodul 124 in den Prozessormitteln 118 des Nachladeautomaten 104 vorgesehen sein. Beispielsweise kann im Zuge des Authentifizierungsverfahrens ein gegenseitiger Austausch von Sicherheitszertifikaten vorgesehen sein, welche in den Speichermitteln 112 des Dokuments 102 bzw. in einem entsprechenden Authentisierungstoken 130 des Nachladeautomaten 104 abgelegt sind. Die im Sinne der vorliegenden Erfindung möglichen Authentifizierungsverfahren sind jedoch nicht hierauf beschränkt.The reloading machine 104 is designed to communicate with the document 102 via the communication interface 116 and to exchange data. For this purpose, the communication interface 116 establish a data connection 122 with the communication interface 106 of the document 102 . The data connection 122 between the document 102 and the automatic reloading device 104 can be configured via the communication interfaces 116 and 106 in accordance with ISO 14443, for example. In order to set up such a data connection 122, provision can be made for an identification and authentication process to be carried out between the document 102 and the reloading machine 104 first. For this purpose, a corresponding program module 124 can be provided in the processor means 118 of the automatic reloading device 104 . For example, in the course of the authentication method, a mutual exchange of security certificates can be provided, which are stored in the storage means 112 of the document 102 or in a corresponding authentication token 130 of the reloading machine 104. However, the authentication methods that are possible within the meaning of the present invention are not limited to this.

Sobald eine sichere Datenverbindung 122 zwischen dem Dokument 102 und dem Nachladeautomaten 104 aufgebaut wurde, können die Prozessormittel 118 des Nachladeautomaten 104 ein weiteres Programmmodul 126 aufrufen, um eine Anwendung 128, welche in dem Nachladetoken 132 des Nachladeautomaten 104 abgelegt ist, auf das Dokument 102 nachzuladen. In diesem Fall kann vorgesehen sein, dass zunächst eine Information an das Dokument 102 übermittelt wird, in welcher das Dokument 102 über den zur Installation der Anwendung 128 notwendigen Speicherplatz informiert wird. Das Dokument 102 bzw. die Prozessormittel 110 können dann überprüfen, ob in den Speichermitteln 112 ein entsprechend großer zusammenhängender unbelegter Speicherbereich existiert, welcher geeignet ist, die zu installierende Anwendung 128 aufzunehmen.As soon as a secure data connection 122 has been established between the document 102 and the reloading machine 104, the processor means 118 of the reloading machine 104 can call up another program module 126 in order to reload an application 128, which is stored in the reloading token 132 of the reloading machine 104, onto the document 102 . In this case, it can be provided that information is first transmitted to the document 102, in which the document 102 is informed about the memory space required for the installation of the application 128. The document 102 or the processor means 110 can then check whether a correspondingly large, contiguous, unoccupied memory area exists in the memory means 112, which is suitable for accommodating the application 128 to be installed.

Stellen die Prozessormittel 110 dabei fest, dass in den Speichermitteln 112 bereits ein ausreichend großer zusammenhängender unbelegter Speicherbereich verfügbar ist, kann das Dokument 102 dem Nachladeautomaten 104 signalisieren, dass es zum Nachladen der Anwendung 128 bereit ist. Der Nachladeautomat 104 übermittelt dann über die Datenverbindung 122 die Anwendung 128 an das Dokument 102 und das Dokument 102 speichert die Anwendung 128 in den Speichermitteln 112.If the processor means 110 determine that a sufficiently large, contiguous, unoccupied memory area is already available in the storage means 112, the document 102 can signal to the automatic reloading device 104 that it is ready for the application 128 to be reloaded. Automatic reloader 104 then transmits application 128 to document 102 via data connection 122, and document 102 stores application 128 in storage means 112.

Stellen jedoch die Prozessormittel 110 nach Benachrichtigung durch den Nachladeautomaten 104 fest, dass die Speichermittel 112 keinen ausreichend großen unbelegten zusammenhängenden Speicherbereich zur Speicherung der Anwendung 128 bereitstellen können, kann durch die Prozessormittel 110 ein Defragmentierungsvorgang angestoßen werden. Sofern im Zuge dieses Defragmentierungsvorgangs ein ausreichend großer zusammenhängender unbelegter Speicherbereich in den Speichermitteln 112 geschaffen werden kann, signalisiert das Dokument 102 dem Nachladevorgang, dass es zur Aufnahme der Anwendung 128 bereit ist. Ferner kann bei der Feststellung, dass die Speichermittel 112 keinen ausreichend großen unbelegten zusammenhängenden Speicherbereich bereitstellen können vorgesehen sein, dass die Prozessormittel 110 ferner prüfen, ob auf dem Dokument 102 insgesamt ausreichend freier Speicher vorhanden ist um die Anwendung zu installieren. Sollte dabei ermittelt werden, dass auch nach einer Defragmentierung der zusammenhängende freie Speicher nicht ausreichen würde um die Anwendung 128 zu speichern, kann das Dokument 102 dem Nachladeautomaten 104 mitteilen, dass ein Nachladevorgang derzeit nicht möglich ist und das Verfahren an dieser Stelle beenden.However, if the processor 110 determines after being notified by the automatic reloader 104 that the storage 112 cannot provide a sufficiently large, unoccupied, contiguous storage area for storing the application 128, the processor 110 can initiate a defragmentation process. If a sufficiently large, contiguous, unoccupied memory area can be created in the storage means 112 in the course of this defragmentation process, the document 102 signals to the reloading process that it is ready to receive the application 128 . Furthermore, if it is determined that the memory means 112 cannot provide a sufficiently large unoccupied contiguous memory area, it can be provided that the processor means 110 also check whether there is sufficient free memory overall on the document 102 to install the application. If it is determined that the contiguous free memory would not be sufficient to store the application 128 even after defragmentation, the document 102 can inform the automatic reloading device 104 that a reloading process is currently not possible and end the method at this point.

Dabei kann vorgesehen sein, dass während eines Defragmentierungsvorgangs fortlaufend geprüft wird, ob in den Speichermitteln 112 zwischenzeitlich ein ausreichend großer Speicherbereich erzeugt wurde, um die Anwendung 128 aufzunehmen. Beispielsweise kann vorgesehen sein, dass der Defragmentierungsvorgang nicht vollständig durchlaufen wird, sondern zu jenem Zeitpunkt abgebrochen wird, an dem die Speichermittel 112 einen ausreichend großen unbelegten zusammenhängenden Speicherbereich bereitstellen können. Dabei kann ein Abbruch des Defragmentierungsvorgangs jedoch erst dann erfolgen, wenn ein atomarer Teilschritt abgeschlossen wurde, da andernfalls eine Inkonsistenz des Speicherinhalts entstehen könnte.Provision can be made for a continuous check to be carried out during a defragmentation process as to whether a sufficiently large memory area has been created in the memory means 112 in the meantime to accommodate the application 128 . For example, it can be provided that the defragmentation process does not run through completely, but is terminated at the point in time at which the storage means 112 can provide a sufficiently large, unoccupied, contiguous storage area. However, the defragmentation process can only be aborted when an atomic sub-step has been completed, since otherwise the memory content could become inconsistent.

Im Folgenden werden zwei mögliche Verfahren zur Defragmentierung der Speichermittel 112 des Dokuments 102 beschrieben.Two possible methods for defragmenting the storage means 112 of the document 102 are described below.

Die 2 ist eine schematische Darstellung eines ersten möglichen Defragmentierungsverfahrens. Dabei wird angenommen, dass die Speichermittel 112 eines Dokuments 112 eine Größe bzw. ein Speichervolumen aufweisen, welches durch den Pfeil 202 angedeutet wird. Wie in 2 a) dargestellt, umfasst der Speicher vier belegte Speicherbereiche 204, 206, 208 und 210. Zwischen diesen belegten Speicherbereichen befinden sich drei unbelegte Speicherbereiche 212, 214 und 216. Nach dem Speicherblock 210 folgt ein weiterer freier Speicherbereich 222, der sich bis zum Ende des Gesamtspeichers erstreckt. Ferner wird durch den Block 218 der notwendige Speicherbereich der Größe 220 angedeutet, welcher erforderlich ist, um eine nachzuladende Anwendung 218 in den Speichermitteln 112 des Dokuments 102 abzulegen. Wie in 2 a) dargestellt, ist im Ausgangszustand des Speichers 112 keiner der unbelegten Speicherbereiche 212, 214 oder 216 groß genug, um die Anwendung 218 aufzunehmen. Daher wird im Zuge des erfindungsgemäßen Verfahrens eine Defragmentierung des Speichers 112 angestoßen.the 2 Figure 12 is a schematic representation of a first possible defragmentation method. It is assumed here that the storage means 112 of a document 112 have a size or a storage volume which is indicated by the arrow 202 . As in 2 a) shown, the memory comprises four occupied memory areas 204, 206, 208 and 210. Between these occupied memory areas there are three unoccupied memory areas 212, 214 and 216. After the memory block 210 there follows another free memory area 222, which extends to the end of the entire memory . Furthermore, block 218 indicates the required memory area of size 220, which is required in order to store an application 218 to be reloaded in memory means 112 of document 102. As in 2 a) shown, none of the unoccupied memory areas 212, 214 is in the initial state of memory 112 or 216 large enough to hold application 218. A defragmentation of the memory 112 is therefore initiated in the course of the method according to the invention.

Es sei an dieser Stelle angemerkt, dass die Verschiebung der Blöcke 204, 206, 208 und 210 unabhängig voneinander jeweils sowohl physikalisch als auch logisch erfolgen kann.It should be noted here that the shifting of blocks 204, 206, 208 and 210 can be both physical and logical, independently of each other.

In einem ersten Schritt des hier dargestellten Defragmentierungsverfahrens wird nun ein erster unbelegter Speicherbereich ermittelt, in diesem Fall der Speicherbereich 212. Anschließend wird der erste auf den unbelegten Speicherbereich 212 folgende belegte Speicherbereich 206 ermittelt. Dieser wird dann an die Anfangsposition des unbelegten Speicherbereichs 212 verschoben. Das Ergebnis dieses Schrittes ist in 2b dargestellt. Da auch nach diesem ersten Defragmentierungsschritt nach wie vor kein ausreichend großer unbelegter Speicherbereich vorhanden ist, um die Anwendung 218 zu speichern, wird in einem nachfolgenden Defragmentierungsschritt der belegte Speicherbereich 208 in den auf den belegten Speicherbereich 206 folgenden unbelegten Speicherbereich verschoben. Das Ergebnis dieser Verschiebung ist in 2 c) dargestellt.In a first step of the defragmentation method presented here, a first unoccupied memory area is determined, in this case memory area 212. Then the first occupied memory area 206 following the unoccupied memory area 212 is determined. This is then moved to the start position of the unoccupied memory area 212. The result of this step is in 2 B shown. Since, even after this first defragmentation step, there is still not a sufficiently large unoccupied memory area to store the application 218, the occupied memory area 208 is moved to the unoccupied memory area following the occupied memory area 206 in a subsequent defragmentation step. The result of this shift is in 2c) shown.

Da auch in der in 2 c) dargestellten Situation nach wie vor der unbelegte Speicherbereich nicht groß genug ist, um die Anwendung 218 aufzunehmen, wird auch der belegte Speicherbereich 210 in den verbleibenden, unbelegten Speicherbereich verschoben, sodass alle vier belegten Speicherbereiche 204, 206, 208 und 210 eine zusammenhängende Kette von belegten Speicherbereichen bilden. Dies ist in 2 d) dargestellt. Erst durch diesen letzten Defragmentierungsschritt, dessen Ergebnis in 2 d) dargestellt ist, wird es möglich, die Anwendung 218 in den nun entstandenen unbelegten Speicherbereich zu speichern.Since also in the in 2 c) If, in the situation shown, the unoccupied memory area is still not large enough to accommodate the application 218, the occupied memory area 210 is also moved to the remaining, unoccupied memory area, so that all four occupied memory areas 204, 206, 208 and 210 form a contiguous chain of occupied create storage areas. this is in 2d) shown. Only through this last defragmentation step, the result of which in 2d) shown, it becomes possible to save the application 218 in the now created free memory area.

Die 3 ist eine schematische Darstellung eines weiteren möglichen Defragmentierungsverfahrens im Sinne der vorliegenden Erfindung. Analog zu der in 2 dargestellten Ausgangssituation sind auch hier in einem Speicher einer definierten Größe, angedeutet durch den Pfeil 302, vier belegte Speicherbereiche 302, 304, 306 und 308 vorhanden. Wie ferner in 3 a) dargestellt, ist keiner der unbelegten Speicherbereiche 312, 314 oder 316 ausreichend groß, um die zu installierende Anwendung 318 mit dem Speicherbedarf 320 aufzunehmen.the 3 is a schematic representation of another possible defragmentation method within the meaning of the present invention. Analogous to the in 2 In the initial situation shown, four occupied memory areas 302, 304, 306 and 308 are also present in a memory of a defined size, indicated by the arrow 302. As also in 3 a) As shown, none of the unallocated memory areas 312, 314 or 316 is large enough to accommodate the application 318 to be installed with the memory requirement 320.

Bei dem hier dargestellten Verfahren ist nun vorgesehen, dass zunächst die Größe der jeweiligen belegten Speicherbereiche 304, 306, 308 und 310 sowie die Größe der unbelegten Speicherbereiche 312, 314 und 316 ermittelt wird. Anschließend werden belegte Speicherbereiche an die Position eines unbelegten Speicherbereichs gleicher oder größerer Größe verschoben. Dies ist exemplarisch in 3 b) dargestellt. Dabei wurde bei der Ermittlung der Größen der belegten und unbelegten Speicherbereiche zuvor festgestellt, dass der belegte Speicherbereich 308 genauso groß ist wie der unbelegte Speicherbereich 312. Daher wurde der belegte Speicherbereich 308 an die Position des unbelegten Speicherbereichs 312 verschoben. Bereits durch diese einfache Verschiebung des Speicherbereichs 308 wurde ein ausreichend großer unbelegter Speicherbereich geschaffen, um die Anwendung 318 aufzunehmen.In the method presented here, it is now provided that first the size of the respective occupied memory areas 304, 306, 308 and 310 and the size of the unoccupied memory areas 312, 314 and 316 are determined. Subsequently, occupied memory areas are moved to the position of an unoccupied memory area of the same or larger size. This is exemplary in 3 b) shown. When determining the sizes of the occupied and unoccupied memory areas, it was previously established that the occupied memory area 308 is just as large as the unoccupied memory area 312. The occupied memory area 308 was therefore moved to the position of the unoccupied memory area 312. A sufficiently large unoccupied memory area to accommodate the application 318 was already created by this simple shifting of the memory area 308 .

Wäre man ausgehend von der in 3 a) dargestellten Situation analog zu dem in 2 beschriebenen Verfahren vorgegangen, wäre zunächst der Speicherbereich 306 verschoben worden, wobei durch diese Verschiebung noch kein ausreichend großer Speicherbereich entstanden wäre. Es wäre daher notwendig gewesen sowohl den belegten Speicherbereich 306 als auch den belegten Speicherbereich 308 zu verschieben. Dies konnte jedoch durch den in 3 dargestellten Defragmentierungsvorgang vermieden werden.If you were starting from the in 3 a) The situation shown is analogous to that in 2 If the method described had been carried out, the memory area 306 would have been shifted first, and this shift would not have resulted in a sufficiently large memory area. It would therefore have been necessary to move both the occupied memory area 306 and the occupied memory area 308. However, this could be done by the in 3 shown defragmentation process can be avoided.

Es kann ferner vorgesehen sein, dass auch nach dem Speichern der Anwendung 318 ein Defragmentierungsvorgang fortgeführt wird, sodass die belegten Speicherbereiche des Speichers 112 des Dokuments 102 einen zusammenhängenden Speicherbereich ergeben. Hierzu kann beispielsweise der belegte Speicherbereich 310 an dem Speicherbereich, welcher durch die Anwendung 318 belegt wird, herangeschoben werden. Dieser Zustand ist in 3 c) dargestellt.Provision can also be made for a defragmentation process to be continued even after the application 318 has been saved, so that the occupied memory areas of the memory 112 of the document 102 result in a contiguous memory area. For this purpose, for example, the occupied memory area 310 can be pushed up to the memory area which is occupied by the application 318 . This state is in 3c) shown.

BezugszeichenlisteReference List

100100
Systemsystem
102102
Dokumentdocument
104104
Nachladeautomatautomatic reloader
106106
Kommunikationsschnittstellecommunication interface
108108
Nutzdatenpayload
110110
Prozessormittelprocessor means
112112
Speichermittelstorage means
114114
Anwendungenapplications
116116
Kommunikationsschnittstellecommunication interface
118118
Prozessormittelprocessor means
120120
Chipkartenbetriebssystemchip card operating system
122122
DatenverbindungData Connection
124124
Programmmodulprogram module
126126
Programmmodulprogram module
128128
Anwendungapplication
130130
Authentisierungstokenauthentication token
132132
Nachladetokenreload token
134134
Kommunikationsschnittstellecommunication interface
136136
Energiequelleenergy source
138138
Steuermodulcontrol module
202202
Speichergrößememory size
204204
belegter Speicherbereichoccupied storage area
206206
belegter Speicherbereichoccupied storage area
208208
belegter Speicherbereichoccupied storage area
210210
belegter Speicherbereichoccupied storage area
212212
unbelegter Speicherbereichunused storage area
214214
unbelegter Speicherbereichunused storage area
216216
unbelegter Speicherbereichunused storage area
218218
Anwendungapplication
220220
Speicherbedarf der Anwendungmemory requirements of the application
222222
unbelegter Speicherbereichunused storage area
302302
Speichergrößememory size
304304
belegter Speicherbereichoccupied storage area
306306
belegter Speicherbereichoccupied storage area
308308
belegter Speicherbereichoccupied storage area
310310
belegter Speicherbereichoccupied storage area
312312
unbelegter Speicherbereichunused storage area
314314
unbelegter Speicherbereichunused storage area
316316
unbelegter Speicherbereichunused storage area
318318
Anwendungapplication
320320
Speicherbedarf der Anwendungmemory requirements of the application

Claims (13)

Verfahren zum Nachladen einer Anwendung (128) in einen Speicher (112) eines Dokuments (102), wobei der Speicher (112) unbelegte Speicherbereiche (212, 214...) und mit relokierbarem Programmcode belegte Speicherbereiche (204, 206,...) umfasst, wobei das Nachladen der Anwendung (128) umfasst: • Ermitteln der notwendigen Länge (220) eines unbelegten zusammenhängenden Speicherbereichs, um die Anwendung (128) in dem Speicher (112) zu speichern, • Ermitteln, ob der Speicher (112) einen zusammenhängenden unbelegten Speicherbereich aufweist, dessen Länge mindestens der zuvor ermittelten Länge (220) entspricht, • Falls der Speicher (112) keinen zusammenhängenden unbelegten Speicherbereich der zuvor ermittelten Länge (220) aufweist, Defragmentieren des Speichers (112), wobei das Defragmentieren ein Umordnen des in den belegten Speicherbereichen gespeicherten relokierbaren Programmcodes umfasst, sodass mehrere der unbelegten Speicherbereiche einen zusammenhängenden unbelegten Speicherbereich bilden, der zumindest die zuvor ermittelte Länge (220) aufweist, • Nachladen der Anwendung (128) in den unbelegten Speicherbereich, wobei das Defragmentieren das Umordnen des in den belegten Speicherbereichen (204, 206,...) gespeicherten relokierbaren Programmcodes durch physikalisches Verschieben des relokierbaren Programmcodes umfasst und/oder wobei die logische Reihenfolge der Speicherbereiche des Speichers (112) durch eine Zuordnungstabelle festgelegt ist, wobei das Defragmentieren das Umordnen eines Teils der belegten Speicherbereiche (204, 206,...) durch Manipulation der Zuordnungstabelle umfasst wobei das Defragmentieren ferner das Definieren eines Schwellwertes für die Länge eines belegten Speicherbereiches (204, 206,...) umfasst, wobei das Verschieben von in belegten Speicherbereichen (204, 206,...) gespeicherten relokierbaren Programmcodes mit einer Länge, die größer ist als der Schwellwert durch Manipulation der Zuordnungstabelle erfolgt und wobei das Verschieben von in belegten Speicherbereichen (204, 206,...) gespeicherten relokierbaren Programmcodes mit einer Länge, die kleiner ist als der Schwellwert durch physikalisches Verschieben des relokierbaren Programmcodes der belegten Speicherbereiche erfolgt (204, 206,...).Method for reloading an application (128) into a memory (112) of a document (102), the memory (112) containing unoccupied memory areas (212, 214...) and memory areas (204, 206,...) occupied with relocatable program code. ), wherein the reloading of the application (128) comprises: • determining the necessary length (220) of an unoccupied contiguous memory area in order to store the application (128) in the memory (112), • Determining whether the memory (112) has a contiguous, unoccupied memory area whose length corresponds at least to the previously determined length (220), • If the memory (112) does not have a contiguous, unoccupied memory area of the previously determined length (220), defragmenting the memory (112), the defragmenting comprising rearranging the relocatable program code stored in the occupied memory areas, so that several of the unoccupied memory areas have a contiguous, unoccupied Form a memory area that has at least the previously determined length (220), • Reloading the application (128) into the unoccupied memory area, with the defragmenting including rearranging the relocatable program code stored in the occupied memory areas (204, 206,...) by physically moving the relocatable program code and/or the logical order of the memory areas of the memory (112) being defined by an allocation table, the defragmenting comprising rearranging part of the occupied memory areas (204, 206,...) by manipulating the allocation table wherein the defragmentation further comprises defining a threshold value for the length of an occupied memory area (204, 206,...), wherein the shifting of relocatable program codes stored in occupied memory areas (204, 206,...) with a length that is greater is carried out as the threshold value by manipulating the assignment table and the shifting of relocatable program codes stored in occupied memory areas (204, 206,...) with a length that is smaller than the threshold value is carried out by physically shifting the relocatable program code of the occupied memory areas ( 204, 206,...). Verfahren nach Anspruch 1, wobei das Defragmentieren umfasst: • Ermitteln einer ersten Position eines ersten, unbelegten Speicherbereichs (212), • Ermitteln einer zweiten Position eines zweiten, belegten Speicherbereichs (206), wobei der zweite belegte Speicherbereich (206) in dem Speicher dem ersten freien Speicherbereich (212) logisch direkt nachfolgt, • Verschieben des in dem zweiten belegten Speicherbereich (206) gespeicherten relokierbaren Programmcodes an die erste Position.procedure after claim 1 , wherein the defragmentation comprises: • determining a first position of a first, unoccupied memory area (212), • determining a second position of a second, occupied memory area (206), wherein the second occupied memory area (206) in the memory corresponds to the first free memory area ( 212) follows logically directly, • shifting the relocatable program code stored in the second occupied memory area (206) to the first position. Verfahren nach einem der Ansprüche 1 und 2, wobei das Defragmentieren umfasst: • Ermitteln der jeweiligen Positionen und Längen der belegten Speicherbereiche (204, 206,...), • Ermitteln der jeweiligen Positionen und Längen der unbelegten Speicherbereiche (212,214,...), • Verschieben des in belegten Speicherbereichen gespeicherten relokierbaren Programmcodes an die Positionen von unbelegten Speicherbereichen gleicher oder größerer Länge.Procedure according to one of Claims 1 and 2 , whereby the defragmentation includes: • Determining the respective positions and lengths of the occupied memory areas (204, 206,...), • Determining the respective positions and lengths of the unoccupied memory areas (212,214,...), • Shifting the occupied memory areas into stored relocatable program codes to the positions of unoccupied memory areas of the same or greater length. Verfahren nach einem der vorhergehenden Ansprüche, wobei das Defragmentieren ferner das Erzeugen einer Protokolldatei umfasst, wobei die Protokolldatei die während eines Defragmentiervorgangs erfolgten Verschiebungen von Speicherbereichen wiedergibt.A method according to any one of the preceding claims, wherein the defragmentation further comprises generating a log file, the log file reflecting the movements of storage areas that occurred during a defragmentation operation. Verfahren nach einem der vorhergehenden Ansprüche, wobei der Speicher (112) in mindestens zwei Speicherbereiche aufgeteilt ist, wobei ein erster Speicherbereich den relokierbaren Programmcode mit relativen Sprungadressen beinhaltet und wobei ein zweiter Speicherbereich hierarchisch gespeicherte Nutzdaten (108) mit absoluten Sprungadressen beinhaltet, wobei die Defragmentierung ausschließlich auf dem ersten Speicherbereich ausgeführt wird.Method according to one of the preceding claims, wherein the memory (112) is divided into at least two memory areas, wherein a first memory area contains the relocatable program code with relative jump addresses and wherein a second memory area contains hierarchically stored user data (108) with absolute jump addresses, the defragmentation runs exclusively on the first memory area. Verfahren nach einem der vorhergehende Ansprüche, wobei es sich bei der Anwendung (128) um eine sicherheitsrelevante Anwendung handelt, wobei in dem Speicher (112) mindestens ein kryptographischer Schlüssel gespeichert ist, wobei die sicherheitsrelevante Anwendung unter Verwendung des kryptographischen Schlüssels dazu ausgebildet ist einen Authentifizierungsvorgang durchzuführen.Method according to one of the preceding claims, wherein the application (128) is a security-related application, wherein at least one cryptographic key is stored in the memory (112), wherein the security-related application is designed using the cryptographic key for an authentication process to perform. Dokument (102) mit Speichermitteln (112), Prozessormitteln (110) und einer Kommunikationsschnittstelle (106), insbesondere einer kontaktlosen Kommunikationsschnittstelle, wobei das Dokument (102) dazu ausgebildet ist, über die Kommunikationsschnittstelle (106) eine Anwendung (128) zum Nachladen in die Speichermittel (112) zu empfangen, wobei die Prozessormittel (110) und die Speichermittel (112) dazu ausgebildet sind das Verfahren nach einem der vorhergehenden Ansprüche auszuführen.Document (102) with storage means (112), processor means (110) and a communication interface (106), in particular a contactless communication interface, wherein the document (102) is designed to use the communication interface (106) to load an application (128) into receiving the storage means (112), the processor means (110) and the storage means (112) being adapted to carry out the method according to any one of the preceding claims. System (100) aus einem Nachladeautomaten (104) zum Nachladen einer Anwendung (128) auf ein Dokument (102) und einem Dokument (102) nach Anspruch 7, wobei der Nachladeautomat (104) eine Kommunikationsschnittstelle (116), insbesondere eine kontaktlose Kommunikationsschnittstelle umfasst und dazu ausgebildet ist, über die Kommunikationsschnittstelle (116) die Anwendung (128) auf das Dokument (102) nachzuladen.System (100) from a reloading machine (104) for reloading an application (128) on a document (102) and a document (102). claim 7 , wherein the reloading machine (104) comprises a communication interface (116), in particular a contactless communication interface, and is designed to reload the application (128) onto the document (102) via the communication interface (116). System (100) nach Anspruch 8, wobei der Nachladeautomat (104) eine mechanische Aufnahme für das Dokument (102) aufweist, wobei die mechanische Aufnahme dazu ausgebildet ist, bei einem Nachladevorgang das Dokument (102) so lange vor einem Entfernen aus dem Nachladeautomaten (104) zu schützen, bis das Nachladen der Anwendung (128) auf das Dokument (102) abgeschlossen ist.system (100) after claim 8 , wherein the automatic reloader (104) has a mechanical receptacle for the document (102), wherein the mechanical receptacle is designed to protect the document (102) from being removed from the automatic reloader (104) during a reloading process until the Reloading the application (128) onto the document (102) is complete. System (100) nach einem der Ansprüche 8 oder 9, wobei ein Zugriff des Nachladeautomaten (104) auf das Dokument (102) erst nach erfolgreicher Überprüfung einer kryptographischen Zugangsbedingung erfolgt.System (100) according to one of Claims 8 or 9 , wherein the reloading machine (104) accesses the document (102) only after successful verification of a cryptographic access condition. System (100) nach einem der Ansprüche 8-10, wobei der Nachladeautomat (104) einen Nachladetoken (132) umfasst, wobei der Nachladetoken (132) die auf das Dokument (102) nachzuladende Anwendung (128) beinhaltet, wobei der Nachladetoken (132) als austauschbarer physischer Datenträger ausgebildet ist.System (100) according to one of Claims 8 - 10 , wherein the automatic reloading device (104) comprises a reloading token (132), the reloading token (132) containing the application (128) to be reloaded on the document (102), the reloading token (132) being designed as an exchangeable physical data medium. System (100) nach einem der Ansprüche 8-11, wobei der Nachladeautomat (104) ein Authentisierungstoken (130) umfasst, wobei der Authentisierungstoken (130) Daten für eine Authentisierung eines Benutzers des Nachladeautomaten (104) beinhaltet, wobei der Authentisierungstoken (130) als austauschbarer physischer Datenträger ausgebildet ist.System (100) according to one of Claims 8 - 11 , wherein the reloading machine (104) comprises an authentication token (130), the authentication token (130) containing data for authentication of a user of the reloading machine (104), the authentication token (130) being designed as an exchangeable physical data carrier. System (100) nach einem der Ansprüche 8-12, wobei der Nachladeautomat (104) eine Energiequelle (136) umfasst, wobei es sich bei der Energiequelle (136) um eine abgeschlossene interne Energiequelle und/oder um eine externe Energiequelle handelt.System (100) according to one of Claims 8 - 12 , wherein the automatic reloader (104) comprises an energy source (136), the energy source (136) being a closed internal energy source and/or an external energy source.
DE102014224186.3A 2014-11-26 2014-11-26 Procedure for reloading an application onto a document Active DE102014224186B4 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
DE102014224186.3A DE102014224186B4 (en) 2014-11-26 2014-11-26 Procedure for reloading an application onto a document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE102014224186.3A DE102014224186B4 (en) 2014-11-26 2014-11-26 Procedure for reloading an application onto a document

Publications (2)

Publication Number Publication Date
DE102014224186A1 DE102014224186A1 (en) 2016-06-02
DE102014224186B4 true DE102014224186B4 (en) 2022-12-29

Family

ID=55967723

Family Applications (1)

Application Number Title Priority Date Filing Date
DE102014224186.3A Active DE102014224186B4 (en) 2014-11-26 2014-11-26 Procedure for reloading an application onto a document

Country Status (1)

Country Link
DE (1) DE102014224186B4 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE60019364T2 (en) 1999-03-23 2006-03-09 International Business Machines Corp. Memory defragmentation in smart cards
US7401174B2 (en) 2003-12-16 2008-07-15 Matsushita Electric Industrial Co., Ltd. File system defragmentation and data processing method and apparatus for an information recording medium
DE102012224083A1 (en) 2012-12-20 2015-08-20 Bundesdruckerei Gmbh Method for Personalizing a Secure Element (SE) and Computer System

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE60019364T2 (en) 1999-03-23 2006-03-09 International Business Machines Corp. Memory defragmentation in smart cards
US7401174B2 (en) 2003-12-16 2008-07-15 Matsushita Electric Industrial Co., Ltd. File system defragmentation and data processing method and apparatus for an information recording medium
DE102012224083A1 (en) 2012-12-20 2015-08-20 Bundesdruckerei Gmbh Method for Personalizing a Secure Element (SE) and Computer System

Also Published As

Publication number Publication date
DE102014224186A1 (en) 2016-06-02

Similar Documents

Publication Publication Date Title
EP1883906B1 (en) Portable data carrier featuring secure data processing
DE102014220616A1 (en) Method for loading executable program instructions into a chip card in active operation
EP1196902B1 (en) Method for operating a portable data carrier configured for executing reloadable functional programs
EP3754530B1 (en) Method for reloading software on a smart card by means of a post-loader
DE102014224186B4 (en) Procedure for reloading an application onto a document
EP3308278B1 (en) Method for updating personalization data
DE19716015A1 (en) Introducing information on a chip card
DE102005020313A1 (en) Apparatus and method for generating data for security media initialization
EP3271825B1 (en) Method for storing user data in a document
DE10324507A1 (en) Method for loading data into a storage device
EP3175383B1 (en) Method for changing the control data of a chip card, and chip card system
EP3215957B1 (en) Chip card, chip card system, and method for accessing a chip card
EP3186711B1 (en) Memory management for a token
DE10323033A1 (en) Load an executable program into a portable data carrier
EP3286687B1 (en) Method for compressing user data of a document
DE102014112304A1 (en) Method for installing an additional application in a non-volatile memory of a chip card
DE102015214422A1 (en) Chip card with main application and persistence application

Legal Events

Date Code Title Description
R012 Request for examination validly filed
R079 Amendment of ipc main class

Free format text: PREVIOUS MAIN CLASS: G06F0012020000

Ipc: G06F0012140000

R016 Response to examination communication
R018 Grant decision by examination section/examining division
R020 Patent grant now final