Method and device for upgrading controller, vehicle and storage medium
By determining the controller type and preset upgrade conditions, and using high-voltage controller power supply to upgrade low-voltage controllers, the safety hazards and low efficiency problems in traditional upgrade solutions are solved, and a more stable upgrade process and higher efficiency are achieved.
Patent Information
- Application Number
- CN202411213312.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-13
AI Technical Summary
Traditional controller upgrade solutions fail to effectively distinguish the upgrade differences between different controllers, which may lead to safety hazards in the upgrade process of low-voltage controllers and affect the upgrade efficiency.
By determining the type of target controller and preset upgrade conditions, the high-voltage controller is controlled to supply power to the low-voltage controller in a high-voltage state, and flash the upgrade file in a high-voltage state to ensure stable power supply and upgrade efficiency.
It improves the upgrade efficiency and safety of low-voltage controllers, ensures stable power supply during the upgrade process, and reduces potential risks and energy consumption.
Smart Images

Figure CN119127250A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicles, and more specifically, to a method, a device, a vehicle and a storage medium for upgrading a controller in the field of vehicles. Background Art
[0002] With the development of vehicle technology, people have higher and higher requirements for vehicle safety and comfort. In order to ensure that the controller in the vehicle has better performance, people need to upgrade the controller regularly.
[0003] However, there are many types of controllers in vehicles, including low-voltage controllers. In some embodiments, the vehicle is an electric vehicle. After the electric vehicle is powered on, the low-voltage controller in the electric vehicle will be in a powered-on state. Traditional controller upgrade solutions do not distinguish between upgrade differences between different controllers. If the traditional controller upgrade solution is used to upgrade the low-voltage controller, there may be safety hazards, which in turn affects the upgrade efficiency of the low-voltage controller.
[0004] Therefore, a method for upgrading a controller is urgently needed to improve the upgrading efficiency of the low-voltage controller. Summary of the invention
[0005] The present application provides a method, device, vehicle and storage medium for upgrading a controller. The method can ensure stable power supply of the low-voltage controller during the upgrade process, and further improve the upgrade efficiency of the low-voltage controller.
[0006] In a first aspect, a method for upgrading a controller is provided, the method comprising: in response to an upgrade instruction for a target controller in a vehicle, determining the type of the target controller; if the type is a low-voltage controller, determining whether the vehicle meets preset upgrade conditions; if the vehicle meets the preset upgrade conditions, controlling a high-voltage controller in the vehicle to be in a high-voltage state, the high-voltage state being a state for powering the low-voltage controller; and in the high-voltage state, flashing an upgrade file of the low-voltage controller to the low-voltage controller.
[0007] In the above technical solution, the vehicle responds to the upgrade instruction of the target controller in the vehicle and determines the type of the target controller. This is because the upgrade process of different types of target controllers is different. When the type is a low-voltage controller and the vehicle meets the preset upgrade conditions, the vehicle controls the high-voltage controller in the vehicle to be in a high-voltage state. The high-voltage controller is connected to the high-voltage battery in the vehicle through a high-voltage wiring harness. In the high-voltage state, the high-voltage controller can control the high-voltage battery to supply power to the entire vehicle. The high-voltage battery is indirectly connected to the low-voltage controller in the vehicle through a converter, and then the high-voltage battery can also supply power to the low-voltage controller. Furthermore, in the high-voltage state, the vehicle writes the upgrade file of the low-voltage controller to the low-voltage controller. In this way, the method can ensure the stable power supply of the low-voltage controller during the upgrade process and improve the upgrade efficiency of the low-voltage controller.
[0008] In combination with the first aspect, in some possible implementations, determining the type of the target controller includes: when the rated voltage of the target controller is less than or equal to the first voltage threshold, determining that the type is a low voltage controller; when the rated voltage is greater than the first voltage threshold, determining whether the rated voltage is greater than or equal to a second voltage threshold, and the second voltage threshold is greater than the first voltage threshold; when the rated voltage is greater than or equal to the second voltage threshold, determining that the type is a high voltage controller; when the rated voltage is greater than the first voltage threshold and less than the second voltage threshold, determining the type of the target controller based on the application scenario of the target controller.
[0009] In the above technical solution, the type of the target controller is related to the voltage range of the rated voltage of the target controller. The rated voltage of a high-voltage controller is usually much larger than the rated voltage of a low-voltage controller. Therefore, when the rated voltage of the target controller is less than or equal to the first voltage threshold, the method determines that the type is a low-voltage controller; and when the rated voltage of the target controller is greater than or equal to the second voltage threshold, the method determines that the type is a high-voltage controller, wherein the second voltage threshold is greater than the first voltage threshold. In addition, there is a situation where the rated voltage is between the first voltage threshold and the second voltage threshold. In order to accurately judge the type of the target controller, the method introduces the application scenario of the target controller and determines the type of the target controller based on the application scenario.
[0010] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the type of the target controller is determined based on the application scenario of the target controller, including: when the application scenario indicates that the target controller is used for the auxiliary system of the vehicle or for managing the low-voltage electrical system of the vehicle, determining that the type is a low-voltage controller; when the application scenario indicates that the target controller is used to manage the high-voltage electrical system of the vehicle, determining that the type is a high-voltage controller.
[0011] In the above technical solution, the low-voltage controller is suitable for low-voltage power systems in home environments and light industrial environments, such as lighting systems, air-conditioning systems, and small motors, or for managing the low-voltage electrical system of the vehicle. Therefore, the method determines that the type is a low-voltage controller when the application scenario of the target controller indicates that the target controller is used for the auxiliary system of the vehicle or for managing the low-voltage electrical system of the vehicle. However, the high-voltage controller is suitable for high-voltage electrical systems such as power systems of high-voltage transmission lines, substations, heavy industry, large-scale power facilities, power plants, mines, and large manufacturing plants. Therefore, the method determines that the type is a high-voltage controller when the application scenario of the target controller indicates that the target controller is used to manage the high-voltage electrical system of the vehicle. The above method can accurately determine the type of the target controller through the specific application scenarios of the low-voltage controller or the high-voltage controller.
[0012] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, determining whether the vehicle meets the preset upgrade conditions includes: when the vehicle is stationary, determining whether the remaining power of the vehicle is greater than the preset power; when the remaining power is greater than the preset power, determining whether the communication status of the vehicle is in a normal state; when the communication status is in the normal state, determining whether the current environment of the vehicle meets the preset environmental conditions; when the current environment meets the preset environmental conditions, determining that the vehicle meets the preset upgrade conditions.
[0013] In the above technical solution, before upgrading the low-voltage controller, it is gradually determined whether the low-voltage controller meets the preset upgrade conditions based on a variety of judgment conditions. Specifically, the vehicle first determines that the vehicle is in a stationary state. This is because if a low-voltage controller is upgraded when the vehicle is in a running state, the vehicle component being controlled by the low-voltage controller will change state, and the change in state of the vehicle component may affect the driving safety of the vehicle. Further, the vehicle determines that the remaining power of the vehicle is greater than the preset power, because more remaining power can ensure the stable power supply of the low-voltage controller during the upgrade process. In addition, the vehicle determines that the communication state of the vehicle is in a normal state, which is to ensure that the vehicle can receive the upgrade file for upgrading the low-voltage controller. The upgrade process of the low-voltage controller usually needs to be carried out under good environmental conditions, because the upgrade process of the low-voltage controller may be affected by a variety of environmental factors, such as temperature, humidity and electromagnetic interference. If these environmental factors are not suitable, it may cause the upgrade process to be interrupted, data to be damaged, or the function of the low-voltage controller to be abnormal, thereby affecting the safety and reliability of the vehicle. Therefore, the method also determines that the current environment in which the vehicle is located needs to meet the preset environmental conditions.
[0014] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, before the upgrade file of the low-voltage controller is flashed to the low-voltage controller, the method also includes: obtaining an original upgrade file for upgrading the low-voltage controller, the original upgrade file being a file encrypted by a first public key; decrypting the original upgrade file based on a first private key to obtain a candidate upgrade file, the first private key corresponding to the first public key; performing hash calculation on the candidate upgrade file based on a preset hash algorithm to obtain a hash value; when the hash value is the same as the original hash value of the original upgrade file, determining the candidate upgrade file as the upgrade file of the low-voltage controller.
[0015] In the above technical solution, the method decrypts the original upgrade file for upgrading the low-voltage controller based on the first private key, and performs hash calculation on the decrypted candidate upgrade file based on a preset hash algorithm to obtain a hash value. In this way, the actual hash value in the upgrade file can be obtained. When the hash value is the same as the original hash value (expected hash value) of the original upgrade file, it indicates that the upgrade file has not been tampered with during the transmission or storage process, and the integrity of the upgrade file is good. Further, the upgrade file of the low-voltage controller is flashed to the low-voltage controller. In this way, by upgrading the low-voltage controller with an upgrade file that has not been tampered with, the safety and reliability of the upgraded low-voltage controller can be ensured. In addition, by upgrading the low-voltage controller with a complete upgrade file, it can be ensured that new functions are introduced into the low-voltage controller or existing functions are improved, thereby improving the overall performance of the low-voltage controller.
[0016] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the upgrade file of the low-voltage controller is flashed to the low-voltage controller, including: obtaining the original software program in the original program file corresponding to the low-voltage controller; comparing the original software program with the upgrade software program in the upgrade file to obtain a difference program in the original program file that is different from the upgrade software program; replacing the difference program with the corresponding upgrade software program in the upgrade file, so as to flash the upgrade file of the low-voltage controller to the low-voltage controller.
[0017] In the above technical solution, the original software program in the original program file corresponding to the low-voltage controller is obtained, that is, the software program in the program file corresponding to the low-voltage controller before the upgrade is obtained. Subsequently, the original software program is compared with the upgraded software program in the upgrade file, and a difference program different from the upgraded software program in the original program file can be obtained, that is, the software program to be upgraded. Further, the difference program is replaced with the corresponding upgraded software program in the upgrade file. In other words, the method adopts a differential upgrade method to only replace the software program to be upgraded with the corresponding upgraded software program in the upgrade file, which can speed up the upgrade process and meet the upgrade requirements for the low-voltage controller in an environment with a slow network connection speed. In addition, this method only involves the software program to be upgraded, and only needs to replace a small amount of programs, which reduces the potential risks in the upgrade process and can effectively prevent malicious programs from spreading through the upgrade process. At the same time, this method only transmits or stores only the software program to be upgraded, which can significantly reduce the required network bandwidth and storage space, thereby reducing the energy consumption of the vehicle for upgrading the low-voltage controller.
[0018] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the method also includes at least one of the following: sending a reminder message to a target terminal, which is a terminal with control authority over the vehicle, and the reminder message is used to remind the vehicle that the upgrade operation of the target controller failed to be successfully completed due to failure to meet the preset upgrade conditions; outputting the reminder message through a first vehicle component in the vehicle; and controlling a second vehicle component in the vehicle to vibrate based on the reminder message.
[0019] In the above technical solution, the vehicle sends a reminder message to the target terminal, so that the target object of the target terminal can view the reminder message to remind the vehicle that the preset upgrade condition is not met, resulting in the failure to successfully complete the upgrade operation of the target controller. Alternatively, the vehicle controls the output of the reminder message on a first vehicle component in the vehicle or controls the vibration of a second vehicle component in the vehicle based on the reminder message to remind the vehicle that the preset upgrade condition is not met, resulting in the failure to successfully complete the upgrade operation of the target controller, so that the vehicle user can promptly discover the reason for the failure to successfully upgrade and take countermeasures.
[0020] In a second aspect, a device for upgrading a controller is provided, the device comprising: a determination module, for: in response to an upgrade instruction for a target controller in a vehicle, determining the type of the target controller; and, if the type is a low-voltage controller, determining whether the vehicle meets preset upgrade conditions; a control module, for, if the vehicle meets the preset upgrade conditions, controlling a high-voltage controller in the vehicle to be in a high-voltage state, the high-voltage state being a state for powering the low-voltage controller; and a flashing module, for flashing an upgrade file of the low-voltage controller to the low-voltage controller under the high-voltage state.
[0021] In combination with the second aspect, in some possible implementations, the determination module is specifically used to: when the rated voltage of the target controller is less than or equal to the first voltage threshold, determine that the type is a low voltage controller; when the rated voltage is greater than the first voltage threshold, determine whether the rated voltage is greater than or equal to the second voltage threshold, and the second voltage threshold is greater than the first voltage threshold; when the rated voltage is greater than or equal to the second voltage threshold, determine that the type is a high voltage controller; when the rated voltage is greater than the first voltage threshold and less than the second voltage threshold, determine the type of the target controller based on the application scenario of the target controller.
[0022] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the determination module is specifically used to: when the application scenario indicates that the target controller is used for the auxiliary system of the vehicle or for managing the low-voltage electrical system of the vehicle, determine that the type is a low-voltage controller; when the application scenario indicates that the target controller is used to manage the high-voltage electrical system of the vehicle, determine that the type is a high-voltage controller.
[0023] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the determination module is specifically used to: when the vehicle is stationary, determine whether the remaining power of the vehicle is greater than the preset power; when the remaining power is greater than the preset power, determine whether the communication status of the vehicle is in a normal state; when the communication status is in the normal state, determine whether the current environment of the vehicle meets the preset environmental conditions; when the current environment meets the preset environmental conditions, determine that the vehicle meets the preset upgrade conditions.
[0024] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, before the upgrade file of the low-voltage controller is flashed to the low-voltage controller, the device also includes: an acquisition module, used to obtain the original upgrade file for upgrading the low-voltage controller, and the original upgrade file is a file encrypted by a first public key; the determination module is also used to decrypt the original upgrade file based on the first private key to obtain a candidate upgrade file, and the first private key corresponds to the first public key; the device also includes: a calculation module, used to perform hash calculation on the candidate upgrade file based on a preset hash algorithm to obtain a hash value; the determination module is also used to determine the candidate upgrade file as the upgrade file of the low-voltage controller when the hash value is the same as the original hash value of the original upgrade file.
[0025] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the acquisition module is also used to obtain the original software program in the original program file corresponding to the low-voltage controller; the comparison module is used to compare the original software program with the upgraded software program in the upgrade file to obtain a difference program in the original program file that is different from the upgraded software program; the flashing module is specifically used to replace the difference program with the corresponding upgraded software program in the upgrade file, so as to flash the upgrade file of the low-voltage controller to the low-voltage controller.
[0026] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the device also includes: a reminder module, used for at least one of the following: sending a reminder message to a target terminal, the target terminal is a terminal with control authority over the vehicle, the reminder message is used to remind the vehicle that the upgrade operation of the target controller failed to be successfully completed due to failure to meet the preset upgrade conditions; outputting the reminder message through a first vehicle component in the vehicle; and controlling a second vehicle component in the vehicle to vibrate based on the reminder message.
[0027] In a third aspect, a vehicle is provided, comprising a memory, a processor, and an executable program code stored in the memory and running on the processor, wherein when the processor executes the executable program code, the vehicle executes the method in the above-mentioned first aspect or any possible implementation of the first aspect.
[0028] In a fourth aspect, a computer-readable storage medium is provided, which stores instructions. When the instructions are executed on a computer or a processor, the computer or the processor executes the method in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is a schematic diagram of a scenario of using a vehicle provided in an embodiment of the present application;
[0030] Figure 2 is a schematic flow chart of a method for upgrading a controller provided in an embodiment of the present application;
[0031] Figure 3 is a schematic diagram of determining that a vehicle meets a preset upgrade condition provided by an embodiment of the present application;
[0032] Figure 4 It is a schematic diagram of determining whether electromagnetic interference exists in the current environment provided by an embodiment of the present application;
[0033] Figure 5 is a structural schematic diagram of a high-voltage controller provided in an embodiment of the present application;
[0034] Figure 6 It is a structural schematic diagram of a device for upgrading a controller provided in an embodiment of the present application;
[0035] Figure 7 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The technical solutions in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, "multiple" means two or more than two. The terms "first" and "second" are used for descriptive purposes only and should not be understood as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.
[0037] Figure 1 It is a schematic diagram of a scenario of using a vehicle provided in an embodiment of the present application.
[0038] For example, Figure 1 As shown, the driver can drive vehicle A to the destination. During driving, the driver can adjust the current driving mode of vehicle A through the driving mode controller.
[0039] In some embodiments, the current driving mode is adjusted from the economy mode to the sand mode by the driving mode controller.
[0040] It should be understood that the economic mode in the above scheme refers to the driving mode that saves the most fuel but has relatively less power. Specifically, the fuel injection is reduced to make the engine speed smoother to achieve the best fuel effect, thereby putting the vehicle in economic mode; the sand mode refers to a driving mode suitable for driving on soft and dry sand, beaches or deserts.
[0041] It should also be understood that the driving mode controller stores the original software program for controlling the driving mode. As time goes by and vehicle technology develops, the driving modes supported by the vehicle will increase. This requires the vehicle to upgrade the driving mode controller, that is, to update the original software program for controlling the driving mode, and flash the upgraded software program in the upgrade file to the driving mode controller. In addition, the driving mode controller is a low-voltage controller.
[0042] However, there are many types of controllers in vehicles, and traditional controller upgrade solutions do not distinguish the upgrade differences between different controllers. If traditional controller upgrade solutions are used to upgrade low-voltage controllers, there may be safety hazards, which in turn affects the upgrade efficiency of low-voltage controllers.
[0043] In order to solve the above problems, this application proposes a method for upgrading a controller to improve the upgrading efficiency of a low-voltage controller. The specific steps can be found in Figure 2 .
[0044] Figure 2 It is a schematic flow chart of a method for upgrading a controller provided in an embodiment of the present application.
[0045] It should be understood that the method for upgrading a controller provided in the embodiment of the present application can be applied to a vehicle (such as Figure 1 Vehicle A) shown.
[0046] For example, Figure 2 As shown, the method 200 includes:
[0047] Step 201 : In response to an upgrade instruction for a target controller in a vehicle, the vehicle determines the type of the target controller.
[0048] It should be understood that the "target controller" in the above step 201 includes a low-voltage controller and a high-voltage controller. The low-voltage controller and the high-voltage controller are also two types of target controllers in the vehicle. A low-voltage controller refers to a control and protection device with a rated voltage below 1kV, which is used in low-voltage electrical systems in vehicles, such as auxiliary systems of the vehicle, which include lighting systems, air-conditioning systems, and multimedia systems. A high-voltage controller refers to a control and protection device with a rated voltage above 1kV, which is used in high-voltage electrical systems in vehicles, such as high-voltage safety management systems and battery systems.
[0049] In some embodiments, the low voltage controller is a vehicle lamp controller in the lighting system.
[0050] In some embodiments, the high voltage controller is a direct current to direct current (DCDC) controller in the battery system.
[0051] In some embodiments, the vehicle is an electric vehicle or a plug-in hybrid vehicle.
[0052] In some embodiments, step 201 includes any one of the following: in a case where a target controller among multiple vehicle controllers on a target display screen is selected by a target gesture, in response to an upgrade instruction to the target controller, the vehicle determines the type of the target controller; in a case where a target controller among multiple vehicle controllers on a target display screen is clicked, in response to an upgrade instruction to the target controller, the vehicle determines the type of the target controller; in a case where a target controller among multiple vehicle controllers on a target display screen is selected by voice, in response to an upgrade instruction to the target controller, the vehicle determines the type of the target controller.
[0053] In some embodiments, the target display screen is a vehicle-mounted display screen or a display screen on a target terminal, and the target terminal is communicatively connected to the vehicle.
[0054] It should be understood that the target terminal is a mobile terminal that has control authority over the vehicle.
[0055] In one possible implementation, the vehicle in step 201 determines the type of the target controller, including: when the rated voltage of the target controller is less than or equal to the first voltage threshold, the vehicle determines that the type is a low-voltage controller; when the rated voltage is greater than the first voltage threshold, the vehicle determines whether the rated voltage is greater than or equal to a second voltage threshold, and the second voltage threshold is greater than the first voltage threshold; when the rated voltage is greater than or equal to the second voltage threshold, the vehicle determines that the type is a high-voltage controller; when the rated voltage is greater than the first voltage threshold and less than the second voltage threshold, the vehicle determines the type of the target controller based on the application scenario of the target controller.
[0056] It should be understood that in the above scheme, "rated voltage" refers to the ideal operating voltage of the target controller when it works normally for a long time, also known as the nominal voltage. "Application scenario of the target controller" refers to the specific purpose for which the target controller is designed and used in different environments and conditions.
[0057] In the above technical solution, the type of the target controller is related to the voltage range of the rated voltage of the target controller. The rated voltage of a high-voltage controller is usually much larger than the rated voltage of a low-voltage controller. Therefore, when the rated voltage of the target controller is less than or equal to the first voltage threshold, the method determines that the type is a low-voltage controller; and when the rated voltage of the target controller is greater than or equal to the second voltage threshold, the method determines that the type is a high-voltage controller, wherein the second voltage threshold is greater than the first voltage threshold. In addition, there is a situation where the rated voltage is between the first voltage threshold and the second voltage threshold. In order to accurately judge the type of the target controller, the method introduces the application scenario of the target controller and determines the type of the target controller based on the application scenario.
[0058] In some embodiments, the first voltage threshold is 280V, and the second voltage threshold is 1 kV.
[0059] In one possible implementation, the vehicle determines the type of the target controller based on the application scenario of the target controller, including: when the application scenario indicates that the target controller is used for an auxiliary system of the vehicle or for managing a low-voltage electrical system of the vehicle, the vehicle determines that the type is a low-voltage controller; when the application scenario indicates that the target controller is used to manage a high-voltage electrical system in the vehicle, the vehicle determines that the type is a high-voltage controller.
[0060] It should be understood that in the above scheme, the "vehicle auxiliary system" is a vehicle system used to assist the vehicle and improve the riding experience. It assists the driver by using various sensors, controllers and actuators to improve driving safety, comfort and convenience. Without this auxiliary system, the vehicle can be in a driving state. "Vehicle high-voltage electrical system" refers to a series of vehicle components and systems used to store, transmit and control high-voltage electrical energy in electric vehicles or plug-in hybrid vehicles.
[0061] In the above technical solution, the low-voltage controller is suitable for low-voltage electrical systems in home environments and light industrial environments, such as lighting systems, air-conditioning systems, and small motors, or for managing the low-voltage electrical system of the vehicle. Therefore, the method determines that the type is a low-voltage controller when the application scenario of the target controller indicates that the target controller is used for the auxiliary system of the vehicle or for managing the low-voltage electrical system of the vehicle. However, the high-voltage controller is suitable for high-voltage electrical systems such as power systems of high-voltage transmission lines, substations, heavy industry, large-scale power facilities, power plants, mines, and large manufacturing plants. Therefore, the method determines that the type is a high-voltage controller when the application scenario of the target controller indicates that the target controller is used to manage the high-voltage electrical system of the vehicle. The above method can accurately determine the type of the target controller through the specific application scenarios of the low-voltage controller or the high-voltage controller.
[0062] In some embodiments, the auxiliary system of the vehicle includes any one of an air conditioning system, a lighting system, a multimedia system, a sensor system, and a switch system.
[0063] In some embodiments, the high-voltage electrical system of the vehicle includes any one of a battery system, a battery management system, an electric drive system, and a high-voltage safety management system.
[0064] Step 202 : When the type is a low voltage controller, the vehicle determines whether the vehicle meets a preset upgrade condition.
[0065] It should be understood that the "preset upgrade condition" in the above step 202 refers to the preset condition for upgrading the low voltage controller. The preset upgrade condition is related to the speed, position, remaining power, communication status and environment of the vehicle.
[0066] In one possible implementation, the vehicle in step 202 determines whether the vehicle meets preset upgrade conditions, including: when the vehicle is stationary, the vehicle determines whether the remaining power of the vehicle is greater than the preset power; when the remaining power is greater than the preset power, the vehicle determines whether the communication status of the vehicle is in a normal state; when the communication status is in the normal state, the vehicle determines whether the current environment of the vehicle meets the preset environmental conditions; when the current environment meets the preset environmental conditions, the vehicle determines that the vehicle meets the preset upgrade conditions.
[0067] It should be understood that in the above scheme, "the vehicle is stationary" means that the speed of the vehicle is zero and there is no displacement change. "Remaining power" refers to the percentage of remaining power or the absolute remaining power of the battery pack in the vehicle. Among them, the remaining power percentage refers to the proportion of remaining capacity to total capacity, usually expressed as a percentage. The absolute remaining power refers to the actual amount of power that the battery pack can still provide in the current state, usually in milliampere hours or watt-hours. Among them, the battery pack is the high-voltage battery in the above scheme.
[0068] In the above technical solution, before upgrading the low-voltage controller, it is gradually determined whether the low-voltage controller meets the preset upgrade conditions based on a variety of judgment conditions. Specifically, the vehicle first determines that the vehicle is in a stationary state. This is because if a low-voltage controller is upgraded when the vehicle is in a running state, the vehicle component being controlled by the low-voltage controller will change state, and the change in state of the vehicle component may affect the driving safety of the vehicle. Further, the vehicle determines that the remaining power of the vehicle is greater than the preset power, because more remaining power can ensure the stable power supply of the low-voltage controller during the upgrade process. In addition, the vehicle determines that the communication state of the vehicle is in a normal state, which is to ensure that the vehicle can receive the upgrade file for upgrading the low-voltage controller. The upgrade process of the low-voltage controller usually needs to be carried out under good environmental conditions, because the upgrade process of the low-voltage controller may be affected by a variety of environmental factors, such as temperature, humidity and electromagnetic interference. If these environmental factors are not suitable, it may cause the upgrade process to be interrupted, data to be damaged, or the function of the low-voltage controller to be abnormal, thereby affecting the safety and reliability of the vehicle. Therefore, the method also determines that the current environment in which the vehicle is located needs to meet the preset environmental conditions.
[0069] Figure 3 It is a schematic diagram provided in an embodiment of the present application for determining whether a vehicle meets preset upgrade conditions.
[0070] For example, Figure 3 As shown, the vehicle determines whether the vehicle is stationary; when the vehicle is stationary, the vehicle determines whether the remaining power of the vehicle is greater than the preset power. When the remaining power is greater than the preset power, the vehicle determines whether the communication state of the vehicle is in a normal state. When the communication state is in the normal state, the vehicle determines whether the current environment of the vehicle meets the preset environmental conditions. When the current environment meets the preset environmental conditions, the vehicle determines that the vehicle meets the preset upgrade conditions. When the vehicle is driving, or, when the remaining power is less than or equal to the preset power, or, when the communication state is in an abnormal state, the vehicle determines that the current environment of the vehicle does not meet the preset environmental conditions.
[0071] In some embodiments, the method for determining that the vehicle is stationary includes: the vehicle obtains a first speed of the vehicle at a first moment and a second speed of the vehicle at a second moment through a speed sensor in the vehicle, and obtains a first position at the first moment and a second position at the second moment through a locator in the vehicle; when the first speed and the second speed are the same and are preset values, and the first position and the second position are the same, the vehicle determines that the vehicle is stationary.
[0072] In some embodiments, the preset value is 0 m / s.
[0073] In some embodiments, the locator is a Global Positioning System (GPS) locator or a Global System for Mobile Communications (GSM) locator.
[0074] In some embodiments, the method for determining the remaining power of the vehicle includes: when the remaining power is a remaining power percentage, the vehicle obtains the remaining power percentage through a dashboard in the vehicle; when the remaining power is an absolute remaining power, the vehicle receives the absolute remaining power uploaded by a battery management system in the vehicle, and the absolute remaining power is determined based on the remaining power percentage and the number of batteries.
[0075] In some embodiments, the method for determining the absolute remaining power includes: determining the absolute remaining power based on the following formula (1);
[0076]
[0077] Among them, Q α is the absolute remaining power, soc α is the remaining power percentage, OCV is the open circuit voltage of the battery, b is the number of batteries, and C1 is the rated capacity of the battery.
[0078] It should be understood that the combination of battery packs in the vehicle includes a series connection and / or a parallel connection. The above formula (1) describes the absolute remaining power determined when the combination of battery packs is a series connection. Among them, OCV is the open circuit voltage of a battery, b is the number of batteries connected in series in the battery pack, and C1 is the rated capacity of a battery in the battery pack.
[0079] It should also be understood that when the battery pack is connected in parallel, the absolute remaining capacity can be expressed by the following formula (2): Determine, where Q α is the absolute remaining power, soc α is the remaining power percentage, OCV is the open circuit voltage of a battery in the battery pack, c is the number of batteries connected in parallel in the battery pack, and C1 is the rated capacity of a battery in the battery pack.
[0080] It should also be understood that when the battery pack is connected in series or in parallel, the vehicle needs to consider whether the battery pack is connected in parallel first and then in series or in series first and then in parallel when determining the absolute remaining capacity of the battery pack. Parallel first and then in series means that multiple batteries are first connected in parallel and then in series with other batteries, and series first and then in parallel means that multiple batteries are first connected in series and then in parallel with other batteries. When the battery pack is connected in parallel first and then in series, the parallel part can be discussed first by formula (2), and then the series part can be further discussed by formula (1). Similarly, the absolute remaining capacity of the battery pack whose combination is first in series and then in parallel can be determined.
[0081] In some embodiments, a vehicle determines whether the communication status of the vehicle is in a normal state, including: the vehicle sends a test signal to the cloud platform; when a response signal from the cloud platform to the test signal is received within a preset time, the vehicle determines that the communication status is in a normal state.
[0082] It should be understood that in the above scheme, the "cloud platform" is a remote server that provides services such as storage, processing and analysis of vehicle data. The vehicle can upload vehicle data to the cloud platform through a wireless network to achieve remote monitoring, maintenance and data sharing. The "test signal" usually includes a series of predefined data packets or commands. The test signal is used to verify whether the communication link between the vehicle and the cloud platform is unobstructed, whether the data transmission is accurate, and whether the communication protocol works as expected. In some embodiments, the test signal includes heartbeat dynamics, diagnostic commands, status reports, and test data packets for triggering specific responses.
[0083] In some embodiments, a vehicle determines whether a current environment in which the vehicle is located satisfies preset environmental conditions, including: the vehicle determines whether a current temperature in the current environment is within a preset temperature range; if the current temperature is within the preset temperature range, the vehicle determines whether a current humidity in the current environment is within a preset humidity range; if the current humidity is within the preset humidity range, the vehicle determines whether there is electromagnetic interference in the current environment; if there is no electromagnetic interference in the current environment, the vehicle determines that the current environment satisfies the preset environmental conditions.
[0084] In the above technical solution, extreme temperatures may affect the performance of the low-voltage controller. Overheating may accelerate the aging of the low-voltage controller, while overcooling may cause the low-voltage controller to start slowly or respond abnormally. Therefore, upgrading the low-voltage controller in an environment with suitable temperature can avoid the risk of overheating or overcooling, ensure the integrity of the software program and improve the upgrade efficiency of the low-voltage controller. In addition, a high-humidity environment may cause condensation to form on the surface of the low-voltage controller, causing short circuits or corrosion, affecting the normal operation of the low-voltage controller. During the upgrade process of the low-voltage controller, moderate ambient humidity can reduce potential electrical failures. Furthermore, electronic devices generate electromagnetic fields when working, and electromagnetic interference may affect the reading, writing and transmission of upgrade files, resulting in damage to the software program in the upgrade file. When upgrading the low-voltage controller, try to avoid operating in a strong electromagnetic interference environment to ensure the integrity of the software program and the stability of the upgrade process.
[0085] In some embodiments, the vehicle determines whether there is electromagnetic interference in the current environment, including: when a preset abnormal phenomenon occurs in an electronic device on the vehicle, the vehicle determines whether there is a preset electromagnetic source in the current environment, the preset electromagnetic source includes at least one of a high-voltage transmission line, a substation, a radio transmission tower and a radar station, and the preset abnormal phenomenon includes any one of a flashing screen phenomenon, a half-screen phenomenon, a blue screen phenomenon and a screen flipping phenomenon; when a preset electromagnetic source exists in the current environment, the vehicle determines that there is electromagnetic interference in the current environment; when the preset electromagnetic source does not exist in the current environment, the vehicle detects the electromagnetic field strength of the current environment by using an electromagnetic field strength tester; when the electromagnetic field strength is greater than or equal to the preset strength, the vehicle determines that there is electromagnetic interference in the current environment; when the electromagnetic field strength is less than the preset strength, the vehicle determines that there is no electromagnetic interference in the current environment.
[0086] It should be understood that in the above scheme, "screen flashing phenomenon" refers to the phenomenon of brief changes in brightness or image flickering on the display screen of the electronic device. "Half screen phenomenon" refers to the phenomenon that only half of the display screen of the electronic device can display normally, while the other half is black or displays abnormally. "Blue screen phenomenon" refers to the phenomenon that the background color of the display screen of the electronic device is blue. "Screen flip phenomenon" is used to indicate that the content of the display screen of the electronic device appears upside down or left to right.
[0087] Figure 4 It is a schematic diagram provided by an embodiment of the present application for determining whether electromagnetic interference exists in the current environment.
[0088] For example, Figure 4As shown, the vehicle determines whether a preset abnormal phenomenon occurs in the electronic equipment on the vehicle. When a preset abnormal phenomenon occurs in the electronic equipment on the vehicle, the vehicle determines whether a preset electromagnetic source exists in the current environment. When a preset electromagnetic source exists in the current environment, the vehicle determines that electromagnetic interference exists in the current environment. When the preset electromagnetic source does not exist in the current environment, the vehicle detects the electromagnetic field strength of the current environment through an electromagnetic field strength tester. When the electromagnetic field strength is greater than or equal to the preset strength, the vehicle determines that electromagnetic interference exists in the current environment. When the electromagnetic field strength is less than the preset strength, the vehicle determines that electromagnetic interference does not exist in the current environment. When the preset abnormal phenomenon does not occur in the electronic equipment on the vehicle, the vehicle determines that electromagnetic interference does not exist in the current environment.
[0089] Step 203, when the vehicle meets the preset upgrade condition, the vehicle controls the high-voltage controller in the vehicle to be in a high-voltage state, and the high-voltage state is a state for supplying power to the low-voltage controller.
[0090] It should be understood that "the high-voltage controller is in a high-voltage state" in the above step 203 means that the high-voltage controller is in a powered-on state, and the voltage of the system monitored by the high-voltage controller has reached a preset high-voltage threshold. The high-voltage controller is connected to the high-voltage battery through a high-voltage wiring harness, and the high-voltage controller can control the high-voltage battery to supply power to the vehicle. The high-voltage battery is indirectly connected to the low-voltage controller in the vehicle through a converter (such as a DC / DC converter), and the high-voltage battery can also supply power to the low-voltage controller.
[0091] Figure 5 It is a structural schematic diagram of a high-voltage controller provided in an embodiment of the present application.
[0092] For example, Figure 5 As shown, the high-voltage controller is connected to the high-voltage battery. During the upgrade of the low-voltage controller, the vehicle controls the high-voltage controller to be in a high-voltage state. In this high-voltage state, the high-voltage controller can control the high-voltage battery to power the entire vehicle. The high-voltage battery is indirectly connected to the low-voltage controller in the vehicle through a DC / DC converter (DC / DC converter), and the high-voltage battery can also power the low-voltage controller. In other words, the high-voltage battery can ensure the stable power supply of the low-voltage controller during the upgrade process.
[0093] Step 204 , in the high-voltage state, the vehicle flashes the upgrade file of the low-voltage controller to the low-voltage controller.
[0094] It should be understood that in the above step 204, the "upgrade file of the low-voltage controller" refers to the file in which the software program corresponding to the control logic of the new version of the low-voltage controller is stored. "Flashing the upgrade file of the low-voltage controller to the low-voltage controller" means transferring the software program corresponding to the control logic of the new version of the low-voltage controller to the low-voltage controller through a specific tool or specific software to replace the old version of the software program (original software program).
[0095] In one possible implementation, before the vehicle in step 204 flashes the upgrade file of the low-voltage controller to the low-voltage controller, the method 200 also includes: the vehicle obtains an original upgrade file for upgrading the low-voltage controller, and the original upgrade file is a file encrypted by a first public key; the vehicle decrypts the original upgrade file based on a first private key to obtain a candidate upgrade file, and the first private key corresponds to the first public key; the vehicle performs a hash calculation on the candidate upgrade file based on a preset hash algorithm to obtain a hash value; when the hash value is the same as the original hash value of the original upgrade file, the vehicle determines the candidate upgrade file as the upgrade file of the low-voltage controller.
[0096] It should be understood that in the above scheme, the "first public key" refers to a key that can be made public. The "first private key" refers to a key that appears in pairs with the first public key, that is, encryption by the first public key requires decryption by the first private key. Among them, the original upgrade file is the file encrypted by the cloud platform using the first public key.
[0097] It should also be understood that the "original hash value of the original upgrade file" in the above solution is obtained by the cloud platform performing a hash operation on the original upgrade file using a preset hash algorithm. In addition, a hash algorithm is an algorithm that converts an input of any length into a hash value or a hash value of a fixed length through a hash function.
[0098] In the above technical solution, the method decrypts the original upgrade file for upgrading the low-voltage controller based on the first public key, and performs hash calculation on the decrypted candidate upgrade file based on a preset hash algorithm to obtain a hash value. In this way, the actual hash value in the upgrade file can be obtained. When the hash value is the same as the original hash value (expected hash value) of the original upgrade file, it indicates that the upgrade file has not been tampered with during the transmission or storage process, and the integrity of the upgrade file is good. Further, the upgrade file of the low-voltage controller is flashed to the low-voltage controller. In this way, by upgrading the low-voltage controller with an upgrade file that has not been tampered with, the safety and reliability of the upgraded low-voltage controller can be ensured. In addition, by upgrading the low-voltage controller with a complete upgrade file, it can be ensured that new functions are introduced into the low-voltage controller or existing functions are improved, thereby improving the overall performance of the low-voltage controller.
[0099] In some embodiments, the preset hash algorithm is a message digest (Message-Digest 5, MD5) algorithm or a secure hash algorithm (Secure Hash Algorithm-1, SHA-1).
[0100] In some embodiments, the vehicle performs a hash calculation on the decrypted upgrade file based on a preset hash algorithm to obtain a hash value, including: the vehicle converts the decrypted upgrade file into binary data; the vehicle converts the binary data into the hash value of a preset length through the preset hash algorithm.
[0101] In one possible implementation, the vehicle in step 204 flashes the upgrade file of the low-voltage controller to the low-voltage controller, including: the vehicle obtains the original software program in the original program file corresponding to the low-voltage controller; the vehicle compares the original software program with the upgraded software program in the upgrade file to obtain a difference program in the original program file that is different from the upgraded software program; the vehicle replaces the difference program with the corresponding upgraded software program in the upgrade file to flash the upgrade file of the low-voltage controller to the low-voltage controller.
[0102] It should be understood that in the above scheme, "the difference program in the original program file that is different from the upgraded software program" refers to the software program to be upgraded in the original program file. "Replacing the difference program with the corresponding upgraded software program in the upgraded file" means replacing the software program to be upgraded with the upgraded software program corresponding to the position of the difference program in the upgraded software program.
[0103] In the above technical solution, the original software program in the original program file corresponding to the low-voltage controller is obtained, that is, the software program in the program file corresponding to the low-voltage controller before the upgrade is obtained. Subsequently, the original software program is compared with the upgraded software program in the upgrade file, and a difference program different from the upgraded software program in the original program file can be obtained, that is, the software program to be upgraded. Further, the difference program is replaced with the corresponding upgraded software program in the upgrade file. In other words, the method adopts a differential upgrade method to only replace the software program to be upgraded with the corresponding upgraded software program in the upgrade file, which can speed up the upgrade process and meet the upgrade requirements for the low-voltage controller in an environment with a slow network connection speed. In addition, this method only involves the software program to be upgraded, and only needs to replace a small amount of programs, which reduces the potential risks in the upgrade process and can effectively prevent malicious programs from spreading through the upgrade process. At the same time, this method only transmits or stores only the software program to be upgraded, which can significantly reduce the required network bandwidth and storage space, thereby reducing the energy consumption of the vehicle for upgrading the low-voltage controller.
[0104] In some embodiments, the difference program includes multiple program blocks, and the vehicle replaces the difference program with the corresponding upgrade software program in the upgrade file, including: for any program block, the vehicle determines a first program block with a first preset number of lines before the program block in the original software program, and a second program block with a second preset number of lines after the program block; the vehicle determines the upgrade software program between the first program block and the second program block as a target program block in the upgrade software program in the upgrade file; and the vehicle replaces the program block with the target program block.
[0105] In some embodiments, step 204 includes: in the high-voltage state, the vehicle obtains the upgrade file of the low-voltage controller through the wireless communication network, and flashes the upgrade file of the low-voltage controller to the low-voltage controller.
[0106] In the above technical solution, the vehicle obtains the upgrade file of the low-voltage controller in the cloud platform through the wireless communication network, so that the vehicle user can upgrade the low-voltage controller based on the upgrade file of the low-voltage controller without driving the vehicle to the vehicle service center. Therefore, this method can complete the remote upgrade of the low-voltage controller.
[0107] In one possible implementation, the method 200 also includes at least one of the following: the vehicle sends a reminder message to a target terminal, which is a terminal with control authority over the vehicle, and the reminder message is used to remind the vehicle that the upgrade operation of the target controller has not been successfully completed due to failure to meet the preset upgrade conditions; the vehicle outputs the reminder message through a first vehicle component in the vehicle; and the vehicle controls a second vehicle component in the vehicle to vibrate based on the reminder message.
[0108] It should be understood that the "reminder information" can be output in the form of text notification, sound notification, vibration notification, etc.
[0109] In the above technical solution, the vehicle sends a reminder message to the target terminal, so that the target object of the target terminal can view the reminder message to remind the vehicle that the preset upgrade condition is not met, resulting in the failure to successfully complete the upgrade operation of the target controller. Alternatively, the vehicle controls the output of the reminder message on a first vehicle component in the vehicle or controls the vibration of a second vehicle component in the vehicle based on the reminder message to remind the vehicle that the preset upgrade condition is not met, resulting in the failure to successfully complete the upgrade operation of the target controller, so that the vehicle user can promptly discover the reason for the failure to successfully upgrade and take countermeasures.
[0110] In some embodiments, the method 200 further includes: when the type is a high-voltage controller, the vehicle controls the high-voltage controller to exit the high-voltage state, and writes the upgrade file of the high-voltage controller to the high-voltage controller.
[0111] It should be understood that in the above solution, before upgrading the high-voltage controller, controlling the high-voltage controller to exit the high-voltage state is for safety reasons. This ensures that there will be no unexpected high-voltage power supply during the upgrade process, thereby avoiding possible risks to personnel safety, equipment damage or data integrity.
[0112] It should also be understood that before "the vehicle controls the high-voltage controller to exit the high-voltage state and writes the upgrade file of the high-voltage controller to the high-voltage controller", it can also be determined whether the high-voltage controller meets the preset upgrade conditions. The preset upgrade conditions include that the vehicle has overcurrent protection function, overvoltage protection function and undervoltage protection function.
[0113] In the above technical solution, during the process of upgrading the high-voltage controller, the high-voltage controller is controlled to exit the high-voltage state, which can effectively prevent the high-voltage state of the vehicle from being confused during the upgrade of the high-voltage controller and reduce the probability of failure during the software upgrade of the high-voltage controller.
[0114] In some embodiments, the vehicle outputs the reminder information through a first vehicle component in the vehicle, including at least one of the following: the vehicle displays the reminder information on an on-board display screen; the vehicle plays the reminder information through an on-board voice output device.
[0115] In some embodiments, the vehicle controls a second vehicle component in the vehicle to vibrate based on the reminder information, including at least one of the following: the vehicle controls the steering wheel of the vehicle to vibrate based on the reminder information; the vehicle controls the seat of the vehicle to vibrate based on the reminder information.
[0116] Figure 6 It is a structural schematic diagram of a device for upgrading a controller provided in an embodiment of the present application.
[0117] For example, Figure 6 As shown, the device 600 includes:
[0118] The determination module 601 is used to:
[0119] In response to an upgrade instruction for a target controller in a vehicle, determining a type of the target controller;
[0120] In the case where the type is a low voltage controller, determining whether the vehicle meets a preset upgrade condition;
[0121] A control module 602 is used to control a high-voltage controller in the vehicle to be in a high-voltage state when the vehicle meets the preset upgrade condition, and the high-voltage state is a state for supplying power to the low-voltage controller;
[0122] The flashing module 603 is used to flash the upgrade file of the low voltage controller to the low voltage controller in the high voltage state.
[0123] Optionally, the determination module 601 is specifically used to: when the rated voltage of the target controller is less than or equal to the first voltage threshold, determine that the type is a low voltage controller; when the rated voltage is greater than the first voltage threshold, determine whether the rated voltage is greater than or equal to a second voltage threshold, and the second voltage threshold is greater than the first voltage threshold; when the rated voltage is greater than or equal to the second voltage threshold, determine that the type is a high voltage controller; when the rated voltage is greater than the first voltage threshold and less than the second voltage threshold, determine the type of the target controller based on the application scenario of the target controller.
[0124] Optionally, the determination module 601 is further specifically used to: when the application scenario indicates that the target controller is used for the auxiliary system of the vehicle or for managing the low-voltage electrical system of the vehicle, determine that the type is a low-voltage controller; when the application scenario indicates that the target controller is used to manage the high-voltage electrical system of the vehicle, determine that the type is a high-voltage controller.
[0125] Optionally, the determination module 601 is further specifically used to: when the vehicle is stationary, determine whether the remaining power of the vehicle is greater than a preset power; when the remaining power is greater than the preset power, determine whether the communication status of the vehicle is in a normal state; when the communication status is in the normal state, determine whether the current environment of the vehicle meets the preset environmental conditions; when the current environment meets the preset environmental conditions, determine that the vehicle meets the preset upgrade conditions.
[0126] Optionally, before the upgrade file of the low-voltage controller is flashed to the low-voltage controller, the device 600 also includes: an acquisition module, used to acquire the original upgrade file for upgrading the low-voltage controller, the original upgrade file is a file encrypted by a first public key; the determination module 601 is also used to decrypt the original upgrade file based on the first private key to obtain a candidate upgrade file, and the first private key corresponds to the first public key; the device 600 also includes: a calculation module, used to perform hash calculation on the candidate upgrade file based on a preset hash algorithm to obtain a hash value; the determination module 601 is also used to determine the candidate upgrade file as the upgrade file of the low-voltage controller when the hash value is the same as the original hash value of the upgrade file.
[0127] Optionally, the acquisition module is also used to obtain the original software program in the original program file corresponding to the low-voltage controller; the comparison module is used to compare the original software program with the upgraded software program in the upgrade file to obtain a difference program in the original program file that is different from the upgraded software program; the flashing module 603 is specifically used to replace the difference program with the corresponding upgraded software program in the upgrade file, so as to flash the upgrade file of the low-voltage controller to the low-voltage controller.
[0128] Optionally, the device 600 also includes: a reminder module, used for at least one of the following: sending a reminder message to a target terminal, the target terminal being a terminal with control authority over the vehicle, the reminder message being used to remind the vehicle that the upgrade operation of the target controller has not been successfully completed due to failure to meet the preset upgrade conditions; outputting the reminder message through a first vehicle component in the vehicle; and controlling a second vehicle component in the vehicle to vibrate based on the reminder message.
[0129] Figure 7 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application.
[0130] For example, Figure 7 As shown, the vehicle 700 includes: a memory 701, a processor 702, and an executable program code 703 stored in the memory 701 and running on the processor 702, wherein when the processor 702 executes the executable program code 703, the vehicle can execute any one of the controller upgrade methods described above.
[0131] In this embodiment, the functional modules of the vehicle can be divided according to the above method example. For example, each functional module can be corresponded, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0132] In the case of dividing each functional module according to each function, the vehicle may include: a determination module, a control module, a flashing module, a calculation module, an acquisition module, a comparison module, and a reminder module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0133] The vehicle provided in this embodiment is used to execute the above-mentioned method of upgrading the controller, and thus can achieve the same effect as the above-mentioned implementation method.
[0134] In the case of an integrated unit, the vehicle may include a processing module and a storage module. The processing module may be used to control and manage the actions of the vehicle. The storage module may be used for the vehicle to execute executable program codes and data.
[0135] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits shown in conjunction with the disclosure of the present application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.
[0136] This embodiment provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a computer or a processor, the computer or the processor executes any one of the controller upgrading methods described above.
[0137] This embodiment also provides a computer program product including instructions. When the computer program product is executed on a computer or a processor, the computer or the processor executes the above-mentioned related steps to implement any one of the controller upgrading methods described above.
[0138] Among them, the vehicle, computer-readable storage medium, computer program product or chip containing instructions provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0139] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0140] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0141] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for upgrading a controller, It is characterized in that The method comprises: In response to an upgrade instruction for a target controller in a vehicle, determining a type of the target controller; In the case where the type is a low voltage controller, determining whether the vehicle meets a preset upgrade condition; When the vehicle meets the preset upgrade condition, controlling the high-voltage controller in the vehicle to be in a high-voltage state, wherein the high-voltage state is a state for supplying power to the low-voltage controller; In the high-voltage state, the upgrade file of the low-voltage controller is flashed to the low-voltage controller.
2. The method according to claim 1, It is characterized in that The determining the type of the target controller includes: When the rated voltage of the target controller is less than or equal to a first voltage threshold, determining that the type is a low voltage controller; In a case where the rated voltage is greater than the first voltage threshold, determining whether the rated voltage is greater than or equal to a second voltage threshold, the second voltage threshold being greater than the first voltage threshold; When the rated voltage is greater than or equal to the second voltage threshold, determining that the type is a high voltage controller; When the rated voltage is greater than the first voltage threshold and less than the second voltage threshold, the type of the target controller is determined based on an application scenario of the target controller.
3. The method according to claim 2, It is characterized in that The determining the type of the target controller based on the application scenario of the target controller includes: In a case where the application scenario indicates that the target controller is used for an auxiliary system of the vehicle or for managing a low-voltage electrical system of the vehicle, determining that the type is a low-voltage controller; In a case where the application scenario indicates that the target controller is used to manage a high-voltage electrical system of the vehicle, the type is determined to be a high-voltage controller.
4. The method according to claim 1, It is characterized in that The determining whether the vehicle meets a preset upgrade condition includes: When the vehicle is stationary, determining whether the remaining power of the vehicle is greater than a preset power; In the case where the remaining power is greater than the preset power, determining whether the communication state of the vehicle is in a normal state; When the communication state is in the normal state, determining whether the current environment of the vehicle meets a preset environmental condition; In a case where the current environment meets the preset environmental condition, it is determined that the vehicle meets the preset upgrade condition.
5. The method according to claim 1, It is characterized in that Before writing the upgrade file of the low-voltage controller to the low-voltage controller, the method further includes: Acquire an original upgrade file for upgrading the low-voltage controller, wherein the original upgrade file is a file encrypted by a first public key; decrypting the original upgrade file based on a first private key to obtain a candidate upgrade file, wherein the first private key corresponds to the first public key; Performing hash calculation on the candidate upgrade file based on a preset hash algorithm to obtain a hash value; In a case where the hash value is identical to the original hash value of the original upgrade file, the candidate upgrade file is determined as the upgrade file of the low voltage controller.
6. The method according to claim 1, It is characterized in that Writing the upgrade file of the low-voltage controller to the low-voltage controller includes: Obtaining an original software program in an original program file corresponding to the low-voltage controller; Comparing the original software program with the upgraded software program in the upgraded file to obtain a differential program in the original program file that is different from the upgraded software program; The difference program is replaced with the corresponding upgrade software program in the upgrade file, so as to flash the upgrade file of the low-voltage controller to the low-voltage controller.
7. The method according to any one of claims 1 to 6, It is characterized in that The method further comprises at least one of the following: Sending a reminder message to a target terminal, the target terminal being a terminal having control authority over the vehicle, the reminder message being used to remind the vehicle that the upgrade operation on the target controller fails to be successfully completed due to failure to meet the preset upgrade condition; outputting the reminder information through a first vehicle component in the vehicle; A second vehicle component in the vehicle is controlled to vibrate based on the reminder information.
8. A device for upgrading a controller, It is characterized in that The device comprises: Identify modules for: In response to an upgrade instruction for a target controller in a vehicle, determining a type of the target controller; In the case where the type is a low voltage controller, determining whether the vehicle meets a preset upgrade condition; a control module, configured to control a high-voltage controller in the vehicle to be in a high-voltage state when the vehicle meets the preset upgrade condition, wherein the high-voltage state is a state for supplying power to the low-voltage controller; The flashing module is used to flash the upgrade file of the low-voltage controller to the low-voltage controller in the high-voltage state.
9. A vehicle, It is characterized in that The invention comprises a memory, a processor and an executable program code stored in the memory and executable on the processor, wherein when the processor executes the executable program code, the vehicle executes the method for upgrading the controller as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes the method for upgrading a controller according to any one of claims 1 to 7.
