Data processing device

The data processing apparatus addresses memory rearrangement challenges by managing data writing and reorganization based on vehicle state and free capacity, reducing processing load and ensuring efficient data management in flash memory.

JP2025094570APending Publication Date: 2025-06-25DENSO CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023210209
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-12-13
Publication Date
2025-06-25

AI Technical Summary

Technical Problem

Existing data processing systems face increased processing load and undesirable timing issues during memory rearrangement due to insufficient free capacity in flash memory sectors, especially when data intervals are long.

Method used

A data processing apparatus that includes a storage unit, data processing unit, operating state determination unit, write request determination unit, and free capacity determination unit to manage data writing and memory reorganization, ensuring data is written when the vehicle is in a suitable state and sufficient free capacity is available, thereby avoiding memory reorganization at undesirable times.

Benefits of technology

The apparatus effectively avoids memory reorganization at undesirable times by managing data writing to maintain sufficient free capacity, reducing processing load and ensuring efficient data management in flash memory.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025094570000001_ABST
    Figure 2025094570000001_ABST
Patent Text Reader

Abstract

To provide a data processing device that avoids memory reorganization at undesired time and appropriately avoids an increase in processing load.SOLUTION: A data processing device 4 includes: a storage unit 16 that stores data; a data processing unit 41 that writes data, as processing for the data stored in the storage unit, and performs memory reorganization; an operation state determination unit 42 that determines an operation state of a vehicle; a write request determination unit 43 that determines whether a data write request occurs; an idle capacity determination unit 44 that compares data size of the write request with the idle capacity in a virtual sector in the storage unit to determine size of the idle capacity. When it is determined that the operation state of the vehicle satisfies a predetermined condition, when it is determined that the data write request occurs, and when it is determined that there is an idle capacity in the virtual sector that is equal to or larger than data size of the write request, the data processing unit increases data size of the virtual sector and writes the data of the write request.SELECTED DRAWING: Figure 5
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a data processing apparatus.

Background Art

[0002] Since the data capacity within a sector of a flash memory is limited, it is necessary to perform memory rearrangement when the free capacity within the sector decreases. When processing a large amount of data at once in memory rearrangement, there is a problem that the processing load increases and it takes time to update the data. In response to such a problem, for example, Patent Document 1 discloses a technique for performing memory rearrangement at a timing when the processing load does not become a problem.

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0004] In the technique disclosed in Patent Document 1, when the interval between memory rearrangements becomes long, the amount of data increases, and the free capacity within the sector decreases, it becomes inevitable to perform memory rearrangement at an undesirable timing, leading to a problem of an increase in the processing load. The present invention has been made in view of the above circumstances, and an object thereof is to provide a data processing apparatus that can avoid memory rearrangement at an undesirable timing and appropriately avoid an increase in the processing load.

Means for Solving the Problems

[0005] According to the invention described in claim 1, there are provided a storage unit (16) for storing data, a data processing unit (41) for performing data writing and memory reorganization as processing on the data stored in the storage unit, an operating state determination unit (42) for determining the operating state of the vehicle, a writing request determination unit (43) for determining the occurrence of a data writing request, and a free capacity determination unit (44) for comparing and determining the data size of the writing request with the free capacity within a virtual sector in the storage unit. When it is determined by the operating state determination unit that the operating state of the vehicle satisfies a predetermined condition, it is determined by the writing request determination unit that a data writing request has occurred, and it is determined by the free capacity determination unit that there is a free capacity equal to or greater than the data size of the writing request within the virtual sector, the data size of the virtual sector is increased and the data of the writing request is written.

[0006] When it is determined that the operating state of the vehicle satisfies a predetermined condition, it is determined that a data writing request has occurred, and it is determined that there is a free capacity equal to or greater than the data size of the writing request within the virtual sector, the data size of the virtual sector is increased and the data of the writing request is written. By increasing the data size of the virtual sector and writing the data of the writing request, it is possible to avoid memory reorganization even if the free capacity within the sector decreases. Thereby, it is possible to avoid memory reorganization at an undesirable timing and appropriately avoid an increase in processing load.

Brief Description of Drawings

[0007]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

BEST MODE FOR CARRYING OUT THE INVENTION

[0008] Hereinafter, embodiments will be described with reference to the drawings. As shown in FIG. 1, the vehicle system 1 is a system mounted on a vehicle equipped with an engine (not shown), which is an internal combustion engine, for example. The vehicle system 1 includes an ignition switch (IG switch) 2 for starting and stopping the engine of the vehicle, a vehicle state detection unit 3 for detecting the operating state of the vehicle, and a data processing device 4 for processing various data indicating the operating state of the vehicle. The vehicle state detection unit 3 includes, as sensors for detecting the operating state of the vehicle, for example, an engine speed sensor 5, a vehicle speed sensor 6, an acceleration sensor 7, an accelerator sensor 8, a brake sensor 9, and the like.

[0009] The engine speed sensor 5 is a sensor for detecting the engine speed, and outputs a detection signal indicating the detection result to the data processing device 4. The vehicle speed sensor 6 is a sensor for detecting the speed of the vehicle, and outputs a detection signal indicating the detection result to the data processing device 4. The acceleration sensor 7 is a sensor for detecting, for example, the longitudinal acceleration when the vehicle is decelerating or accelerating, and outputs a detection signal indicating the detection result to the data processing device 4. The accelerator sensor 8 is a sensor for detecting that the accelerator pedal has been depressed by the driver and the depression amount, and outputs a detection signal indicating the detection result to the data processing device 4. The brake sensor 9 is a sensor for detecting that the brake pedal has been depressed by the driver and the depression amount, and outputs a detection signal indicating the detection result to the data processing device 4.

[0010] As shown in FIG. 2, the data processing apparatus 4 includes a well-known microcomputer (hereinafter referred to as a microcontroller) 10. The microcontroller 10 includes a CPU 11, a ROM 12, a RAM 13, a flash controller 14, an HSM (Hardware Security Module) 15, a flash memory 16 (corresponding to a storage unit), and an input / output port 17. Power is supplied from a power source 18 to each part of these data processing apparatuses 4.

[0011] Various functions of the data processing apparatus 4 are realized by the CPU 11 executing a program stored in a non-transitory tangible recording medium. In the present embodiment, the ROM 12 corresponds to the non-transitory tangible recording medium. Also, a method corresponding to the program is executed by executing the program. Part or all of the functions executed by the CPU 11 may be configured hardware-wise by one or more ICs or the like.

[0012] The CPU 11 executes flash control software and the like, which are programs stored in the ROM 12, to control the operation of the data processing apparatus 4. Specifically, by executing the flash control software, the CPU 11 controls the reading, writing, and erasing of data with respect to the flash memory 16 via the flash controller 14.

[0013] The RAM 13 is a volatile memory and temporarily stores the calculation results of the CPU 11 and the like. The RAM 13 temporarily stores the data read from the flash memory 16 and the data to be written to the flash memory 16. The input / output port 17 performs signal input / output between the outside of the data processing apparatus 4 and the data processing apparatus 4.

[0014] The flash controller 14 executes each process such as a process of writing data to the flash memory 16 based on a command given from the CPU 11, a process of reading data stored in the flash memory 16, a process of erasing data stored in the flash memory 16, and a process of checking the free capacity of the flash memory 16.

[0015] The flash memory 16 has a storage area for storing data and is a rewritable non-volatile memory. In this case, the flash memory 16 is used as a data flash where data is stored. The storage area of the flash memory 16 has a plurality of blocks which are the data erasure units. That is, the storage area of the flash memory 16 is divided into a plurality of blocks having a predetermined data size. Hereinafter, the block is referred to as a sector.

[0016] The flash memory 16 can write and erase data. The data write unit is, for example, 2 bytes or 4 bytes, while the data erase unit is larger than the data write unit and is, for example, in sector units of several tens of bytes to several KB. Incidentally, in the flash memory 16, the state after data erasure is called blank, and the area that is blank is called a blank area. Since further data writing, that is, overwriting, is impossible in the area where data has already been written (i.e., the used area), data is written to the free capacity. Incidentally, the blank area may also be referred to as a free area, and the area where data has been written may also be referred to as a used area.

