Synchronization of memory units in a distributed system

The method for synchronizing memories in distributed systems addresses the challenge of maintaining consistent memory states by using update messages with versioning, ensuring reliable and efficient synchronization during system initialization.

WO2025114380A1PCT designated stage expired Publication Date: 2025-06-05VOLKSWAGEN AG
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/EP2024/083801
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-28
Filing Date
2024-11-27
Publication Date
2025-06-05

AI Technical Summary

Technical Problem

In distributed systems, synchronizing local memory copies with a central memory is challenging, especially during system initialization, as it requires precise control to avoid inconsistent memory states and lengthy wait times.

Method used

A method for synchronizing memories in a distributed system involves registering central and read-only memories within the network, sending update messages with initial memory images, and adopting these images as the current memory state, ensuring consistent versioning to prevent inconsistencies.

Benefits of technology

This approach ensures reliable synchronization of memories in distributed systems, reducing the need for strict wait times and operation order adherence, thereby preventing inconsistent memory states and simplifying system initialization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure EP2024083801_05062025_PF_FP_ABST
    Figure EP2024083801_05062025_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to methods and a computer program having instructions for synchronizing memory units in a distributed system. The invention also relates to a distributed system in which such methods are used, and to a means of transportation having a distributed system of this type. In a first step, the central memory unit is logged (S10) into a network of the distributed system. The central memory unit then transmits (S11) an update message having an initial memory-unit image of the central memory unit. The initial memory-unit image from the update message is adopted (S12) by at least one reading memory unit as a current memory-unit state.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Description

[0002] Synchronization of storage in a distributed system

[0003] The present invention relates to a method and a computer program with instructions for synchronizing memories in a distributed system. The invention also relates to a distributed system in which such methods are used, as well as to a means of transportation with such a distributed system.

[0004] In a distributed system, local copies of a memory instance are often created in the distributed processes to accelerate read access to the memory. However, the local copies must be synchronized with the central memory at all times. Synchronization is particularly critical when a new local copy or a new central memory is created. This is because a complete memory image must be transported to the local copy, which takes a certain amount of time, and incremental memory changes that arrive in the meantime must be taken into account. If confusion occurs, an inconsistent memory image of the local copy is created.

[0005] Against this background, CN 101751394 A relates to a method for data synchronization. In this method, logic logs are received, buffered, and ordered according to their sequence numbers. Based on the sequence numbers, it is determined whether the logic logs are in a normal state or not. If this is the case, the logic logs are written to a memory database.

[0006] US 2015 / 0006840 A1 relates to a method for memory synchronization in a multiprocessor system. In this method, a memory synchronization unit sends a central generation message. Memory access requests are delayed depending on the values ​​of the central generation message.

[0007] Various protocols for synchronizing memory areas over the network are conceivable. A simple approach involves the local process requesting the complete memory image. All incremental memory changes received up to that point are cached. Once the complete memory image has been received, the local process processes the cached incremental memory changes in order until the local memory contains the last valid state. This approach requires precise control of the memory model by the local process. This creates wait times that the process itself must manage. If the wait times are not adhered to or the operations are not performed in the correct order, inconsistent memory states arise.

[0008] It is an object of the invention to provide improved solutions for the synchronization of memories in a distributed system.

[0009] This object is achieved by a method having the features of claim 1 or 3, by a computer program with instructions according to claim 13, by a distributed system according to claim 14, and by a means of transport according to claim 15. Preferred embodiments of the invention are the subject of the dependent claims.

[0010] According to a first aspect of the invention, a method for synchronizing memories in a distributed system comprising at least one central memory and a number of read memories comprises the steps:

[0011] - Registering a central storage in a network of the distributed system;

[0012] - Sending an update message with an initial memory image of the central memory by the central memory; and

[0013] - Adopting the initial memory image from the update message as the current memory state by at least one read memory.

[0014] According to a further aspect of the invention, a computer program contains instructions which, when executed by a computer, cause the computer to perform the following steps for synchronizing memories in a distributed system comprising at least one central memory and a number of read-only memories:

[0015] - Registering a central storage in a network of the distributed system;

[0016] - Sending an update message with an initial memory image of the central memory by the central memory; and

[0017] - Adopting the initial memory image from the update message as the current memory state by at least one read-only memory. The term "computer" is to be understood broadly. In particular, it also includes distributed systems and other processor-based data processing devices.

[0018] The computer program may, for example, be made available for electronic retrieval or stored on a computer-readable storage medium.

[0019] Preferably, the update message is sent with the initial memory image of the central memory with the lowest version number provided for the memory image in the system.

[0020] According to a further aspect of the invention, a method for synchronizing memories in a distributed system comprising at least one central memory and a number of read memories comprises the steps:

[0021] - Registering a read-only memory in a network of the distributed system;

[0022] - Sending a request message for a complete memory image of the central memory by the read memory;

[0023] - Sending a response message with the requested memory image by the central storage;

[0024] - Receiving the sent response message by the read memory; and

[0025] - Adopting the memory image from the received response message as the current memory state by the read memory.

[0026] In particular, the subject matter of the independent claims each avoids inconsistent memory states. Thus, no inconsistent memory image of a local copy is created. This further reduces the need to adhere to strict wait times and / or perform operations in the correct order.

[0027] According to a further aspect of the invention, a computer program contains instructions which, when executed by a computer, cause the computer to perform the following steps for synchronizing memories in a distributed system comprising at least one central memory and a number of read-only memories:

[0028] - Registering a read-only memory in a network of the distributed system;

[0029] - Sending a request message for a complete memory image of the central memory by the read memory;

[0030] - Sending a response message with the requested memory image by the central memory; - Receiving the sent response message by the read memory; and

[0031] - Adopting the memory image from the received response message as the current memory state by the read memory.

[0032] Here, too, the term "computer" should be understood broadly. In particular, it also includes distributed systems and other processor-based data processing devices.

[0033] The computer program may, for example, be made available for electronic retrieval or stored on a computer-readable storage medium.

[0034] The inventive solution is based on a distributed system comprising a central memory, which can be read and written to, and any number of read memories. The read memories are kept synchronized with the central memory. All memory instances are located in their own process, which can access them. The memories communicate with each other using messages, with various types of messages. With request-reply messages, one process sends a message to another process. This process sends a response, which is received by the first process. With update messages, a process sends a message to any number of other processes unknown to the process.

[0035] During operation, the central storage sends an update message whenever the storage contents change. It addresses a previously defined subject, i.e., the storage topic. All read-only storage devices that have previously registered with the network for this subject receive the update message and can transfer the respective content changes to the local storage. Each update message is assigned a sequential version number. The read-only storage devices only accept update messages whose content has a higher version number than the currently stored content.

[0036] The inventive solution handles the critical phase of system initialization and ensures that the memories involved are reliably synchronized. There are two possible cases here. In the first case, the read-only memories already exist and a new central memory is created. The new central memory must first register with the network in order to be able to receive request messages addressed to it. The new central memory then sends a memory image of its initial memory state as an update message, preferably with the lowest version number provided for the memory image in the system, e.g., version 1. The read-only memories have not yet received an update and therefore adopt this memory image as the current memory state.

[0037] In the second case, the central memory already exists and a new read memory is added. The new read memory must first register with the network to receive update messages. If the new read memory determines that the registration was successful, a request message is sent to the central memory, requesting it to provide a complete memory image. The central memory then sends a reply message to the new read memory containing a complete memory image. As soon as this reply message arrives at the read memory, the memory image is adopted there. The read memory process does not have to actively start any of these steps or actively wait. The initialization and synchronization of the memory units takes place exclusively through the exchange of messages between them.

