OTA upgrading method and system
By generating controller-specific configuration files through the remote server, the time-consuming and costly OTA upgrade problem of the vehicle controller is solved, adaptive firmware updates are achieved, operation and maintenance costs are reduced, and upgrade efficiency is improved.
Patent Information
- Application Number
- CN202410249928.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-05
- Publication Date
- 2025-09-12
AI Technical Summary
In the existing technology, OTA upgrades of automobile controllers require a long and costly operation and maintenance cycle because the mobile terminal program needs to be re-adapted each time a new controller is added.
The remote server generates configuration files corresponding to each controller, including a set of upgrade steps. The mobile terminal uses these files to perform adaptive OTA upgrades, reducing adaptation development time.
It implements adaptive firmware updates, reduces the operation and maintenance cycle and cost of OTA upgrades, and improves the reliability and security of upgrades.
Smart Images

Figure CN120631389A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software upgrade, and in particular to an OTA upgrade method and system. Background Art
[0002] In the existing solution, the mobile terminal in the car connects to various controllers via buses such as CAN (Controller Area Network) or ETH (Ethernet bus), obtains upgraded firmware from a remote server, and performs OTA (Over-the-Air Technology) upgrades on the controllers based on different protocols such as UDS (Unified Diagnostic Services) or DOIP (Diagnostic over Internet Protocol, a remote diagnostic protocol designed specifically for the automotive industry). The mobile terminal needs to be adapted and developed according to the upgrade specifications of each controller. Each time a new controller with a different specification is added, the mobile terminal must be re-adapted and re-developed and its own program updated before it can perform OTA on the newly added controller. This upgrade method requires a longer operation and maintenance cycle and increases operation and maintenance costs. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide an OTA upgrade method and system, which can reduce the operation and maintenance cycle and operation and maintenance costs of OTA upgrades.
[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0005] An OTA upgrade method includes the following steps:
[0006] The remote server obtains information about all controllers in the vehicle and generates a configuration file corresponding to each controller based on the information about all controllers and a preset step set library, wherein the preset step set library includes a set of upgrade steps for each type of controller in the vehicle;
[0007] The remote server sends all the configuration files to the mobile terminal bound to the vehicle;
[0008] The mobile terminal performs OTA upgrade on the controller to be upgraded by using the configuration file.
[0009] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0010] An OTA upgrade system includes a remote server and a mobile terminal, wherein the remote server includes a first memory, a first processor, and a first computer program stored in the first memory and executable on the first processor; the mobile terminal includes a second memory, a second processor, and a second computer program stored in the second memory and executable on the second processor. When the first processor executes the first computer program, the following steps are implemented:
[0011] Obtaining information about all controllers in the vehicle, and generating a configuration file corresponding to each controller based on the information about all controllers and a preset step set library, wherein the preset step set library includes a set of upgrade steps for each type of controller in the vehicle;
[0012] Sending all the configuration files to the mobile terminal bound to the vehicle;
[0013] When the second processor executes the second computer program, the following steps are implemented:
[0014] The configuration file is used to perform OTA upgrade on the controller to be upgraded.
[0015] The beneficial effects of the present invention are as follows: the remote server generates corresponding configuration files for each controller based on the preset step set library according to the acquired information of all controllers of the vehicle. The preset step set library maximizes the coverage of the upgrade step sets of various controllers in the vehicle. The remote server sends all configuration files to the mobile terminal bound to the vehicle. The mobile terminal uses the configuration files to perform OTA upgrades on the controller to be upgraded, and can adapt to different controllers to achieve adaptive OTA upgrades, thereby realizing adaptive firmware updates, thereby reducing the operation and maintenance cycle and operation and maintenance costs of OTA upgrades. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a flowchart of the steps of an OTA upgrade method according to an embodiment of the present invention;
[0017] Figure 2 This is a schematic structural diagram of an OTA upgrade terminal according to an embodiment of the present invention;
[0018] Figure 3 This is a flowchart of flashing a controller in the OTA upgrade method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0019] To illustrate the technical content, achieved objectives and effects of the present invention in detail, the following description is given in conjunction with the embodiments and accompanying drawings.
[0020] Please refer to Figure 1 , an OTA upgrade method, comprising the steps of:
[0021] The remote server obtains information about all controllers in the vehicle and generates a configuration file corresponding to each controller based on the information about all controllers and a preset step set library, wherein the preset step set library includes a set of upgrade steps for each type of controller in the vehicle;
[0022] The remote server sends all the configuration files to the mobile terminal bound to the vehicle;
[0023] The mobile terminal performs OTA upgrade on the controller to be upgraded by using the configuration file.
[0024] From the above description, it can be seen that the beneficial effect of the present invention is that the remote server generates corresponding configuration files for each controller based on the preset step set library according to the acquired information of all controllers of the vehicle. The preset step set library maximizes the coverage of the upgrade step set of various controllers in the vehicle. The remote server sends all configuration files to the mobile terminal bound to the vehicle. The mobile terminal uses the configuration file to perform OTA upgrade on the controller to be upgraded, and can adapt to different controllers to achieve adaptive OTA upgrade, thereby realizing adaptive firmware update, thereby reducing the operation and maintenance cycle and operation and maintenance cost of OTA upgrade.
[0025] Furthermore, before generating a configuration file corresponding to each controller based on the preset step set library according to the information of all controllers, the method includes:
[0026] The remote server determines the complete upgrade steps for all controllers based on the information of all controllers, and decomposes the complete upgrade steps for each controller into multiple sub-steps;
[0027] The mobile terminal constructs an API interface corresponding to each of the sub-steps, uniquely numbers the API interface, maps it one-to-one with the sub-steps of the controller, and integrates it into the computer program of the mobile terminal;
[0028] The remote server collects the numbers of all the API interfaces and generates a preset step set library according to the numbers of all the API interfaces of each controller.
[0029] From the above description, it can be seen that the remote server decomposes the complete upgrade steps of each controller into multiple sub-steps. The mobile terminal constructs an API interface corresponding to each sub-step, and uniquely numbers the API interface, maps it one-to-one with the controller upgrade sub-steps, and integrates it into the computer program of the mobile terminal. Then the remote server generates a preset step set library based on the numbers of all API interfaces of each controller. Each step set in the library corresponds to a set of all API interfaces of a controller, so as to facilitate the subsequent generation of configuration files corresponding to the controller, thereby realizing automatic adaptation and upgrade of the controller.
[0030] Furthermore, generating a configuration file corresponding to each controller based on the preset step set library according to the information of all controllers includes:
[0031] The remote server queries the numbers of all API interfaces corresponding to the controller information from the preset step set library, and obtains the parameters of all API interfaces according to the controller upgrade specification;
[0032] The remote server uses a connector to associate the numbers of all the API interfaces with the parameters of all the API interfaces one by one, and uses a separator to concatenate the numbers of all the API interfaces in the order of each of the sub-steps to generate a configuration file corresponding to each controller.
[0033] From the above description, it can be seen that the remote server uses connectors to associate the numbers of all API interfaces and the parameters of all API interfaces one by one, and uses separators to concatenate the numbers of all API interfaces in the order of each sub-step to generate a configuration file corresponding to each controller. The configuration file only includes the API interface and parameters of the upgrade steps corresponding to the controller. Subsequently, it is only necessary to simply parse and map the call interface. For controllers with different upgrade methods, by regenerating the API interface numbers and parameters of the configuration file, the upgrade can be adapted better and faster, thereby effectively reducing the operation and maintenance cycle and operation and maintenance costs of OTA upgrades.
[0034] Furthermore, the mobile terminal performs OTA upgrade on the controller to be upgraded by using the configuration file, including:
[0035] The mobile terminal obtains the firmware upgrade API interface calling procedure of each controller according to the twin mapping of the configuration file;
[0036] The mobile terminal determines the controller to be upgraded and the corresponding controller information to be upgraded, and sends the controller information to the remote server;
[0037] The remote server determines whether a corresponding new version of firmware exists based on the information of the controller to be upgraded, and if so, sends the new version of firmware to the mobile terminal;
[0038] The mobile terminal calls the API interface of the controller to be upgraded in sequence based on the new version of the firmware according to the firmware upgrade API interface calling procedure of the controller to be upgraded, and passes corresponding parameters.
[0039] From the above description, it can be seen that after the mobile terminal determines the controller to be upgraded and the corresponding controller information to be upgraded, it sends the information to the remote server. When there is a corresponding new version of firmware, it will receive the new version of firmware sent by the remote server. At this time, based on the new version of firmware, the API interface of the controller to be upgraded is called in sequence according to the firmware upgrade API interface calling procedure of the controller to be upgraded, and the corresponding parameters are passed to complete the firmware upgrade, which is more convenient and efficient.
[0040] Furthermore, the remote server uses a connector to associate the numbers of all the API interfaces with the parameters of all the API interfaces one by one, and uses a separator to concatenate the numbers of all the API interfaces in the order of each of the sub-steps to generate a configuration file corresponding to each controller, including:
[0041] The remote server uses a connector to associate the numbers of all the API interfaces with the parameters of all the API interfaces one by one, and uses a separator to concatenate the numbers of all the API interfaces in the order of each of the sub-steps to obtain an initial configuration file corresponding to each controller;
[0042] The initial configuration file is digitally encoded to generate a configuration file corresponding to each controller.
[0043] As can be seen from the above description, after the remote server generates the initial configuration file, it will digitally encode it and the file content therein, reducing the risk of information leakage and improving the reliability and security of OTA upgrades.
[0044] Please refer to Figure 2 An OTA upgrade system includes a remote server and a mobile terminal, wherein the remote server includes a first memory, a first processor, and a first computer program stored in the first memory and executable on the first processor, and the mobile terminal includes a second memory, a second processor, and a second computer program stored in the second memory and executable on the second processor, wherein when the first processor executes the first computer program, the following steps are implemented:
[0045] Obtaining information about all controllers in the vehicle, and generating a configuration file corresponding to each controller based on the information about all controllers and a preset step set library, wherein the preset step set library includes a set of upgrade steps for each type of controller in the vehicle;
[0046] Sending all the configuration files to the mobile terminal bound to the vehicle;
[0047] When the second processor executes the second computer program, the following steps are implemented:
[0048] The configuration file is used to perform OTA upgrade on the controller to be upgraded.
[0049] From the above description, it can be seen that the beneficial effect of the present invention is that the remote server generates corresponding configuration files for each controller based on the preset step set library according to the acquired information of all controllers of the vehicle. The preset step set library maximizes the coverage of the upgrade step set of various controllers in the vehicle. The remote server sends all configuration files to the mobile terminal bound to the vehicle. The mobile terminal uses the configuration file to perform OTA upgrade on the controller to be upgraded, and can adapt to different controllers to achieve adaptive OTA upgrade, thereby realizing adaptive firmware update, thereby reducing the operation and maintenance cycle and operation and maintenance cost of OTA upgrade.
[0050] Furthermore, when the first processor executes the first computer program, the first processor further implements the following steps:
[0051] Determining complete upgrade steps for all controllers based on the information of all controllers, and decomposing the complete upgrade steps for each controller to obtain multiple sub-steps;
[0052] When the second processor executes the second computer program, the second processor further implements the following steps:
[0053] Constructing an API interface corresponding to each of the sub-steps, uniquely numbering the API interface, mapping it one-to-one with the sub-steps of the controller, and integrating it into a computer program of the mobile terminal;
[0054] When the first processor executes the first computer program, the first processor further implements the following steps:
[0055] The numbers of all the API interfaces are collected, and a preset step set library is generated according to the numbers of all the API interfaces of each controller.
[0056] From the above description, it can be seen that the remote server decomposes the complete upgrade steps of each controller into multiple sub-steps. The mobile terminal constructs an API interface corresponding to each sub-step, and uniquely numbers the API interface, maps it one-to-one with the controller's upgrade sub-steps, and integrates it into the computer program of the mobile terminal. Then the remote server generates a preset step set library based on the numbers of all API interfaces of each controller. Each step set in the library corresponds to a set of all API interfaces of a controller, so as to facilitate the subsequent generation of configuration files corresponding to the controller, thereby realizing automatic adaptation and upgrade of the controller.
[0057] Furthermore, generating a configuration file corresponding to each controller based on the preset step set library according to the information of all controllers includes:
[0058] Query the numbers of all API interfaces corresponding to the controller information from the preset step set library, and obtain the parameters of all API interfaces according to the controller upgrade specification;
[0059] Use a connector to associate the numbers of all the API interfaces with the parameters of all the API interfaces one by one, and use a separator to concatenate the numbers of all the API interfaces in the order of each of the sub-steps to generate a configuration file corresponding to each controller.
[0060] From the above description, it can be seen that the remote server uses connectors to associate the numbers of all API interfaces and the parameters of all API interfaces one by one, and uses separators to concatenate the numbers of all API interfaces in the order of each sub-step to generate a configuration file corresponding to each controller. The configuration file only includes the API interface and parameters of the upgrade steps corresponding to the controller. Subsequently, it is only necessary to simply parse and map the call interface. For controllers with different upgrade methods, by regenerating the API interface numbers and parameters of the configuration file, the upgrade can be adapted better and faster, thereby effectively reducing the operation and maintenance cycle and operation and maintenance costs of OTA upgrades.
[0061] Furthermore, performing OTA upgrade on the controller to be upgraded using the configuration file includes:
[0062] Obtaining the firmware upgrade API interface calling procedure of each controller according to the twin mapping of the configuration file;
[0063] Determine the controller to be upgraded and the corresponding controller information to be upgraded, and send the controller information to the remote server;
[0064] Determine whether there is a corresponding new version of firmware according to the controller information to be upgraded, and if so, send the new version of firmware to the mobile terminal;
[0065] Based on the new version of the firmware, the API interface of the controller to be upgraded is called in sequence according to the firmware upgrade API interface calling procedure of the controller to be upgraded, and corresponding parameters are passed.
[0066] From the above description, it can be seen that after the mobile terminal determines the controller to be upgraded and the corresponding controller information to be upgraded, it sends the information to the remote server. When there is a corresponding new version of firmware, it will receive the new version of firmware sent by the remote server. At this time, based on the new version of firmware, the API interface of the controller to be upgraded is called in sequence according to the firmware upgrade API interface calling procedure of the controller to be upgraded, and the corresponding parameters are passed to complete the firmware upgrade, which is more convenient and efficient.
[0067] Furthermore, the use of connectors to associate the numbers of all the API interfaces with the parameters of all the API interfaces one by one, and the use of separators to concatenate the numbers of all the API interfaces in the order of each of the sub-steps to generate a configuration file corresponding to each controller includes:
[0068] Use a connector to associate the numbers of all the API interfaces with the parameters of all the API interfaces one by one, and use a separator to concatenate the numbers of all the API interfaces in the order of each of the sub-steps to obtain an initial configuration file corresponding to each controller;
[0069] The initial configuration file is digitally encoded to generate a configuration file corresponding to each controller.
[0070] As can be seen from the above description, after the remote server generates the initial configuration file, it will digitally encode it and the file content therein, reducing the risk of information leakage and improving the reliability and security of OTA upgrades.
[0071] The above-mentioned OTA upgrade method and system of the present invention can be applied to the vehicle controller upgrade scenario, and is described below through specific implementation methods:
[0072] Please refer to Figure 1 and Figure 3 , embodiment 1 of the present invention is:
[0073] An OTA upgrade method includes the following steps:
[0074] S1. The remote server obtains information about all controllers in the vehicle and generates a corresponding configuration file for each controller based on the information of all controllers and a preset step set library. The preset step set library includes a set of upgrade steps for various controllers in the vehicle, specifically including S11-S15:
[0075] S11. The remote server obtains all controller information of the vehicle.
[0076] Specifically, after the mobile terminal requests registration and connects to the remote server, the remote server obtains the configuration information of the vehicle bound to the mobile terminal based on the registration information of the mobile terminal, and obtains all controller information of the vehicle based on the configuration information.
[0077] S12. The remote server determines the complete upgrade steps for all controllers based on the information of all controllers, and decomposes the complete upgrade steps for each controller to obtain multiple sub-steps.
[0078] In an optional embodiment, the multiple sub-steps may include controller information reading, OTA preconditions, firmware transmission, firmware update and restart during the controller upgrade process.
[0079] S13. The mobile terminal constructs an API interface corresponding to each of the sub-steps, uniquely numbers the API interface, maps it one-to-one with the sub-steps of the controller, and integrates it into the computer program of the mobile terminal.
[0080] S14. The remote server collects the numbers of all the API interfaces and generates a preset step set library according to the numbers of all the API interfaces of each controller.
[0081] That is, the upgrade step set of each type of controller is the set of numbers of all API interfaces corresponding to the upgrade steps of the controller of this type.
[0082] S15, the remote server generates a configuration file corresponding to each controller based on the preset step set library according to the information of all controllers, specifically including S151-S152:
[0083] S151. The remote server searches for numbers of all API interfaces corresponding to the controller information from a preset step set library, and obtains parameters of all API interfaces according to the controller upgrade specification.
[0084] In an optional implementation, the parameters of all API interfaces may include a controller drive information reading address, a precondition threshold, a data packet, a security key, and the like.
[0085] S152. The remote server uses a connector to associate the numbers of all the API interfaces with the parameters of all the API interfaces one by one, and uses a separator to concatenate the numbers of all the API interfaces in the order of each of the sub-steps to generate a configuration file corresponding to each controller.
[0086] Specifically, the remote server uses a connector to associate the numbers of all the API interfaces with the parameters of all the API interfaces one by one, and uses a separator to concatenate the numbers of all the API interfaces in the order of each of the sub-steps to obtain an initial configuration file corresponding to each controller; the initial configuration file is digitally encoded to generate a configuration file corresponding to each controller.
[0087] That is, the configuration file includes the numbers and parameters of all API interfaces corresponding to the controller upgrade.
[0088] S2. The remote server sends all the configuration files to the mobile terminal bound to the vehicle.
[0089] S3, the mobile terminal uses the configuration file to perform OTA upgrade on the controller to be upgraded, specifically including S31-S34:
[0090] S31. The mobile terminal obtains the firmware upgrade API interface calling procedure of each controller according to the twin mapping of the configuration file.
[0091] Specifically, the mobile terminal parses the configuration file, and then obtains the firmware upgrade API interface calling procedures of each controller according to the twin mapping of the configuration file.
[0092] S32: The mobile terminal determines the controller to be upgraded and its corresponding controller information to be upgraded, and sends the controller information to the remote server.
[0093] In an optional implementation, the mobile terminal determines the controller to be upgraded and its corresponding controller information after each vehicle startup, and sends the controller information to be upgraded to the remote server.
[0094] S33. The remote server determines whether a corresponding new version of firmware exists based on the information of the controller to be upgraded. If so, the remote server sends the new version of firmware to the mobile terminal.
[0095] S34. The mobile terminal calls the API interface of the controller to be upgraded based on the new version of the firmware and in accordance with the firmware upgrade API interface calling procedure of the controller to be upgraded, and passes corresponding parameters.
[0096] The above method of the present invention is applied to the specific upgrade scenario as follows:
[0097] Assuming that a controller is flashed using the standard UDS (Unified Diagnostic Services) protocol, the complete flashing process is roughly as follows: Figure 3 shown.
[0098] 1. Break down the above flashing process into the following sub-steps:
[0099] (1) Determine whether the upgrade conditions are met; (2) Enter the extended session mode; (3) Disable the DTC (Diagnostic Trouble Code) setting; (4) Disable the regular message; (5) Enter the programming session mode; (6) Secure access; (7) Erase sectors; (8) Request download; (9) Data transmission; (10) End transmission; (11) Verify data; (12) Reset the device; (13) Query the version. 2. Construct the API interfaces corresponding to each sub-step and their numbers as shown in Table 1.
[0100] Table 1 API interfaces and their numbers corresponding to each sub-step
[0101] API interface Interface number CheckUpdateConditions U00 EnterExtendedSessionMode U01 CloseDtcSettings U02 CloseRegularMsg U03 EnterProgramSessionMode U04 SafetyAccess U05 EraseSectors U06 RequestDownload U07 DataTransmission U08 EndTransfer U09 VerifyData U10 ResetDevice U11 QueryVersion U12
[0102] 3. Generate the initial configuration file as:
[0103] U00-01&02;U0;U0;U03;U04;U05-01-01020304;U06;U07-00000004-00020202;U08-0100;U09;U10;U11;U12;U13.
[0104] Among them, "-" and "&" are connectors, and ";" is a separator; 01 and 02 in "U00-01&02" represent the parameters of the engine shutdown brake; 00000004 in "U04-00000004-00020202" represents the file download address, and 00020202 represents the file length; 01 in "U05-01-01020304" represents security algorithm A, and 01020304 represents the seed for calculating the key of the security algorithm; 0100 in "U06-0100" represents the data block length.
[0105] 4. Digitally encode the initial configuration file to obtain the configuration file.
[0106] 5. The mobile terminal can analyze the mapping and call the relevant firmware upgrade API interface procedures (i.e., steps and parameters), which are:
[0107] ->CheckUpdateConditions(0x01,0x02);
[0108] ->EnterExtendedSessionMode();
[0109] ->CloseDtcSettings();
[0110] ->CloseRegularMsg();
[0111] ->EnterProgramSessionMode();
[0112] ->SafetyAccess(0x01,0x01020304);
[0113] ->EraseSectors();
[0114] ->RequestDownload(0x00000004,0x00020202);
[0115] ->DataTransmission(0x0100);
[0116] ->EndTransfer();
[0117] ->VerifyData();
[0118] ->ResetDevice();
[0119] ->QueryVersion().
[0120] 6. The mobile terminal calls the controller's API interface in sequence based on the new version of the firmware according to the firmware upgrade API interface calling procedure, and passes the corresponding parameters to complete the flashing process.
[0121] The present invention does not require repeated upgrades of the mobile terminal program to adapt to different controllers, and is more convenient and applicable than existing solutions. At the same time, due to the simplification and digitization of the configuration file, the reliability of the upgrade is also improved, and the operation and maintenance cycle and cost of OTA upgrades are reduced.
[0122] Please refer to Figure 2 , the second embodiment of the present invention is:
[0123] An OTA upgrade system includes a remote server and a mobile terminal, wherein the remote server includes a first memory, a first processor, and a first computer program stored in the first memory and executable on the first processor; the mobile terminal includes a second memory, a second processor, and a second computer program stored in the second memory and executable on the second processor. When the first processor executes the first computer program, the following steps are implemented:
[0124] Obtaining information about all controllers in the vehicle, and generating a configuration file corresponding to each controller based on the information about all controllers and a preset step set library, wherein the preset step set library includes a set of upgrade steps for each type of controller in the vehicle;
[0125] Sending all the configuration files to the mobile terminal bound to the vehicle;
[0126] When the second processor executes the second computer program, the following steps are implemented:
[0127] The configuration file is used to perform OTA upgrade on the controller to be upgraded.
[0128] Specifically, when the first processor executes the first computer program, it further implements the following steps:
[0129] Determining complete upgrade steps for all controllers based on the information of all controllers, and decomposing the complete upgrade steps for each controller to obtain multiple sub-steps;
[0130] When the second processor executes the second computer program, the second processor further implements the following steps:
[0131] Constructing an API interface corresponding to each of the sub-steps, uniquely numbering the API interface, mapping it one-to-one with the sub-steps of the controller, and integrating it into a computer program of the mobile terminal;
[0132] When the first processor executes the first computer program, the first processor further implements the following steps:
[0133] The numbers of all the API interfaces are collected, and a preset step set library is generated according to the numbers of all the API interfaces of each controller.
[0134] Specifically, generating a configuration file corresponding to each controller based on the preset step set library according to the information of all controllers includes:
[0135] Query the numbers of all API interfaces corresponding to the controller information from the preset step set library, and obtain the parameters of all API interfaces according to the controller upgrade specification;
[0136] Use a connector to associate the numbers of all the API interfaces with the parameters of all the API interfaces one by one, and use a separator to concatenate the numbers of all the API interfaces in the order of each of the sub-steps to generate a configuration file corresponding to each controller.
[0137] Specifically, performing OTA upgrade on the controller to be upgraded by using the configuration file includes:
[0138] Obtaining the firmware upgrade API interface calling procedure of each controller according to the twin mapping of the configuration file;
[0139] Determine the controller to be upgraded and the corresponding controller information to be upgraded, and send the controller information to the remote server;
[0140] Determine whether there is a corresponding new version of firmware according to the controller information to be upgraded, and if so, send the new version of firmware to the mobile terminal;
[0141] Based on the new version of the firmware, the API interface of the controller to be upgraded is called in sequence according to the firmware upgrade API interface calling procedure of the controller to be upgraded, and corresponding parameters are passed.
[0142] Specifically, the use of connectors to associate the numbers of all the API interfaces with the parameters of all the API interfaces one by one, and the use of separators to concatenate the numbers of all the API interfaces in the order of each of the sub-steps to generate a configuration file corresponding to each controller includes:
[0143] Use a connector to associate the numbers of all the API interfaces with the parameters of all the API interfaces one by one, and use a separator to concatenate the numbers of all the API interfaces in the order of each of the sub-steps to obtain an initial configuration file corresponding to each controller;
[0144] The initial configuration file is digitally encoded to generate a configuration file corresponding to each controller.
[0145] In summary, the present invention provides an OTA upgrade method and system. The remote server generates a corresponding configuration file for each controller based on a preset step set library according to the acquired information of all controllers of the vehicle. The preset step set library maximizes the coverage of the upgrade step set of various controllers in the vehicle. The remote server sends all configuration files to the mobile terminal bound to the vehicle. The mobile terminal uses the configuration file to perform OTA upgrade on the controller to be upgraded, and can adapt to different controllers to achieve adaptive OTA upgrade, thereby achieving adaptive firmware update, thereby reducing the operation and maintenance cycle and operation and maintenance cost of OTA upgrade; and the remote server uses a connector to associate the numbers of all API interfaces and the parameters of all API interfaces one by one, and uses a delimiter to concatenate the numbers of all API interfaces in the order of each sub-step to generate a configuration file corresponding to each controller. The configuration file only includes the API interface and parameters of the upgrade step corresponding to the controller. Subsequently, it is only necessary to simply parse and map the call interface. For controllers with different upgrade methods, by regenerating the API interface numbers and parameters of the configuration file, it can be better and faster to adapt to the upgrade. At the same time, the file content in the configuration file is digitally encoded, which reduces the risk of information leakage and improves the reliability and security of the OTA upgrade.
[0146] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's description and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. An OTA upgrade method, characterized in that: Including steps: The remote server obtains information about all controllers in the vehicle and generates a configuration file corresponding to each controller based on the information about all controllers and a preset step set library, wherein the preset step set library includes a set of upgrade steps for each type of controller in the vehicle; The remote server sends all the configuration files to the mobile terminal bound to the vehicle; The mobile terminal performs OTA upgrade on the controller to be upgraded by using the configuration file.
2. An OTA upgrade method according to claim 1, characterized in that: Before generating a configuration file corresponding to each controller based on the preset step set library according to the information of all controllers, the method includes: The remote server determines the complete upgrade steps for all controllers based on the information of all controllers, and decomposes the complete upgrade steps for each controller into multiple sub-steps; The mobile terminal constructs an API interface corresponding to each of the sub-steps, uniquely numbers the API interface, maps it one-to-one with the sub-steps of the controller, and integrates it into the computer program of the mobile terminal; The remote server collects the numbers of all the API interfaces and generates a preset step set library according to the numbers of all the API interfaces of each controller.
3. An OTA upgrade method according to claim 2, characterized in that: Generating a configuration file corresponding to each controller based on the preset step set library according to the information of all controllers includes: The remote server queries the numbers of all API interfaces corresponding to the controller information from the preset step set library, and obtains the parameters of all API interfaces according to the controller upgrade specification; The remote server uses a connector to associate the numbers of all the API interfaces with the parameters of all the API interfaces one by one, and uses a separator to concatenate the numbers of all the API interfaces in the order of each of the sub-steps to generate a configuration file corresponding to each controller.
4. The OTA upgrade method according to claim 1, wherein: The mobile terminal uses the configuration file to perform OTA upgrade on the controller to be upgraded, including: The mobile terminal obtains the firmware upgrade API interface calling procedure of each controller according to the twin mapping of the configuration file; The mobile terminal determines the controller to be upgraded and the corresponding controller information to be upgraded, and sends the controller information to the remote server; The remote server determines whether a corresponding new version of firmware exists based on the information of the controller to be upgraded, and if so, sends the new version of firmware to the mobile terminal; The mobile terminal calls the API interface of the controller to be upgraded in sequence based on the new version of the firmware according to the firmware upgrade API interface calling procedure of the controller to be upgraded, and passes corresponding parameters.
5. An OTA upgrade method according to claim 3, characterized in that: The remote server uses a connector to associate the numbers of all the API interfaces with the parameters of all the API interfaces one by one, and uses a separator to concatenate the numbers of all the API interfaces in the order of each of the sub-steps to generate a configuration file corresponding to each controller, including: The remote server uses a connector to associate the numbers of all the API interfaces with the parameters of all the API interfaces one by one, and uses a separator to concatenate the numbers of all the API interfaces in the order of each of the sub-steps to obtain an initial configuration file corresponding to each controller; The initial configuration file is digitally encoded to generate a configuration file corresponding to each controller.
6. An OTA upgrade system, comprising a remote server and a mobile terminal, wherein the remote server comprises a first memory, a first processor, and a first computer program stored in the first memory and executable on the first processor, and the mobile terminal comprises a second memory, a second processor, and a second computer program stored in the second memory and executable on the second processor, characterized in that: When the first processor executes the first computer program, the following steps are implemented: Obtaining information about all controllers in the vehicle, and generating a configuration file corresponding to each controller based on the information about all controllers and a preset step set library, wherein the preset step set library includes a set of upgrade steps for each type of controller in the vehicle; Sending all the configuration files to the mobile terminal bound to the vehicle; When the second processor executes the second computer program, the following steps are implemented: The configuration file is used to perform OTA upgrade on the controller to be upgraded.
7. An OTA upgrade system according to claim 6, characterized in that: When the first processor executes the first computer program, the first processor further implements the following steps: Determining complete upgrade steps for all controllers based on the information of all controllers, and decomposing the complete upgrade steps for each controller to obtain multiple sub-steps; When the second processor executes the second computer program, the second processor further implements the following steps: Constructing an API interface corresponding to each of the sub-steps, uniquely numbering the API interface, mapping it one-to-one with the sub-steps of the controller, and integrating it into a computer program of the mobile terminal; When the first processor executes the first computer program, the first processor further implements the following steps: The numbers of all the API interfaces are collected, and a preset step set library is generated according to the numbers of all the API interfaces of each controller.
8. An OTA upgrade system according to claim 7, characterized in that: Generating a configuration file corresponding to each controller based on the preset step set library according to the information of all controllers includes: Query the numbers of all API interfaces corresponding to the controller information from the preset step set library, and obtain the parameters of all API interfaces according to the controller upgrade specification; Use a connector to associate the numbers of all the API interfaces with the parameters of all the API interfaces one by one, and use a separator to concatenate the numbers of all the API interfaces in the order of each of the sub-steps to generate a configuration file corresponding to each controller.
9. The OTA upgrade system according to claim 6, wherein: The OTA upgrade of the controller to be upgraded using the configuration file includes: Obtaining the firmware upgrade API interface calling procedure of each controller according to the twin mapping of the configuration file; Determine the controller to be upgraded and the corresponding controller information to be upgraded, and send the controller information to the remote server; Determine whether there is a corresponding new version of firmware according to the controller information to be upgraded, and if so, send the new version of firmware to the mobile terminal; Based on the new version of the firmware, the API interface of the controller to be upgraded is called in sequence according to the firmware upgrade API interface calling procedure of the controller to be upgraded, and corresponding parameters are passed.
10. The OTA upgrade system according to claim 8, characterized in that: The steps of using a connector to associate the numbers of all the API interfaces with the parameters of all the API interfaces one by one, and using a separator to concatenate the numbers of all the API interfaces in the order of the sub-steps to generate a configuration file corresponding to each controller include: Use a connector to associate the numbers of all the API interfaces with the parameters of all the API interfaces one by one, and use a separator to concatenate the numbers of all the API interfaces in the order of each of the sub-steps to obtain an initial configuration file corresponding to each controller; The initial configuration file is digitally encoded to generate a configuration file corresponding to each controller.