Control device, vehicle, control method, and control program

The control device and method enhance compatibility with design changes in object-oriented vehicle systems by backing up and generating objects with associated IDs, ensuring consistent and usable backup data.

JP7718997B2Active Publication Date: 2025-08-05TOYOTA JIDOSHA KK +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2022005930
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-01-18
Publication Date
2025-08-05
Estimated Expiration
2042-01-18

AI Technical Summary

Technical Problem

Existing object-oriented vehicle control systems face compatibility issues when there are design changes in storage medium types or class structures, leading to unusable backup data due to data inconsistency.

Method used

A control device and method that backs up and generates objects by associating elements with IDs, storing them in key-value storage, allowing for compatibility with design changes by reading and generating objects based on these IDs during startup.

Benefits of technology

Improves compatibility with design changes in class structures related to storage areas by ensuring data consistency and usability of backup data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007718997000001
    Figure 0007718997000001
  • Figure 0007718997000002
    Figure 0007718997000002
  • Figure 0007718997000003
    Figure 0007718997000003
Patent Text Reader

Abstract

To provide a control device and a control program capable of improving compatibility with a design change in a class structure related to a storage area.SOLUTION: A control device which operates when a processor executes an object-oriented program backs up each of first combinations of respective elements of a first object defining a class structure related to an application program, and each of second combinations of respective elements of a second object defining a class structure related to a storage area to be used by the application program to a storage unit, reads each of the first combinations from the storage unit to generate the first object about the first object in the case of requiring the generation of an object when the program is started, and reads each of the second combinations from the storage unit to generate the second object about the second object.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to a control device, a vehicle, a control method, and a control program. [Background technology]

[0002] Patent Document 1 discloses an object-oriented vehicle control system that can minimize the impact on applications and data even when the design of a storage medium is changed. This technology discloses that a method for converting data into persistence-compatible data, which is the storage format of the data, is incorporated into a persistence-compatible data conversion processing class.

[0003] Patent Document 2 discloses a technique for accurately calculating the size of a heap area that is actually used when an application is executed. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] Japanese Patent Application Laid-Open No. 2008-077220 [Patent Document 2] Japanese Patent Application Laid-Open No. 2016-134057 Summary of the Invention [Problem to be solved by the invention]

[0005] In the prior art of Patent Document 1, it is assumed that if there is a design change in the storage medium type, the medium / data type correspondence referenced in the persistence management class will be modified.In the prior art of Patent Document 2, when an object is created in the heap area in response to the execution of an application, object identification information that identifies the object is associated with the identification information of the application and registered in the load object management information.

[0006] However, in the prior art, if a change in class structure occurs due to a design change, for example, compatibility cannot be ensured when restoring the backup, and it is expected that the backup data cannot be used.

[0007] An object of the present disclosure is to provide a control device and a control program that can improve compatibility with design changes to class structures related to storage areas. [Means for solving the problem]

[0008] The control device described in claim 1 is a control device that operates when a processor executes an object-oriented program, wherein the processor backs up each of the first combinations in which each element of a first object, for which a class structure related to an application program is defined, corresponds to a first ID, in a memory unit, and backs up each of the second combinations in which each element of a second object, for which a class structure related to a memory area used by the application program is defined, corresponds to a second ID, in the memory unit, and when it becomes necessary to generate an object when the program is started, the processor reads each of the first combinations from the memory unit to generate the first object for the first object, and reads each of the second combinations from the memory unit to generate the second object for the second object.

[0009] The control device described in claim 1 backs up each combination of elements of the first and second objects associated with their respective IDs, and reads them out to generate an object when it becomes necessary to generate the object. This improves compatibility with design changes to the class structure related to the storage area.

[0010] The control device of claim 2 is the control device of claim 1, wherein the processor can associate, for each of the first combinations, elements required for generating the first object with the first ID, and, for each of the second combinations, associate elements required for generating the second object with the second ID.

