Software update module and method, controller, cloud, program and storage medium
By unifying the management of virtual machine software updates, the problem of high complexity in virtual machine software updates is solved, enabling efficient and low-cost software updates, which is suitable for domain-centralized electronic and electrical architectures.
Patent Information
- Application Number
- CN202211275480.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-18
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2042-10-18
AI Technical Summary
In domain-centralized and centrally-centralized electronic and electrical architectures, the high complexity of virtual machine software updates leads to increased development costs and a higher risk of update errors, affecting system stability.
A software update module and method are provided, which obtains update requests, identifies a set of virtual machine software to be updated, downloads the new version of the virtual machine software and stores it in a set storage area, and copies the virtual machine software that does not need to be updated to the same storage area, thereby realizing unified management of multiple virtual machines.
It simplifies the functional design of virtual machine software updates, reduces development costs, improves update efficiency, enables more granular software updates, and is compatible with various over-the-air (OTA) download strategies.
Smart Images

Figure CN115686563B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent vehicle technology, and in particular to a software update module and method, controller, cloud, program and storage medium. Background Technology
[0002] The "Four New Trends" in the automotive industry refer to electrification, intelligentization, connectivity, and sharing, representing a major direction of transformation for the industry. As these trends advance, in-vehicle functions are becoming increasingly complex, rendering traditional distributed electrical / electronic architectures (EEA) inadequate. Therefore, EEA is evolving from a distributed model to a domain-centralized and then a centralized model to realize the vision of "software-defined vehicles."
[0003] In domain-centralized and centralized electronic and electrical architectures, the number of controllers has decreased, and their form and responsibilities have undergone significant changes. Traditional embedded controllers are trending towards integration to reduce communication overhead, hardware costs, and improve manufacturing automation. To address the need for controller integration, virtualization technology has been gradually applied in automotive embedded controllers. It is an advanced technology and powerful means of integrating multiple controller functions within a single microcontroller (MCU). That is, multiple controller software programs run on the same microcontroller via virtual machines (VMs), and a hypervisor coordinates and manages these VMs, configuring hardware resources. Clearly, the use of virtual machines enhances controller functionality. Similarly, in software updates, virtualization technology allows for finer granularity. In traditional automotive embedded controllers, software updates are performed on the entire controller software. With virtualization, however, vehicle system software updates are performed on a per-VM basis, allowing for individual updates to specific VMs. However, as the number of virtual machines continues to increase, multiple virtual machines updating themselves not only makes software updates more complex and increases development costs, but also easily leads to update errors and other problems, affecting system stability.
[0004] Therefore, there is an urgent need for a software update module to systematically manage the updates of each virtual machine, so as to reduce update complexity and development costs. Summary of the Invention
[0005] The purpose of this invention is to provide a software update module and method, controller, cloud, program and storage medium to solve the problem of how to manage virtual machine software updates.
[0006] To address the aforementioned technical problems, this invention provides a software update method applicable to electronic control units with virtual machines, the software update method comprising:
[0007] Obtain update requests and identify the set of virtual machine software to be updated;
[0008] Download the latest version of the virtual machine software corresponding to the virtual machine to be updated and store it in the designated storage area; and copy the virtual machine software that does not need to be updated from the same storage area as the virtual machine to be updated and store it in the designated storage area.
[0009] Optionally, in the software update method described above, the new version of the virtual machine software is downloaded using over-the-air (OTA) download technology.
[0010] Optionally, in the software update method, the process of downloading the new version of the virtual machine software corresponding to the virtual machine to be updated and storing it in a designated storage area includes:
[0011] At least the new version of the virtual machine software in the cloud shall be stored in the designated storage area; and / or,
[0012] The new version of the virtual machine software in the cloud is stored on the master node of the over-the-air download technology, and then distributed by the master node to the designated storage area of the electronic control unit.
[0013] Optionally, in the software update method, within the electronic control unit, the virtual machine software that does not require updating is copied from the same storage area as the virtual machine to be updated and stored in the designated storage area.
[0014] Optionally, in the software update method, downloading the new version of the virtual machine software corresponding to the virtual machine to be updated and storing it in a designated storage area; and copying the virtual machine software that does not need to be updated from the same storage area as the virtual machine to be updated and storing it in the designated storage area includes:
[0015] The new version of the virtual machine software in the cloud is stored on the master node of the over-the-air (OTA) download technology. The master node of the OTA download technology copies the virtual machine software that does not need to be updated in the same storage area as the virtual machine to be updated. The copied virtual machine software that does not need to be updated is combined with the new version of the virtual machine software to form a virtual machine software file, and the virtual machine software file is distributed to the designated storage area of the electronic control unit.
[0016] Optionally, in the software update method, downloading the new version of the virtual machine software corresponding to the virtual machine to be updated and storing it in a designated storage area; and copying the virtual machine software that does not need to be updated from the same storage area as the virtual machine to be updated and storing it in the designated storage area includes:
[0017] The system obtains the new version of the virtual machine software from the cloud and copies the virtual machine software that does not need to be updated from the same storage area as the virtual machine to be updated. The copied virtual machine software that does not need to be updated is combined with the new version of the virtual machine software to form a virtual machine software file, which is then distributed to the designated storage area of the electronic control unit; or distributed to the designated storage area of the electronic control unit via the master node of the over-the-air download technology.
[0018] Optionally, in the software update method, the electronic control unit includes a plurality of microcontrollers; wherein the designated storage area includes a storage area within the microcontrollers and / or a storage area outside the microcontrollers.
[0019] Optionally, in the software update method, the storage area within the microcontroller and / or the storage area outside the microcontroller has several sets of storage partitions; wherein each storage partition includes two swap areas; and at least a portion of the software of each virtual machine is stored in one swap area of each storage partition.
[0020] Optionally, in the software update method, the software update method includes:
[0021] Obtain update requests and identify the set of virtual machine software to be updated and the storage partition corresponding to the virtual machine to be updated;
[0022] Download the new version of the virtual machine software corresponding to the virtual machine to be updated, and store it in another swap area within the corresponding storage partition; and copy the virtual machine software that does not need to be updated from the corresponding storage partition, and store it in the other swap area, so that the new version of the virtual machine software and the copied virtual machine software that does not need to be updated are located in the same swap area within the same storage partition.
[0023] The designated storage area is another swap area stored in the new version of the virtual machine software.
[0024] Optionally, in the software update method, when the software of one of the virtual machines to be updated is distributed across multiple storage partitions, the software update method further includes:
[0025] The new version of the virtual machine software is stored in the corresponding swap area of the plurality of storage partitions; and the virtual machine software that does not need to be updated in the plurality of storage partitions is copied to the corresponding swap area.
[0026] Optionally, in the software update method, the set of virtual machine software to be updated includes all virtual machines to be updated as determined according to the update request.
[0027] Optionally, in the software update method, the software update method further includes: determining whether all the virtual machines to be updated in the set of virtual machine software to be updated have been updated; if so, entering a waiting update request state.
[0028] Optionally, in the software update method, after the virtual machine to be updated in the same storage area has completed the update and the virtual machine software that does not need to be updated has been copied, the software update method further includes: deleting the old version of the virtual machine software and the copied virtual machine software that does not need to be updated in the same storage area.
[0029] Optionally, in the software update method, after the virtual machine to be updated in the same storage area has completed the update and the virtual machine software that does not need to be updated has been copied, the software update method further includes: switching the virtual machine software to run in the designated storage area.
[0030] Based on the same inventive concept, the present invention also provides a software update module for running the software update method.
[0031] Based on the same inventive concept, the present invention also provides an in-vehicle controller, including a plurality of electronic control units and a software update module running thereon; wherein, the electronic control units include a plurality of microcontrollers, and at least some of the microcontrollers run a plurality of virtual machines.
[0032] Optionally, in the vehicle controller, the microcontroller stores a virtual machine monitor, wherein some processes in the software update module are executed within the virtual machine monitor, and / or, some processes in the software update module are executed within the virtual machine managed by the virtual machine monitor.
[0033] Optionally, in the vehicle controller, the microcontroller further includes several kernels, and some processes in the software update module are executed within the kernels that are not under the jurisdiction of the virtual machine monitoring.
[0034] Optionally, in the vehicle controller, the microcontroller further includes an over-the-air (OTA) master node, within which some processes of the software update module are executed.
[0035] Based on the same inventive concept, the present invention also provides a cloud processing platform for running part of the software update method described above.
[0036] Based on the same inventive concept, the present invention also provides a computer program, including a method for performing the software update when the computer program is executed on a suitable computer device.
[0037] Based on the same inventive concept, the present invention also provides a computer-readable storage medium on which the aforementioned computer program is encoded.
[0038] In summary, this invention provides a software update module and method, a controller, a cloud platform, a program, and a storage medium. The software update method includes: acquiring an update request and identifying a set of virtual machine software to be updated; downloading the new version of the virtual machine software corresponding to the virtual machine to be updated and storing it in a designated storage area; and copying the virtual machine software that does not need updating from the same storage area as the virtual machine to be updated and storing it in the designated storage area. The software update module is used to run the software update method. It is evident that the software update module, by downloading the new version of the virtual machine software and copying the virtual machine software that does not need updating from the same storage area to the same designated storage area, achieves unified management of software updates for multiple virtual machines, eliminating the need for virtual machines to perform software updates themselves, simplifying the functional design of virtual machine software updates, and reducing development costs. Furthermore, the software update module can perform non-holistic software updates, performing updates only on specific virtual machines to be updated, improving update efficiency and making the granularity of software updates smaller. In addition, the software update method is compatible with various over-the-air (OTA) download strategies, has a wide range of applications, and strong scalability. Attached Figure Description
[0039] Figure 1 This is a flowchart of the software update method in an embodiment of the present invention.
[0040] Figure 2 This is a schematic diagram of the structure of a storage area in an embodiment of the present invention.
[0041] Figure 3 This is a schematic diagram of the structure of a storage area in an embodiment of the present invention.
[0042] Figure 4 This is a schematic diagram of the structure of a storage area in an embodiment of the present invention.
[0043] Figure 5 This is a schematic diagram of the structure of a storage area in an embodiment of the present invention.
[0044] Figure 6 This is a flowchart of a software update method according to an embodiment of the present invention.
[0045] Figure 7 This is a schematic diagram of the software update status in the storage area in an embodiment of the present invention.
[0046] Figure 8 This is a schematic diagram of the software update status in the storage area in an embodiment of the present invention. Detailed Implementation
[0047] To make the objectives, advantages, and features of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the drawings are all in a very simplified form and are not drawn to scale, and are only used to facilitate and clearly illustrate the objectives of the embodiments of the present invention. Furthermore, the structures shown in the drawings are often part of the actual structures. In particular, different figures may emphasize different aspects and sometimes use different scales. It should also be understood that, unless specifically stated or indicated, the terms "first," "second," "third," etc., in the specification are only used to distinguish the various components, elements, steps, etc., in the specification, and are not used to indicate the logical or sequential relationships between the various components, elements, steps, etc.
[0048] Please see Figure 1 This embodiment provides a software update method applicable to electronic control units with virtual machines. The software update method includes:
[0049] Step 1 S10: Obtain update requests and identify the set of virtual machine software to be updated;
[0050] Step 2 S20: Download the new version of the virtual machine software corresponding to the virtual machine to be updated and store it in the designated storage area; and copy the virtual machine software that does not need to be updated from the same storage area as the virtual machine to be updated and store it in the designated storage area.
[0051] Based on the same inventive concept, this embodiment also provides a software update module for running the software update method.
[0052] As can be seen, the software update module provided in this embodiment achieves unified management of software updates for multiple virtual machines by running the software update method, eliminating the need for virtual machines to perform software updates themselves, thus simplifying the functional design of virtual machine software updates and reducing development costs.
[0053] The following is in conjunction with the appendix Figures 1-8 This embodiment provides a detailed description of the software update module and method.
[0054] The software update method includes:
[0055] Step 1 S10: Obtain update requests and identify the set of virtual machine software to be updated.
[0056] It should be noted that the software update method is applicable to electronic control units (ECUs) with virtual machines, and these ECUs contain multiple microcontrollers. The microcontroller running the virtual machine typically includes a hypervisor. The hypervisor is used to create and run the virtual machine, and to configure the resources required by the virtual machine. When higher access permissions are required, the software update module can request the hypervisor to cooperate. Therefore, when the virtual machine needs to be updated, the virtual machine and / or the hypervisor send an update request to the software update module. The software update module collects all virtual machine update requests to form a set of virtual machine software to be updated. Therefore, the set of virtual machine software to be updated includes all virtual machines to be updated as determined by the update requests.
[0057] Step 2 S20: Download the new version of the virtual machine software corresponding to the virtual machine to be updated and store it in the designated storage area; and copy the virtual machine software that does not need to be updated from the same storage area as the virtual machine to be updated and store it in the designated storage area.
[0058] It should be noted that current in-vehicle software downloads generally employ Over-the-Air (OTA) technology. Furthermore, the corresponding software storage area can be either internal to the microcontroller or external to it. Therefore, the defined storage area includes both internal and external storage areas within the microcontroller. In other words, the virtual machine software can be stored either internally or externally to the microcontroller; this embodiment does not impose any limitations on this.
[0059] Furthermore, the defined storage area can be a single, unified storage area, such as... Figure 2 As shown, virtual machines VM1 to VMx (where x is a positive integer) are all stored within the designated storage area 100; the designated storage area 100 can also be multiple groups of divided storage areas. Specifically, the multiple groups of divided storage areas refer to: the storage area within the microcontroller and / or the storage area outside the microcontroller having several groups of storage partitions; wherein each storage partition includes two swap areas; and at least a portion of the software of each virtual machine is stored in one swap area of each storage partition. For example, as... Figure 3 As shown, the designated storage area 100 is divided into a set of storage partitions, including swap area Bank A and swap area Bank B. Virtual machines VM1 to VMx are all located in swap area Bank A, but they can also all be located in swap area Bank B. Alternatively, as... Figure 4As shown, the designated storage area 100 is divided into four groups of storage partitions. The first group of storage partitions includes swap areas Bank A1 and Bank B1; the second group includes swap areas Bank A2 and Bank B2; the third group includes swap areas Bank A3 and Bank B3; and the fourth group includes swap areas Bank A4 and Bank B4. Virtual machines VM1 to VMx are each located within one swap area of each storage partition. Alternatively, as... Figure 5 As shown, due to its large size, the virtual machine software is stored in the swap space of multiple storage partitions. For example, the software corresponding to virtual machine VM1 is stored in swap space Bank A1 of the first group of storage partitions and swap space Bank A2 of the second group of storage partitions. Furthermore, the partitioning of the storage area into storage partitions can be a fixed partition or a time-sharing partition, for example, dividing the storage area into four storage partitions within a set time period, and not partitioning at other times. This embodiment does not limit the number of storage partitions, the number of virtual machines, which storage partition the virtual machines are located in, or the location of the virtual machines within the swap space. Furthermore, this embodiment does not limit the storage area to be a non-volatile storage area or a volatile storage area.
[0060] Based on this, after obtaining the update request of the virtual machine, the software update module downloads the new version of the virtual machine software corresponding to the virtual machine to be updated from the cloud and stores it in the designated storage area 100; and copies the virtual machine software that does not need to be updated from the same storage area as the virtual machine to be updated and stores it in the designated storage area 100. Wherein, when a storage partition exists, the designated storage area 100 specifically refers to the other swap space where the new version of the virtual machine software is stored. Furthermore, this embodiment does not limit the specific implementation of downloading the new version of the virtual machine software to the designated storage area, nor does it limit the specific implementation of copying the virtual machine software that does not need to be updated from the same storage area as the virtual machine to be updated to the designated storage area 100, the purpose of which is to be compatible with various over-the-air download strategies.
[0061] For example, in one embodiment, the software update module directly downloads the new version of the virtual machine software from the cloud to the designated storage area of the electronic control unit. Also, within the electronic control unit, it copies the virtual machine software that does not require updating from the same storage area as the virtual machine to be updated and stores it in the designated storage area. For example, if virtual machines VM1 and VM2 are stored in the same storage area exchange bank A1, where VM1 needs updating but VM2 does not, the software update module directly downloads the new version of VM1 software from the cloud to the designated storage area exchange bank B1. Furthermore, within the electronic control unit, the software update module copies the VM2 software from exchange bank A1 to the designated storage area exchange bank B1. Therefore, the updated designated storage area exchange bank B1 stores both the new version of VM1 software and the copied VM2 software.
[0062] In another embodiment, the software update module stores the new version of the virtual machine software from the cloud to the master node of the over-the-air (OTA) download technology, and then the master node distributes it to the designated storage area of the electronic control unit. Additionally, within the electronic control unit, the software of the virtual machine software that does not require updating and is located in the same storage area as the virtual machine to be updated is copied and stored in the designated storage area. It is understood that the master node serves to store and forward the new version of the virtual machine software. For example, if virtual machines VM1 and VM2 are stored in the same storage area exchange bank A1, where VM1 needs an update but VM2 does not, the software update module directly downloads the new version of VM1 software from the cloud to the master node, and then the master node redistributes the new version of VM1 software to the corresponding electronic control unit for storage in the designated storage area exchange bank B1. Furthermore, within the electronic control unit, the software update module copies the VM2 software from exchange bank A1 to the designated storage area exchange bank B1. Similarly, the updated storage area exchange Bank B1 stores the new version of virtual machine VM1 software and the copied virtual machine VM2 software. Therefore, copying the non-updating virtual machine software from the same storage area of the virtual machine to be updated to the designated storage area is performed within the electronic control unit. Thus, the master node only needs to replace the original virtual machine software with the new version without needing to concern itself with the characteristics and other specific details of the virtual machine to be updated. This results in high update efficiency and simplifies the strategy design of the over-the-air (OTA) download system.
[0063] In other embodiments, the software update module stores the new version of the virtual machine software in the cloud to the master node of the over-the-air (OTA) download technology. The master node also copies the virtual machine software that does not require updating from the same storage area as the virtual machine to be updated. The copied virtual machine software that does not require updating is then combined with the new version of the virtual machine software to form a virtual machine software file, which is then distributed to the designated storage area of the electronic control unit. In other words, the master node of the OTA download technology can combine the new version of the virtual machine software and the copied virtual machine software that does not require updating from the same storage area and distribute them together to the electronic control unit.
[0064] Therefore, the process of copying virtual machine software that does not require updating within the same storage area is performed directly on the master node, without needing to be executed within the electronic control unit. For example, if virtual machines VM1 and VM2 are stored in the same storage area exchange bank A1, where VM1 requires an update but VM2 does not, the software update module downloads the new version of VM1's software from the cloud to the master node. Then, the master node copies the VM2 software that does not require updating from the same storage area exchange bank A1, and combines the copied VM2 software with the new version of VM1 software into a single file, which is then distributed to the corresponding electronic control unit for storage in the designated storage area exchange bank B1. Similarly, the updated designated storage area exchange bank B1 stores the new version of VM1 software and the copied VM2 software.
[0065] Optionally, the new version of the virtual machine software and a copied virtual machine software that does not require updating within the same storage area can be combined via the cloud and distributed to the designated storage area, or forwarded to the designated storage area via the master node. Based on this, this embodiment also provides a cloud processing platform for running part of the software update method described above. Specifically, the cloud processing platform can obtain the new version of the virtual machine software and copy the virtual machine software that does not require updating within the same storage area as the virtual machine to be updated, and combine the copied virtual machine software that does not require updating with the new version of the virtual machine software into a virtual machine software file, which is then distributed to the designated storage area of the electronic control unit; or distributed to the designated storage area of the electronic control unit via the master node of the over-the-air (OTA) download technology. For example, if virtual machines VM1 and VM2 are stored in the same storage area exchange bank A1, where VM1 needs updating but VM2 does not, the cloud processing platform obtains the new version of VM1 software and copies the VM2 software. The new VM1 software and the copied VM2 software are then combined into a single file and directly stored in the designated storage area exchange bank B1, or distributed to the electronic control unit via the master node and then stored in the designated storage area exchange bank B1. Therefore, the process of copying the non-updating virtual machine software from the same storage area of the VM to be updated to the designated storage area is performed within the cloud processing platform.
[0066] Furthermore, after the virtual machine to be updated in the same storage area completes its update and the copy of the virtual machine software that does not need updating is completed, the software update method further includes: switching the virtual machine software running in the designated storage area. That is, switching the running swap area from the previous swap area to the swap area where the new version of the virtual machine is located. When the designated storage area does not have a zone division, the corresponding new version of the virtual machine software is switched to run. For example, if the software of virtual machine VM1' is the updated software of virtual machine VM1, then when virtual machine VM1 needs to be started, virtual machine VM1' software is run. In addition, the software update method also includes: deleting the old version of the virtual machine software and the copied virtual machine software that does not need updating in the same storage area. It should be noted that within a set time range, the old version of the virtual machine software and the copied virtual machine software that does not need updating in the same storage area may not be deleted to avoid the new version of the virtual machine software malfunctioning and needing to be restored to the original version of the virtual machine software.
[0067] This embodiment uses Figure 4 The software update method is illustrated using the storage area shown as an example. Please refer to [link / reference]. Figure 4 and 6~7. When it is determined that there are virtual machines in the storage partition that need to be updated, the system checks whether each virtual machine in the storage partition needs to be updated. If so, the new version of the virtual machine software is downloaded to another swap area within the storage partition. If not, the virtual machine software is copied to another swap area within the storage partition, so that the updated virtual machine software and the virtual machine software that does not need to be updated are in the same swap area within the same storage partition for use. Specifically, the storage area is divided into four groups of storage partitions, and virtual machine VM1 in the first group of storage partitions needs to be updated, while virtual machines VM5 and VM6 in the third group of storage partitions need to be updated. The software update module checks whether all virtual machines in the first group of storage partitions and all virtual machines in the third group of storage partitions need to be updated, either individually or simultaneously. When it is determined that virtual machine VM1 needs to be updated, the corresponding new version of the virtual machine software VM1' is downloaded to another swap area BankB1 within the first group of storage partitions; and when it is determined that virtual machine VM2 does not need to be updated, virtual machine VM2 is copied to another swap area BankB1. Similarly, if it is determined that virtual machine VM4 in the third storage partition does not need to be updated, then VM4 is copied to another swap area, BankB3. And if it is determined that virtual machines VM5 and VM6 need to be updated, then the corresponding new versions of the virtual machine software VM5' and VM6' are downloaded to another swap area, BankB3, within the third storage partition. After completing the copying and downloading, the software previously stored in swap areas BankA1 and BankA3 can be cleared, so that the corresponding new version of the software can be downloaded there during the next update, or the virtual machine software that does not need to be updated can be copied there. Of course, it can also be retained for a period of time so that the original virtual machine software can be restored if needed later.
[0068] Furthermore, this embodiment does not limit the distribution location of the new version of virtual machine software and the virtual machine software that does not need to be updated in the exchange area, nor does it limit the order in which the storage partitions are updated. That is, when updating in sequence, the third group of storage partitions can be updated first, or the first group of storage partitions can be updated first.
[0069] Furthermore, when the software of one of the virtual machines to be updated is distributed within one of the swap areas of the multiple storage partitions, the software update method further includes: downloading the corresponding new version of the virtual machine software to another swap area of the multiple storage partitions; and copying the virtual machine software that does not need to be updated from the multiple storage partitions to the corresponding swap area. Figure 5 and 8Since virtual machine VM1 needs to be updated, and because VM1 has a large capacity and is distributed across swap areas BankA1 in the first storage partition and BankA2 in the second storage partition, when downloading a new version of VM1', the new version of VM1' can also be stored in swap areas BankB1 in the first storage partition and BankB2 in the second storage partition, respectively, to achieve cross-storage partition updates. Meanwhile, VM2 in swap area BankA2 does not need to be updated, so it is copied to swap area BankB2.
[0070] After completing the copying and updating within the storage partition, the system switches to the swap space where the new virtual machine software resides. Optionally, all software in the swap space where the old virtual machine software resides is deleted. Furthermore, the software update module needs to determine whether all storage partitions have completed software updates. If so, it enters a waiting-for-update-request state; otherwise, it waits for all updates to complete before entering the waiting-for-update-request state.
[0071] Based on the same inventive concept, this embodiment also provides an in-vehicle controller, including a plurality of electronic control units and a software update module running thereon; wherein, the electronic control units include a plurality of microcontrollers, and at least some of the microcontrollers run a plurality of virtual machines. Further, some processes in the software update module are executed within the virtual machine monitor, and / or, the microcontroller stores the virtual machine monitor. Some processes in the software update module are executed within the virtual machine monitor, and / or, some processes in the software update module are executed within the virtual machines managed by the virtual machine monitor. The microcontroller also includes a plurality of kernels, and some processes in the software update module are executed within kernels not under the jurisdiction of the virtual machine monitor. This embodiment does not limit the specific deployment of the software update module.
[0072] Based on the same inventive concept, this embodiment also provides a computer program, including a method for performing the software update method when the computer program is executed on a suitable computer device.
[0073] Based on the same inventive concept, this embodiment also provides a computer-readable storage medium on which the aforementioned computer program is encoded.
[0074] In summary, this invention provides a software update module and method, a controller, a cloud platform, a program, and a storage medium. The software update method includes: acquiring an update request and identifying a set of virtual machine software to be updated; downloading the new version of the virtual machine software corresponding to the virtual machine to be updated and storing it in a designated storage area; and copying the virtual machine software that does not need updating from the same storage area as the virtual machine to be updated and storing it in the designated storage area. The software update module is used to run the software update method. It is evident that the software update module, by downloading the new version of the virtual machine software and copying the virtual machine software that does not need updating from the same storage area to the same designated storage area, achieves unified management of software updates for multiple virtual machines, eliminating the need for virtual machines to perform software updates themselves, simplifying the functional design of virtual machine software updates, and reducing development costs. Furthermore, the software update module can perform non-holistic software updates, performing updates only on specific virtual machines to be updated, improving update efficiency and making the granularity of software updates smaller. In addition, the software update method is compatible with various over-the-air (OTA) download strategies, has a wide range of applications, and strong scalability.
[0075] Furthermore, it should be understood that although the present invention has been disclosed above with reference to preferred embodiments, these embodiments are not intended to limit the present invention. For any person skilled in the art, many possible variations and modifications can be made to the technical solutions of the present invention based on the disclosed technical content, or equivalent embodiments can be modified accordingly, without departing from the scope of the present invention. Therefore, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention, without departing from the content of the present invention, shall still fall within the scope of protection of the present invention.
Claims
1. A software update method applicable to electronic control units with virtual machines, characterized in that, The software update method includes: Obtain update requests and identify the set of virtual machine software to be updated; Download the latest version of the virtual machine software corresponding to the virtual machine to be updated and store it in the designated storage area; and copy the virtual machine software that does not need to be updated from the same storage area as the virtual machine to be updated and store it in the designated storage area. The defined storage area is either a single storage area or multiple partitioned storage areas. The partitioning method includes fixed partitioning or time-sharing partitioning, and each storage partition includes two swap areas. At least a portion of the software of each virtual machine is stored in one of the swap areas of each storage partition. The new version of the virtual machine software corresponding to the virtual machine to be updated and the virtual machine software that does not need to be updated in the same storage partition of the virtual machine to be updated are both stored in the other swap area of the corresponding storage partition.
2. The software update method according to claim 1, characterized in that, The new version of the virtual machine software was downloaded using over-the-air (OTA) download technology.
3. The software update method according to claim 2, characterized in that, The process of downloading the latest version of the virtual machine software corresponding to the virtual machine to be updated and storing it in the designated storage area includes: At least the new version of the virtual machine software in the cloud shall be stored in the designated storage area; and / or, The new version of the virtual machine software in the cloud is stored on the master node of the over-the-air download technology, and then distributed by the master node to the designated storage area of the electronic control unit.
4. The software update method according to claim 3, characterized in that, Within the electronic control unit, the virtual machine software that does not require updating is copied from the same storage area as the virtual machine to be updated and stored in the designated storage area.
5. The software update method according to claim 3, characterized in that, Download the latest version of the virtual machine software corresponding to the virtual machine to be updated, and save it to the designated storage area; The process of copying the virtual machine software that does not need to be updated from the same storage area as the virtual machine to be updated and storing it in the designated storage area includes: The new version of the virtual machine software in the cloud is stored on the master node of the over-the-air (OTA) download technology. The master node of the OTA download technology copies the virtual machine software that does not need to be updated in the same storage area as the virtual machine to be updated. The copied virtual machine software that does not need to be updated is combined with the new version of the virtual machine software to form a virtual machine software file, and the virtual machine software file is distributed to the designated storage area of the electronic control unit.
6. The software update method according to claim 3, characterized in that, Download the latest version of the virtual machine software corresponding to the virtual machine to be updated, and save it to the designated storage area; The process of copying the virtual machine software that does not need to be updated from the same storage area as the virtual machine to be updated and storing it in the designated storage area includes: The system obtains the new version of the virtual machine software from the cloud and copies the virtual machine software that does not need to be updated from the same storage area as the virtual machine to be updated. The copied virtual machine software that does not need to be updated is combined with the new version of the virtual machine software to form a virtual machine software file, which is then distributed to the designated storage area of the electronic control unit; or distributed to the designated storage area of the electronic control unit via the master node of the over-the-air download technology.
7. The software update method according to claim 1, characterized in that, The electronic control unit includes a plurality of microcontrollers; wherein the designated storage area includes a storage area within the microcontrollers and / or a storage area outside the microcontrollers.
8. The software update method according to claim 7, characterized in that, The software update method includes: Obtain update requests and identify the set of virtual machine software to be updated and the storage partition corresponding to the virtual machine to be updated; Download the new version of the virtual machine software corresponding to the virtual machine to be updated, and store it in another swap area within the corresponding storage partition; and copy the virtual machine software that does not need to be updated from the corresponding storage partition, and store it in the other swap area, so that the new version of the virtual machine software and the copied virtual machine software that does not need to be updated are located in the same swap area within the same storage partition. The designated storage area is another swap area stored in the new version of the virtual machine software.
9. The software update method according to claim 7, characterized in that, When the software of one of the virtual machines to be updated is distributed across multiple storage partitions, the software update method further includes: The new version of the virtual machine software is stored in the corresponding swap area of the plurality of storage partitions; and the virtual machine software that does not need to be updated in the plurality of storage partitions is copied to the corresponding swap area.
10. The software update method according to claim 1 or 8, characterized in that, The set of virtual machine software to be updated includes all virtual machines to be updated as determined by the update request.
11. The software update method according to claim 1, characterized in that, The software update method further includes: determining whether all the virtual machines to be updated in the set of virtual machine software to be updated have been updated; if so, entering a waiting update request state.
12. The software update method according to claim 1, characterized in that, After the virtual machine to be updated in the same storage area has completed the update and the virtual machine software that does not need to be updated has been copied, the software update method further includes: deleting the old version of the virtual machine software and the copied virtual machine software that does not need to be updated in the same storage area.
13. The software update method according to claim 1, characterized in that, After the virtual machine to be updated in the same storage area has completed the update and the virtual machine software that does not need to be updated has been copied, the software update method further includes: switching the virtual machine software to run in the designated storage area.
14. A software update module, characterized in that, Used to run the software update method as described in any one of claims 1 to 13.
15. A vehicle-mounted controller, characterized in that, It includes several electronic control units and a software update module running as described in claim 14; wherein the electronic control units include several microcontrollers, and at least some of the microcontrollers run several virtual machines.
16. The vehicle controller according to claim 15, characterized in that, The microcontroller stores a virtual machine monitor, wherein some processes in the software update module are executed within the virtual machine monitor, and / or, some processes in the software update module are executed within the virtual machine managed by the virtual machine monitor.
17. The vehicle controller according to claim 15, characterized in that, The microcontroller also includes several kernels, and some processes in the software update module are executed within the kernels that are not under the jurisdiction of the virtual machine monitoring.
18. The vehicle controller according to claim 15, characterized in that, The microcontroller also includes a master node for over-the-air (OTA) download technology, within which some processes in the software update module are executed.
19. A cloud processing platform, characterized in that, Used to run the software update method as described in any one of claims 1 to 13.
20. A computer program product, characterized in that, This includes a software update method as described in any one of claims 1 to 13, used when the computer program product is executed on a computer device.
21. A computer-readable storage medium, characterized in that, The computer program product as described in claim 20 is encoded on the computer-readable storage medium.
Citation Information
Patent Citations
Terminal remote automatic updating system based on NB-IoT
CN110457053A
Information processing device, moving object, and information processing method
US20220027166A1
Electronic control unit, software update method, software update program product and electronic control system
US20220171612A1
