Method and apparatus for recording event data in a vehicle
By setting up multiple partitions in the vehicle and managing the storage and transmission of data frames according to write and read standards, the problem of multiple functions accessing the current write partition simultaneously is solved, achieving reliable recording and secure storage of event data.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ROBERT BOSCH GMBH
- Filing Date
- 2021-08-31
- Publication Date
- 2026-07-03
AI Technical Summary
In existing technologies, the methods for recording event data in vehicles pose a risk of multiple functions accessing the currently written partition simultaneously, which could lead to changes in the data content and affect the integrity and reliability of the data.
A method and apparatus are employed to ensure secure data transfer between volatile and non-volatile memory by setting up multiple partitions, allowing only one function to exclusively access the currently written partition, and managing the storage and transfer of data frames according to pre-given write and read standards.
It enables reliable recording of event data in vehicles, prevents data content from being altered by other functions, ensures data integrity and reliability, and improves data storage security.
Smart Images

Figure CN116210037B_ABST
Abstract
Description
Technical Field
[0001] This invention is based on a method for recording event data in a vehicle. The subject of this invention also includes an apparatus and computer program product for performing such a method for recording event data in a vehicle, and a computer-readable storage medium on which the computer program product is stored. Background Technology
[0002] Highly automated driving promises safer traffic due to the absence of human error. However, in the event of problems, it increases the need for data detection in such vehicles with highly automated driving capabilities, ensuring all necessary information is available for later analysis and product improvement. Therefore, methods for recording event data are used in such vehicles. Here, vehicle data from at least one vehicle system is continuously received and written as event data into data frames of a pre-given size, wherein each data frame is stored in at least one volatile memory. The stored data frames are managed and remain available in the at least one volatile memory until the event data stored in each data frame is older than a pre-given maximum event time point (Voreigniszeitpunkt) or is persistently stored in at least one non-volatile memory in response to a pre-given event being identified. An apparatus for performing such a method for recording event data typically includes a data providing device, an event identification device, and a data recording device. Summary of the Invention
[0003] The method for recording event data in a vehicle according to the present invention has the advantage that there is only one currently written partition, and only one function can exclusively access the currently written partition, so that other functions cannot access the currently written partition and cannot change its data content.
[0004] The present invention provides a method for recording event data in a vehicle, wherein vehicle data from at least one vehicle system is continuously received and written as event data into data frames of a pre-given size. The data frames are stored in at least one volatile memory, wherein the stored data frames are managed and kept available in the at least one volatile memory until the event data stored in the respective data frames is older than a pre-given maximum event time point or is persistently stored in at least one non-volatile memory in response to a pre-given event being identified. Here, multiple partitions of a pre-given size are set up, wherein one of the partitions is determined as the current write partition according to at least one write criterion, and the received reference information of each data frame is written into the current write partition; and, in response to a request and according to at least one pre-given read criterion, one of the other partitions is determined as the current read partition, the at least one pre-given read criterion including at least one current event time window, within which the event data should be persistently recorded, wherein the reference information contained in the current read partition of the data frame containing the event data to be persistently recorded is read out and forwarded, wherein the data frame corresponding to the forwarded reference information is persistently stored in the at least one non-volatile memory.
[0005] Furthermore, an apparatus is provided for performing such a method for recording event data in a vehicle, the apparatus comprising a data providing device, a buffer block, an event recognition device, and a data recording device. The data providing device is configured to continuously receive vehicle data to be recorded from at least one vehicle system and write it as event data into data frames of a pre-given size, and store each data frame in at least one volatile memory. The buffer block is configured to manage the stored data frames and keep them available in the at least one volatile memory until the event data stored in each data frame is older than a pre-given maximum event time point or is persistently stored in at least one non-volatile memory in response to a pre-given event recognized by the event recognition device. Here, the buffer block includes a write function and multiple partitions of a pre-given size. The write function is configured to determine one of the partitions as the current write partition according to at least one write criterion and write reference information received by the data providing device for each data frame into the current write partition. The buffer block also includes a read function, configured to, in response to a request from the data recording device and according to at least one pre-given read criterion, determine one of the other partitions as the current read partition, read the reference information contained in the current read partition for data frames containing event data to be persistently recorded, and forward them to the data recording device. The at least one pre-given read criterion includes at least one current event time window within which the event data should be persistently recorded. The data recording device is configured to persistently store data frames corresponding to the forwarded reference information in the at least one non-volatile memory.
[0006] Computer program products containing program code are also advantageous, which are stored on a machine-readable medium (such as semiconductor memory, hard disk memory, or optical memory) and used to perform analytical processing when the computer program is implemented.
[0007] With further measures and extensions, advantageous improvements to the aforementioned method for recording event data in a vehicle and the aforementioned device for recording event data in a vehicle are possible.
[0008] Currently, a data providing device can be understood as a processing unit that includes all processing steps from detecting raw vehicle data to organizing and storing the vehicle data as event data in volatile memory blocks, so that the event data remains available in the at least one volatile memory for a limited time period. Currently, an event recognition device can be understood as a processing unit that continuously monitors the vehicle's status and determines when a pre-configured situation or pre-given event occurs, requiring the permanent storage of pre-given vehicle data. Such a pre-given event could be, for example, a detected malfunction of one of the vehicle systems or a detected collision between the vehicle and a stationary obstacle or another vehicle. Currently, a data recording device can be understood as a processing unit that includes processing steps to extract vehicle data available in the at least one volatile memory, possibly perform additional data transformations such as encryption, and ultimately persistently store the vehicle data in at least one non-volatile memory.
[0009] Therefore, the data providing device, the event recognition device, and the data recording device can each have at least one interface, which can be constructed in hardware and / or software. In a hardware construction, the at least one interface can be, for example, part of a so-called system ASIC that includes various functions of the data providing device. However, it is also possible that the interface is its own integrated circuit or at least partially composed of discrete structural elements. In a software construction, the interface can be a software module, which exists, for example, on a microcontroller along with other software modules.
[0010] Through the at least one interface, the data providing device can receive vehicle data to be recorded from at least one vehicle system, which may be implemented as an environmental monitoring system, an occupant protection system, a driving power system, or a braking system. Furthermore, the data providing device can be connected to the at least one volatile memory via the at least one interface so that the received vehicle data remains available in the at least one volatile memory for a limited time period. Additionally, the data providing device can include additional components for preparing and preprocessing the received vehicle data. The event recognition device can receive vehicle data or information from the at least one vehicle system via the at least one interface and analyze and process the received vehicle data or information to identify significant and relevant events. Therefore, the data providing device or the event recognition device can, for example, be coupled to a vehicle data bus, such that the data providing device or the event recognition device can receive a large amount of vehicle data and information from a vehicle system connected to the vehicle data bus.
[0011] The data recording device can be connected to the at least one volatile memory via the at least one interface to read data to be persistently stored. Furthermore, the data recording device can be connected to the at least one non-volatile memory via the at least one interface to store data to be persistently stored in the at least one non-volatile memory.
[0012] Currently, the buffer block can be understood as a component establishing a connection between the data providing device, the event recognition device, and the data recording device. Here, the buffer block holds vehicle data provided by the data providing device in the at least one volatile memory until the data becomes too old to be relevant to the event. In this case, the buffer block releases the storage area in the at least one volatile memory used for now-outdated vehicle data, making this storage area reusable by the data providing device to store newer vehicle data. Alternatively, the event recognition device informs the buffer block that all vehicle data from the data recording device for a defined detection time window should be provided. In this case, the buffer block ensures that all vehicle data for the pre-given current event time window remains available until the data recording device has fully and persistently stored this vehicle data in the at least one non-volatile memory. This also includes the critical case where the data recording device stores vehicle data so slowly that vehicle data for newer events becomes outdated during this period. Even then, the buffer block must not release or overwrite the corresponding storage area in the at least one volatile memory.
[0013] Data providing devices, event recognition devices, and data recording devices can be distributed across multiple components within a vehicle, interconnected via a suitable vehicle network infrastructure. For example, the data providing device can be implemented on multiple "data sources" (e.g., computing units) that forward vehicle data to other devices within the vehicle, which can perform event recognition and additional post-processing steps and include buffer blocks. These additional post-processing steps and data storage can be implemented on another computing unit. Data providing, event recognition, and data recording can be implemented in separate processes. Furthermore, the device or hardware on which the method for recording event data in the vehicle is implemented can provide multiple CPU cores or processors that can implement these processes in virtually parallel. Buffer blocks allow calls initiated by the data recording device, event recognition device, and data providing device to be separated from each other, ensuring that the result is always correct in each parallel implementation. Furthermore, the data providing device can invoke the buffer block in multiple parallel processes. Implementing the data recording device in a single process, i.e., the buffer block does not require separating the individual calls to the data recording device. The interface method provided by the buffer block is invoked by the interface component and thus runs in its corresponding process.
[0014] Particularly advantageously, in response to a request and according to at least one pre-defined read criterion, a partition among other partitions can be identified as the current read partition, the at least one pre-defined read criterion including at least one current event time window within which the event data should be persistently recorded. This means that, for example, a current write partition that can be marked by a write partition indicator cannot be identified as the current read partition, which can be marked by a read partition indicator, for example. Here, reference information contained in the current read partition, including data frames containing event data to be persistently recorded, can be read and forwarded. Data frames corresponding to the forwarded reference information can be persistently stored in the at least one non-volatile memory. By having a single read partition that only one function can exclusively access, it is advantageously prevented that other functions can access the current read partition and change its data content.
[0015] In an advantageous configuration of the method, the start time of the current event time window can be predefined as a timestamp about the current zero reference time. The end time of the current event time window can be predefined as the time difference from the start time, wherein the current zero reference time can be redefined if needed. Here, the first zero reference time can correspond to the vehicle's start time. The method for recording event data in the vehicle does not need to consider events prior to the start of current travel in time. Therefore, the zero reference time does not necessarily need to be located before the start of travel. The current zero reference time can be redefined, for example, if the new current event time window cannot be represented by the current zero reference time because the start time of the new current event time window is too far from the current zero reference time in time. Typically, a time window can be represented as two absolute time points, i.e., as two timestamps, a start timestamp and an end timestamp. 32 bits are needed to represent such a timestamp, making 64 bits needed to represent a time window. A 32-bit processor can only read or write 32 bits atomically (i.e., within machine instructions), so a 64-bit processor requires more than one machine instruction, which is not atomic. To represent the current event time window in 32 bits and thus provide a lock-free (sperrfreie) atomic implementation of the current event time window, instead of two timestamps, the start time timestamp and the time difference relative to the start timestamp are used to define the current event time window. The length of the current event time window is expected to be in minutes. Therefore, instead of storing two complete timestamps for the start and end times of the current event time window, bits can be saved by storing only the start timestamp and the duration of the current event time window. Thus, for example, using a 32-bit processor, it is possible to read or store the current event time window atomically with a resolution of 0.1 seconds (where 17 bits are used for the start timestamp of the current event time window and 14 bits are used for the duration, or length, of the current event time window). Here, the start time of the current event time window can be expressed as, for example, within a maximum of 3.6 hours after the current zero reference time, and the duration or length of the current event time window can be expressed as within a maximum of 27.3 minutes or 1,638 seconds.
[0016] In another advantageous configuration of the method, each data frame can be associated with a time window. Here, the reference information for each data frame can include a corresponding storage area and a corresponding time window containing the start and end timestamps of each data frame, within which at least one data segment containing event data has been generated or detected. This allows for a simple and quick check whether a data frame contains event data or vehicle data whose generation or detection overlaps with the current event time window. Furthermore, the start and end timestamps of each data frame can be associated with the current zero reference time point.
[0017] In another advantageous configuration of the method, each partition can be assigned a separate time window. Here, the start timestamp of the time window for a corresponding partition can be the oldest start timestamp of the reference information contained in the partition within the corresponding data frame. The end timestamp of the time window for a corresponding partition can be the latest end timestamp of the reference information contained in the partition within the corresponding data frame. Thus, it is possible to easily and quickly check whether a corresponding partition overlaps with the current event time window.
[0018] In another advantageous configuration of the method, reference information for at least one data frame can be read from the currently read partition, the time window of which overlaps with the current event time window. Furthermore, the time window of the at least one data frame in the reference information can be invalidated after the reference information is read. This prevents the reference information of a data frame from being read multiple times and the corresponding data frame from being persistently stored multiple times in the at least one non-volatile memory.
[0019] In another advantageous configuration of the method, an existing current event time window can be stored locally before determining the current read partition. Here, before each readout of reference information for at least one data frame, the locally stored current event time window can be compared with the current event time window, and if the current event time window differs from the locally stored one, the stored current event time window is stored locally. Furthermore, if the locally stored current event time window has changed, it can be checked whether the time window of the current read partition overlaps with the new current event time window. If the current read partition overlaps with the changed current event time window, the readout process for the read partition can be restarted. This means that the current read partition is read again from the beginning. Here, the reference information that has already been read is no longer read, because the time window of the corresponding data frame in the reference information becomes invalid after the reference information is read. Alternatively, if the current read partition does not overlap with the changed current event time window, a new current read partition is determined. This means that the readout process for the current read partition corresponding to the current event time window that has become invalid during this period is aborted and not restarted. Therefore, at most the reference information of one data frame is forwarded to the data recording device, and the time window of that data frame is now outside the new current event time window. However, this behavior is as if "the event recognition device will only determine the new current event time window after the reference information of this data frame has been read in the reading process," and is therefore tolerable.
[0020] In another advantageous configuration of the method, if the vehicle is restarted or the current write partition has been fully written with reference information, a new write partition can be searched according to the at least one pre-given write criterion. For this purpose, a set of partitions can be identified, for example, that do not have a valid time window. This means that these partitions do not contain reference information for data frames, thus avoiding conflicts between determining the current write partition and determining the current read partition. Since these partitions do not contain reference information for data frames, they will not be attempted as current read partitions. Therefore, one of these partitions can be identified as the current write partition. Additionally or alternatively, partitions can be identified that have a valid time window that is significantly older than the maximum event time point and does not overlap with the existing current event time window. This means that no future events do not yet require data frames for the corresponding partition, and the partition is not currently of significant relevance as a read partition, and has not yet fully read all reference information for data frames overlapping with the current event window, even if they are beyond the maximum event time point. From this set of partitions, the partition without a valid time window or the partition whose corresponding valid time window has the oldest start timestamp can be identified as the current write partition. Furthermore, the existing current event window can be stored locally before determining the current write partition. This allows for checking whether the current event window has changed before determining the current write partition. When a new current write partition is determined, the write partition indicator can be reset according to atomic machine instructions.
[0021] In another advantageous configuration of the method, the received reference information of each data frame can be written into the current write partition in any chronological order. Here, a temporally randomly ordered subsequence of the written reference information for each data frame can be retrieved and marked within the write partition. For this purpose, the written reference information of each data frame can be consecutively numbered in ascending order according to its writing order.
[0022] In another advantageous configuration of the method, each time reference information for a new data frame is written, the time window of the new data frame can be compared with the time window of the reference information as the last data frame written to the write partition.
[0023] In another advantageous configuration of the method, the start timestamp of a new data frame can be compared, for example, with the start timestamp of the most recently written data frame. If the start timestamp of the new data frame is newer than the start timestamp of the most recently written data frame, then the current start time subsequence, which is randomly ordered in time, can be identified and continued. Alternatively, if the start timestamp of the new data frame is older than the start timestamp of the most recently written data frame, then a new start time subsequence can begin, and its start timestamp can be marked by storing the corresponding number of the new data frame. Furthermore, the first start time subsequence can begin with the start timestamp of the first written data frame. This means that the smallest ascending number simultaneously marks the starting point of the current first start time subsequence, which is randomly ordered in time.
[0024] In another advantageous configuration of the method, the end timestamp of a new data frame can be compared with the end timestamp of the most recently written data frame. If the end timestamp of the new data frame is newer than the end timestamp of the most recently written data frame, then the current end timestamp subsequence, which is randomly ordered in time, is identified and continues. Alternatively, if the end timestamp of the new data frame is older than the end timestamp of the most recently written data frame, then a new end timestamp subsequence can begin, and its end timestamp can be marked by storing the corresponding number of the new data frame. Furthermore, the first end timestamp subsequence can begin with the end timestamp of the first written data frame. This means that the smallest ascending number simultaneously marks the starting point of the current first end timestamp subsequence, which is randomly ordered in time.
[0025] In another advantageous configuration of the method, reference information for at least one data frame to be read from the current read partition can be obtained based on the temporal relationship between at least one temporally randomly ordered start time subsequence and / or at least one temporally randomly ordered end time subsequence of the current read partition and the current event time window. By introducing temporally randomly ordered start time subsequences and temporally randomly ordered end time subsequences, the search for reference information to be read from a data frame can be accelerated because it is not always necessary to check the reference information of all data frames contained in the current read partition.
[0026] In an advantageous configuration of the device, the buffer block can include a read function implemented to, in response to a request from the data recording device and according to at least one pre-defined read criterion, determine one of the other partitions as the current read partition, and read reference information contained in the current read partition, including data frames containing event data to be persistently recorded, and forward them to the data recording device. The at least one pre-defined read criterion includes at least one current event time window within which event data should be persistently recorded. The data recording device can be implemented to persistently store data frames corresponding to the forwarded reference information in the at least one non-volatile memory.
[0027] In another advantageous configuration of the device, the write function can be further implemented to write the received reference information of each data frame into the current write partition in an arbitrary time order, and to retrieve and mark in the write partition a subsequence of the written reference information of each data frame in a time-random order.
[0028] In another advantageous configuration of the device, the event recognition device can be configured to continuously monitor the vehicle's state and determine when a pre-given event occurs, the pre-given event requiring the persistent storage of corresponding event data for the at least one vehicle system. Here, the event recognition device can be further configured to output a current event time window corresponding to the recognized event to a buffer block, within which the event data should be persistently recorded, wherein the start time of the current event time window is not temporally preceding the time point before the maximum event. Furthermore, the event recognition device can be further configured to pre-given the start time of the current event time window as a timestamp about the current zero reference time point, and pre-given the end time of the current event time window as the time difference from the start time point, wherein the buffer block can be configured to redefine the current zero reference time point as needed.
[0029] Embodiments of the invention are shown in the accompanying drawings and described in more detail in the following description. In the drawings, the same reference numerals denote parts or elements that perform the same or similar functions. Attached Figure Description
[0030] Figure 1 A schematic flowchart illustrating an embodiment of a method for recording event data in a vehicle according to the present invention is shown.
[0031] Figure 2 Showing the use of from Figure 1 A schematic illustration of a first embodiment of a method for recording event data in a vehicle according to the present invention.
[0032] Figure 3 Showing the use of from Figure 1 A schematic illustration of a second embodiment of a method for recording event data in a vehicle according to the present invention.
[0033] Figure 4 Showing the use of from Figure 1 Schematic illustrations of a first embodiment of the current event time window and several embodiments of the partitioned time window of the method for recording event data in a vehicle according to the present invention.
[0034] Figure 5 Showing the use of from Figure 1 A tabular representation of the storage area during the redefinition of the current zero reference time point, according to the method for recording event data in a vehicle according to the present invention.
[0035] Figure 6 Showing the use of from Figure 1 A schematic flowchart of the process for determining the current write partition in the method for recording event data in a vehicle according to the present invention.
[0036] Figure 7 Showing the execution from Figure 1 A schematic block diagram of an embodiment of the apparatus according to the invention for recording event data in a vehicle, according to a method of the invention. Detailed Implementation
[0037] As from Figure 1 As can be seen, in the presented embodiment of the method 100 for recording event data in a vehicle according to the present invention, vehicle data from at least one vehicle system 3 is continuously received in step S100 and written as event data into data frames DR of a pre-given size in step S110. In step S120, each data frame DR is stored in at least one volatile memory 50, wherein the stored data frames DR are managed and kept available in the at least one volatile memory 50 until the event data stored in each data frame DR is older than a pre-given maximum event time point or is persistently stored in at least one non-volatile memory 46 in response to a pre-given event. For this purpose, a plurality of partitions 21, 21A, 21B of a pre-given size are set in step S130, wherein in step S140, one of the partitions 21, 21A, 21B is determined as the current write partition according to at least one write criterion, and in step S150, the received reference information 25 of each data frame DR is written into the current write partition.
[0038] In the embodiment of the method 100 presented according to the invention, in step S160, in response to a request and according to at least one pre-given read criterion, one of the other partitions 21, 21A, 21B is determined as the current read partition, the at least one pre-given read criterion including at least one current event time window EZF, within which the event data should be persistently recorded. In step S170, reference information 25 contained in the current read partition of the data frame DR containing the event data to be persistently recorded is read and forwarded, and in step S180, the data frame DR corresponding to the forwarded reference information 25 is persistently stored in the at least one non-volatile memory 46.
[0039] In the presented embodiment, each data frame DR is associated with a time window 27. (As from...) Figure 2 and Figure 3 It can also be seen that the reference information 25 of each data frame DR includes a corresponding storage area and a corresponding time window 27 including a start timestamp 28 and an end timestamp 29 of each data frame DR. The storage area is preferably represented by a data frame indicator DRZ, and at least one data segment containing event data that has been generated or detected in the corresponding data frame DR is included in the time window.
[0040] As from Figure 2 and Figure 3 It can also be seen that each partition 21, 21A, and 21B is allocated a time window 22. The start timestamp 23 of the time window 22 for the corresponding partitions 21, 21A, and 21B uses the oldest start timestamp 28 of the reference information 25 contained in partition 21 of the corresponding data frame DR. The end timestamp 24 of the time window 22 for the corresponding partitions 21, 21A, and 21B uses the latest end timestamp 29 of the reference information 25 contained in partitions 21, 21A, and 21B of the corresponding data frame DR. (The last sentence appears to be incomplete and possibly refers to a different context.) Figure 2 and Figure 3 It can also be seen that the presented fully written partitions 21A and 21B each include reference information for fifteen data frames DR, each of which is associated with a corresponding time window 27. The time windows 22 of the presented partitions 21A and 21B exemplarily have a value "3" for the start timestamp 28 of the first data frame DR, which corresponds to the oldest start timestamp 28 in the presented partitions 21A and 21B. As the end timestamp 24, the presented partitions 21A and 21B exemplarily have a value "37" for the end timestamp 29 of the last data frame DR, which corresponds to the latest end timestamp 29 in the presented partitions 21A and 21B.
[0041] In the presented embodiment, the current event time window EZF is... Figure 4 The start time point EZF_1 presented in the text is predefined as being about... Figure 5 The timestamp of the current zero reference time point B is presented in the table. The end time point EZF_2 of the current event time window EZF is pre-defined as the time difference between it and the start time point EZF_1, wherein the current zero reference time point B is redefined when necessary. For example, the current zero reference time point B is redefined if the new current event time window EZF cannot be represented by the current zero reference time point B because the start time point EZF_1 of the new current event time window EZF is too far away from the current zero reference time point B in time. In addition, the start timestamp 28 and end timestamp 29 of each data frame DR, and therefore the start timestamp 23 and end timestamp 24 of each partition 21, 21A, 21B are also related to the current zero reference time point B.
[0042] Below, for reference Figure 5 Describe the process used to redefine the zero reference time point B. For example, from... Figure 5 As can be seen, the two most recently used zero reference time points A and B are stored in the storage spaces "Epoch A" and "Epoch B," respectively. The current event time window EZF is indicated by a marker M in the corresponding storage space: which of the two stored zero reference time points A and B is the start time point EZF_1 of the current event time window EZF associated with. Typically, the oldest zero reference time point corresponds to the vehicle's start time. In the presented embodiment, the current event time window EZF is encoded with 32 bits. Here, bits 0 to 13 represent the duration or length of the current event time window EZF, and bits 14 to 30 represent the time difference between the start time point EZF_1 of the current event time window EZF and the current zero reference time point B. Bit 31 indicates the marker for the currently valid zero reference time point B. Therefore, the validity of zero reference time point A stored in storage space "time A" can be marked, for example, by a logical value "0", and the validity of zero reference time point B stored in storage space "time B" can be marked, for example, by a logical value "1". Figure 5 In the table, the second row shows the current state of the corresponding storage area. This means that an older first zero reference time point A with an exemplary value of 2:00:00:000 is stored in storage space "Time Dimension A," and a newer second zero reference time point B with a value of 8:00:00:000 is stored in storage space "Time Dimension B." The marker M with the presented value "B" indicates that the newer second zero reference time point B stored in storage space "Time Dimension B" corresponds to the current zero reference time point B. Here, the oldest zero reference time point corresponds to the vehicle's start time.
[0043] As from Figure 5 It can also be seen that when redefining the currently used zero reference time point B, the older of the two stored zero reference time points A and B is first overwritten with the new zero reference time point C. Figure 5 In the table, the third row shows this state of the corresponding storage region. This means that a new zero-reference time point C with an exemplary value of 16:00:00:000 is stored in storage space "Time Dimension A". In storage space "Time Dimension B", a now older second zero-reference time point B with a value of 8:00:00:000 is also stored, where the marker M with the presented value "B" also shows that the second zero-reference time point B stored in storage space "Time Dimension B" corresponds to the current zero-reference time point B. The new zero-reference time point C is then marked as the current zero-reference time point C in the atomic process. Figure 5 In the table, the fourth row shows this state of the corresponding storage area. This means that a new zero-reference time point C with an exemplary value of 16:00:00:000 is stored in storage space "Time Dimension A". A second, older zero-reference time point B with a value of 8:00:00:000 is also stored in storage space "Time Dimension B", where the marker M with the presented value "A" now indicates that the new zero-reference time point C stored in storage space "Time Dimension A" now corresponds to the current zero-reference time point C. Then, a new current event time window EZF associated with the new current zero-reference time point C is atomically written. Figure 5 In the table, the fifth row shows the state of the corresponding storage area after the current zero reference time point C is redefined.
[0044] Below, for reference Figure 6 This describes the process 140 performed in step S140 for determining the current write partition of the method 100 for recording event data in a vehicle according to the present invention. Here, if the vehicle is restarted or the current write partition is completely written to the reference information 25, a new write partition is searched according to the at least one pre-given write criterion. In the presented embodiment, the current event time window EZF (if it exists) is stored locally before determining the current write partition. Figure 6It can also be seen that the determination process 140 begins in step S200. In step S210, it is checked whether at least one of partitions 21, 21A, and 21B does not have a valid time window 22. If this is the case, then in step S220, one of these partitions 21, 21A, and 21B is determined as the current write partition, and the determination process ends. If no partitions 21, 21A, and 21B with a invalid time window 22 are identified in step S210, then in step S230, it is checked whether at least one of partitions 21, 21A, and 21B has a valid time window 22 that is older than the time point before the maximum event. If no such partitions 21, 21A, and 21B are identified in step S230, then the determination process 140 returns to the check in step S210. If partitions 21, 21A, and 21B with valid time windows 22 are identified in step S230, then in step S240, it is checked whether this partition overlaps with an existing current event time window EZF. If it is determined in step S240 that this partition 21, 21A, and 21B overlaps with an existing current event time window EZF, then the determination process 140 returns to the check in step S210. If no current event time window EZF is identified in step S240, or if it is determined that this partition 21, 21A, and 21B does not overlap with an existing current event time window EZF, then in step S250, this partition 21, 21A, and 21B is added to a group of partitions 21, 21A, and 21B. In step S260, it is checked whether other partitions 21, 21A, and 21B still exist. If this is the case, then in step S280, the next partition 21, 21A, 21B is selected, and the determination process 140 continues with the check in step S210. If no other partition 21, 21A, 21B is identified in step S270, then in step S270, the partition 21, 21A, 21B with the oldest start timestamp 23 corresponding to its effective time window 22 is selected from that group of partitions 21, 21A, 21B. The selected partition 21, 21A, 21B is then determined as the current write partition in step S220, and the determination process ends.
[0045] In the embodiments presented in this invention, the received reference information 25 of each data frame DR is written into the current write partition in an arbitrary time order, wherein a subsequence of the reference information 25 written by each data frame DR is obtained and marked in the write partition in a time-randomized order. For this purpose, each partition 21, 21B includes additional auxiliary information 60, such as information also derived from... Figure 3 This can be seen from the text. (and) Figure 2 The partition 21A presented in the middle is different, Figure 3The reference information 25 written to each data frame DR of partition 21B presented in the image includes number 62. This means that... Figure 3 The reference information 25 of each data frame DR in partition 21B presented in the middle is numbered sequentially in ascending order according to their writing order.
[0046] Each time a new data frame DR is written to the reference information 25, the time window 27 of the new data frame DR is compared with the time window 27 of the reference information 25 previously used as the last data frame DR written to the currently written partition. For this purpose, the start timestamp 28 of the new data frame DR is compared with the start timestamp 28 of the most recently written data frame DR. Here, if the start timestamp 28 of the new data frame DR is newer than the start timestamp 28 of the most recently written data frame DR, the current start time subsequence 64, which is randomly ordered in time, is identified and continues. Alternatively, if the start timestamp 28 of the new data frame DR is older than the start timestamp 28 of the most recently written data frame DR, a new start time subsequence 64 begins, and its start timestamp 28 is marked by storing the corresponding number 62 of the new data frame DR. The first start time subsequence 64 begins with the start timestamp 28 of the first data frame DR written and the number "0". Furthermore, the end timestamp 29 of the new data frame DR is compared with the end timestamp 29 of the most recently written data frame DR. Here, if the end timestamp 29 of the new data frame DR is newer than the end timestamp 29 of the most recently written data frame DR, the current end timestamp subsequence 66, which is randomly ordered in time, is identified and continues. Alternatively, if the end timestamp 29 of the new data frame DR is older than the end timestamp 29 of the most recently written data frame DR, a new end timestamp subsequence 64 begins, and its end timestamp 29 is marked by storing the corresponding number 62 of the new data frame DR. The first end timestamp subsequence 66 begins with the end timestamp of the first data frame DR that was written.
[0047] As from Figure 3It can also be seen that the exemplary partition 21B includes four start time subsequences 64. Here, the first start time subsequence 64 begins with the smallest number "0" in ascending order 62. The second start time subsequence 64 begins with number "3" because the start timestamp 28 of the corresponding data frame DR with the value "5" is older than the start timestamp 28 of the previous data frame DR with the value "7". The third start time subsequence 64 begins with number "7" in ascending order 62 because the start timestamp 28 of the corresponding data frame DR with the value "7" is older than the start timestamp 28 of the previous data frame DR with the value "13". The fourth start time subsequence 64 begins with number "13" in ascending order 62 because the start timestamp 28 of the corresponding data frame DR with the value "28" is older than the start timestamp 28 of the previous data frame DR with the value "29". In addition, the exemplary partition 21B includes five end time subsequences 66. Here, the first end time subsequence 66 begins with the smallest number "0" of ascending sequence number 62. The second end time subsequence 66 begins with number "1" because the end timestamp 29 of the corresponding data frame DR with value "19" is older than the end timestamp 29 of the previous data frame DR with value "20". The third end time subsequence 66 begins with number "5" because the end timestamp 29 of the corresponding data frame DR with value "19" is older than the end timestamp 29 of the previous data frame DR with value "27". The fourth end time subsequence 66 begins with number "7" because the end timestamp 29 of the corresponding data frame DR with value "12" is older than the end timestamp 29 of the previous data frame DR with value "30". The fifth end time subsequence 66 begins with number "11" because the end timestamp 29 of the corresponding data frame DR with the value "25" is older than the end timestamp 29 of the previous data frame DR with the value "28".
[0048] Figure 4Four time windows 22A, 22B, 22C, and 22D of partitions 21, 21A, and 21B are illustrated, which overlap with the current event time window EZF. Since all the presented time windows 22A, 22B, 22C, and 22D overlap with the current event time window EZF, all corresponding partitions 21, 21A, and 21B are suitable to be identified as the current read partition. Because the time windows 22A, 22B, 22C, and 22D of the current read partition overlap with the current event time window EZF, at least one data frame DR of the current read partition also overlaps with the current event time window EZF. Reference information 25 of at least one data frame DR is read from the current read partition, and the time window 27 of the at least one data frame overlaps with the current event time window EZF. Here, after reading the reference information 25, the time window 27 of the at least one data frame DR in the reference information 25 is invalidated.
[0049] Before determining the current read partition, the existing current event time window EZF is stored locally. Specifically, before each readout process of the reference information 25 for at least one data frame DR, the locally stored current event time window EZF is compared with the existing current event time window EZF. If the existing current event time window EZF differs from the locally stored one, the existing current event time window EZF is stored locally. Furthermore, if the locally stored current event time window EZF has changed, it is checked whether the current read partition's time window 22 and the new current event time window EZF overlap. If the current read partition overlaps with the changed current event time window EZF, the readout process for the read partition is restarted. Alternatively, if the current read partition does not overlap with the changed current event time window EZF, a new current read partition is determined.
[0050] To accelerate the readout process, reference information 25 for at least one data frame DR to be read from the current readout partition is obtained based on the temporal relationship between at least one time-randomized start time subsequence 64 and / or at least one time-randomized end time subsequence 66 of the current read partition and the current event time window EZF.
[0051] As from Figure 4It can also be seen that the start timestamp 23 of the first time window 22 of the corresponding partitions 21, 21A, and 21B is outside the current event time window EZF, and the end timestamp 24 of the first time window 22 of the corresponding partitions 21, 21A, and 21B is within the current event time window EZF. Therefore, partitions 21, 21A, and 21B can contain data frames DR that are too old for the current event time window EZF, but cannot contain data frames DR that are too new for the current event time window EZF. Therefore, in order to obtain the reference information 25 of the data frame DR to be read from partitions 21, 21A, and 21B, only the end timestamp 29 of the data frame DR of the randomly ordered end time subsequence 66 is compared with the start time point EZF_1 of the current event time window EZF, so as to identify the data frame DR that is completely before the current event time window EZF.
[0052] As from Figure 4 It can also be seen that the start timestamp 23 and end timestamp 24 of the second time window 22B of the corresponding partitions 21, 21A, and 21B are within the current event time window EZF. Therefore, partitions 21, 21A, and 21B do not contain data frame DRs that are too old for the current event time window EZF, nor do they contain data frame DRs that are too new for the current event time window EZF. This allows the reference information 25 of all data frame DRs in the corresponding partitions 21, 21A, and 21B to be read and forwarded without further inspection, and the corresponding data frame DRs to be persistently stored.
[0053] As from Figure 4 It can also be seen that the start timestamp 28 of the third time window 22C of the corresponding partitions 21, 21A, and 21B is within the current event time window EZF, and the end timestamp 29 of the third time window 22C of the corresponding partitions 21, 21A, and 21B is outside the current event time window EZF. Therefore, partitions 21, 21A, and 21B can contain data frames DR that are too new for the current event time window EZF, but cannot contain data frames DR that are too old for the current event time window EZF. Therefore, in order to obtain the reference information 25 to be read from partitions 21, 21A, and 21B for data frames DR, only the start timestamp 28 of the randomly ordered start time subsequence 64 is compared with the end time point EZF_2 of the current event time window EZF to identify data frames DR that are completely after the current event time window EZF.
[0054] As from Figure 4It can also be seen that the start timestamp 28 and end timestamp 29 of the fourth time window 22D of the corresponding partitions 21, 21A, and 21B are all outside the current event time window EZF. Therefore, partitions 21, 21A, and 21B can contain data frames DR that are too new for the current event time window EZF and data frames DR that are too old for the current event time window EZF. Therefore, in order to obtain the reference information 25 to be read from partitions 21, 21A, and 21B for data frames DR, the start timestamp 28 of the marked time-randomized start time subsequence 64 is compared with the end time point EZF_2 of the current event time window EZF to identify data frames DR that are completely after the current event time window EZF. In addition, the end timestamp 29 of the marked time-randomized end time subsequence 66 is compared with the start time point EZF_1 of the current event time window EZF to identify data frames DR that are completely before the current event time window EZF.
[0055] Here, a randomly ordered end time subsequence 66 is first used to find data frames DR that are not entirely before the event time window EZF. To do this, the end timestamp 29 of the data frame DR of the last data item (Eintrag) of the first randomly ordered end time subsequence 66 is first compared with the start time EZF_1 of the current event time window EZF to check if the data frame DR of the first randomly ordered end time subsequence 66 is entirely before the event time window EZF. If so, the process continues with the next randomly ordered end time subsequence 66, and the reference information 25 of the data frame DR of the first randomly ordered end time subsequence 66 is not forwarded. If not, starting from the first data item, the end timestamp 29 of the data frame DR of the first randomly ordered end time subsequence 66 is checked to find data frames DR that are not entirely before the event time window EZF, because earlier data items of the data frame DR of the first randomly ordered end time subsequence 66 can still be entirely older than the current event time window EZF. After obtaining the number of such a first data frame DR, a corresponding randomly ordered start time subsequence 64 is generated, which contains this first data frame DR. To ensure that the data frame DR is not completely after the event time window EZF, starting from the start timestamp 28 of the obtained first data frame DR, the start timestamp 28 of the randomly ordered first start time subsequence 64 is compared with the end time point EZF_2 of the current event time window EZF to find a data frame DR that is completely after the event time window EZF. If a data frame DR that is completely after the current event time window EZF is found, the process continues with the first data item of the next randomly ordered start time subsequence 64. Furthermore, whenever a data frame DR that overlaps with the current event time window EZF is found, it is checked whether the found data frame DR still belongs to the previously checked randomly ordered end time subsequence 66. If this is the case, the reference information 25 of the found data frame DR is forwarded and the time window 27 in the reference information 25 of the data frame DR is deleted from the partition 21. Otherwise, the process continues with the end time subsequence 66 of the randomly ordered sequence to which the found data frame DR belongs.
[0056] The embodiments of the method 100 according to the present invention can be implemented, for example, in software or hardware or in a hybrid form of software and hardware.
[0057] As from Figure 7As can be seen, the presented embodiment of the apparatus 1 according to the present invention for performing a method 100 for recording event data in a vehicle includes a data providing device 10, a buffer block 20, an event recognition device 30, and a data recording device 40. The data providing device 10 continuously receives vehicle data to be recorded from at least one vehicle system 3 and writes it as event data into data frames DR of a pre-given size, and stores each data frame DR in at least one volatile memory 50. The buffer block 20 manages the stored data frames DR and keeps them available in the at least one volatile memory 50 until the event data stored in each data frame DR is older than a pre-given maximum event time point or is persistently stored in at least one non-volatile memory 46 in response to a pre-given event recognized by the event recognition device 30. Here, the buffer block 20 includes a write function SF and includes multiple partitions 21, 21A, 21B of a pre-given size. The write function SF determines one of the partitions 21, 21A, and 21B as the current write partition according to at least one write criterion and writes the reference information 25 of each data frame DR, received by the data providing device 10, into the current write partition.
[0058] Furthermore, buffer block 20 includes a read function LF in the presented embodiment. In response to a request from data recording device 40 and according to at least one pre-defined read criterion, the read function LF identifies one of the other partitions 21 as the current read partition, reads reference information 25 contained in the current read partition along with a data frame DR containing event data to be persistently recorded, and forwards it to data recording device 40. The at least one pre-defined read criterion includes at least one current event time window (EZF) within which event data should be persistently recorded. Data recording device 40 persistently stores the data frame DR corresponding to the forwarded reference information 25 in the at least one non-volatile memory 46.
[0059] In addition, the write function SF writes the received reference information 25 of each data frame DR into the write partition in an arbitrary time order, and in at least one partition 21, it retrieves and marks the time-randomly ordered subsequence of the written reference information 25 of each data frame DR.
[0060] The event recognition device 30 continuously monitors the vehicle's status and determines when a pre-defined event occurs, requiring the persistent storage of corresponding event data for at least one vehicle system 3. The event recognition device 30 outputs a current event time window (EZF) corresponding to the recognized event to a buffer block 20, within which event data should be persistently recorded. The start time of the current event time window (EZF) is not temporally preceding the time point before the maximum event.
[0061] In the presented embodiment, the first vehicle system 3 is implemented as an environmental detection system 3A. The second vehicle system 3 is implemented as an occupant protection system 3B, the third vehicle system 3 is implemented as a driving power system 3C, and the fourth vehicle system is implemented as a braking system 3D. Of course, it is also possible to detect and record vehicle data from other vehicle systems or other combinations of the above-described vehicle systems 3.
[0062] The event recognition device 30 pre-assigns the start time point EZF_1 of the current event time window EZF as a timestamp about the current zero reference time point B, and pre-assigns the end time point EZF_2 of the current event time window EZF as the time difference from the start time point EZF_1. The buffer block 20 redefines the current zero reference time point B when needed.
[0063] In the presented embodiment, the data providing device 10 includes a data detection unit 12 and a data preprocessing unit, and delivers reference information 25 of data frames DR stored in the at least one volatile memory 50 to the buffer block 20. As explained above, the reference information 25 of each data frame DR in the presented embodiment includes a data frame indicator DRZ, which indicates the storage space of the data block or data frame stored in the volatile memory and the corresponding time window 27 of the data frame DR with a start timestamp 28 and an end timestamp 29. Upon detection of an event, the buffer block 20 forwards the corresponding reference information 25 of the data frame that should be persistently stored in the at least one non-volatile memory 46 to the data recording device 40. In the presented embodiment, the data recording device 40 includes a data post-processing unit 42, a data storage unit 44, and at least one non-volatile memory 46. Each data frame DR typically contains more than one data portion that has been generated or stored within the time window 27 of the data frame DR. Buffer block 20 only identifies the time window 27 of the data frame DR and does not identify or understand the content of the data frame DR. Buffer block 20 receives and forwards the data frame DR as a reference from the data providing device 10 to the data recording device 40. This means that buffer block 20 does not copy the stored content of the data frame DR. If the event identification device 30 informs buffer block 20 of the current event time window EZF, buffer block 20 identifies the data frame DR associated with the current event time window EZF. Then, buffer block 20 accurately provides the reference information 25 of the data frame DR to the data recording device 40 for data recording, the data frame overlapping the current event time window EZF in time. This means that buffer block 20 forwards the complete reference information 25 of the data frame DR to the data recording device 40, even if the data frame DR only partially overlaps with the current event time window EZF and therefore some data portions may be outside the current event time window EZF. Buffer block 20 only associates the data frame DR with events that have occurred and have a time overlap with the current event time window EZF. Buffer block 20 does not apply additional criteria to allocate data frame DR to an event. Buffer block 20 provides the data recording device 40 with accurate reference information 25 for data frame DRs that overlap with the current event time window EZF. The order in which buffer block 20 forwards data frame DRs to the data recording device 40 is not restricted. Buffer block 20 processes only one event at a time. Event identification device 30 only notifies buffer block 20 of the current event time window EZF. Buffer block 20 does not require any further information about the event's status or details. If event identification device 30 identifies a second event, and buffer block 20 has already processed the current event time window EZF of the first event, then event identification unit 30 can change the current event time window EZF.Furthermore, buffer block 20 has statically configurable (i.e., compile-time known) limitations that specify the maximum number of time units before the current event time window EZF can begin. This limitation is called the maximum pre-event time point. Event identification device 30 cannot change the starting point of the current event time window EZF to a time point that is temporally before the maximum pre-event time point. Furthermore, event identification device 30 cannot determine the current event time window EZF whose starting point is temporally before the maximum pre-event time point.
[0064] Therefore, the behavior of buffer block 20 is indicated by the current event time window (EZF). If event recognition device 30 recognizes an event for which data must be permanently recorded, then event recognition device 30 informs buffer block 20 of the corresponding current event time window (EZF), which corresponds to the time range within which the corresponding data frame DR should be permanently stored. The end point of the current event time window (EZF) can be a future point in time. If another event is recognized, the current event time window (EZF) can be changed. This could be, for example, the following scenario: a less significant event is first recognized, followed by a more serious event considered to be associated with the first event. An example could be: as event A, the vehicle recognizes that it has crossed the center line of the road, i.e., a malfunction in the vehicle's automatic steering function, and then the airbag control device informs event recognition device 30 that the airbags have been deployed due to a frontal collision as event B. Event A can be considered independently as being significantly relevant to the recording of vehicle data within a first event time window EZF with a start time of 10 seconds before and an end time of 10 seconds after event A. Event B, which is significantly more serious than event A, requires the recording of vehicle data within a second event time window EZF with a start time of 30 seconds before and an end time of 30 seconds after event B. Therefore, while recording of vehicle data for event A continues, the event recognition device 30 has changed the current event time window EZF for recording vehicle data for event B.
[0065] In the presented embodiment, from an external perspective, buffer block 20 corresponds to a set of indicators DRZ pointing to data frames DR. Buffer block 20 retains these indicators for a period of time until it causes them to either return to the storage management unit of the at least one volatile memory 50 or forward them to the data recording device 40, which reads the data frame DR corresponding to the forwarded indicator DRZ from the at least one volatile memory 50 and persistently stores it in the at least one non-volatile memory 46. Buffer block 20 can, for example, mark the currently written partition in atomic machine instructions with a write partition indicator. Internally, the buffer block includes a row of partitions 21, 21A, 21B. Individual partitions 21, 21A, 21B correspond to, for example, an array of data frame indicators DRZ enriched with additional information 26 and auxiliary information 60, the additional information being related to a time window 27 of the corresponding data frame DR, and the auxiliary information simplifying and accelerating the readout process of reference information 25. The size and number of partitions 21, 21A, and 21B in buffer block 20 can be statically configured, i.e., known at compile time. Buffer block 20 statically contains the storage areas for partitions 21, 21A, and 21B; that is, buffer block 20 statically allocates partitions 21, 21A, and 21B when the program starts. The size and number of partitions 21, 21A, and 21B can be configured in such a way that the number of Data Frame Indicators (DRZs) is sufficient under all conditions. In addition to partitions 21, 21A, and 21B containing the Data Frame Indicators (DRZs), buffer block 20 contains a concrete representation of the current event time window (EZF).
[0066] The data providing device 10 inserts a data frame DR (i.e., reference information 25 of the corresponding data frame DR) into the buffer block 20, while the data recording device 40 reads the reference information 25 of the data frame DR from the buffer block 20 and persistently stores the corresponding data frame DR. Therefore, the data providing device 10 is referred to here as a "writer" and the data recording device 40 as a "reader". The writer and reader can invoke the methods of the buffer block 20 simultaneously or in parallel from different processes, and the internal state of the buffer block 20 is, of course, kept correct in all possible simultaneous or parallel processes.
[0067] Buffer block 20 separates the write process of write function SF from the read process of read function LF by exclusively occupying partitions 21, 21A, and 21B. Buffer block 20 designates one of partitions 21, 21A, and 21B as the current "write partition". Write function SF exclusively occupies this current write partition. Read function LF can neither read from nor modify the current write partition, even if the current write partition contains data frames DR that overlap temporally with the current event time window EZF. When write function SF has completely filled the current write partition with reference information 25, write function SF uses the aforementioned determination process 140 to search for a new current write partition, and the current write partition becomes available for use by read function LF.
[0068] If the write function SF has determined a new current write partition, the write function SF resets the write partition indicator of buffer block 20 according to an atomic storage procedure. This eliminates a race condition that could be caused by the read function LF accessing an outdated, cached version of the current write partition, for example, in the CPU cache of another CPU core.
[0069] Similarly, the read function LF occupies partitions 21, 21A, and 21B, which are identified as the current read partitions. Of course, the current read partitions overlap with the current event time window EZF in time; otherwise, the read function LF would not be interested in the contained data frames DR. Due to the above determination process, the write function SF will never access the current read partitions without other means of separating the process. If the read function LF has read all the reference information 25 of the important related data frames DR from the current read partition, then either the time window 22 of the current read partition is invalid because all data frames DR contained in the current read partition have been read, or the time window 22 of the current read partition no longer overlaps with the current event time window EZF. The read function LF then searches for another partition 21, 21A, and 21B, which overlaps with the current event time window EZF and is not the current write partition. If the read function LF finds partitions 21, 21A, and 21B because the buffer block contains reference information 25 for multiple important related data frame DRs about the current event, then the read function LF determines these partitions 21, 21A, and 21B for the new current read partition. Since the write function SF never accesses the current read partition, there is no need to atomically store the read partition indicator. In the vast majority of calls to buffer block 20, the write function SF simply appends the reference information 25 about the new data frame DR to the end of the current write partition, potentially extending the time window 22 of the current write partition. Similarly, the read function LF simply reads the reference information 25 about the next data frame DR from the current read partition. In this way, the write function SF and the read function LF never interfere with each other. Simultaneous access to a partition is only possible when the current write partition has been completely written to or completely read from. However, this is a write-protected read-only access, which compares the time windows 22 of partitions 21, 21A, and 21B. Due to the definition of a new exclusive read partition or a new exclusive write partition, the read process and the write process can be separated from each other at any time according to the rules.
[0070] There can be more than one call to the write function SF. To avoid race conditions caused by two calls (both of which want to simultaneously define a new current write partition or overwrite state information within the current write partition), all accesses to buffer block 20 from calls to the write function SF are only performed if the lock is exclusively held. In the case of a single write function SF, this lock is always available during a single atomic read. Otherwise, second calls wait for each other until the currently active write function SF has released the lock. Since actions performed under this lock are very fast, this is a better solution than introducing a separate current write partition for each call to the write function SF. It should be noted that neither the read function LF nor the event identification device 30 needs to have acquired the lock. This means that the lock only results in a wait period if two calls here simultaneously insert the reference information 25 of the new data frame DR into buffer block 20 via the write function SF.
[0071] Event identification can be implemented as a separate process within the event identification device 30. The event identification device 30 does not directly interact with the processing of the data frame DR. However, the event identification device 30 can determine, modify, or invalidate the current event time window stored in the buffer block 20 at any time. The write function SF reads the current event time window EZF while searching for a new write partition. Although simultaneous access to the current event time window by the event identification device 30 and the write function SF is "only" a read / write conflict, the buffer block 20 ensures that the write function SF does not read a partially written and therefore arbitrarily corrupted current event time window EZF, while the event identification device 30 modifies the current event time window EZF. If the write function SF is called more than once, only one of the calls can acquire the described exclusive lock. Therefore, only one write function SF can conflict with the event identification device 30 for simultaneous access to the current event time window EZF, while other calls attempt to acquire the lock. The buffer block 20 resolves the conflict between the event identification device 30 and the write function SF by storing the current event time window EZF as an atomic value, i.e., stored in a single machine instruction. Therefore, the event identification device 30 writes a new current event time window EZF in a single atomic process. The write function SF either reads the old current event time window EZF or reads the new current event time window EZF, but never reads a corrupted or partially written current event time window EZF.
[0072] When searching for a new write partition, the write function SF first creates a locally running copy of the current event time window EZF using an atomic read process. Then, the write function SF works only with this locally running copy until a new write partition is found. In this way, it is possible that the write function SF searches for a new write partition using an outdated current event time window EZF. However, this behavior is consistent with the situation where the write function SF first updates the write partition and the event recognition device 30 subsequently changes the current event time window EZF.
[0073] As described, in the case of a read / write conflict between the event identification device 30 and the write function SF, the read function LF also has a read / write conflict with the event identification device 30 for accessing the current event time window EZF of the buffer block 20. The read function LF must recognize the current event time window EZF in order to find partitions 21, 21A, 21B that contain data frames DR that overlap with the current event time window EZF, and, if partitions 21, 21A, 21B are not completely contained within the current event time window EZF, in order to identify or determine the important and relevant data frames DR within those partitions. Of course, the read function LF does not read partially written, corrupted portions of the current event time window EZF, while the event identification device 30 simultaneously modifies the current event time window EZF.
[0074] As explained above, the event identification device 30 atomically updates the current event time window EZF. Similarly, the read function LF atomically reads the current event time window EZF at the start of each method call to buffer block 20 and stores it in a locally running copy. During the read process, the read function LF uses this copy wherever the current event time window EZF is needed.
[0075] It is possible that the current event time window EZF stored in buffer block 20 is different from the locally running copy of the read function LF. The read function LF ends the current read process with the current event time window EZF that is outdated during this period, and therefore forwards at most the reference information 25 of the data frame DR whose time window 22 is outside the current event time window EZF to the data recording device 40. However, this behavior is as if "the event identification device 30 determines the new current event time window EZF after the read function LF has processed the data frame DR", and is therefore tolerable.
[0076] At the start of each call to buffer block 20, the read function LF not only creates a locally running copy of the current event time window EZF, but also checks whether the current event time window EZF has changed since the previous call. If the current event time window EZF has changed, the read function LF first checks whether the current read partition still overlaps with the new current event time window. If this is not the case, the read function LF searches for a new current read partition, as described above. If the current read partition always overlaps with the new current event time window EZF, the read function LF restarts the read process and begins rereading the current read partition from the beginning.
Claims
1. A method (100) for recording event data in a vehicle, wherein Vehicle data from at least one vehicle system (3) is continuously received and written as event data into data frames (DRs) of a pre-given size, wherein each data frame (DR) is stored in at least one volatile memory (50), wherein the stored data frames (DRs) are managed and kept available in the at least one volatile memory (50) until the event data stored in each data frame (DR) is older than a pre-given maximum event time point or is persistently stored in at least one non-volatile memory (46) in response to a pre-given event, wherein a plurality of partitions (21) of a pre-given size are set, wherein one of the partitions (21) is determined as the current write according to at least one write criterion. The system reads the reference information (25) received from each data frame (DR) into the current write partition, and, in response to a request and according to at least one pre-given read criterion, determines one of the other partitions (21) as the current read partition, the at least one pre-given read criterion including at least one current event time window (EZF), within which the event data should be persistently recorded, wherein the reference information (25) contained in the current read partition of the data frame (DR) containing the event data to be persistently recorded is read out and forwarded, wherein the data frame (DR) corresponding to the forwarded reference information (25) is persistently stored in the at least one non-volatile memory (46).
2. The method (100) according to claim 1, characterized in that, The writing of the event data and the reading of the reference information occur simultaneously or in parallel.
3. The method (100) according to claim 2, characterized in that, The start time (EZF_1) of the current event time window (EZF) is pre-defined as a timestamp about the current zero reference time point (B), and the end time (EZF_2) of the current event time window (EZF) is pre-defined as the time difference from the start time point (EZF_1), wherein the current zero reference time point (B) is redefined when necessary.
4. The method (100) according to claim 3, characterized in that, The oldest zero reference time point corresponds to the vehicle's start time point.
5. The method (100) according to claim 3 or 4, characterized in that, If the new current event time window (EZF) cannot be represented by the current zero reference time point (B) because the start time point (EZF_1) of the new current event time window (EZF) is too far away from the current zero reference time point (B) in time, then the current zero reference time point (B) is redefined.
6. The method (100) according to any one of claims 1 to 4, characterized in that, Each data frame (DR) is associated with a time window (27), wherein the reference information (25) of each data frame (DR) includes a corresponding storage area and a corresponding time window (27) including a start timestamp (28) and an end timestamp (29) of each data frame (DR), in which at least one data segment containing the event data has been generated or detected in the corresponding data frame (DR).
7. The method (100) according to claim 6, characterized in that, The start timestamp (28) and end timestamp (29) of each data frame (DR) are related to the current zero reference time point (B).
8. The method (100) according to claim 6, characterized in that, Each partition (21) is assigned a time window (22), wherein the start timestamp (23) of the time window (22) of the corresponding partition (21) uses the oldest start timestamp (28) of the reference information (25) contained in the partition (21) of the corresponding data frame (DR), wherein the end timestamp (24) of the time window (22) of the corresponding partition (21) uses the latest end timestamp (29) of the reference information (25) contained in the partition (21) of the corresponding data frame (DR).
9. The method (100) according to claim 8, characterized in that, Reference information (25) of at least one data frame (DR) is read from the current read partition, the time window (27) of the at least one data frame overlaps with the current event time window (EZF), wherein the time window (27) of the at least one data frame (DR) in the reference information (25) is invalidated after the reference information (25) is read.
10. The method (100) according to claim 9, characterized in that, Before determining the current read partition, an existing current event time window (EZF) is stored locally, wherein, before each readout process of reference information (25) of at least one data frame (DR), the locally stored event time window (EZF) is compared with the current event time window (EZF), and if the current event time window is different from the locally stored event time window (EZF), the current event time window (EZF) is stored locally, wherein, if the locally stored event time window (EZF) has changed, it is checked whether the time window (22) of the current read partition overlaps with the changed event time window (EZF), wherein, if the time window of the current read partition overlaps with the changed event time window (EZF), the readout process of the read partition is restarted, or, if the time window of the current read partition does not overlap with the changed event time window (EZF), a new current read partition is determined.
11. The method (100) according to any one of claims 1 to 4, characterized in that, If the vehicle is restarted or the current write partition is completely written to the reference information (25), a new write partition is searched according to the at least one pre-given write criterion.
12. The method (100) according to claim 11, characterized in that, A set of partitions (21) is determined, wherein the partitions do not have a valid time window (22) or have a valid time window (22) that is older than the time point before the maximum event and does not overlap with the existing current event time window (EZF), wherein the partitions (21) without a valid time window (22) or the partitions (21) whose corresponding valid time window (22) has the oldest start timestamp (23) are determined as the current write partitions.
13. The method (100) according to claim 11, characterized in that, Before determining the current write partition, the existing current event time window (EZF) is stored locally.
14. The method (100) according to any one of claims 1 to 4, characterized in that, The received reference information (25) of each data frame (DR) is written into the current write partition in an arbitrary time order, wherein the time order of the time sequence of the written reference information (25) of each data frame (DR) is randomly ordered in the write partition.
15. The method (100) according to claim 14, characterized in that, The reference information (25) written to each data frame (DR) is numbered sequentially in ascending order according to the order in which it was written.
16. The method (100) according to claim 15, characterized in that, Each time a new data frame (DR) reference information (25) is written, the time window (27) of the new data frame (DR) is compared with the time window (27) of the data frame (DR) whose reference information (25) was previously written as the last one to the currently written partition.
17. The method (100) according to claim 16, characterized in that, The start timestamp (28) of the new data frame (DR) is compared with the start timestamp (28) of the most recently written data frame (DR). If the start timestamp (28) of the new data frame (DR) is newer than the start timestamp (28) of the most recently written data frame (DR), the current start time subsequence (64) is identified and continues in a time-random order. Alternatively, if the start timestamp (28) of the new data frame (DR) is older than the start timestamp (28) of the most recently written data frame (DR), a new start time subsequence (64) is started and its start timestamp (28) is marked by storing the corresponding number (62) of the new data frame (DR). The first start time subsequence (64) begins with the smallest number (0) of the start timestamp (28) of the first data frame (DR) written and the corresponding number (62).
18. The method (100) according to claim 16 or 17, characterized in that, The end timestamp (29) of the new data frame (DR) is compared with the end timestamp (29) of the most recently written data frame (DR). If the end timestamp (29) of the new data frame (DR) is newer than the end timestamp (29) of the most recently written data frame (DR), the current end timestamp subsequence (66) is identified and continues in a time-random order. Alternatively, if the end timestamp (29) of the new data frame (DR) is older than the end timestamp (29) of the most recently written data frame (DR), a new end timestamp subsequence (66) is started and its end timestamp (29) is marked by storing the corresponding number (62) of the new data frame (DR). The first end timestamp subsequence (66) begins with the smallest number (0) of the end timestamp (29) of the first data frame (DR) written and the corresponding number (62).
19. The method (100) according to claim 18, characterized in that, Reference information (25) for at least one data frame (DR) to be read from the current read partition is obtained based on the temporal relationship between at least one temporally randomly ordered start time subsequence (64) and / or at least one temporally randomly ordered end time subsequence (66) of the current read partition and the current event time window (EZF).
20. An apparatus (1) for performing a method for recording event data in a vehicle according to any one of claims 1 to 19, the apparatus comprising a data providing device (10), a buffer block (20), an event recognition device (30), and a data recording device (40), wherein, The data providing device (10) is configured to continuously receive vehicle data to be recorded from at least one vehicle system (3) and write it as event data into data frames (DRs) of a pre-given size, and store each data frame (DR) in at least one volatile memory (50), wherein the buffer block (20) is configured to manage the stored data frames (DRs) and keep them available in the at least one volatile memory (50) until the event data stored in each data frame (DR) is older than a pre-given maximum event time point or is persistently stored in at least one non-volatile memory (46) in response to a pre-given event identified by the event identification device (30), wherein the buffer block (20) includes a write function (SF) and includes a plurality of partitions (21) of a pre-given size, wherein the write function (SF) is configured to determine one of the partitions (21) as the current write partition according to at least one write criterion and store each Reference information (25) of a data frame (DR) received by the data providing device (10) is written into the current write partition, and the buffer block (20) includes a read function (LF), wherein the read function (LF) is configured to, in response to a request from the data recording device (40) and according to at least one pre-given read criterion, determine one of the other partitions (21) as the current read partition, and read the reference information (25) of the data frame (DR) containing event data to be persistently recorded in the current read partition and forward them to the data recording device (40), wherein the at least one pre-given read criterion includes at least one current event time window (EZF) in which the event data should be persistently recorded, wherein the data recording device (40) is configured to persistently store the data frame (DR) corresponding to the forwarded reference information (25) in the at least one non-volatile memory (46).
21. The device (1) according to claim 20, characterized in that, The write function (SF) and the read function (LF) occur simultaneously or in parallel.
22. The device (1) according to claim 20 or 21, characterized in that, The write function (SF) is further implemented to write the received reference information (25) of each data frame (DR) into the current write partition in an arbitrary time order, and to obtain and mark the time-randomized subsequence of the written reference information (25) of each data frame (DR) in the write partition.
23. The device (1) according to claim 20 or 21, characterized in that, The event recognition device (30) is configured to continuously monitor the state of the vehicle and determine when a pre-given event occurs, the pre-given event requiring the persistent storage of corresponding event data of at least one vehicle system (3), wherein the event recognition device (30) is further configured to output the current event time window (EZF) corresponding to the recognized event to the buffer block (20), the event data should be persistently recorded within the current event time window, wherein the start time of the current event time window (EZF) is not located before the time point before the maximum event.
24. The device (1) according to claim 20 or 21, characterized in that, The at least one vehicle system (3) is implemented as an environmental monitoring system (3A), a personnel protection system (3B), a driving power system (3C), or a braking system (3D).
25. The device (1) according to claim 23, characterized in that, The event recognition device (30) is further configured to pre-define the start time point (EZF_1) of the current event time window (EZF) as a timestamp about the current zero reference time point (B), and pre-define the end time point (EZF_2) of the current event time window (EZF) as the time difference with the start time point (EZF_1), wherein the buffer block (20) is configured to redefine the current zero reference time point (B) when needed.
26. The device (1) according to claim 20 or 21, characterized in that, The data providing device (10) and / or the buffer block (20) and / or the event recognition device (30) and / or the data recording device (40) are distributed on multiple devices in the vehicle, which communicate with each other via a vehicle network structure.
27. A computer program product configured to implement a method for recording event data in a vehicle according to any one of claims 1 to 19.
28. A computer-readable storage medium on which a computer program product according to claim 27 is stored.