[0011] According to the control device of claim 2, only necessary elements are backed up, and compatibility with design changes of class structures related to storage areas can be improved.

[0012] The control device described in claim 3 is a control device described in claim 1 or claim 2, wherein the first object can be a user object relating to a user that indicates an application in the object-oriented system, and the second object can be a directory object relating to a directory of a storage area used by the user in the object-oriented system.

[0013] According to the control device of claim 3, it is possible to improve the compatibility of user objects and directory objects in the object-oriented approach.

[0014] The control device according to claim 4 is the control device according to any one of claims 1 to 3, wherein the processor can perform the backup when the first object or the second object is updated.

[0015] According to the control device of claim 4, when an object is updated, it is possible to back up necessary elements.

[0016] The control device described in claim 5 is a control device of any one of claims 1 to 4, wherein the processor determines whether it is necessary to generate the object based on whether the class structure of the first object or the second object has been updated, and determines that it is necessary if it has been updated, and determines that it is not necessary if it has not been updated.

[0017] According to the control device of claim 5, when the class structure is updated, necessary elements can be read out and an object can be generated.

[0018] A vehicle according to a sixth aspect of the present invention is a vehicle equipped with the control device according to any one of the first to fifth aspects of the present invention.

[0019] The control method described in claim 7 is a control method that operates when a processor executes an object-oriented program, wherein the processor backs up in a memory unit each of first combinations in which each element of a first object, for which a class structure related to an application program is defined, corresponds to a first ID, and backs up in the memory unit each of second combinations in which each element of a second object, for which a class structure related to a memory area used by the application program is defined, corresponds to a second ID, and when it becomes necessary to generate an object when the program is started, the computer executes the following processing: for the first object, each of the first combinations is read from the memory unit to generate the first object, and for the second object, each of the second combinations is read from the memory unit to generate the second object.

[0020] The control program described in claim 8 is an object-oriented control program executed by a processor, wherein the processor causes a computer to execute the following process: backing up each first combination in a memory unit, in which each element of a first object, in which a class structure related to an application program is defined, is associated with a first ID; backing up each second combination in the memory unit, in which each element of a second object, in which a class structure related to a storage area used by the application program is defined, is associated with a second ID; and when it becomes necessary to generate an object when the control program is started, reading each of the first combinations from the memory unit for the first object to generate the first object, and reading each of the second combinations from the memory unit for the second object to generate the second object. [Effects of the Invention]

[0021] According to the technology of the present disclosure, it is possible to improve compatibility with design changes of class structures related to storage areas. [Brief explanation of the drawings]

[0022] [Figure 1] 1 is a diagram showing a schematic configuration of a vehicle according to an embodiment; [Figure 2] 1 is a block diagram showing a hardware configuration of a vehicle according to an embodiment; [Figure 3] FIG. 2 is a block diagram showing a functional configuration of a central ECU according to the embodiment. [Figure 4] FIG. 10 is a diagram illustrating an example of combinations that are backed up in a key-value storage. [Figure 5] 10 is a flowchart of the entire control process including the backup process and the object generation process. [Figure 6] 10 is a flowchart showing the flow of a backup process. [Figure 7] 10 is a flowchart showing the flow of an object generation process. DETAILED DESCRIPTION OF THE INVENTION

[0023] An outline of an embodiment of the present invention will be described below: In this embodiment, a storage coordinator (hereinafter referred to as storage code) written in an object-oriented program is used.

[0024] A storage code is a coordinator installed in an ECU that acts as an intermediary between the application programs executed by the user and storage areas. Storage code provides functions such as improving utilization efficiency by varying storage area usage, preventing specific applications from monopolizing the storage, and managing access levels. As a premise, with storage code, internal data is initialized when the vehicle's power is turned off, so data must be backed up to external storage called key-value storage. Key-value storage is a storage that associates and stores keys and values in an object-oriented manner.

[0025] The data that needs to be backed up by storage code is user information and directory information. User information is information such as which user (application) is currently using storage space. Directory information is information such as how much storage space a user is using. In object-oriented programming, objects are treated as entities that bundle data and functions. Objects include user objects related to user information and directory objects related to directory information. A class structure related to an application program is defined for a user object. The class structure related to an application program is the structure of elements treated as a user class. A class structure related to a storage area used by an application program is defined for a directory object. The class structure related to a storage area is the structure of elements treated as a directory class. A user object is an example of a "first object" in the technology of the present disclosure. A directory object is an example of a "second object" in the technology of the present disclosure.

[0026] In the old object-oriented backup method, user objects and directory objects were backed up as binary data in key-value storage in order to improve the efficiency of reading backup data. However, this old design could not handle changes to the user class or directory class structure when software was updated. This is because if some class structure changes due to updates such as changing, adding, or deleting object elements, the binary data cannot be used even if it is read as is. Therefore, if a situation arises in which the storage code is looking for a new user object after an update, but the user object read from the backup data still has the old requirements, the backup data becomes unusable due to data inconsistency.

[0027] Therefore, in this embodiment, rather than storing objects directly in key-value storage, the information required to generate the object is linked to an ID and stored as a combination of objects one by one. When reading backup data, the object is generated and restored based on the information read. For example, for a user object, elements such as "user_name" are stored in association with "user_id." This makes it possible to handle changes in the object class structure due to software updates.

[0028] 1, in the embodiment of the present invention, a central ECU 20 is mounted on a vehicle 12. The central ECU 20 is an example of the "control device" of the technology of the present disclosure.

[0029] (vehicle) As shown in FIG. 2, the vehicle 12 according to this embodiment includes a central ECU (Electronic Control Unit) 20, an ADAS-ECU 22, and an in-vehicle device 24.

[0030] The central ECU 20 includes a central processing unit (CPU) 20A, a read-only memory (ROM) 20B, a random access memory (RAM) 20C, an in-vehicle communication interface (I / F) 20D, and a wireless communication I / F 20G. The CPU 20A, the ROM 20B, the RAM 20C, the in-vehicle communication I / F 20D, the shared storage 20E, the key-value storage 20F, and the wireless communication I / F 20G are connected to each other via an internal bus 20H so as to be able to communicate with each other. The CPU 20A may be composed of multiple CPUs. The key-value storage 20F is an example of a "storage unit" of the technology disclosed herein.

[0031] The CPU 20A is a central processing unit that executes various programs and controls each part. That is, the CPU 20A reads out a program from the ROM 20B and executes the program using the RAM 20C as a work area.

[0032] The ROM 20B stores various programs and various data. In this embodiment, the ROM 20B stores an execution program 40 that utilizes the functions of various application programs of the vehicle 12. The ROM 20B also stores a storage code 50. The storage code 50 is a program that functions as a coordinator that mediates the use of the shared storage 20E by the execution program 40, and is written as an object-oriented program. The storage code 50 is an example of a "control program" of the technology of the present disclosure. The RAM 20C temporarily stores programs or data as a working area. The internal data of the storage code 50 is held in the RAM 20C.

[0033] The in-vehicle communication I / F 20D is an interface for connecting to the ADAS-ECU 22 and the in-vehicle device 24. The interface uses a communication standard based on the CAN protocol. The in-vehicle communication I / F 20D is connected to the external bus 20H.

[0034] The shared storage 20E is a storage area in which data of various applications executed by the execution program 40 or the like is stored through the mediation of the storage code 50. The shared storage 20E is set so that access is permitted only via the storage code 50. The key-value storage 20F is a storage area that stores the IDs (keys) and elements (values) of user objects and directory objects handled in the storage code 50 in association with each other.

[0035] The wireless communication I / F 20G is a wireless communication module for communicating with an external server. The wireless communication module uses communication standards such as 5G, LTE, and Wi-Fi (registered trademark). The wireless communication I / F 20E is connected to a network N.

[0036] Although not shown for the sake of convenience, the central ECU 20 has functions for steering control, braking control, engine control, and control of information systems such as a car navigation system and audio.

[0037] The ADAS-ECU 22 performs overall control of the advanced driving assistance system. A vehicle speed sensor 25 and a yaw rate sensor 26, which constitute the in-vehicle device 24, are connected to the ADAS-ECU 22.

[0038] In addition, the in-vehicle device 24 includes a steering angle sensor, a brake actuator, a throttle actuator, and other sensors as devices necessary to realize the functions of the central ECU 20.

[0039] 3, in the central ECU 20 of this embodiment, the CPU 20A executes the storage code 50, thereby functioning as a backup processing unit 200 and a generation unit 202. Note that a detailed description of the function of intermediating between the application of the storage code 50 and the shared storage 20E will be omitted here.

[0040] The backup processing unit 200 associates elements required for object generation with IDs and backs up the combination information to the key-value storage 20F. The association between elements and IDs is backed up for each user object and directory object. The backup processing unit 200 backs up elements of the user object required for object generation and the user ID as a combination of user information to the key-value storage 20F. The backup processing unit 200 backs up elements of the directory object required for object generation and the directory ID as a combination of directory information to the key-value storage 20F. The combination of user information is an example of a "first combination" of the technology disclosed herein, and the combination of directory information is an example of a "second combination" of the technology disclosed herein.

[0041] FIG. 4 is a diagram showing an example of a combination backed up to the key-value storage 20F. FIG. 4 shows a user information combination 200A and a directory information combination 200B backed up to the key-value storage 20F. As the user information combination 200A, each combination of "user_id" (user ID) and a user object element associated with each other is backed up. FIG. 4 shows that, from the top of the record, each combination of the IDs of the elements "user_name", "shared_directory_id", and "private_directory_id" is stored as the elements of the user information combination 200A. As the directory information combination 200B, each combination of "directory_id" (directory ID) and a directory object element associated with each other is backed up. FIG. 4 shows that, from the top of the record, each combination of the IDs of the elements "directory_total_size" and "directory_used_size", which are related to capacity information for each directory, is stored as the elements of the directory information combination 200B. "shared_directory_id" and "private_directory_id" respectively indicate the IDs of the shared directory and private directory according to the directory access privileges. For example, a shared directory is a directory that allows sharing with other users (applications), and a private directory is a directory that is occupied by the user with the associated user ID.

[0042] When it becomes necessary to generate an object upon startup of the storage code 50, the generation unit 202 reads the information of the combination required for generation from the key-value storage 20F and generates the object. When generating a user object, the generation unit 202 reads the user information combination 200A required for the user object from the key-value storage 20F and generates the user object. When generating a directory object, the generation unit 202 reads the directory information combination 200B required for the directory object from the key-value storage 20F and generates the directory object.

[0043] (Flow of Control) The flow of backup processing and object generation processing as a control method executed by the central ECU 20 of this embodiment will be described with reference to the flowcharts of Figures 5 to 7. Figure 5 is a flowchart of the entire control processing including the backup processing and object generation processing.

[0044] In step S10, the CPU 20A executes backup of the user information combination 200A and the directory information combination 200B. In step S12, when it becomes necessary to generate an object when the storage code 50 is started up, the CPU 20A reads information on the combination required for generation from the key-value storage 20F and generates the object.

[0045] Next, details of the backup process in step S10 will be explained using the flowchart in Fig. 6. Note that the backup process is executed periodically regardless of the flow shown in Fig. 5.

[0046] In step S20, CPU 30A determines whether or not to back up user information. If it is determined that the user information should be backed up, the process proceeds to step S22, and if it is determined that the user information should not be backed up, the process proceeds to step S24. The criteria for determining whether or not to back up user information may be when an update such as a change, addition, or deletion has occurred for a user, or when a certain period of time has passed.

[0047] In step S22, the CPU 30A backs up the elements of the user object necessary for generating the user object and the user ID as a combination of user information in the key-value storage 20F. The elements of the user object necessary for generating the user object may be defined in advance in the storage code 50 or may be obtained by updating from an external server, etc. Also, if the backup destination key-value storage 20F has sufficient capacity, all elements included in the user object may be backed up. The same applies to the elements of the directory object.

[0048] In step S24, CPU 30A determines whether or not to back up the directory information. If it is determined that the directory information should be backed up, the process proceeds to step S26, and if it is determined that the directory information should not be backed up, the process ends. The criteria for whether or not to back up the directory information may be when an update such as a change, addition, or deletion has occurred to the directory, or when a certain period of time has passed.

[0049] In step S26, CPU 30A backs up the elements of the directory object necessary for generating the directory object and the directory ID as a combination of directory information in key-value storage 20F. The elements of the directory object necessary for generating the directory object may be defined in advance in storage code 50 or may be obtained by updating from an external server, for example.

[0050] Next, details of the object generation process in step S12 will be described with reference to the flowchart in Fig. 7. Note that the object generation process is executed when the storage code 50 is started up, regardless of the flow shown in Fig. 5.

[0051] In step S30, the CPU 30A determines whether or not the storage code 50 needs to generate an object when it is started. If it determines that generation is necessary, the process proceeds to step S32. If it determines that generation is not necessary, step S30 is periodically repeated. Object generation is necessary when the storage code 50 is first loaded at startup or when access to the shared storage 20E becomes necessary after startup. The storage code 50 starts up, for example, when the vehicle 12 is powered off and then powered on again, starting the storage code 50. The criterion for determining whether or not object generation is necessary may be whether the class structure of a user object or directory object has been updated. In this case, if the class structure has been updated, it is determined that the object is necessary, and if the class structure has not been updated, it is determined that the object is not necessary. Whether or not the class structure has been updated can be determined by recording the class structure in the key-value storage 20F in advance, receiving update information about the class structure from an external server, and comparing it with the recorded class structure.

[0052] In step S32, CPU 30A acquires elements necessary for generating a user object from user information combination 200A backed up in key-value storage 20F.

[0053] In step S34, CPU 30A determines whether all necessary user object backups have been acquired. If it is determined that all have been acquired, the process proceeds to step S36; if it is determined that all have not been acquired, the process returns to step S32 and repeats until all have been acquired. The elements necessary for generating a user object are the elements of the user object for the user ID held in storage code 50 before the internal data of storage code 50 was initialized. Similarly, the elements necessary for generating a directory object, which will be described later, are the elements of the directory object for the directory ID held in storage code 50. If generation of either a user object or a directory object is not necessary, it is skipped.

[0054] In step S36, elements required for generating a directory object are obtained from the directory information combination 200B backed up in the key-value storage 20F.

[0055] In step S38, CPU 30A determines whether or not backups of all necessary directory objects have been acquired. If it is determined that all have been acquired, the process proceeds to step S40, but if it is determined that all have not been acquired, the process returns to step S36 and is repeated until all have been acquired.

[0056] In step S40, an object required for restarting the storage code 50 is generated using the elements of the object obtained from the backup.

[0057] (summary) The central ECU 20, which serves as the control device of this embodiment, associates elements required for object generation with IDs and backs up the combination information in the key-value storage 20F. When it becomes necessary to generate an object when the storage coder 50 is started, the central ECU 20 reads the combination information required for generation from the key-value storage 20F and generates the object. In this way, object-oriented user information and directory information are saved in a backup format that associates IDs with elements, which is different from binary data, and are read out as needed when the storage coder 50 is restarted. This improves compatibility with design changes to the class structure related to the storage area.

[0058] In the above embodiment, various processes executed by the CPU 20A after reading software (programs) may be executed by various processors other than a CPU. Examples of such processors include programmable logic devices (PLDs) (such as field-programmable gate arrays (FPGAs)) whose circuit configuration can be changed after fabrication, and application-specific integrated circuits (ASICs) that are dedicated electrical circuits designed specifically to execute specific processes. Each of the above processes may be executed by one of these processors, or by a combination of two or more processors of the same or different types (e.g., multiple FPGAs, or a combination of a CPU and an FPGA). The hardware structure of these processors is, more specifically, an electrical circuit that combines circuit elements such as semiconductor devices.

[0059] In the above embodiment, each program is described as being pre-stored (installed) on a computer-readable non-transitory recording medium. However, this is not limiting. Each program may be provided in a form recorded on a non-transitory recording medium such as a CD-ROM (Compact Disc Read Only Memory), a DVD-ROM (Digital Versatile Disc Read Only Memory), or a USB (Universal Serial Bus) memory. Furthermore, the program may be downloaded from an external device via a network.

[0060] The processing flow described in the above embodiment is an example, and unnecessary steps may be deleted, new steps may be added, or the processing order may be changed within the scope of the gist of the invention. [Explanation of symbols]

[0061] 12 vehicles 20 Central ECU (control unit) 20A CPU (processor) 50 Storage Code (Control Program)

Claims

1. A control device that operates by a processor executing an object-oriented program, the processor: backing up, in a storage unit, each of first combinations in which each element of a first object having a defined class structure related to the application program is associated with a first ID; backing up, in the storage unit, each of second combinations in which each element of a second object, in which a class structure relating to a storage area used by the application program is defined, is associated with a second ID; When it becomes necessary to generate an object at the time of starting the program, for the first object, each of the first combinations is read from the storage unit to generate the first object, and for the second object, each of the second combinations is read from the storage unit to generate the second object. Control device.

2. the processor: for each of the first combinations, an element required for generating the first object is associated with the first ID; for each of the second combinations, an element required for generating the second object is associated with the second ID; The control device according to claim 1 .

3. The first object is a user object relating to a user that represents an application in the object-oriented system.

3. The control device according to claim 1, wherein the second object is a directory object related to a directory of a storage area used by the user in the object-oriented system.

4. the processor:

4. The control device according to claim 1, wherein the backup is performed when the first object or the second object is updated.

5. the processor: A control device as described in any one of claims 1 to 4, wherein the determination of whether or not it has become necessary to generate the object is based on whether the class structure of the first object or the second object has been updated, and determines that it is necessary if it has been updated, and determines that it is not necessary if it has not been updated.

6. A vehicle equipped with the control device according to any one of claims 1 to 5.

7. A control method that operates by a processor executing an object-oriented program, comprising: the processor: backing up, in a storage unit, each of first combinations in which elements of a first object, in which a class structure related to an application program is defined, are associated with a first ID; and backing up, in the storage unit, each of second combinations in which elements of a second object, in which a class structure related to a storage area used by the application program is defined, are associated with a second ID; When it becomes necessary to generate an object at the time of starting the program, for the first object, each of the first combinations is read from the storage unit to generate the first object, and for the second object, each of the second combinations is read from the storage unit to generate the second object. A control method for computer-implemented processing.

8. An object-oriented control program executed by a processor, comprising: the processor: backing up, in a storage unit, each of first combinations in which each element of a first object having a defined class structure related to the application program is associated with a first ID; backing up, in the storage unit, each of second combinations in which each element of a second object, in which a class structure relating to a storage area used by the application program is defined, is associated with a second ID; When it becomes necessary to generate an object at the time of starting up the control program, for the first object, each of the first combinations is read from the storage unit to generate the first object, and for the second object, each of the second combinations is read from the storage unit to generate the second object. A control program that causes a computer to execute a process.

Citation Information

Patent Citations

  • Data base managing system

    JP1997106368A

  • Object-orientated vehicle controller

    JP2008077220A

  • Information processing device, control method and program

    JP2016134057A

  • Preloading of shared objects

    US20140359046A1