[0017] The internal configuration of the flash memory 16 will be described. As shown in FIG. 3, the storage area of the flash memory 16 includes virtual sectors composed of a plurality of physical sectors. That is, a virtual sector is a virtual data aggregate in which a plurality of physical sectors that are erasure units are grouped together. The plurality of physical sectors are classified, for example, as the first physical sector S1, the second physical sector S2, the third physical sector S3, the nth physical sector Sn (n is a natural number). Incidentally, a plurality of virtual sectors are set in the flash memory 16, for example.

[0018] The actual sectors store different types of data or the same type of data. That is, for example, the first actual sector S1 stores data A such as vehicle speed, and the second actual sector S2 stores data B such as engine speed. Also, in the case of the same type of data, for example, data with different detection times is stored. For example, data A1 of the vehicle speed at a certain time is stored, and data A2 of the vehicle speed at a different subsequent time is stored, and so on.

[0019] The data processing device 4 will be functionally described. As shown in FIG. 4, the data processing device 4 includes a data processing unit 41, an operation state determination unit 42, a write request determination unit 43, a free capacity determination unit 44, and a data size determination unit 45.

[0020] The data processing unit 41 performs data writing and memory reorganization as processing on the data stored in the flash memory 16. The operation state determination unit 42 determines, as the operation state of the vehicle, whether it is running, whether it is in OTA (Over-The-Air), and whether it is in memory access by the HSM 15.

[0021] In this case, the data processing device 4 determines whether the vehicle is in motion based on the detection signals output from each of the sensors 5 to 9 of the vehicle state detection unit 3. The data processing device 4 determines whether it is in OTA (Over-The-Air) based on whether the application program stored in the ROM 12 is being updated. The update of the application program includes a series of procedures such as downloading an update program from an OTA center, installing the update program, activating the update program, and verifying the update program. The data processing device 4 determines whether the HSM 15 is accessing the memory based on whether the CPU 11 is outputting a memory access command to the HSM 15. Being in motion, in OTA, or accessing the memory by the HSM 15 corresponds to satisfying a predetermined condition. Being in OTA corresponds to updating software wirelessly. Note that it is also possible to determine whether the vehicle is in motion based on a detection signal output from, for example, an image sensor different from the sensors 5 to 9. Also, a configuration in which a dedicated CPU that outputs a memory access command to the HSM 15 is provided may be used.

[0022] The write request determination unit 43 determines the occurrence of a data write request. The free capacity determination unit 44 determines by comparing the data size of the write request with the free capacity in the virtual sector in the flash memory 16. The data size determination unit 45 determines by comparing the data size of the virtual sector with a reference data size.

[0023] When the operation state determination unit 42 determines that the operation state of the vehicle satisfies a predetermined condition, the write request determination unit 43 determines the occurrence of a data write request, and the free capacity determination unit 44 determines that there is free capacity in the virtual sector equal to or greater than the data size of the write request, the data processing unit 41 increases the data size of the virtual sector and writes the data of the write request. On the other hand, when the operation state determination unit 42 determines that the operation state of the vehicle does not satisfy a predetermined condition and the data size determination unit 45 determines that the data size of the virtual sector exceeds a preset reference data size, the data processing unit 41 performs memory rearrangement.

[0024] The operation of the above-described configuration will be described with reference to FIGS. 5 to 8. When the start condition for data processing is satisfied, the data processing device 4 starts data processing. The start condition for data processing is, for example, that a certain period of time has elapsed. When the data processing device 4 starts data processing, it acquires the operating state of the vehicle (A1) and determines whether or not the acquired operating state of the vehicle satisfies a predetermined condition (A2). That is, the data processing device 4 determines whether or not the vehicle is in motion, whether or not OTA is in progress, and whether or not memory access is being performed by the HSM 15. When the data processing device 4 determines that at least one of the vehicle being in motion, OTA being in progress, or memory access being performed by the HSM 15 is true, it determines that the operating state of the vehicle satisfies the predetermined condition (A2: YES) and determines whether or not a data write request has occurred (A3).