[0038] According to one aspect of the invention, ping requests are sent by the read-only memory until the registration of the read-only memory on the network is complete. It may take some time until the registration of the new read-only memory on the network is successfully completed. In the meantime, update messages may already be sent from the central memory which the new read-only memory cannot yet receive. Therefore, the read-only memory must first wait until the registration on the network is successfully completed. So that this waiting time does not have to be coordinated by the read-only memory process, the read-only memory can simply send request messages to the central memory until the registration has been successfully completed. Preferably, empty request messages, so-called pings, are sent, which are answered by the central memory with similar pings.

[0039] According to one aspect of the invention, when the read-only memory adopts the memory image from the received response message as the current memory state, a version number of the current memory state of the read-only memory is set to a version number sent in the response message. This ensures that the new read-only memory can correctly process update messages from the central memory.

[0040] According to one aspect of the invention, update messages are received and processed by the read-only memory. During the phase in which the new read-only memory's registration with the network is not yet complete, update messages can be sent from the central memory. These are advantageously received and processed by the read-only memory once the registration with the network is complete. After the read-only memory has been fully initialized and synchronized in this way, it receives further update messages during operation.

[0041] According to one aspect of the invention, the update messages are received and processed by the read-only memory before a complete memory image has been received. It is possible to receive and process update messages before a complete memory image has been received. This simplifies the implementation of the inventive solution.

[0042] According to one aspect of the invention, the received memory image is only adopted by the read-only memory if a version number of the received memory image is greater than or equal to a version number of a current memory image in the read-only memory. A situation may arise where an update message is sent from the central memory after the central memory has sent the complete memory image to the read-only memory, and where this update message arrives at the read-only memory before the memory image. In this case, the update message has overtaken the response message containing the memory image. This may happen because the two messages can be transported on different channels with different priorities. The read-only memory can detect this situation because the memory image has a lower version number than the current memory state.A memory dump is therefore preferably only adopted if it has at least the same version number as the current save state.

[0043] According to one aspect of the invention, the read-only memory sends a new request message for a complete memory image of the central memory if the version number of the received memory image is lower than the version number of the current memory image of the read-only memory. If the above-described case occurs, in which the received memory image has a lower version number than the current memory state, the read-only memory can simply request a complete memory image from the central memory again.

[0044] According to one aspect of the invention, cached update messages are only retrieved and processed by the read-only memory once a complete memory dump has been received. This approach is somewhat more complex to implement, since the read-only memory is not allowed to receive any update messages in the meantime, but it eliminates the need to request a complete memory dump again.

[0045] According to one aspect of the invention, update messages are discarded by the read-only memory if they have a version number that is less than or equal to the version number of the received memory image. If the received update messages have a version number that is less than or equal to the version number of the received complete memory image, then these update messages were sent too early. They can therefore be discarded without hesitation.

[0046] According to one aspect of the invention, the memory image of the read-only memory is adjusted according to the received update messages if they have a version number greater than the version number of the received memory image. If the received update messages have a version number less than or equal to the version number of the received complete memory image, the memory content is adjusted accordingly. Once all buffered update messages have been processed, the read-only memory is fully initialized.

[0047] Advantageously, a distributed system comprising at least one central memory and a number of read-only memories is configured to carry out a method according to the invention for synchronizing the memories. Such a distributed system can be used, for example, in a means of transport. The means of transport can be any type of means of transport, e.g., a car, a bus, a motorcycle, a commercial vehicle, in particular a truck, an agricultural machine, a construction machine, a rail vehicle, etc. In principle, the described methods are applicable to all systems with distributed read-only memories, e.g., for computer programs on a PC, web applications, smart home systems, servers, or mobile devices.

[0048] Further features of the present invention will become apparent from the following description and the appended claims taken in conjunction with the figures.

[0049] Fig. 1 shows schematically a distributed system with a central memory and a number of read memories;

[0050] Fig. 2 shows a first embodiment of a method for synchronizing the memories of the distributed system of Fig. 1; Fig. 3 shows a second embodiment of a method for synchronizing the memories of the distributed system of Fig. 1;

[0051] Fig. 4 illustrates the message exchange after adding a central store;

[0052] Fig. 5 illustrates the message exchange after adding a read memory; and

