Information processing device
By integrating data from multiple applications into a single write operation, the information processing apparatus reduces the frequency of write operations to NAND flash memory, enhancing data integrity and storage efficiency.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- TOYOTA JIDOSHA KK
- Filing Date
- 2023-08-23
- Publication Date
- 2026-07-22
Smart Images

Figure 0007893201000001 
Figure 0007893201000002 
Figure 0007893201000003
Abstract
Description
Technical Field
[0001] The present invention relates to an information processing apparatus.
Background Art
[0002] In recent years, NAND flash memories have been widely used as storage devices such as USB (Universal Serial Bus) memories, SD (Secure Digital) cards, and flash SSDs (Solid State Drives). Patent Document 1 describes a technique for merging data to be written before writing the data in order to efficiently use the storage area of a cache memory used for the write process to a NAND flash memory.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] By the way, there is an upper limit to the number of write operations of a NAND flash memory. Therefore, in an information processing apparatus including a NAND flash memory, it is preferable to reduce the frequency of writing data to the memory.
Means for Solving the Problems
[0005] The information processing apparatus that achieves the above object is an information processing apparatus that is mounted on a vehicle and manages a storage device that can be rewritten in cell units, and from each of a plurality of applications executed in the vehicle , defined as the timing at which the power switch of the aforementioned vehicle is turned off. collects data at a collection timing, and integrates the collected plurality of the data into one integrated data, Following the generation of the aforementioned integrated dataExecuting a first command which is a command requesting the writing of the integrated data to the storage device, After executing the first command, without waiting for the next write operation to be performed in accordance with the first command, The process involves executing a second command, which is a command that immediately writes the integrated data based on the first command to the storage device, and then executing the second command. [Effects of the Invention]
[0006] According to the present invention, the frequency of writing data to a storage device can be reduced. [Brief explanation of the drawing]
[0007] [Figure 1] Figure 1 is a diagram used to explain a vehicle equipped with an information processing device. [Figure 2] Figure 2 is a flowchart used to explain the writing process. [Figure 3] Figure 3 is a flowchart used to explain the read process. [Modes for carrying out the invention]
[0008] <Embodiment> An embodiment of the information processing device will be described below with reference to Figures 1 to 3. <Overall configuration of Vehicle 1> As shown in Figure 1, the vehicle 1 includes, for example, an information processing device 10 and a power supply device 20 that supplies power to the information processing device 10. The information processing device 10 is a computer that includes, for example, a CPU (Central Processing Unit) 11, a ROM (Read Only Memory) 12, a RAM (Random Access Memory) 13, and a storage device 14. The various components of the information processing device 10 can communicate with each other via an internal bus 15.
[0009] ROM 12 stores multiple programs that are executed in vehicle 1. The information processing device 10 implements various functions by having the CPU 11 execute each program. The "functions" referred to here include functions related to the driving of vehicle 1 and functions for automatically updating the firmware of vehicle 1. Hereinafter, it is assumed that ROM 12 has pre-stored a program that implements an integrated application 120 that implements the data integration function, a program that implements an application 121A that implements the first function, a program that implements an application 121B that implements the second function, and a program that implements an application 121C that implements the third function. Note that the programs stored in ROM 12 are examples and are not limited to these. In the following explanation, when applications 121A, 121B, and 121C are not distinguished from each other, they will simply be referred to as application 121.
[0010] The storage device 14 is capable of storing various programs and various types of data. The storage device 14 is a non-volatile memory in which data can be electrically rewritten on a cell-by-cell basis. Specifically, the storage device 14 is implemented using NAND flash memory. Therefore, the storage device 14 has a limit on the number of write cycles. The number of write cycles to the storage device 14 corresponds to the number of times some kind of data has been written to the same memory cell. Therefore, "writing" includes not only writing information to an empty memory cell, but also overwriting the contents of a memory cell that already has information written to it.
[0011] The power supply unit 20 supplies power to various devices installed in the vehicle 1. Two power supply modes are available from the power supply unit 20: a constant power mode and an auxiliary power mode. For example, when the vehicle is stopped and no user is near the vehicle 1, the constant power mode is selected as the supply mode. On the other hand, when the constant power mode is selected and a user approaches the vehicle 1, the supply mode is changed from the constant power mode to the auxiliary power mode.
[0012] The constant power mode is a mode in which power is supplied to some in-vehicle devices even when the power to vehicle 1 is turned off. When constant power mode is selected as the supply mode, power is supplied from the power supply unit 20 to the information processing device 10 and the security device of vehicle 1. On the other hand, when auxiliary power mode is selected as the supply mode, the number of in-vehicle devices to which power is supplied from the power supply unit 20 increases compared to when constant power mode is selected as the supply mode. Here, "in-vehicle devices" includes both electronic control devices such as the information processing device 10 and in-vehicle actuators.
[0013] <About Integrated Application 120: Write Process> The following describes the writing process of the integrated application 120. The integrated application 120 collects data to be written from each of the multiple programs executed by the CPU 11 at the collection timing. In this example, the multiple programs are application 121A, application 121B, and application 121C.
[0014] Here, generally, data used in each application 121 implemented in vehicle 1 that is of high importance in controlling vehicle 1 is required to be appropriately stored in the storage device 14 at the collection timing. Examples of high-priority data include total mileage information, power management information, storage-related metadata, and diagnostic information. Note that high-priority data is just an example and is not limited to these. The collection timing is, for example, the timing when the power switch of vehicle 1 is turned off. An example of a power switch is the ignition switch.
[0015] The integrated application 120 integrates data collected from multiple applications 121A to 121C into a single integrated data at the time of collection. The integrated application 120 then executes a first command on the integrated data. The first command is a command that requests the writing of specified data to the storage device 14.
[0016] When the first command is executed, the specified data is written to the storage device 14. However, the timing of data writing is not strictly immediate, but is performed at predetermined intervals. Therefore, after a write operation is performed at a predetermined interval, one or more data specified by the first command will be written to the storage device 14 at the next write operation. Consequently, if various factors occur between the time the first command is executed and the time the write operation is actually performed, such as a momentary interruption of the power supply 20 or an impact to the vehicle 1, the data specified by the first command may not be written to the storage device 14.
[0017] Therefore, the integrated application 120 executes the first command, and then the second command. The second command is a command that immediately executes the writing of the specified data to the storage device 14, which is performed as a result of the execution of the first command.
[0018] <About Integrated Application 120: Read Processing> The read process of the integrated application 120 will be described below. Generally, data with high importance is required to be appropriately read from the storage device 14 at the read timing. The read timing is, for example, the timing when the power switch of the vehicle 1 is turned on. The integrated application 120 reads integrated data from the storage device 14 at the read timing. For each piece of data included in the read integrated data, the integrated application 120 outputs it to the corresponding program. For example, each piece of data collected from each application 121 includes identification information that can identify the corresponding application 121. Based on the identification information in each piece of data included in the integrated data, the integrated application 120 identifies the corresponding application 121 and outputs the data to the identified application 121.
[0019] <Regarding the write confirmation flag> The write confirmation flag will be described below. As described above, the write process to the storage device 14 is executed by the first command and the second command. As described above, due to various factors such as momentary power interruption of the power supply device 20 or impact on the vehicle 1, the write process may fail. The integrated application 120 stores a write confirmation flag indicating whether the write process has succeeded in the storage device 14. Then, based on the write confirmation flag, the integrated application 120 manages the information stored in the storage device 14.
[0020] At the collection timing, the integrated application 120 turns off the write confirmation flag. After executing the second command at the collection timing, the integrated application 120 obtains a return value indicating the execution result of the second command. The return value of the second command indicates whether the write process to the storage device 14 has succeeded. If the obtained return value indicates that the write process to the storage device 14 has failed, the integrated application 120 does not update the write confirmation flag and leaves it off. On the other hand, if the obtained return value indicates that the write process to the storage device 14 has succeeded, the integrated application 120 updates the write confirmation flag to ON and stores it in the storage device 14. By this process, the write confirmation flag represents the execution result of the second command.
[0021] <Regarding the first state information and the second state information> Hereinafter, the first state information and the second state information will be described. As described above, the data write process to the storage device 14 may fail. It is preferable that all the data stored in the storage device 14 is unified to the data before the write process rather than being in an inappropriate state where part of the data remains the data before the write process and part of the data is updated to the data after the write process due to the failure. That is, it is preferable that the atomicity of the data stored in the storage device 14 is maintained.
[0022] Along with this, the storage device 14 stores two pieces of information, namely, the first state information which is the data before the execution of the second command and the second state information which is the data after the execution of the second command. Specifically, when the integrated application 120 executes the second command, it stores the integrated data as the second state information in the storage device 14. At that time, if the write process of the second state information fails, the integrated application 120 does not update the first state information and leaves it as it is. On the other hand, if the write process of the second state information succeeds, the integrated application 120 updates the content of the first state information with the second state information.
[0023] The integrated application 120 obtains a write confirmation flag from the storage device 14 at the read timing. Based on the obtained write confirmation flag, the integrated application 120 determines whether the write operation was successful at the previous collection timing. If the write confirmation flag is OFF, the integrated application 120 reads the first state information because the integrated data as the second state information may be in an inappropriate state. That is, the integrated application 120 reads the integrated data that was stored in the storage device 14 before the execution of the previous write operation. On the other hand, if the write confirmation flag is ON, the integrated application 120 reads the second state information, assuming that the integrated data as the second state information has been stored properly.
[0024] <Writing process of information processing device 10> As shown in Figure 2, the integrated application 120 determines whether or not it is time to collect data (step S100). If the integrated application 120 determines that it is not time to collect data (step S100: NO), it repeats the determination process in step S100 until it becomes time to collect data. If the integrated application 120 determines that it is time to collect data (step S100: YES), it updates the write confirmation flag to OFF (step S102). Next, the integrated application 120 collects data from each application 121 (step S104). Next, the integrated application 120 integrates the collected data into a single integrated data (step S106).
[0025] Next, the integrated application 120 executes a first command on the integrated data (step S108). Next, the integrated application 120 executes a second command (step S110). Next, the integrated application 120 obtains a return value indicating the result of executing the second command (step S112). Next, the integrated application 120 determines whether the data writing process to the storage device 14 was successful or not based on the obtained return value (step S114). If the integrated application 120 determines that the writing process failed (step S114; NO), it leaves the write confirmation flag OFF without updating it and terminates the series of processes. If the integrated application 120 determines that the writing process was successful (step S114; YES), it updates the write confirmation flag to ON (step S116). Next, the integrated application 120 updates the contents of the first state information with the second state information (step S118).
[0026] <Writing process of information processing device 10> As shown in Figure 3, the integrated application 120 determines whether or not it is a read timing (step S200). If the integrated application 120 determines that it is not a read timing (step S200: NO), it repeats the determination process in step S200 until it becomes a read timing. If the integrated application 120 determines that it is a read timing (step S200: YES), it determines whether or not the write confirmation flag obtained from the storage device 14 is ON (step S202).
[0027] If the write confirmation flag is ON (step S202; YES), the integrated application 120 reads out the second state information (step S204) for the integrated data as second state information, assuming that the write process has been performed correctly. If the write confirmation flag is OFF (step S202; NO), the integrated application 120 reads out the first state information (step S206) because the integrated data as second state information may be in an inappropriate state. The integrated application 120 provides each piece of data contained in the read integrated data to the corresponding application 121 (step S208).
[0028] <Effects and Effects of the Embodiment> According to the above embodiment, the following actions and effects can be obtained. (1) The information processing device 10 is mounted on the vehicle 1 and manages a storage device 14 that can be rewritten on a cell-by-cell basis. The CPU 11 of the information processing device 10 executes an integrated application 120. The integrated application 120 collects data from each of the multiple applications 121 that run on the vehicle 1 at the collection timing. The integrated application 120 integrates the multiple collected data into integrated data. The integrated application 120 requests the writing of the integrated data to the storage device 14 by executing a first command. The integrated application 120 immediately executes the writing of the integrated data to the storage device 14 based on the first command by executing a second command.
[0029] In this case, if the integrated application 120 does not integrate the data of each application 121, each application 121 will perform its own data writing process to the storage device 14 at the time of data collection. This example describes the case where three applications 121 are implemented in the information processing device 10, but the more functions there are, the more frequently the data writing process to the storage device 14 will occur at the time of data collection. Therefore, if the data is not integrated, it is not possible to suppress the increase in the number of write operations.
[0030] In contrast, the integration application 120 combines multiple data into a single integrated data. Then, at the time of data collection, only one of the integrated data combined by the integration application 120 is written to the storage device 14. As a result, the information processing device 10 can reduce the frequency of data writing to the storage device 14, which is a NAND flash memory.
[0031] Furthermore, as mentioned above, the storage device 14 is a non-volatile memory in which data can be electrically rewritten on a cell-by-cell basis. Here, if the amount of data written to a cell is sufficiently smaller than the storage capacity of the cell, the storage capacity of the cell will be surplus. If the integrated application 120 does not integrate the data of each application 121, each application 121 will perform the data writing process to each cell of the storage device 14 at the time of collection. In this case, the storage device 14 is more likely to have surplus storage capacity in its cells compared to when integrated data is stored.
[0032] With this configuration, the information processing device 10 can efficiently utilize the storage area of the cells of the storage device 14 by storing integrated data, which is a compilation of data from multiple applications 121, in its cells.
[0033] (2) The data collection timing includes the timing when the power switch of vehicle 1 is turned off. Generally, the application 121 implemented in the information processing device 10 executes the process of writing data to the storage device 14 when the power switch is turned off. With this configuration, the information processing device 10 can suppress an increase in the number of times data is written to the storage device 14 at the timing when the write process is generally performed.
[0034] (3) The integrated application 120 reads the integrated data from the storage device 14 at the read timing. Based on the integrated data, the integrated application 120 provides data to each of the multiple applications 121. The read timing also includes the timing when the power switch is turned on.
[0035] Generally, applications 121 implemented in the information processing device 10 execute a process to read data from the storage device 14 when the power switch is turned on. At this time, if each application 121 performs a data reading process, the waiting time for the reading process may become long.
[0036] With this configuration, the information processing device 10 can efficiently perform read operations at the timing when read operations are typically performed, by reading the integrated data from the storage device 14 all at once.
[0037] (4) The storage device 14 stores first state information indicating the state of the storage device 14 before the execution of the second command, and second state information indicating the state of the storage device 14 after the execution of the second command. When the integrated application 120 reads integrated data from the storage device 14, it obtains a write confirmation flag. If the write confirmation flag indicates success of the second command, the integrated application 120 reads the second state information. If the write confirmation flag indicates failure of the second command, the integrated application 120 reads the first state information. With this configuration, the information processing device 10 can maintain the atomicity of the data stored in the storage device 14 even if the write operation fails.
[0038] Each of the above embodiments may be modified as follows. Furthermore, the above embodiments and the following alternative examples may be combined with each other to the extent that they do not contradict the technical standards. • The above description assumes that the data acquisition timing is when the power switch is turned off and the data reading timing is when the power switch is turned on, but this is not the only case. The data acquisition timing and data reading timing may be at other times.
[0039] As described above, the power supply unit 20 has two power supply modes: a constant power mode and an auxiliary power mode. When a user approaches the vicinity of the vehicle 1, the power supply unit 20 switches from the constant power mode to the auxiliary power mode, and when the user moves away from the vicinity of the vehicle 1, it switches back from the auxiliary power mode to the constant power mode.
[0040] The data collection timing may be the timing when switching from auxiliary power mode to constant power mode, or the timing when switching from constant power mode to auxiliary power mode. Generally, the application 121 implemented in the information processing device 10 executes a process to write data to the storage device 14 when the voltage supply source is changed. With this configuration, the information processing device 10 can suppress an increase in the number of times data is written to the storage device 14 at the timing when write operations are generally performed.
[0041] In vehicles where the power supply unit 20 provides both a constant power mode and an auxiliary power mode, it is not necessary to have a physical power switch such as an ignition switch.
[0042] The vehicle may not be one in which an auxiliary power supply mode is provided as a power supply mode from the power supply unit 20. • The above description explains the case where vehicle 1 is equipped with one information processing device 10, but it is not limited to this. Vehicle 1 may be equipped with multiple information processing devices 10. In this case, the multiple information processing devices 10 are connected by in-vehicle communication such as CAN (Controller Area Network), LIN (Local Interconnect Network), or FlexRay. The integrated application 120 collects data from applications 121 implemented in other information processing devices 10 via in-vehicle communication and writes the collected data to the storage device 14 as integrated data.
[0043] • At the time of collection, the data collected by the integrated application 120 may include not only high-priority data but also other data. The applications 121 other than the integrated application 120 stored in ROM 12 may be two, four or more, if there are multiple applications 121. [Explanation of symbols]
[0044] 1...Vehicle, 10...Information processing unit, 11...CPU, 12...ROM, 13...RAM, 14...Storage device, 15...Internal bus, 20...Power supply unit, 120...Integrated application, 121, 121A, 121B, 121C...Applications.
Claims
1. An information processing device that is mounted on a vehicle and manages a storage device that can be rewritten on a cell-by-cell basis, The collection of data from each of the multiple applications running on the vehicle at a collection timing determined to be the timing when the vehicle's power switch is turned off, The process involves integrating the multiple aforementioned data sets into a single unified data set, The process involves executing a first command, which is a command that requests the writing of the integrated data to the storage device, following the generation of the integrated data. After executing the first command, without waiting for the next write process to be performed in response to the first command, execute a second command which is a command that immediately executes the writing of the integrated data based on the first command to the storage device, Information processing device.
2. At the read timing, the integrated data is read from the storage device, Based on the integrated data, the data is provided to each of the multiple applications, and the following is performed: The information processing apparatus according to claim 1.
3. The storage device stores first state information indicating the state of the storage device before the execution of the second command, and second state information indicating the state of the storage device after the execution of the second command. When reading the integrated data from the storage device, the execution result of the second command is obtained, If the execution result indicates success of the second command, the second state information is read; if the execution result indicates failure of the second command, the first state information is read. The information processing apparatus according to claim 1.