[0025] When the data processing device 4 determines that no data write request has occurred (A3: NO), it ends the data processing and waits for the start condition for the next data processing to be satisfied. On the other hand, when the data processing device 4 determines that a data write request has occurred (A3: YES), it determines whether or not there is free capacity in the virtual sector that is equal to or greater than the data size of the write request (A4). When the data processing device 4 determines that there is free capacity in the virtual sector that is equal to or greater than the data size of the write request (A4: YES), it writes the data of the write request (A5), ends the data processing, and waits for the start condition for the next data processing to be satisfied.

[0026] On the other hand, when the data processing device 4 determines that there is no free capacity in the virtual sector that is equal to or greater than the data size of the write request (A4: NO), it increases the data size of the virtual sector (A6), writes the data of the write request (A5), ends the data processing, and waits for the start condition for the next data processing to be satisfied.

[0027] That is, as shown in FIG. 6, when n is "7" and the data processing device 4 stores data in the first to fourth actual sectors S1 to S4 and uses the fifth to seventh actual sectors S5 to S7 as blank areas, and when the operating state of the vehicle satisfies a predetermined condition, a data write request occurs, and it is determined that there is free capacity in the virtual sector that is equal to or greater than the data size of the write request, the data of the write request is written without increasing the data size of the virtual sector. Thereafter, as shown in FIG. 7, when the data processing device 4 stores data in the first to seventh actual sectors S1 to S7, and when the operating state of the vehicle satisfies a predetermined condition, a data write request occurs, and it is determined that there is no free capacity in the virtual sector that is equal to or greater than the data size of the write request, the data size of the virtual sector is increased and the data of the write request is written. FIG. 7 illustrates an example in which the eleventh to seventeenth actual sectors S11 to S17 are increased.

[0028] On the other hand, when the data processing device 4 determines that the vehicle is not running, not in OTA, and not accessing the memory by the HSM 15, it determines that the operating state of the vehicle does not satisfy the predetermined condition (A2: NO), and determines whether the data size of the virtual sector exceeds the reference data size (A7). When the data processing device 4 determines that the data size of the virtual sector does not exceed the reference data size (A7: NO), it ends the data processing and waits for the start condition of the next data processing to be satisfied.

[0029] On the other hand, when the data processing device 4 determines that the data size of the virtual sector exceeds the reference data size (A7: YES), it performs memory reorganization (A8). The data processing device 4 acquires the data size after reorganization (A9), determines the data size of the virtual sector after reorganization (A10), ends the data processing, and waits for the start condition of the next data processing to be satisfied.

[0030] That is, as shown in FIG. 8, when the data processing device 4 determines that the operating state of the vehicle does not satisfy a predetermined condition and the data size of the virtual sector exceeds the reference data size from the state where the data size of the virtual sector is increasing, it performs memory rearrangement.

[0031] As described above, according to this embodiment, the following operational effects can be obtained. In the data processing device 4, when it is determined that the operating state of the vehicle satisfies a predetermined condition, it is determined that a data write request has occurred, and when it is determined that there is a free capacity in the virtual sector that is equal to or greater than the data size of the write request, the data size of the virtual sector is increased and the data of the write request is written. By increasing the data size of the virtual sector and writing the data of the write request, it is possible to avoid memory rearrangement even if the free capacity in the sector decreases. Thereby, it is possible to avoid memory rearrangement at an undesirable timing and appropriately avoid an increase in the processing load.

[0032] It is determined whether the vehicle is in a running state as the operating state of the vehicle. When it is determined that the vehicle is in a running state, it is determined that a data write request has occurred, and when it is determined that there is a free capacity in the virtual sector that is equal to or greater than the data size of the write request, the data size of the virtual sector is increased and the data of the write request is written. It is possible to avoid memory rearrangement during running.

[0033] It is determined whether the vehicle is in an OTA state as the operating state of the vehicle. When it is determined that the vehicle is in an OTA state, it is determined that a data write request has occurred, and when it is determined that there is a free capacity in the virtual sector that is equal to or greater than the data size of the write request, the data size of the virtual sector is increased and the data of the write request is written. It is possible to avoid memory rearrangement during OTA.

[0034] Determine whether or not it is during memory access by HSM15 as the operating state of the vehicle. If it is determined that it is during memory access by HSM15, determine the occurrence of a data write request. If it is determined that there is free capacity equal to or greater than the data size of the write request within the virtual sector, increase the data size of the virtual sector and perform the write of the data of the write request. It is possible to avoid memory reorganization during memory access by HSM15.