[0053] Fig. 6 schematically shows a means of transport in which a solution according to the invention is implemented.

[0054] To better understand the principles of the present invention, embodiments of the invention are explained in more detail below with reference to the figures. It is understood that the invention is not limited to these embodiments and that the described features may also be combined or modified without departing from the scope of the invention as defined in the appended claims.

[0055] Fig. 1 schematically shows a distributed system 1 with a central memory 2 and a number of read-only memories 3. The central memory 2 can be read from and written to. The read-only memories 3 are kept synchronized with the central memory 1. The central memory 2 and the read-only memories 3 are integrated into a network 4. All memory instances are located in their own process, which can access them. The memories communicate with each other using messages, with there being different types of messages. With request-response messages, one process sends a message to another process. This process sends a response, which is received by the first process. The response is preferably a high-priority message so that it can be received by the process before other messages. For this purpose, a process can specifically wait for high-priority messages. All other low-priority messages are not retrieved until then.With update messages, a process sends a message to any number of other processes unknown to it. The receiving processes must first register with network 4 in order to receive update messages with a specific subject. Update messages are preferably low-priority messages. During operation, whenever the memory contents change, the central memory 1 sends an update message with a previously defined subject, i.e., the memory topic. All read memories 3 that have previously registered with network 4 for this subject receive the update message and can transfer the respective content changes to the local memory. Each update message is assigned a consecutive version number. The read memories only accept update messages whose content has a higher version number than the currently stored content.This ignores update messages that are too old from the perspective of a read-only memory 3. For this to work, it must be ensured that network 4 forwards the update messages in exactly the order in which they were sent by the central memory 2, i.e., the update messages must not overtake each other.

[0056] However, the system initialization phase is critical, as it must ensure that the participating memories 2 and 3 are reliably synchronized. There are two possible scenarios. In the first case, the read memories 3 already exist, and a new central memory 2 is created. In the second case, the central memory 2 already exists, and a new read memory 3 is added.

[0057] Fig. 2 shows a first embodiment of a method for synchronizing the memories of the distributed system from Fig. 1. This embodiment handles the case where a new central memory is created while the read-only memories already exist. In a first step, the central memory is registered S10 in a network of the distributed system. The central memory then sends S11 an update message with an initial memory image of the central memory, preferably with the lowest version number provided for the memory image in the system. The initial memory image from the update message is adopted S12 by at least one read-only memory as the current memory state.

[0058] Fig. 3 shows a second embodiment of a method for synchronizing the memories of the distributed system from Fig. 1. This embodiment handles the case where a new read-only memory is added while the central memory already exists. In a first step, the read-only memory is registered S20 in a network of the distributed system. Preferably, S21 the read-only memory sends ping requests until the registration of the read-only memory in the network is complete. The read-only memory then sends S22 a request message for a complete memory image of the central memory and receives S24 the response message subsequently sent by the central memory. Finally, S25 the read-only memory adopts the memory image from the received response message as the current memory state.

[0059] A preferred embodiment of the invention will be explained below with reference to Fig. 4 to Fig. 6.

[0060] Fig. 4 illustrates the message exchange after adding a central memory 2. When a new central memory 2 is created by an assigned process P, the central memory 2 must first register with the network 4 in order to receive request messages addressed to it. The new central memory then sends a memory image of its initial memory state with the data written by the process P as an update message U, preferably with the lowest version number provided for the memory image in the system, e.g., version 1. The read memories 3 have not yet received an update and therefore adopt the memory image sent with the update message U as the current memory state.

