Disclosure of Invention
The invention solves the main problems that when new energy automobiles update application layer software in batches, peripheral devices have no effective control, so that the problems of high energy consumption, high noise and large operation amount exist, and the differences of the peripheral devices are obvious due to numerous types and configurations of large-scale host factories, so that the problems are further aggravated.
According to one aspect of the invention, the invention provides a method for controlling peripheral devices during batch update of ECU application layer software, which comprises the following steps:
s1, when application layer software is updated in batches, identifying control parameters of the peripheral devices correspondingly linked with the VIN code through the VIN code;
s2, configuring an OTA task list and a corresponding software upgrade package;
S3, obtaining version information of the target controller of each vehicle to be updated;
S4, judging whether the software version information of the target controller is the same as the version information of the software upgrading package, and when the software version information is different from the version information of the software upgrading package, issuing the software upgrading package to an OTA client;
s5, calibrating control parameters of the vehicle to be updated through the application layer software when the vehicle to be updated meets OTA upgrading requirements;
and S6, after the calibration is finished, the application layer software performs OTA upgrading and updating, and meanwhile, the Boot loader is used for replacing the application layer software to control all hardware interfaces, reads and executes control parameters corresponding to more than one peripheral device, and controls each peripheral device to operate with the corresponding control parameters through the hardware interfaces.
Further, the control method further includes:
In step S5, when the vehicle to be updated does not meet the OTA upgrade requirement, steps S2 to S4 are re-implemented until the vehicle to be updated meets the OTA upgrade requirement.
Further, the control method further includes:
in step S4, when the version information of the target controller of any one of the vehicles to be updated is the same as the version information of the software upgrade package, the vehicle to be updated is marked as successful in upgrading and updating, and step S2 is re-implemented.
Further, before the application layer software is updated in batches, according to the actual configuration of the vehicle and the model of the device, defining control parameters of peripheral devices corresponding to the vehicle to be updated.
Further, before the control parameters corresponding to the vehicle to be updated are identified through the VIN code of the vehicle to be updated, the control parameters of the peripheral devices corresponding to the vehicle to be updated are customized.
Further, the OTA upgrade requirement is to reach a preset upgrade time.
Further, control parameters defined according to the actual configuration of the vehicle and the model of the device are linked with the vehicle VIN code.
Further, before the control parameters correspondingly linked with the VIN code of the vehicle to be updated are identified, the control parameters of the peripheral device are linked with the VIN code of the vehicle.
According to another aspect of the present invention, there is also disclosed a storage medium, which is a computer-readable storage medium, on which is stored an executable computer program for executing the peripheral device control method when the ECU application layer software is updated in batch as described in any one of the foregoing.
The invention provides a control method of peripheral devices during application layer software updating on the premise of ensuring the universality of bottom layer software, which can enable the devices to work under proper low-consumption working conditions, automatically identify the vehicle type and the peripheral device demand control parameters corresponding to vehicle configuration according to the vehicle VIN number before OTA through design, manually select the peripheral device control parameters by a host factory authority, and write the parameters into a public data storage area through interaction with an application layer so as to realize the management of the peripheral devices with time difference in batch updating of the vehicle application layer software.
Detailed Description
Various exemplary embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless it is specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective parts shown in the drawings are not drawn in actual scale for convenience of description.
The following description of at least one exemplary embodiment is merely exemplary in nature and is in no way intended to limit the invention, its application, or uses.
The present invention will be further described in detail below with reference to specific embodiments and with reference to the accompanying drawings, in order to make the objects, technical solutions and advantages of the present invention more apparent.
Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but should be considered part of the specification where appropriate.
In all examples shown and discussed herein, any specific values should be construed as merely illustrative, and not a limitation. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that like reference numerals and letters refer to like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
In the first embodiment, as shown in fig. 1, a schematic control flow diagram of a peripheral device during calibration and upgrade of the ECU OTA software in this embodiment is shown, before a vehicle leaves the factory, control parameters of the peripheral device are configured according to device types, the control parameters of the peripheral device are linked with VIN codes of the vehicle to be updated, and then application layer software begins batch update;
S1, identifying control parameters of peripheral devices correspondingly linked with VIN codes through VIN codes of vehicles to be updated when the application layer software is updated in batches, or defining the control parameters of the peripheral devices of the vehicles to be updated according to the model number and/or actual configuration of the vehicle before the application layer software is updated in batches.
S2, configuring an OTA task list and a corresponding software upgrade package (namely an upgrade package);
S3, acquiring software version information of a target controller of each vehicle to be updated according to the VIN code;
And S4, judging whether the feedback version information of the target controller is the same as the version information of the upgrade package, when the feedback version information of the target controller is different from the version information of the upgrade package, issuing a soft upgrade package to the OTA according to the VIN code, and when the version information of the target controller of any vehicle to be updated is the same as the version information of the software upgrade package, marking that the vehicle to be updated is successfully updated, and re-implementing the step S2 to configure a new OTA task list and a corresponding software upgrade package.
S5, calibrating control parameters of peripheral devices of the vehicle to be updated through application layer software when the vehicle to be updated meets the OTA upgrading requirement, and re-implementing the steps S2-S4 when the vehicle to be updated does not meet the OTA upgrading requirement until the vehicle to be updated meets the OTA upgrading requirement. The upgrade requirement of the OTA may be to reach a preset upgrade time.
S6, after calibration is completed, the application layer software performs OTA upgrading and updating, meanwhile, a Boot loader is used for replacing the application layer software to control all hardware interfaces, the Boot loader reads and executes control parameters corresponding to more than one peripheral device, and each peripheral device is controlled to run with the corresponding control parameters through the hardware interfaces, so that the purpose of controlling the peripheral devices in batches during batch updating of the application layer software is achieved.
Preferably, the control parameters of the peripheral devices corresponding to the vehicle to be updated can be customized before the VIN code of the vehicle to be updated identifies the control parameters correspondingly linked with the VIN code.
In the second embodiment, the host factory vehicle management system background with the ECU OTA software calibrated and upgraded can identify the vehicle model and the actual configuration through the VIN code, so that the host factory vehicle management system needs to link the vehicles of different vehicle types and different configurations with the peripheral device control parameters of the controllers corresponding to the vehicles.
After parameter link configuration is completed, before OTA updating is carried out on the vehicle software in batches, a round of calibration operation is carried out, namely when an upgrade package is configured, the vehicle model and configuration are identified in a vehicle management system through a vehicle VIN code, and control parameters of corresponding peripheral devices on the links are used. The control parameters of the peripheral devices can be manually selected by the host factory authority, if the step of skipping the setting parameters is selected without modification, the software version instructions of all the target controllers are directly obtained, after the feedback of the software version information of all the target controllers is received, if the software version information of the software upgrading package is inconsistent with the software version information fed back by the target controllers, the software upgrading package can be normally issued later.
When the preset upgrading time is reached, the OTA system firstly sends an upgrading state detection instruction to detect the state of the vehicle. When the vehicle feedback meets the upgrade state requirement, firstly calibrating control parameters of peripheral devices of the controller, and after receiving feedback information of calibration completion, starting to send an OTA upgrade instruction to update the application layer software of the controller. When the vehicle feedback does not meet the upgrading requirement, the OTA updating software is not calibrated and carried out.
In the last step, when the calibration state is fed back, the value in the storage address is not checked, and the calibration is finished after the process is finished, because the conditions such as the power supply gear, the vehicle gear and the torque are generally strict in terms of judgment of the OTA, the calibration cannot fail when the OTA judgment conditions are met. If the calibration fails, the condition for judging the OTA is basically not met, and then the OTA process is exited.
The control parameters of the peripheral devices after calibration are stored in a public data storage area by application layer software, and backup operation of all the control parameters is carried out. The storage address area of the calibrated control parameter and the storage address area of the backup control parameter need to select the address area with the position difference as far as possible, and the damage of the storage addresses has the characteristic of continuity, so that the simultaneous damage of two groups of storage addresses can be avoided.
The acquired control parameters of the peripheral device can be determined by the ECU according to different ECUs, and both application layer software and bootloader software developers are required to be set in advance. The control parameters of the ECU comprise device control type, effective level, PWM frequency, PWM duty cycle, check code and the like.
When the application layer software is updated, the software jumps to Bootloader software, the Bootloader reads the control parameters such as device control type, effective level, PWM frequency, PWM duty ratio, check code and the like from the public data area, the parameter check module performs parameter check of the calibrated control parameters, and the check algorithm is defined by a host factory according to enterprise standards, and the device control with the requirement control is performed after the check is passed.
In the parameter verification process, when the parameter is not verified, the backup control parameter is verified, and when the parameter is verified, the Bootloader uses the backup control parameter to control peripheral devices and outputs corresponding level and duty ratio, and the Bootloader reads and executes the control parameter corresponding to more than one peripheral device which is verified, and controls each peripheral device to run with the corresponding control parameter through a hardware interface, so that the peripheral devices are controlled in batches when the application layer software is updated in batches.
If both the two groups of parameters are not checked, the control is carried out according to the backup control parameters, and the specific control steps are that when the application layer software is updated, the Boot loader reads and executes the control parameters corresponding to more than one peripheral device which passes the check, and controls each peripheral device to operate with the corresponding control parameters through the hardware interface. At this time, the fault information is stored in a storage address predetermined with the application layer software, and is used for displaying the fault code after the program updating is completed (the fault code can be sent only through a diagnostic protocol when the application layer software runs, but the fault Bootloader in the storage space can be stored first).
When the application layer software is updated, the software jumps to run the new application layer software, the peripheral device resumes the control of the application layer software, and the application layer software detects at regular time when running whether at least one group of acquired control parameters of the peripheral controller and the backup group of control parameters can be checked successfully, otherwise, the fault information is stored into a storage address agreed with the application layer software to display a fault code, so that clients and staff are reminded.
The step of displaying the fault code is that when the application layer software is running, the fault code and the VIN code are bound through a communication protocol and sent to a vehicle management system together, and the vehicle management system marks the vehicle as a fault according to the received fault code and the VIN code.
In this embodiment, the vehicle management system updates the database through networking, and realizes the update of its own control parameters.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the invention, but any modifications, equivalents, and improvements made within the spirit and principle of the present invention should be included in the scope of the present invention.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.