[0035] If it is determined that the operating state of the vehicle does not satisfy a predetermined condition and it is determined that the data size of the virtual sector exceeds the reference data size, perform memory reorganization. Memory reorganization can be performed at a timing when the vehicle is not running, not during OTA, and not during memory access by HSM15.

[0036] Although the present disclosure has been described in accordance with the embodiments, it is understood that the present disclosure is not limited to such embodiments or structures. The present disclosure also includes various modifications and modifications within an equivalent range. In addition, various combinations and forms, and further other combinations and forms including only one, more than one, or less than one element thereof, fall within the scope and spirit of the present disclosure.

[0037] The control unit and its method described in the present disclosure may be realized by a dedicated computer configured by a processor and a memory programmed to execute one or more functions embodied by a computer program. Alternatively, the control unit and its method described in the present disclosure may be realized by a dedicated computer provided by configuring a processor with one or more dedicated hardware logic circuits. Or, the control unit and its method described in the present disclosure may be realized by one or more dedicated computers configured by a combination of a processor programmed to execute one or more functions and a memory and a processor configured by one or more hardware logic circuits. Also, the computer program may be stored in a computer-readable non-transitory tangible recording medium as instructions to be executed by a computer.

Explanation of Symbols

[0038] In the drawings, 1 is a vehicle system, 4 is a data processing device, 16 is a flash memory (storage unit), 41 is a data processing unit, 42 is an operating state determination unit, 43 is a write request determination unit, 44 is a free capacity determination unit, and 45 is a data size determination unit.

Claims

1. A storage unit (16) for storing data; A data processing unit (41) that performs data writing and memory reorganization as processing on the data stored in the storage unit; An operation state determination unit (42) for determining the operation state of the vehicle; A write request determination unit (43) for determining the occurrence of a data write request; A free capacity determination unit (44) that compares and determines the data size of the write request and the free capacity in the virtual sector in the storage unit, and includes: The data processing unit is a data processing device that increases the data size of the virtual sector and writes the data of the write request when it is determined by the operation state determination unit that the operation state of the vehicle satisfies a predetermined condition, it is determined by the write request determination unit that a data write request has occurred, and it is determined by the free capacity determination unit that there is a free capacity in the virtual sector that is equal to or greater than the data size of the write request.

2. The operation state determination unit determines whether the vehicle is in a running state as the operation state of the vehicle; The data processing unit according to claim 1, wherein when it is determined by the operation state determination unit that the vehicle is in a running state, it is determined by the write request determination unit that a data write request has occurred, and it is determined by the free capacity determination unit that there is a free capacity in the virtual sector that is equal to or greater than the data size of the write request, the data size of the virtual sector is increased and the data of the write request is written.

3. The operation state determination unit determines whether the vehicle is in a state of software update by wireless as the operation state of the vehicle; The data processing unit according to claim 1, wherein when it is determined by the operation state determination unit that the vehicle is in a state of software update by wireless, it is determined by the write request determination unit that a data write request has occurred, and it is determined by the free capacity determination unit that there is a free capacity in the virtual sector that is equal to or greater than the data size of the write request, the data size of the virtual sector is increased and the data of the write request is written.

4. The operation state determination unit determines whether the vehicle is in a state of memory access by a hardware security module as the operation state of the vehicle; The data processing unit according to claim 1, wherein when the operation state determination unit determines that the memory access is being performed by the hardware security module, the write request determination unit determines the occurrence of a data write request, and the free capacity determination unit determines that there is a free capacity equal to or greater than the data size of the write request within the virtual sector, the data size of the virtual sector is increased to perform the write of the data of the write request.

5. The data processing apparatus according to any one of claims 1 to 4, wherein the data processing unit is capable of performing memory reorganization when the operation state determination unit determines that the operation state of the vehicle does not satisfy a predetermined condition.

6. A data size determination unit (45) that compares and determines the data size of the virtual sector with a reference data size; The data processing apparatus according to claim 5, wherein the data processing unit performs memory reorganization when the data size determination unit determines that the data size of the virtual sector exceeds the reference data size.

Citation Information

Patent Citations

  • Data processor

    JP2021060792A