[0061] Fig. 5 illustrates the message exchange after adding a read memory 3. When a new read memory 3 is created by an assigned process P, the read memory 3 must first register with the network 4 to receive update messages. It may take some time until this registration is successfully completed. In the meantime, update messages could already be sent from the central memory 2 which cannot yet be received by the read memory 3. Therefore, the read memory 3 must first wait until the registration with the network 4 is successfully completed. So that this waiting time does not have to be coordinated by the process P of the read memory 3, the read memory 3 sends a ping request PA to the central memory 2, i.e. an empty request message. When the central memory 2 receives this ping request PA, it simply sends back a ping response PR as a high-priority response message.These two empty messages PA, PR are quickly processed by network 4. When the ping response PR arrives at read-only memory 3, it checks whether registration with network 4 has been completed in the meantime. The transmission time of the ping messages PA, PR from read-only memory 3 to central memory 2 and back is therefore used as the waiting time for read-only memory 3. The assumption here is that registration with network 4 is generally faster than the transmission of fast and empty ping messages PA, PR. However, if registration has not yet been completed, another ping request PA is simply sent to central memory 2. This is repeated until registration with network 4 is completely completed by the time read-only memory 3 receives a ping response PR.

[0062] If a ping response PR arrives at read-only memory 3 and this determines that the registration was successful, a request message A is next sent to central memory 2, requesting it to provide a complete memory image. Since this request message A is sent only after the registration has already been connected to network 4 for update messages, it is possible that update messages have already arrived. However, these are low-priority messages and are therefore not retrieved from network 4 by read-only memory 3 at this time. They are therefore temporarily stored in network 4. Central memory 2 now sends a response message R to the new read-only memory 3, which contains a complete memory image.As soon as this response message R arrives at the read memory 3, the memory image is adopted there and the version number of the memory content is set to the version number sent along.

[0063] Now, all update messages buffered in network 4 are retrieved from read-only memory 3. If these have a version number less than or equal to the version number of the complete memory image, they were sent too early and can be discarded. If, however, the version number is greater, the memory contents are adjusted accordingly. Once all buffered update messages have been processed, read-only memory 3 is fully initialized and then receives further update messages from ongoing operation.

[0064] Process P of read-only memory 3 does not need to actively initiate any of these steps or actively enter any waiting periods. The initialization and synchronization of memory units 2, 3 occurs exclusively through the exchange of messages between them. Therefore, process P can perform other tasks during synchronization. In particular, process P can also send and receive other messages that are not related to read-only memory 3 in the meantime.

[0065] With the described solution, process P can simply continue receiving all types of messages and also forward them to read-only memory 3. Read-only memory 3 then decides what to do with the messages and whether and how to handle them. It is therefore possible for read-only memory 3 to already receive and process update messages before a complete memory image has yet arrived at read-only memory 3. This simplifies the implementation of the inventive solution, since read-only memory 3 simply handles the update messages in the same way it handles all update messages. In this case, the situation may arise that an update message is sent from central memory 2 after it has sent the complete memory image to read-only memory 3, and that precisely this update message arrives at read-only memory 3 before the memory image.In this case, the update message has overtaken the response message R with the memory image. This can happen because the two messages can be transported on different channels with different priorities. Read-only memory 3 can detect this situation because the memory image has a lower version number than the current memory state. Read-only memory 3 can then request a complete memory image again, expecting that no update message will overtake the response message R with the memory image this time. A memory image is only accepted if it has at least the same version number as the current memory state.

[0066] Fig. 6 schematically shows a means of transport 20 in which a solution according to the invention is implemented. In this example, the means of transport 20 is a motor vehicle. The motor vehicle has a distributed system 1 with a central memory 2 and a number of read-only memories 3. The central memory 2 and the read-only memories 3 are integrated into a network 4. In addition, the motor vehicle has an environmental sensor system 21 for detecting environmental information, such as cameras, radar sensors, lidar sensors or ultrasonic sensors, as well as an assistance system 22 and a central computer 23. By means of a data transmission unit 24, for example, a connection to a backend can be established, e.g. for transmitting collected data or for retrieving updated software for the components of the motor vehicle. The memories 2, 3 can be used to store data.The data exchange between the various components of the vehicle takes place via the network 4.

[0067] List of reference symbols

[0068] 1 Distributed system

[0069] 2 Central storage

[0070] 3 Read memory

[0071] 4 Network

[0072] 510 Registering a central storage

[0073] 511 Sending an update message with an initial memory dump

[0074] 512 Applying the initial memory image

[0075] 520 Registering a read-only memory

[0076] 521 Sending empty request messages

[0077] 522 Sending a request message for a complete memory dump

[0078] 523 Send a response message with the requested memory image

[0079] 524 Receiving the sent reply message

[0080] 525 Applying the memory image

[0081] 20 means of transport

[0082] 21 Environmental sensors

[0083] 22 Assistance system

[0084] 23 computers

[0085] 24 Data transmission unit

[0086] A request message

[0087] P process

[0088] PA ping request

[0089] PR Ping Response

[0090] R Reply message

[0091] U Update message

Claims

Patent claims 1. A method for synchronizing memories (2, 3) in a distributed system (1) comprising at least one central memory (2) and a number of read memories (3), comprising the steps: - Registering (S10) a central memory (2) in a network (4) of the distributed system (1); - sending (S11) an update message (U) with an initial memory image of the central memory (2) by the central memory (2); and - Adopting (S12) the initial memory image from the update message (U) as the current memory status by at least one read memory (3).

2. The method according to claim 1, wherein the update message (U) is sent with the initial memory image of the central memory (2) with the lowest version number provided in the system (1) for the memory image (S11).

3. Method for synchronizing memories (2, 3) in a distributed system (1) comprising at least one central memory (2) and a number of read memories (3), comprising the steps: - Registering (S20) a read-only memory (3) in a network (4) of the distributed system (1); - sending (S22) a request message (A) for a complete memory image of the central memory (2) by the read memory (3); - sending (S23) a response message (R) with the requested memory image by the central memory (2); - receiving (S24) the sent response message (R) by the read memory (3); and - Acceptance (S25) of the memory image from the received response message (R) as the current memory status by the read memory (3).

4. The method according to claim 3, wherein ping requests (PA) are sent (S21) by the read-only memory (3) until the registration of the read-only memory (3) in the network (4) is completed.

5. The method according to claim 3 or 4, wherein when the memory image from the received response message (R) is adopted (S25) as the current memory state by the read memory (3), a version number of the current memory state of the read memory (3) is set to a version number sent in the response message (R).

6. Method according to one of claims 3 to 5, wherein update messages (U) are received and processed by the read memory (3).

7. The method according to claim 6, wherein the update messages (U) are already received and processed by the read memory (3) before a complete memory image has been received (S24).

8. The method according to claim 7, wherein the received memory image is only adopted by the read-only memory (3) if a version number of the received memory image is greater than or equal to a version number of a current memory state of the read-only memory (3).

9. The method according to claim 8, wherein a new request message (A) for a complete memory image of the central memory (2) is sent by the read-only memory (3) if the version number of the received memory image is smaller than the version number of the current memory status of the read-only memory (3).

10. The method according to claim 6, wherein cached update messages (U) are retrieved and processed by the read memory (3) only when a complete memory image has been received (S24).

11. The method according to claim 10, wherein update messages (U) are discarded by the read memory (3) if they have a version number that is less than or equal to a version number of the received memory image.

12. The method according to claim 10 or 11, wherein the memory status of the read memory (3) is adapted according to the received update messages (U) if these have a version number that is greater than the version number of the received memory image.

13. A computer program comprising instructions which, when executed by a computer, cause the computer to carry out the steps of a method according to any one of claims 1 to 12.

14. Distributed system (1) comprising at least one central memory (2) and a number of read memories (3), wherein the distributed system (1) is configured to carry out a method according to one of claims 1 to 12 for synchronizing the memories (2, 3).

15. A means of transport (20), wherein the means of transport (20) comprises a distributed system (1) according to claim 14.

Citation Information

Patent Citations

  • Method and system for synchronizing data

    CN101751394A

  • Generation-based memory synchronization in a multiprocessor system with weakly consistent memory accesses

    US20150006840A1

  • Data synchronization method and system for distributed memory cache

    CN114896344A

  • Efficient Distributed Cache Consistency

    US20150169497A1

  • Replication in distributed caching cluster

    US9262323B1