CN110134412B - Software updating method, device, vehicle and computer readable storage medium - Google Patents

Software updating method, device, vehicle and computer readable storage medium Download PDF

Info

Publication number
CN110134412B
CN110134412B CN201910226959.XA CN201910226959A CN110134412B CN 110134412 B CN110134412 B CN 110134412B CN 201910226959 A CN201910226959 A CN 201910226959A CN 110134412 B CN110134412 B CN 110134412B
Authority
CN
China
Prior art keywords
vehicle
preset
upgrading
upgrade
upgrade file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910226959.XA
Other languages
Chinese (zh)
Other versions
CN110134412A (en
Inventor
马东辉
边峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing CHJ Automobile Technology Co Ltd
Original Assignee
Beijing CHJ Automobile Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing CHJ Automobile Technology Co Ltd filed Critical Beijing CHJ Automobile Technology Co Ltd
Priority to CN201910226959.XA priority Critical patent/CN110134412B/en
Publication of CN110134412A publication Critical patent/CN110134412A/en
Application granted granted Critical
Publication of CN110134412B publication Critical patent/CN110134412B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

Embodiments of the present disclosure relate to a software update method, apparatus, vehicle, and computer-readable storage medium. The software updating method comprises the following steps: detecting whether the vehicle meets a preset upgrading condition or not; under the condition that the vehicle meets the preset upgrading conditions, obtaining an upgrading file, and carrying out integrity verification on the upgrading file; under the condition that the upgrade file passes the integrity verification, carrying out validity verification on the upgrade file; and under the condition that the upgrade file passes the validity verification, executing the upgrade operation according to the upgrade file. The technical scheme provided by the invention solves the problem that the existing vehicle is easy to receive the upgrade operation of an illegal download source or download wrong upgrade software.

Description

Software updating method, device, vehicle and computer readable storage medium
Technical Field
Embodiments of the present disclosure relate to the field of vehicle technologies, and in particular, to a software updating method, a device, a vehicle, and a computer readable storage medium.
Background
At present, when the vehicle carries out online upgrade of CAN node software, on-line brush writing is mostly carried out directly through an OBD (On-Board Diagnostic). Thus, the vehicle is easy to receive the upgrade operation of the illegal download source, or the wrong upgrade software is downloaded to be applied to the ECU (Electronic Control Unit ), so that the software is incompatible, the normal use of the vehicle is not facilitated, and hidden danger is brought to the driving safety.
Disclosure of Invention
Embodiments of the present disclosure provide a software updating method, apparatus, vehicle, and computer-readable storage medium, to solve the problem that an existing vehicle is easy to receive an upgrade operation of an illegal download source or download an incorrect upgrade software.
In a first aspect, embodiments of the present disclosure provide a software updating method, applied to a vehicle, including:
detecting whether the vehicle meets a preset upgrading condition or not;
under the condition that the vehicle meets the preset upgrading conditions, obtaining an upgrading file, and carrying out integrity verification on the upgrading file;
under the condition that the upgrade file passes the integrity verification, carrying out validity verification on the upgrade file;
and under the condition that the upgrade file passes the validity verification, executing the upgrade operation according to the upgrade file.
Optionally, the detecting whether the vehicle meets a preset upgrade condition includes:
detecting whether the vehicle is in an inactive state;
and if the vehicle is in an unactuated state, judging that the vehicle meets a preset upgrading condition.
Optionally, the preset upgrade condition includes:
the power supply is in a closing mode, the vehicle door is closed, the central control lock is closed, the voltage of the storage battery is in a preset voltage range, the hand brake signal is effective, the hand brake is in a pulled-up state, the vehicle speed is smaller than the preset vehicle speed, and the driving gear is the parking gear.
Optionally, the performing integrity verification on the upgrade file includes:
calculating a first verification value of the data bytes of the upgrade file;
comparing whether the first verification value is matched with a first preset verification value sent by an external terminal;
and if the first verification value is matched with a first preset verification value sent by the external terminal, judging that the upgrade file passes the integrity verification.
Optionally, the verifying the validity of the upgrade file includes:
acquiring a first abstract encrypted in the upgrade file;
extracting a second abstract of the upgrade file through a preset algorithm, and decrypting the encrypted first abstract;
comparing whether the decrypted first abstract is matched with the second abstract;
and if the decrypted first abstract is matched with the second abstract, judging that the upgrade file passes the validity verification.
Optionally, in the case that the upgrade file passes the validity verification, after performing the upgrade operation according to the upgrade file, the method further includes:
in the execution process of the upgrading operation, if abnormal power failure of the vehicle is detected and the upgrading operation is stopped, determining an electronic control unit for stopping the upgrading operation;
and controlling the electronic control unit to continue to execute the upgrading operation or re-execute the upgrading operation under the condition that the vehicle power supply is detected to be in a starting mode.
Optionally, in the case that the upgrade file passes the validity verification, after performing the upgrade operation according to the upgrade file, the method further includes:
in the execution process of the upgrading operation, if a preset instruction is detected, outputting prompt information;
wherein, the preset instruction at least comprises one of the following: a vehicle door opening command, a central control lock opening command, a hand brake lowering command and a gear shifting command.
In a second aspect, embodiments of the present disclosure further provide a software updating apparatus, applied to a vehicle, including:
the detection module is used for detecting whether the vehicle meets preset upgrading conditions or not;
the first verification module is used for acquiring an upgrade file and carrying out integrity verification on the upgrade file under the condition that the vehicle meets the preset upgrade condition;
the second verification module is used for verifying the validity of the upgrade file under the condition that the upgrade file passes the integrity verification;
and the execution module is used for executing the upgrading operation according to the upgrading file under the condition that the upgrading file passes the validity verification.
Optionally, the detection module is further configured to:
detecting whether the vehicle is in an inactive state;
and if the vehicle is in an unactuated state, judging that the vehicle meets a preset upgrading condition.
Optionally, the preset upgrade condition includes:
the power supply is in a closing mode, the vehicle door is closed, the central control lock is closed, the voltage of the storage battery is in a preset voltage range, the hand brake signal is effective, the hand brake is in a pulled-up state, the vehicle speed is smaller than the preset vehicle speed, and the driving gear is the parking gear.
Optionally, the first verification module is further configured to:
calculating a first verification value of the data bytes of the upgrade file;
comparing whether the first verification value is matched with a first preset verification value sent by an external terminal;
and if the first verification value is matched with a first preset verification value sent by the external terminal, judging that the upgrade file passes the integrity verification.
Optionally, the second verification module is further configured to:
acquiring a first abstract encrypted in the upgrade file;
extracting a second abstract of the upgrade file through a preset algorithm, and decrypting the encrypted first abstract;
comparing whether the decrypted first abstract is matched with the second abstract;
and if the decrypted first abstract is matched with the second abstract, judging that the upgrade file passes the validity verification.
Optionally, the apparatus further comprises a control module for:
in the execution process of the upgrading operation, if abnormal power failure of the vehicle is detected and the upgrading operation is stopped, determining an electronic control unit for stopping the upgrading operation;
and controlling the electronic control unit to continue to execute the upgrading operation or re-execute the upgrading operation under the condition that the vehicle power supply is detected to be in a starting mode.
Optionally, the apparatus further comprises an output module for:
in the execution process of the upgrading operation, if a preset instruction is detected, outputting prompt information;
wherein, the preset instruction at least comprises one of the following: a vehicle door opening command, a central control lock opening command, a hand brake lowering command and a gear shifting command.
In a third aspect, embodiments of the present disclosure also provide a vehicle comprising a processor, a memory and a computer program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the software update method as described in the first aspect.
In a fourth aspect, embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the software update method as described in the first aspect.
In the embodiment of the disclosure, under the condition that the vehicle is detected to meet the preset upgrading condition, the vehicle acquires an upgrading file, and carries out integrity verification on the upgrading file, if the upgrading file passes the integrity verification, validity verification is carried out on the upgrading file, and under the condition that the upgrading file passes the validity verification, upgrading operation is carried out according to the upgrading file. Because the integrity verification is carried out on the upgrade file, the situation that the vehicle receives the incomplete upgrade file, interruption, upgrade error and the like in the upgrade process are avoided, and the smoothness of the upgrade is ensured; in addition, by verifying the validity of the upgrade file, the vehicle can be prevented from acquiring an error or incompatible file, the smoothness of upgrade is further ensured, the vehicle can be prevented from being maliciously upgraded, and the safety of the vehicle is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings that are needed in the description of the embodiments of the present disclosure will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and that other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
FIG. 1 is a flow chart of a software update method provided by an embodiment of the present disclosure;
FIG. 1a is a flow chart of an integrity verification of an upgrade file in the software update method provided in FIG. 1;
FIG. 1b is a flowchart of validating an upgrade file in the software update method provided in FIG. 1;
fig. 2 is a block diagram of a software updating apparatus provided in an embodiment of the present disclosure.
Detailed Description
The technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments of the present disclosure without inventive faculty, are intended to fall within the scope of the present disclosure.
Referring to fig. 1, fig. 1 is a flowchart of a software updating method applied to a vehicle according to an embodiment of the disclosure, as shown in fig. 1, including the following steps:
step 101, detecting whether the vehicle meets preset upgrading conditions.
It should be noted that, the triggering of detecting whether the vehicle meets the preset upgrade condition may be various. For example, in one case, the vehicle may receive a software upgrade instruction, for example, in a case where the vehicle establishes a connection with the cloud server, for example, the cloud server sends the software upgrade instruction to the vehicle, and after receiving the software upgrade instruction, the vehicle may detect whether the vehicle itself meets a preset upgrade condition, or may also detect whether the vehicle meets the preset upgrade condition by the cloud server; of course, the mobile terminal may also send a software upgrade instruction to the vehicle, or may also be another external terminal, such as a host computer, that sends a software upgrade instruction to the vehicle.
Alternatively, in another case, it may be detected whether the vehicle satisfies a preset upgrade condition when it is detected that the vehicle enters a specific software upgrade program.
In the embodiment of the present invention, the preset upgrade condition includes: the power supply is in a closing mode, the vehicle door is closed, the central control lock is closed, the voltage of the storage battery is in a preset voltage range, the hand brake signal is effective, the hand brake is in a pulled-up state, the vehicle speed is smaller than the preset vehicle speed, and the driving gear is the parking gear.
Wherein the preset voltage range is 10-14V, and the preset vehicle speed is 2Km/h.
Detecting whether the vehicle meets preset upgrading conditions, namely detecting a power mode, a door state, a central control lock state, a storage battery voltage, a hand brake state, a vehicle speed and a driving gear of the vehicle, and judging that the vehicle meets the preset upgrading conditions only when the power is detected to be in a closed mode, the door is closed and the central control lock is closed, the storage battery voltage is in a range of 10-14V, a hand brake signal is effective, the hand brake is in a pulled-up state, the vehicle speed is smaller than 2Km/h and the driving gear is a parking gear.
Alternatively, the step 101 may include:
detecting whether the vehicle is in an inactive state.
When the vehicle is detected to be in an unactuated state, judging that the vehicle meets a preset upgrading condition; if the vehicle is detected to be in a starting state, judging that the vehicle does not meet the preset upgrading condition. It is understood that the vehicle is in an inactive state including at least one of an engine of the vehicle not being started, a vehicle speed being at 0, and a power supply of the vehicle being in a shut-down mode.
In addition, when it is detected that the vehicle meets the preset upgrade condition, the vehicle may output a prompt instruction, for example, specific text information may be displayed on a central control display screen of the vehicle, so as to prompt a user that the vehicle currently meets the preset upgrade condition, and then the next operation may be performed.
Step 102, under the condition that the vehicle meets the preset upgrading conditions, obtaining an upgrading file, and carrying out integrity verification on the upgrading file.
And under the condition that the vehicle meets the preset upgrading conditions, acquiring an upgrading file. For example, in the case where the vehicle establishes a connection with the cloud server, the vehicle may acquire an upgrade file sent by the cloud server; alternatively, in the case where the vehicle establishes a wired connection with other external terminals (such as an upper computer), the vehicle may acquire an upgrade file transmitted from the external terminal.
After the vehicle acquires the upgrade file, the upgrade file may be stored in a memory of the vehicle, and integrity verification is performed on the upgrade file.
Referring to fig. 1a, the integrity verification of the upgrade file may include the following steps:
step 1021, calculating a first verification value of the data bytes of the upgrade file;
step 1022, comparing whether the first verification value is matched with a first preset verification value sent by the external terminal;
step 1023, if the first verification value is matched with a first preset verification value sent by the external terminal, determining that the upgrade file passes the integrity verification.
Specifically, after the vehicle acquires the upgrade file, the vehicle may activate the integrity verification of the ECU through a "check programming integrity" routine control, and when the ECU receives the service request, the Bootloader calculates a first verification value of a data byte of the upgrade file, compares whether the first verification value matches a first preset verification value sent by the external terminal, and if so, determines that the integrity verification of the upgrade file passes.
Alternatively, the vehicle may verify whether all data bytes of the upgrade file are correctly transmitted and written by using a CRC32 algorithm, that is, the Bootloader calculates a CRC32 value of the data bytes of the upgrade file, compares the calculated CRC32 value with a preset CRC32 value in a request message sent by the upper computer, and if the calculated CRC32 value is consistent with the preset CRC32 value sent by the upper computer, determines that the integrity verification of the upgrade file is passed.
Step 103, carrying out validity verification on the upgrade file under the condition that the upgrade file passes the integrity verification.
It can be appreciated that in the case that the integrity verification of the upgrade file is passed, that is, the upgrade file includes complete data bytes, validity verification is performed on the upgrade file to determine whether the upgrade file is valid.
Referring to fig. 1b, in the embodiment of the disclosure, the validity verification of the upgrade file may include the following steps:
step 1031, obtaining a first abstract encrypted in the upgrade file;
step 1032, extracting a second abstract of the upgrade file through a preset algorithm, and decrypting the encrypted first abstract;
step 1033, comparing whether the decrypted first abstract is matched with the second abstract;
step 1034, if the decrypted first digest matches the second digest, determining that the upgrade file passes the validity verification.
Wherein the preset algorithm is an MD5 algorithm. Specifically, when the vehicle acquires the upgrade file, and under the condition that the upgrade file passes the integrity verification, extracting a second abstract of the upgrade file through an MD5 algorithm, acquiring an encrypted first abstract in the upgrade file, decrypting the first abstract through a corresponding algorithm, comparing whether the second abstract is in comparison with the decrypted first abstract, and if the comparison result is consistent, judging that the upgrade file is valid, wherein the validity verification of the upgrade file passes; if the comparison results are inconsistent, the upgrade file is judged to be invalid, and the vehicle can stop the subsequent upgrade operation.
It should be noted that, before the upgrade file is sent to the vehicle, the source upgrade file may be preprocessed by the external terminal, for example, the source upgrade file is first extracted with the MD5 algorithm to obtain a first digest, the first digest is encrypted, and the encrypted first digest is written into the end of the source upgrade file to generate the upgrade file, so that the upgrade file also includes the encrypted first digest. The external terminal may transmit the upgrade file to the vehicle in case of establishing a connection with the vehicle.
And 104, executing upgrading operation according to the upgrading file under the condition that the upgrading file passes the validity verification.
It can be appreciated that when the upgrade file is determined to be a valid upgrade file, the vehicle performs an upgrade operation according to the upgrade file.
In the embodiment of the disclosure, under the condition that the vehicle is detected to meet the preset upgrading condition, the vehicle acquires an upgrading file, and carries out integrity verification on the upgrading file, if the upgrading file passes the integrity verification, validity verification is carried out on the upgrading file, and under the condition that the upgrading file passes the validity verification, upgrading operation is carried out according to the upgrading file. Furthermore, by carrying out integrity verification on the upgrade file, the situation that the vehicle receives the incomplete upgrade file, interruption, upgrade error and the like in the upgrade process are avoided, and the smoothness of the upgrade is ensured; in addition, by verifying the validity of the upgrade file, the vehicle can be prevented from acquiring an error or incompatible file, the smoothness of upgrade is further ensured, the vehicle can be prevented from being maliciously upgraded, and the safety of the vehicle is improved.
Optionally, after the step 104, the method may further include:
in the execution process of the upgrading operation, if abnormal power failure of the vehicle is detected and the upgrading operation is stopped, determining an electronic control unit for stopping the upgrading operation; and controlling the electronic control unit to continue to execute the upgrading operation or re-execute the upgrading operation under the condition that the vehicle power supply is detected to be in a starting mode.
As can be appreciated, when the vehicle is abnormally powered off in the upgrading process, if the vehicle is abnormally powered off, the upgrading operation is stopped, the ECU stopping the upgrading operation is determined, and the ECU is controlled to memorize the upgrading node of the upgrading operation before the abnormal power off; when the vehicle is detected to be powered back, namely, when the vehicle power supply is detected to be in a starting mode, the ECU is controlled to execute follow-up upgrading nodes which are not completed in the upgrading operation from the upgrading nodes according to the upgrading nodes memorized by the ECU. Thus, the upgrading process is saved, and the upgrading operation efficiency is improved.
Or when the vehicle is detected to be powered back, that is, when the vehicle power supply is detected to be in a starting mode, the ECU is controlled to execute the upgrading operation again, that is, the ECU which executes the upgrading operation before power failure is controlled to execute the upgrading operation again. It can be understood that the upgrade operation performed by the vehicle before the power failure is performed, and the upgrade file according to the upgrade file has passed the integrity verification and the validity verification, so that when the vehicle resumes the power supply and re-performs the upgrade operation, the vehicle does not need to perform the integrity verification and the validity verification on the upgrade file, thereby simplifying the upgrade flow of the vehicle.
In addition, after the step 104, the method may further include:
and in the execution process of the upgrading operation, if a preset instruction is detected, outputting prompt information.
Wherein, the preset instruction at least comprises one of the following: a vehicle door opening command, a central control lock opening command, a hand brake lowering command and a gear shifting command. For example, if the door lock of the vehicle is triggered during the execution of the upgrade operation, if the user pulls the door lock, and at this time, the vehicle detects a door opening instruction, the vehicle outputs a prompt message, where the prompt message may be a text message displayed on a central control display screen of the vehicle or on a mobile terminal that establishes a wireless connection with the vehicle, so as to display a current upgrade state, prompt the user to stop the door opening operation, so as to avoid interference to the upgrade operation of the vehicle, and ensure smooth execution of the upgrade operation.
Of course, the prompting instruction may be in other forms, for example, a voice instruction or an alarm sound sent by a central control room of the vehicle, or a preset light flashing on the vehicle, so as to inform the user that the vehicle is in an upgrading state currently, and avoid interference to the upgrading operation of the vehicle.
It should be noted that, the preset instruction is a trigger instruction before a user performs a certain preset operation, for example, the door opening instruction is a trigger instruction before the user performs a door opening action, when the user pulls a door lock, the vehicle will detect the door opening instruction, but the door is not yet opened at this time, and the vehicle may control the door to be locked so as to prohibit the door from being opened, so that the user can be prevented from entering the vehicle to open the vehicle, and smoothness of the upgrade operation is ensured. In the same principle, when the vehicle detects the central control lock opening command, the hand brake lowering command and the gear shifting command, the vehicle outputs a corresponding prohibiting command to prohibit the central control lock from being opened, prohibit the hand brake from being lowered and prohibit the gear shifting from being executed, so that the user is prevented from starting the vehicle, and the smoothness of the upgrading operation of the vehicle is ensured.
In the embodiment of the invention, after the vehicle finishes the upgrading operation, the vehicle can also perform functional verification on the upgraded software, wherein the functional verification can be to test the upgraded software, for example, to run the upgraded software and monitor whether the software is abnormal in the running process; if no abnormality occurs, the software upgrade is successful and the normal operation can be realized.
Further, after the vehicle completes the functional verification, the vehicle can send indication information for indicating the functional verification result to an external terminal, such as a cloud server or an upper computer, so that the external terminal and a user can timely acquire the result of the software upgrade on the vehicle. For example, in the case of successful functional verification, the vehicle may send first indication information, where the first indication information is used to indicate that the software on the vehicle is upgraded successfully and can operate normally; under the condition that the functional verification fails, the vehicle can send second indication information, wherein the second indication information is used for indicating that the vehicle cannot normally run after the software is upgraded, so that the vehicle can play an indication role for a user, and the user can conveniently take targeted measures in time, such as operation of carrying out software upgrading and updating on the vehicle again.
Referring to fig. 2, fig. 2 is a block diagram of a software updating apparatus according to an embodiment of the disclosure, and as shown in fig. 2, the software updating apparatus 200 includes:
a detection module 201, configured to detect whether the vehicle meets a preset upgrade condition;
a first verification module 202, configured to obtain an upgrade file and perform integrity verification on the upgrade file when the vehicle meets a preset upgrade condition;
a second verification module 203, configured to perform validity verification on the upgrade file if the upgrade file passes the integrity verification;
and the execution module 204 is configured to execute an upgrade operation according to the upgrade file if the upgrade file passes the validity verification.
Optionally, the detection module 201 is further configured to:
detecting whether the vehicle is in an inactive state;
and if the vehicle is in an unactuated state, judging that the vehicle meets a preset upgrading condition.
Optionally, the preset upgrade condition includes:
the power supply is in a closing mode, the vehicle door is closed, the central control lock is closed, the voltage of the storage battery is in a preset voltage range, the hand brake signal is effective, the hand brake is in a pulled-up state, the vehicle speed is smaller than the preset vehicle speed, and the driving gear is the parking gear.
Optionally, the first verification module 202 is further configured to:
calculating a first verification value of the data bytes of the upgrade file;
comparing whether the first verification value is matched with a first preset verification value sent by an external terminal;
and if the first verification value is matched with a first preset verification value sent by the external terminal, judging that the upgrade file passes the integrity verification.
Optionally, the second verification module 203 is further configured to:
acquiring a first abstract encrypted in the upgrade file;
extracting a second abstract of the upgrade file through a preset algorithm, and decrypting the encrypted first abstract;
comparing whether the decrypted first abstract is matched with the second abstract;
and if the decrypted first abstract is matched with the second abstract, judging that the upgrade file passes the validity verification.
Optionally, the software updating apparatus 200 further comprises a control module, where the control module is configured to:
in the execution process of the upgrading operation, if abnormal power failure of the vehicle is detected and the upgrading operation is stopped, determining an electronic control unit for stopping the upgrading operation;
and controlling the electronic control unit to continue to execute the upgrading operation or re-execute the upgrading operation under the condition that the vehicle power supply is detected to be in a starting mode.
Optionally, the software updating apparatus 200 further includes an output module, where the output module is configured to:
in the execution process of the upgrading operation, if a preset instruction is detected, outputting prompt information;
wherein, the preset instruction at least comprises one of the following: a vehicle door opening command, a central control lock opening command, a hand brake lowering command and a gear shifting command.
The software updating apparatus 200 applied to a vehicle provided in the embodiments of the present disclosure may be used to perform each process of the embodiments of the software updating method, and achieve the same technical effects, and related concepts and specific implementation manners thereof may refer to descriptions in the embodiments of the software updating method and are not repeated herein.
In the embodiment of the disclosure, the software updating apparatus 200 obtains an upgrade file and performs integrity verification on the upgrade file when detecting that the vehicle meets a preset upgrade condition, and performs validity verification on the upgrade file if the upgrade file passes the integrity verification, and performs an upgrade operation according to the upgrade file when the upgrade file passes the validity verification. Furthermore, the software updating device 200 is used for carrying out integrity verification on the upgrade file, so that the situation that the vehicle receives an incomplete upgrade file, interruption, upgrade error and the like in the upgrade process are avoided, and the smoothness of the upgrade is ensured; in addition, by verifying the validity of the upgrade file, the vehicle can be prevented from acquiring an error or incompatible file, the smoothness of upgrade is further ensured, the vehicle can be prevented from being maliciously upgraded, and the safety of the vehicle is improved.
The embodiments of the present disclosure also provide a vehicle, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, where the computer program when executed by the processor implements the respective processes of the foregoing embodiments of the software updating method, and the same technical effects can be achieved, so that repetition is avoided, and no redundant description is given here.
Embodiments of the present disclosure further provide a computer readable storage medium, on which a computer program is stored, where the computer program when executed by a processor implements each process of the foregoing software update method embodiment, and the same technical effects can be achieved, and for avoiding repetition, a detailed description is omitted herein. Wherein the computer readable storage medium is selected from Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk.
It should be noted that, in this document, 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 the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (14)

1. A software updating method applied to a vehicle, comprising:
detecting whether the vehicle meets a preset upgrading condition or not;
under the condition that the vehicle meets the preset upgrading conditions, obtaining an upgrading file, and carrying out integrity verification on the upgrading file;
under the condition that the upgrade file passes the integrity verification, carrying out validity verification on the upgrade file;
under the condition that the upgrade file passes the validity verification, performing upgrade operation according to the upgrade file;
in the execution process of the upgrading operation, if a preset instruction is detected, outputting prompt information; the preset instruction is a trigger instruction before a user executes a certain preset operation;
during the execution of the upgrade operation, if the abnormal power failure of the vehicle is detected and the upgrade operation is stopped, determining an electronic control unit ECU for stopping the upgrade operation; if the vehicle is abnormally powered off, the upgrading operation is stopped, an ECU stopping the upgrading operation is determined, and the ECU is controlled to memorize an upgrading node of the upgrading operation before the abnormal power off;
controlling the electronic control unit to continuously execute the upgrading operation or re-execute the upgrading operation under the condition that the vehicle power supply is detected to be in a starting mode, wherein when the vehicle power supply is detected to be restored, the ECU is controlled to execute follow-up upgrading nodes which are not completed in the upgrading operation from the upgrading nodes according to the upgrading nodes memorized by the ECU;
wherein, the preset instruction at least comprises one of the following: a vehicle door opening instruction, a central control lock opening instruction, a hand brake lowering instruction and a gear shifting instruction; in the process of executing the upgrading operation, if a preset operation is detected by the vehicle, the preset operation corresponds to a preset instruction, and the preset instruction is a trigger instruction before a user executes any one of the preset operations of opening the vehicle door, opening the central control lock, putting down the hand brake and shifting gears; the vehicle outputs prompt information which displays the current upgrading state and prompts the user to stop the door opening action so as to avoid interference to the upgrading operation of the vehicle and ensure the smooth execution of the upgrading operation.
2. The method of claim 1, wherein the detecting whether the vehicle satisfies a preset upgrade condition comprises:
detecting whether the vehicle is in an inactive state;
and if the vehicle is in an unactuated state, judging that the vehicle meets a preset upgrading condition.
3. The method of claim 1, wherein the preset upgrade condition comprises:
the power supply is in a closing mode, the vehicle door is closed, the central control lock is closed, the voltage of the storage battery is in a preset voltage range, the hand brake signal is effective, the hand brake is in a pulled-up state, the vehicle speed is smaller than the preset vehicle speed, and the driving gear is the parking gear.
4. The method of claim 1, wherein the integrity verifying the upgrade file comprises:
calculating a first verification value of the data bytes of the upgrade file;
comparing whether the first verification value is matched with a first preset verification value sent by an external terminal;
and if the first verification value is matched with a first preset verification value sent by the external terminal, judging that the upgrade file passes the integrity verification.
5. The method of claim 1, wherein the validating the upgrade file comprises:
acquiring a first abstract encrypted in the upgrade file;
extracting a second abstract of the upgrade file through a preset algorithm, and decrypting the encrypted first abstract;
comparing whether the decrypted first abstract is matched with the second abstract;
and if the decrypted first abstract is matched with the second abstract, judging that the upgrade file passes the validity verification.
6. The method of claim 1, wherein the preset instructions comprise at least one of: a vehicle door opening command, a central control lock opening command, a hand brake lowering command and a gear shifting command.
7. A software updating apparatus for use in a vehicle, comprising:
the detection module is used for detecting whether the vehicle meets preset upgrading conditions or not;
the first verification module is used for acquiring an upgrade file and carrying out integrity verification on the upgrade file under the condition that the vehicle meets the preset upgrade condition;
the second verification module is used for verifying the validity of the upgrade file under the condition that the upgrade file passes the integrity verification;
the execution module is used for executing upgrading operation according to the upgrading file under the condition that the upgrading file passes the validity verification;
the apparatus further comprises an output module for: in the execution process of the upgrading operation, if a preset instruction is detected, outputting prompt information; the preset instruction is a trigger instruction before a user executes a certain preset operation;
the control module is used for:
during the execution of the upgrade operation, if the abnormal power failure of the vehicle is detected and the upgrade operation is stopped, determining an electronic control unit ECU for stopping the upgrade operation; if the vehicle is abnormally powered off, the upgrading operation is stopped, an ECU stopping the upgrading operation is determined, and the ECU is controlled to memorize an upgrading node of the upgrading operation before the abnormal power off;
controlling the electronic control unit to continuously execute the upgrading operation or re-execute the upgrading operation under the condition that the vehicle power supply is detected to be in a starting mode, wherein when the vehicle power supply is detected to be restored, the ECU is controlled to execute follow-up upgrading nodes which are not completed in the upgrading operation from the upgrading nodes according to the upgrading nodes memorized by the ECU;
wherein, the preset instruction at least comprises one of the following: a vehicle door opening instruction, a central control lock opening instruction, a hand brake lowering instruction and a gear shifting instruction; in the process of executing the upgrading operation, if a preset operation is detected by the vehicle, the preset operation corresponds to a preset instruction, and the preset instruction is a trigger instruction before a user executes any one of the preset operations of opening the vehicle door, opening the central control lock, putting down the hand brake and shifting gears; the vehicle outputs prompt information which displays the current upgrading state and prompts the user to stop the door opening action so as to avoid interference to the upgrading operation of the vehicle and ensure the smooth execution of the upgrading operation.
8. The apparatus of claim 7, wherein the detection module is further configured to:
detecting whether the vehicle is in an inactive state;
and if the vehicle is in an unactuated state, judging that the vehicle meets a preset upgrading condition.
9. The apparatus of claim 7, wherein the preset upgrade condition comprises:
the power supply is in a closing mode, the vehicle door is closed, the central control lock is closed, the voltage of the storage battery is in a preset voltage range, the hand brake signal is effective, the hand brake is in a pulled-up state, the vehicle speed is smaller than the preset vehicle speed, and the driving gear is the parking gear.
10. The apparatus of claim 7, wherein the first verification module is further configured to:
calculating a first verification value of the data bytes of the upgrade file;
comparing whether the first verification value is matched with a first preset verification value sent by an external terminal;
and if the first verification value is matched with a first preset verification value sent by the external terminal, judging that the upgrade file passes the integrity verification.
11. The apparatus of claim 7, wherein the second verification module is further configured to:
acquiring a first abstract encrypted in the upgrade file;
extracting a second abstract of the upgrade file through a preset algorithm, and decrypting the encrypted first abstract;
comparing whether the decrypted first abstract is matched with the second abstract;
and if the decrypted first abstract is matched with the second abstract, judging that the upgrade file passes the validity verification.
12. The apparatus of claim 7, wherein the preset instructions comprise at least one of: a vehicle door opening command, a central control lock opening command, a hand brake lowering command and a gear shifting command.
13. A vehicle comprising a processor, a memory and a computer program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the software update method of any one of claims 1 to 6.
14. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the software updating method according to any of claims 1 to 6.
CN201910226959.XA 2019-03-25 2019-03-25 Software updating method, device, vehicle and computer readable storage medium Active CN110134412B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910226959.XA CN110134412B (en) 2019-03-25 2019-03-25 Software updating method, device, vehicle and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910226959.XA CN110134412B (en) 2019-03-25 2019-03-25 Software updating method, device, vehicle and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110134412A CN110134412A (en) 2019-08-16
CN110134412B true CN110134412B (en) 2024-04-12

Family

ID=67568924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910226959.XA Active CN110134412B (en) 2019-03-25 2019-03-25 Software updating method, device, vehicle and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110134412B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110647341A (en) * 2019-09-21 2020-01-03 深圳市英博超算科技有限公司 OTA upgrading method, OTA upgrading device, OTA vehicle and computer readable storage medium
CN110703726B (en) * 2019-09-26 2021-07-30 上海赫千电子科技有限公司 Automatic upgrading test method applied to locomotive
CN110687888B (en) * 2019-09-26 2021-09-24 上海赫千电子科技有限公司 Automatic upgrading test device and system applied to locomotive
CN111107138A (en) * 2019-12-10 2020-05-05 交控科技股份有限公司 VOBC data download method, VOBC, download server, device and medium
CN112989431A (en) * 2019-12-16 2021-06-18 北京车和家信息技术有限公司 System file detection method and device of vehicle-mounted equipment and vehicle-mounted equipment
CN113497819A (en) * 2020-04-02 2021-10-12 广州汽车集团股份有限公司 Remote upgrade security guarantee method and system and vehicle-mounted Tbox equipment
CN112114841A (en) * 2020-06-10 2020-12-22 上汽通用五菱汽车股份有限公司 Vehicle machine system upgrading method, vehicle and readable storage medium
CN111954040A (en) * 2020-07-17 2020-11-17 深圳市华曦达科技股份有限公司 Remote controller upgrading method and device, electronic equipment and storage medium
CN111949299A (en) * 2020-08-24 2020-11-17 上海博泰悦臻网络技术服务有限公司 Control method and device for OTA (over the air) upgrade of vehicle-mounted software
CN112965421B (en) * 2021-02-23 2023-06-16 潍柴重机股份有限公司 Engine ECU (electronic control Unit) brush writing control method and control system
CN115145610A (en) * 2021-03-31 2022-10-04 上海擎感智能科技有限公司 Vehicle-mounted system and software upgrading method thereof
CN114265382A (en) * 2021-11-12 2022-04-01 潍柴动力股份有限公司 ECU (electronic control Unit) flash fault processing method and device, electronic equipment and storage medium
CN115562698B (en) * 2022-04-29 2023-10-20 荣耀终端有限公司 Upgrading method of Basic Input Output System (BIOS) and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159605A (en) * 2007-10-25 2008-04-09 中兴通讯股份有限公司 Flow control method capable of implementing state memory and recovery
CN101330399A (en) * 2007-06-19 2008-12-24 上海风格信息技术有限公司 Method for upgrading built-in equipment
CN101593118A (en) * 2009-02-24 2009-12-02 浪潮集团山东通用软件有限公司 A kind of software upgrade method flexibly
CN105138349A (en) * 2015-07-24 2015-12-09 深圳市元征科技股份有限公司 Software upgrading method and device
CN105278994A (en) * 2015-10-29 2016-01-27 北京新能源汽车股份有限公司 Updating method and updating system of vehicle-mounted ECU (Electronic Control Unit) software
US20160092190A1 (en) * 2013-12-16 2016-03-31 Beijing Nq Technology Co., Ltd. Method, apparatus and system for inspecting safety of an application installation package
CN107291511A (en) * 2017-06-30 2017-10-24 百度在线网络技术(北京)有限公司 Method and apparatus for the application program updating of vehicle-mounted Android system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101330399A (en) * 2007-06-19 2008-12-24 上海风格信息技术有限公司 Method for upgrading built-in equipment
CN101159605A (en) * 2007-10-25 2008-04-09 中兴通讯股份有限公司 Flow control method capable of implementing state memory and recovery
CN101593118A (en) * 2009-02-24 2009-12-02 浪潮集团山东通用软件有限公司 A kind of software upgrade method flexibly
US20160092190A1 (en) * 2013-12-16 2016-03-31 Beijing Nq Technology Co., Ltd. Method, apparatus and system for inspecting safety of an application installation package
CN105138349A (en) * 2015-07-24 2015-12-09 深圳市元征科技股份有限公司 Software upgrading method and device
CN105278994A (en) * 2015-10-29 2016-01-27 北京新能源汽车股份有限公司 Updating method and updating system of vehicle-mounted ECU (Electronic Control Unit) software
CN107291511A (en) * 2017-06-30 2017-10-24 百度在线网络技术(北京)有限公司 Method and apparatus for the application program updating of vehicle-mounted Android system

Also Published As

Publication number Publication date
CN110134412A (en) 2019-08-16

Similar Documents

Publication Publication Date Title
CN110134412B (en) Software updating method, device, vehicle and computer readable storage medium
US20210182048A1 (en) Vehicle electronic control system, program update notification control method and computer program product
CN107809324B (en) Vehicle-mounted automatic diagnosis system equipment and upgrading method thereof
CN107729757A (en) Software authentication before software upgrading
US20210157570A1 (en) Vehicle master device, installation instruction determination method and computer program product
CN113849212B (en) Software upgrading control method and device and electronic equipment
US20210165651A1 (en) Electronic control unit, vehicle electronic control system, difference data consistency determination method and computer program product
US20210157574A1 (en) Vehicle master device, non-rewrite target power supply administration method and computer program product
CN113645590A (en) Method, apparatus, device and medium for remotely controlling vehicle based on encryption algorithm
US20210155174A1 (en) Display control device, rewrite progress display control method and computer program product
EP4075309A1 (en) Secure boot device
CN112346904A (en) Smart electric meter calibration method and device, smart electric meter and storage medium
CN111158729A (en) System upgrading method, device, equipment and storage medium
CN115437915A (en) Vehicle-based version testing method and device and electronic equipment
US11876898B2 (en) Vehicle master device, security access key management method, security access key management program and data structure of specification data
US20210107325A1 (en) Method and device for upgrading tpms diagnostic tool
CN107340841B (en) Method for quickly initializing diagnostic instrument, terminal and computer readable storage medium
US10417016B2 (en) Data communication system for vehicle
WO2022160745A1 (en) Network security function detection method and related device
CN116257270A (en) Vehicle, upgrading method and device of vehicle
CN116382724A (en) Remote upgrading method and system based on cloud printer
CN112925546B (en) Multistage verification method and system for preventing vehicle-mounted ECU from refreshing errors
CN114793196A (en) Firmware upgrading method, device, equipment and storage medium
CN116707819B (en) Construction method of vehicle OTA upgrading security mechanism
CN105827413A (en) Electronic terminal, and system safety verification device and method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant