Method to be executed by on-vehicle device and program
By rearranging tasks in a queue based on priority, the in-vehicle device ensures faster execution of high-priority functions, addressing the inefficiencies in next-generation vehicle management without dedicated microcontrollers.
Patent Information
- Application Number
- JP2023083457
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-05-19
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2043-05-19
AI Technical Summary
In next-generation vehicles, the management of functions such as remote control by the operating system (OS) of the in-vehicle device without dedicated microcontrollers leaves room for improvement in technology.
An in-vehicle device method that rearranges tasks in a queue based on priority, swapping higher-priority tasks to the front of the queue until they are executed before lower-priority tasks, ensuring faster response times for high-priority functions.
Improves the response time of high-priority functions by executing them earlier than lower-priority tasks, enhancing the technology of next-generation vehicle-mounted devices.
Smart Images

Figure 2024166980000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a method and a program executed by an in-vehicle device. [Background technology]
[0002] Conventionally, each function of a vehicle, such as a remote control function, is performed by a dedicated microcontroller among a plurality of microcontrollers mounted on the vehicle. For example, Patent Document 1 discloses that a vehicle starts a pre-air conditioning operation in response to an operation on a remote control device. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Patent Publication No. 2020-125050 Summary of the Invention [Problem to be solved by the invention]
[0004] In next-generation vehicles such as automobiles that use electricity as a power source, some functions such as the vehicle remote control function will not use a dedicated microcomputer, but will be managed collectively by the operating system (OS) of the vehicle's on-board device. In this case, there is room for improvement in the technology of the vehicle's on-board device.
[0005] In view of the above circumstances, an object of the present disclosure is to improve the technology of in-vehicle devices for next-generation vehicles. [Means for solving the problem]
[0006] According to one embodiment of the present disclosure, the method comprises: 1. A method executed by an in-vehicle device for adding a plurality of tasks to a queue in a chronological order, comprising: Adding the first task that has occurred to the end of the queue; determining whether there is an unexecuted second task immediately preceding the first task in the queue; if it is determined that the second task exists, comparing a first priority assigned to the first task with a second priority assigned to the second task; and if it is determined that the first priority is higher than the second priority, swapping the order of the first task and the second task in the queue; Executing a replacement process comprising: Including, The in-vehicle device repeatedly executes the replacement process until it is determined that there is no unexecuted second task immediately preceding the first task in the queue, or until it is determined that the first priority is lower than or equal to the second priority of an unexecuted second task immediately preceding the first task in the queue.
[0007] A program according to an embodiment of the present disclosure includes: In-vehicle devices that add multiple tasks to a queue in the order in which they occur. Add the first task that occurs to the end of the queue, determining whether there is an unexecuted second task immediately preceding the first task in the queue; if it is determined that the second task exists, comparing a first priority assigned to the first task with a second priority assigned to the second task; and if it is determined that the first priority is higher than the second priority, swapping the order of the first task and the second task in the queue; Performing a replacement process comprising: and repeatedly executing the replacement process until it is determined that there is no unexecuted second task immediately preceding the first task in the queue, or until it is determined that the first priority is equal to or lower than the second priority of an unexecuted second task immediately preceding the first task in the queue. Effect of the Invention
[0008] According to one embodiment of the present disclosure, technology is improved for on-board devices in next generation vehicles. [Brief description of the drawings]
[0009] [Figure 1] 1 is a block diagram showing a schematic configuration of a system according to an embodiment of the present disclosure. [Diagram 2] 2 is a block diagram showing a schematic configuration of hardware of an in-vehicle device; FIG. [Diagram 3] FIG. 2 is a block diagram showing a schematic configuration of software of the in-vehicle device; [Figure 4] 4 is a flowchart showing the operation of the in-vehicle device. [Diagram 5] 10A and 10B are conceptual diagrams showing the state of a queue in an in-vehicle device without the present embodiment and the state of a queue in an in-vehicle device with the present embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] Hereinafter, embodiments of the present disclosure will be described.
[0011] (Overview of the embodiment) An overview of a system 1 according to an embodiment of the present disclosure will be described with reference to Fig. 1. The system 1 includes an in-vehicle device 10, a terminal device 20, and an information processing device 30. The in-vehicle device 10, the terminal device 20, and the information processing device 30 are communicatively connected to a network 40 including, for example, the Internet and a mobile communication network.
[0012] The in-vehicle device 10 is a computer mounted on a vehicle. The computer is equipped with an OS, and the OS adds a plurality of tasks to a queue in the order in which they occur, as described below. The vehicle is, for example, an automobile, but is not limited to this and may be any vehicle. The automobile is, for example, an automobile powered by electricity, such as a BEV (Battery Electric Vehicle), a HEV (Hybrid Electric Vehicle), a PHEV (Plug-in Hybrid Electric Vehicle), or a FCEV (Fuel Cell Electric Vehicle), but is not limited to these.
[0013] The terminal device 20 is, for example, a computer such as a PC (Personal Computer), a smartphone, or a bullet terminal, or a dedicated device having a function as a vehicle key, and is a portable device for a vehicle such as a key fob, a smart key, a key card, etc. In this embodiment, the terminal device 20 is capable of communicating with the in-vehicle device 10, and is used by a user such as a driver of the vehicle to, for example, remotely control the vehicle.
[0014] The information processing device 30 is, for example, a computer such as a server device, etc. The information processing device 30 is capable of communicating with the in-vehicle device 10 and the terminal device 20 via a network 40.
[0015] First, an overview of the present embodiment will be described, and details will be described later. The in-vehicle device 10 adds a generated first task to the end of the queue. Next, the in-vehicle device 10 executes a replacement process including a step of determining whether or not an unexecuted second task exists immediately before the first task in the queue, a step of comparing a first priority assigned to the first task with a second priority assigned to the second task when it is determined that the second task exists, and a step of replacing the order of the first task and the second task in the queue when it is determined that the first priority is higher than the second priority. The in-vehicle device 10 repeatedly executes the replacement process until it is determined that an unexecuted second task does not exist immediately before the first task in the queue, or until it is determined that the first priority is equal to or lower than the second priority of an unexecuted second task existing immediately before the first task in the queue.
[0016] In this manner, according to the present embodiment, the first task is executed before an unexecuted task having a lower priority than the first task, so the response of the function achieved by the execution of the first task can be faster than that of an in-vehicle device not having the present embodiment. Therefore, according to the present embodiment, the technology of the in-vehicle device of the next-generation vehicle is improved in that the response of the function with a high priority can be improved.
[0017] Next, each component of the system 1 will be described in detail.
[0018] (Hardware configuration of in-vehicle device) As shown in FIG. 2, the in-vehicle device 10 includes a communication unit 11, an output unit 12, an input unit 13, a storage unit 14, and a control unit 15.
[0019] The communication unit 11 includes one or more communication interfaces connected to the network 40. The communication interfaces correspond to mobile communication standards such as, but are not limited to, 4G (4th Generation) or 5G (5th Generation). In this embodiment, the in-vehicle device 10 communicates with the terminal device 20 and the information processing device 30 via the communication unit 11 and the network 40.
[0020] The output unit 12 includes one or more output devices that output information. The output devices are, for example, but not limited to, a display that outputs information as a video or a speaker that outputs information as a sound. Alternatively, the output unit 12 may include an interface for connecting an external output device.
[0021] The input unit 13 includes one or more input devices that detect an input operation by a user. The input devices are, for example, but are not limited to, a physical key, a capacitive key, a mouse, a touch panel, a touch screen that is integral with the display of the output unit 12, or a microphone. Alternatively, the input unit 13 may include an interface for connecting an external input device.
[0022] The storage unit 14 includes one or more memories. The memories are, for example, but not limited to, semiconductor memories, magnetic memories, or optical memories. Each memory included in the storage unit 14 may function as, for example, a main storage device, an auxiliary storage device, or a cache memory. For example, the storage unit 14 may store a system program, an application program, embedded software, and the like. For example, the information stored in the storage unit 14 may be updateable with information acquired from the network 40 via the communication unit 11, for example.
[0023] The control unit 15 includes one or more processors, one or more programmable circuits, one or more dedicated circuits, or a combination of these. The processor is, for example, but is not limited to, a general-purpose processor such as a CPU (Central Processing Unit) or a GPU (Graphics Processing Unit), or a dedicated processor specialized for a specific process. The programmable circuit is, for example, but is not limited to, an FPGA (Field-Programmable Gate Array). The dedicated circuit is, for example, but is not limited to, an ASIC (Application Specific Integrated Circuit). The control unit 15 controls the operation of the entire vehicle equipped with the in-vehicle device 10.
[0024] (Software configuration of in-vehicle device) As shown in FIG. 3, the in-vehicle device 10 includes an OS 110 and a queue to which an occurring task 120 is added.
[0025] The OS 110 manages the execution of a plurality of tasks 120, and includes OS such as Microsoft Windows (registered trademark), UNIX (registered trademark), Solaris (registered trademark), LINUX (registered trademark), Apple (registered trademark), MAC-OS (registered trademark), Apple iOS (registered trademark), etc. The OS 110 manages the order in which the plurality of tasks 120 are executed by adding one of the plurality of tasks 120 to the end of a queue each time it occurs.
[0026] In this embodiment, each of the multiple tasks 120 is a task that occurs in response to a user operation on the terminal device 20, or a task other than the above. Specifically, a task that occurs in response to a user operation on the terminal device 20 is, for example, a task that occurs in response to a so-called remote operation, such as a task for remotely opening and closing a vehicle door, or a task for remotely operating an air conditioner of the vehicle, but is not limited to these. In addition, a task other than the above is, for example, a task that executes a data collection function for sending the vehicle status, etc. to the information processing device 30, or a task for setting the vehicle, but is not limited to these.
[0027] (Operation flow of the in-vehicle device) Next, the operation of the in-vehicle device 10 according to this embodiment will be described with reference to FIG.
[0028] S100: The control unit 15 of the in-vehicle device 10 adds the generated first task to the end of the queue.
[0029] The first task is generated by, for example, a user operation using the terminal device 20, a request from the information processing device 30 to transmit data such as the vehicle status, a request from outside the in-vehicle device 10 such as receiving data at regular intervals, or the start of a timer, but is not limited to these, and is generated by any trigger. The control unit 15 adds the generated first task to the end of a queue stored in the memory unit 14.
[0030] S101: The control unit 15 judges whether or not there is an unexecuted second task immediately before the first task in the queue. If it is judged that there is an unexecuted second task (S101-Yes), the process proceeds to S102, and if it is judged that there is no unexecuted second task (S101-No), the process ends.
[0031] Specifically, the control unit 15 checks whether a second task exists immediately before the first task in the queue stored in the storage unit 14. If it is determined that a second task exists, the control unit 15 then checks the status of the second task. If it is determined that the status is not yet executed (S101-Yes), the process proceeds to S102. On the other hand, if it is determined that a second task does not exist immediately before the first task, or if it is determined that a second task exists but the status is not not yet executed (S101-No), the process ends.
[0032] S102: If it is determined in S101 that an unexecuted second task exists (S101-Yes), the control unit 15 compares the first priority assigned to the first task with the second priority assigned to the second task. If it is determined that the first priority is higher than the second priority (S102-Yes), the process proceeds to S103, and if it is determined that no unexecuted second task exists (S102-No), the process ends.
[0033] Specifically, when it is determined in S101 that an unexecuted second task exists (S101-Yes), the control unit 15 acquires the first priority assigned to the first task and the second priority assigned to the second task from the property of each task stored in the storage unit 14. Next, the control unit 15 compares the first priority with the second priority. When it is determined that the first priority is higher than the second priority (S102-Yes), the process proceeds to S103, and when it is determined that the second task does not exist (S102-No), the process ends. Note that the information acquired by the control unit 15 from the property of each task may be the type of task (for example, a task generated in response to a user operation, or another task), and in this case, the control unit 15 may determine the first priority assigned to the first task and the second priority assigned to the second task according to the type of task.
[0034] The priority assigned to each task, including the first priority or the second priority, may be any value that allows for comparison, such as, for example, "high" or "low", "0" or "1", or an integer value. When the value used for the priority is an integer value, the smaller the value, the higher the priority may be, or the larger the value, the higher the priority may be.
[0035] In this embodiment, the priority assigned to a task generated in response to a user operation is set to be higher than the priority assigned to other tasks. However, the priority assigned to each task may be changeable.
[0036] The priority assigned to each task may be changed depending on the vehicle status. For example, when the vehicle status is before the initial setting, the priority assigned to the task for setting the vehicle may be set higher than the priority assigned to the task generated in response to the user operation, and when the vehicle status is after the initial setting, the priority assigned to the task generated in response to the user operation may be set higher than the priority assigned to the task for setting the vehicle.
[0037] S103: If it is determined that the first priority is higher than the second priority (S102-Yes), the control unit 15 switches the order of the first task and the second task in the queue.
[0038] Specifically, when it is determined that the first priority is higher than the second priority (S102-Yes), the control unit 15 switches the order of the first task and the second task in the queue. That is, the first task is executed before the second task. After that, the process returns to S101.
[0039] As described above, the control unit 15 repeatedly executes the replacement process (corresponding to S101 to S103 in FIG. 4) until it is determined that there is no unexecuted second task immediately preceding the first task in the queue (S101-No) or until it is determined that the first priority is equal to or lower than the second priority of the unexecuted second task immediately preceding the first task in the queue (S102-No).
[0040] 5 shows the state of the queue in the in-vehicle device 10 without this embodiment and the state of the queue in the in-vehicle device 10 with this embodiment. The numbers assigned to the tasks indicate the order in which the tasks were generated. As shown in FIG. 5, in the queue of the in-vehicle device 10 with this embodiment, tasks with higher priority are executed first, except for task 1 which is being executed.
[0041] As described above, the in-vehicle device 10 adds the generated first task to the end of the queue. Next, the in-vehicle device 10 executes a replacement process including a step of determining whether or not an unexecuted second task exists immediately before the first task in the queue, a step of comparing a first priority assigned to the first task with a second priority assigned to the second task when it is determined that the second task exists, and a step of replacing the order of the first task and the second task in the queue when it is determined that the first priority is higher than the second priority. The in-vehicle device 10 repeatedly executes the replacement process until it is determined that an unexecuted second task does not exist immediately before the first task in the queue, or until it is determined that the first priority is equal to or lower than the second priority of the unexecuted second task existing immediately before the first task in the queue.
[0042] According to this configuration, the first task is executed before an unexecuted task having a lower priority than the first task, so the response of the function achieved by the execution of the first task can be faster than that of an in-vehicle device not having this embodiment. Therefore, according to this embodiment, the technology of the in-vehicle device of the next-generation vehicle is improved in that the response of the function with a high priority can be improved.
[0043] Although the present disclosure has been described based on the drawings and examples, it should be noted that those skilled in the art may make various modifications and alterations based on the present disclosure. Therefore, it should be noted that these modifications and alterations are included in the scope of the present disclosure. For example, the functions included in each component or step can be rearranged so as not to be logically inconsistent, and multiple components or steps can be combined or divided into one.
[0044] For example, in the above-described embodiment, the in-vehicle device 10 does not need to be contained in a single housing, and some of the components may be located in separate locations. For example, any combination is possible, such as the communication unit 11, the output unit 12, the input unit 13, the storage unit 14, and the control unit 15 being located in different locations in the vehicle body, or the output unit 12 and the input unit 13 being located in the same location in the vehicle body and the rest being located in different locations.
[0045] Also, for example, an embodiment is possible in which a general-purpose computer functions as the in-vehicle device 10 according to the above-described embodiment. Specifically, a program describing the processing contents for realizing each function of the in-vehicle device 10 according to the above-described embodiment is stored in the memory of the general-purpose computer, and the program is read and executed by a processor. Therefore, the present disclosure can also be realized as a program executable by a processor, or a non-transitory computer-readable medium that stores the program. [Explanation of symbols]
[0046] 1 System 10 Onboard equipment 11 Communications Department 12 Output section 13 Input section 14 Storage section 15 Control section 20 Terminal Equipment 30 Information processing device 40 Network 110 OS 120 Tasks
Claims
1. 1. A method executed by an in-vehicle device for adding a plurality of tasks to a queue in a chronological order, comprising: Adding a first task that has occurred to the end of the queue; determining whether or not there is an unexecuted second task immediately preceding the first task in the queue; if it is determined that the second task exists, comparing a first priority assigned to the first task with a second priority assigned to the second task; and if it is determined that the first priority is higher than the second priority, swapping the order of the first task and the second task in the queue; Executing a replacement process comprising: Including, The in-vehicle device repeatedly executes the replacement process until it is determined that there is no unexecuted second task immediately preceding the first task in the queue, or until it is determined that the first priority is lower than or equal to the second priority of an unexecuted second task immediately preceding the first task in the queue.
2. 2. The method of claim 1 , Setting a priority level assigned to a task generated in response to a user operation higher than priorities assigned to other tasks; The method further comprises:
3. 2. The method of claim 1 , Changing the priority assigned to each task depending on the vehicle's condition; The method further comprises:
4. 4. The method of claim 3, When the vehicle status is before the initial setting, a priority assigned to a task for setting the vehicle is set higher than a priority assigned to a task generated in response to a user operation; and When the vehicle status is after the initial setting, a priority assigned to a task generated in response to the user operation is set higher than a priority assigned to a task for setting the vehicle. The method further comprises:
5. A program, In-vehicle devices that add multiple tasks to a queue in the order in which they occur. Add the first task that has occurred to the end of the queue; determining whether or not there is an unexecuted second task immediately preceding the first task in the queue; if it is determined that the second task exists, comparing a first priority assigned to the first task with a second priority assigned to the second task; and if it is determined that the first priority is higher than the second priority, swapping the order of the first task and the second task in the queue; Performing a replacement process comprising: and repeatedly executing the replacement process until it is determined that there is no unexecuted second task immediately preceding the first task in the queue, or until it is determined that the first priority is equal to or lower than the second priority of an unexecuted second task immediately preceding the first task in the queue.
Citation Information
Patent Citations
Method for remotely controlling vehicle on the basis of smart apparatus
EP3726806A1
In-vehicle device, scheduling program, and scheduling method
JP2012185541A
Electronic control device
JP2015170180A
Optimal scheduling for CAD architecture
US20090165009A1
Vehicle air conditioner
JP2020125050A
