CN114064095A - Vehicle-mounted software upgrading method, vehicle-mounted controller, vehicle and storage medium - Google Patents

Vehicle-mounted software upgrading method, vehicle-mounted controller, vehicle and storage medium Download PDF

Info

Publication number
CN114064095A
CN114064095A CN202010797765.8A CN202010797765A CN114064095A CN 114064095 A CN114064095 A CN 114064095A CN 202010797765 A CN202010797765 A CN 202010797765A CN 114064095 A CN114064095 A CN 114064095A
Authority
CN
China
Prior art keywords
software
sub
storage area
vehicle
upgrading
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.)
Pending
Application number
CN202010797765.8A
Other languages
Chinese (zh)
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.)
WM Smart Mobility Shanghai Co Ltd
Original Assignee
WM Smart Mobility Shanghai 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 WM Smart Mobility Shanghai Co Ltd filed Critical WM Smart Mobility Shanghai Co Ltd
Priority to CN202010797765.8A priority Critical patent/CN114064095A/en
Publication of CN114064095A publication Critical patent/CN114064095A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4416Network booting; Remote initial program loading [RIPL]

Landscapes

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

Abstract

The embodiment of the application provides an upgrading method of vehicle-mounted software, a vehicle-mounted controller, a vehicle and a storage medium. The upgrading method of the vehicle-mounted software comprises the following steps: writing the first-time upgrading software into a sub-storage area of a storage area by adopting a first boot loader, and marking the sub-storage area written into the first-time upgrading software as a working area; the storage area comprises at least two sub-storage areas, and all the upgrading software comprises a second boot loader; and writing the upgrade software of the Nth time into any sub-storage area which is not marked as a working area by adopting a second boot loader of any upgrade software, marking the sub-storage area written into the upgrade software of the Nth time as the working area when an initialization signal is detected, and marking other sub-storage areas as non-working areas. The embodiment of the application realizes that the vehicle can carry out the upgrading of the vehicle-mounted software in the running process.

Description

Vehicle-mounted software upgrading method, vehicle-mounted controller, vehicle and storage medium
Technical Field
The application relates to the technical field of software upgrading, in particular to an upgrading method of vehicle-mounted software, a vehicle-mounted controller, a vehicle and a storage medium.
Background
At present, vehicle-mounted software of a vehicle-mounted Controller is widely used in vehicle control, and a BootLoader based on a CAN (Controller Area Network) bus and a Unified Diagnostic Service (UDS) are combined to provide convenience for upgrading of the vehicle-mounted software of the vehicle-mounted Controller.
However, at present, the upgrading of the vehicle-mounted software requires that the original vehicle-mounted software is erased and then the upgraded software is written into a storage area. When the upgrade software is written, the original vehicle-mounted software is required to be in a non-working state, that is, the vehicle is required to be in a non-running safety state, for example, the vehicle is stopped, and the gear of the vehicle is not in a forward gear. If the vehicle is in a running state, the vehicle needs to be stopped for upgrading the on-board software, so that the normal running of the vehicle is prevented.
Disclosure of Invention
The application provides an upgrading method of vehicle-mounted software, a vehicle-mounted controller, a vehicle and a storage medium aiming at the defects of the prior art, and is used for solving the technical problem that the vehicle-mounted software can be upgraded only when the vehicle stops running in the prior art.
In a first aspect, an embodiment of the present application provides a method for upgrading vehicle-mounted software, including:
writing the first-time upgrading software into a sub-storage area of a storage area by adopting a first boot loader, and marking the sub-storage area written into the first-time upgrading software as a working area; the storage area comprises at least two sub-storage areas, all the upgrading software comprises a second boot loader, and the upgrading software in the sub-storage area marked as the working area is used as vehicle-mounted software to control the running of the vehicle;
writing the upgrading software of the Nth time into any sub-storage area which is not marked as a working area by adopting a second boot loader of any upgrading software, wherein N is a positive integer greater than 1; when the initialization signal is detected, the sub-storage area written in the nth upgrading software is marked as a working area, and other sub-storage areas are marked as non-working areas.
In a possible implementation manner, before writing the first-time upgrade software into one sub-storage area of the storage area by using the first boot loader, the method further includes:
dividing the storage area into at least two sub-storage areas; each sub-storage area is used for storing upgrade software.
In one possible implementation, dividing the storage area into at least two sub-storage areas includes:
determining whether the original vehicle-mounted software exists in the storage area;
if the storage area has the original vehicle-mounted software, taking the area where the original vehicle-mounted software is located as a sub-storage area, and dividing the rest storage areas into at least one sub-storage area;
and if the original vehicle-mounted software does not exist in the storage area, dividing the storage area into at least two sub-storage areas.
In one possible implementation manner, writing the first-time upgrade software into a sub-storage area of the storage area by using a first boot loader includes:
determining a sub-storage area to be written in the first-time upgrade software;
if the primary vehicle-mounted software exists in the sub-storage area to be written with the primary upgrade software, erasing the primary vehicle-mounted software, and writing the primary upgrade software into the sub-storage area to be written with the primary upgrade software;
and if the original vehicle-mounted software does not exist in the sub-storage area to be written with the first-time upgrading software, writing the first-time upgrading software into the sub-storage area to be written with the first-time upgrading software.
In one possible implementation, determining a sub-storage area to be written with the first-time upgrade software includes:
if the original vehicle-mounted software exists in the sub-storage area, taking the sub-storage area as a sub-storage area to which the first-time upgrade software is to be written;
and if the original vehicle-mounted software does not exist in the sub-storage areas, selecting any sub-storage area as the sub-storage area to which the first-time upgrade software is to be written.
In one possible implementation manner, writing the nth upgrade software into any sub-storage area not marked as a working area by using a second boot loader of any upgrade software, includes:
determining a sub-storage area to be written into the upgrading software of the Nth time;
and writing the upgrade software of the Nth time into the sub storage area of the upgrade software to be written into the Nth time by adopting a second boot loader of the upgrade software of the sub storage area marked as the working area.
In a second aspect, an embodiment of the present application further provides an upgrading apparatus for vehicle-mounted software, including:
the first upgrading module is used for writing the first upgrading software into one sub-storage area of the storage area by adopting a first boot loader and marking the sub-storage area written into the first upgrading software as a working area; the storage area comprises at least two sub-storage areas, all the upgrading software comprises a second boot loader, and the upgrading software in the sub-storage area marked as the working area is used as vehicle-mounted software to control the running of the vehicle;
and the second upgrading module is used for writing the upgrading software for the Nth time into any sub-storage area which is not marked as a working area by adopting a second boot loader of any upgrading software, marking the sub-storage area written into the upgrading software for the Nth time as the working area when an initialization signal is detected, and marking other sub-storage areas as non-working areas.
In a third aspect, an embodiment of the present application further provides an on-vehicle controller, including:
the communication unit is in communication connection with the upper computer and used for receiving the upgrade software sent by the upper computer;
a processor;
the memory is electrically connected with the processor and comprises a reserved area and a storage area, and the storage area comprises at least two sub-storage areas;
the reserved area is configured to store a first boot loader, and when the first boot loader is executed by the processor, the first boot loader writes the first-time upgrade software into one of the sub-storage areas; all the upgraded software comprises a second boot loader; marking a sub-storage area written in the first-time upgrading software as a working area; the upgrading software in the sub-storage area marked as the working area is used as vehicle-mounted software to control the running of the vehicle;
the second boot loader of the upgrading software in any sub storage area writes the upgrading software of the Nth time into any sub storage area which is not marked as a working area when being executed by the processor; n is a positive integer greater than 1; when the initialization signal is detected, the sub-storage area written in the nth upgrading software is marked as a working area, and all other sub-storage areas are marked as non-working areas.
In a fourth aspect, an embodiment of the present application further provides a vehicle, including: the vehicle-mounted controller of the third aspect.
In a fifth aspect, embodiments of the present application further provide a computer-readable storage medium, where the computer-readable storage medium is used for storing computer instructions, and when the computer instructions are run on a computer, the method for upgrading vehicle-mounted software according to the first aspect is implemented.
The beneficial technical effects brought by the technical scheme provided by the embodiment of the application comprise:
the storage area of the embodiment of the application comprises at least two sub-storage areas, the latest upgrade software can be written into the sub-storage area which is not marked as the working area by adopting a second boot loader, namely the latest upgrade software is written into the sub-storage area which is in a non-working state, the upgrade software of the sub-storage area marked as the working area is in a working state as vehicle-mounted software, and the running of a vehicle can be normally controlled. Therefore, the upgrading process of the vehicle-mounted software does not affect the normal operation of the vehicle, the vehicle can upgrade the vehicle-mounted software in the operation process, and potential safety hazards are avoided.
The vehicle-mounted controller can be in communication connection with the upper computer, receives the upgrading software sent by the upper computer, does not need to download the upgrading software remotely, and reduces the interference of remote upgrading on vehicle operation and the risk of potential safety hazards caused by the interference.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic structural diagram of an on-board controller according to an embodiment of the present disclosure;
fig. 2 is a flowchart of an upgrading method for vehicle-mounted software according to an embodiment of the present disclosure;
FIG. 3 is a flowchart of another method for upgrading vehicle-mounted software according to an embodiment of the present disclosure;
FIG. 4 is a schematic structural diagram of a memory of an on-board controller according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an upgrading apparatus for vehicle-mounted software according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of another vehicle-mounted software upgrading device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the present application, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar parts or parts having the same or similar functions throughout. In addition, if a detailed description of the known art is not necessary for illustrating the features of the present application, it is omitted. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
It will be understood by those within the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
The terms referred to in this application will first be introduced and explained:
BootLoader: the boot loader runs before the kernel of the operating system runs, and can initialize hardware equipment and establish a memory space mapping chart, so that the software and hardware environment of the system is brought to a proper state, and a correct environment is prepared for finally calling the kernel of the operating system and is applied to the embedded operating system.
An embodiment of the present application provides an on-board controller, and referring to fig. 1, the on-board controller 100 includes: a communication unit 110, a processor 120, and a memory 130.
And the communication unit 110 is used for being in communication connection with the upper computer and receiving the upgrade software sent by the upper computer.
The memory 130, electrically connected to the processor 120, includes a reserved area 131 and a storage area 132, and the storage area 132 includes at least two sub-storage areas 1321.
The reserved area 131 is configured to store a first boot loader 1311, which when executed by the processor 120, writes first-time upgrade software into a sub-storage area 1321; all the upgraded software comprises a second boot loader; marking the sub-storage area 1321 written with the first-time upgrade software as a working area, and controlling the running of the vehicle by using the upgrade software in the sub-storage area 1321 marked as the working area as vehicle-mounted software;
a second boot loader of the upgraded software in any of the sub storage areas 1321, when executed by the processor 120, writes the upgraded software for the nth time into any of the sub storage areas 1321 that are not marked as working areas, N being a positive integer greater than 1; when the initialization signal is detected, the sub memory area 1321 to which the nth-time upgrade software is written is marked as a working area, and the other sub memory areas 1321 are marked as non-working areas.
Specifically, the upgrade software located in the working area controls the operation of the vehicle as on-board software, and the upgrade software located in the non-working area is in a non-working state.
Optionally, the upgrade software is directly stored or stored after being downloaded by the upper computer, and then the communication unit 110 is in communication connection with the vehicle-mounted controller 100 to send the upgrade software to the vehicle-mounted controller 100, so that the upgrade software does not need to be downloaded remotely, and interference of remote upgrade on vehicle operation and risks of potential safety hazards are reduced.
Alternatively, the Processor 120 may be a CPU (Central Processing Unit), a general-purpose Processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor 120 may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs and microprocessors, and the like.
Optionally, the memory 130 is further configured with at least one program configured to, when executed by the processor 120, implement the method for upgrading the vehicle-mounted software according to any embodiment of the present application, which will be described in detail below.
Based on the same inventive concept, the embodiment of the present application provides a vehicle, including: an onboard controller as in any embodiment of the present application.
Based on the same inventive concept, the embodiment of the present application provides an upgrading method of vehicle-mounted software, which is applied to the vehicle-mounted controller 100 shown in fig. 1, and as shown in fig. 2, the upgrading method of vehicle-mounted software includes the following steps:
s201, writing the first-time upgrade software into one sub-storage area 1321 of the storage area 132 by adopting a first boot loader, and marking the sub-storage area 1321 into which the first-time upgrade software is written as a working area; the memory area 132 includes at least two sub-memory areas 1321, all upgrade software including a second boot loader, the upgrade software in the sub-memory area 1321 labeled as a work area controlling the operation of the vehicle as on-board software.
Optionally, the processor 120 employs the first boot loader to write the first-time upgrade software into one of the sub-memory areas 1321 of the memory area 132, and mark the sub-memory area 1321 into which the first-time upgrade software is written as a work area.
Optionally, the upgrade software in the sub-storage area 1321 marked as the work area is used as the vehicle-mounted software, and when the vehicle control is needed, the upgrade software in the sub-storage area 1321 marked as the work area is operated, and the upgrade software is in a working state.
Optionally, when the sub-storage area 1321 written in the upgrade software for the first time is marked as a working area, other sub-storage areas 1321 are marked as non-working areas.
In some embodiments, before writing the first upgraded software into one of the sub-storage areas 1321 of the storage area 132 by using the first boot loader, the method further includes:
dividing the storage area 132 into at least two sub-storage areas 1321; each sub-storage area 1321 is used to store upgrade software.
In some embodiments, dividing storage area 132 into at least two sub-storage areas 1321 includes:
determining whether the original in-vehicle software exists in the storage area 132;
if the original vehicle-mounted software exists in the storage area 132, the area where the original vehicle-mounted software exists is taken as a sub-storage area 1321, and the rest of the storage area 132 is divided into at least one sub-storage area 1321.
If the storage area 132 does not have the original in-vehicle software, the storage area 132 is divided into at least two sub-storage areas 1321.
Optionally, the original in-vehicle software may or may not have a second boot loader.
In some embodiments, writing the first-time upgrade software to a sub-memory area 1321 of the memory area 132 using a first boot loader includes:
the sub storage area 1321 of the upgrade software to be written for the first time is determined.
If the original vehicle-mounted software exists in the sub-storage area 1321 to which the first-time upgrade software is to be written, the original vehicle-mounted software is erased, and the first-time upgrade software is written into the sub-storage area 1321 to which the first-time upgrade software is to be written.
And if the original vehicle-mounted software does not exist in the sub-storage area 1321 into which the first-time upgrade software is to be written, writing the first-time upgrade software into the sub-storage area 1321 into which the first-time upgrade software is to be written.
In some embodiments, determining the child storage area 1321 to which the first upgrade software is to be written includes:
if the original vehicle-mounted software exists in the sub storage area 1321, the sub storage area 1321 is used as the sub storage area 1321 to which the first-time upgrade software is to be written.
If the original vehicle-mounted software does not exist in the sub-storage area 1321, selecting any sub-storage area 1321 as the sub-storage area 1321 to which the first-time upgrade software is to be written.
S202, the on-board controller 100 writes the nth upgrade software into any sub storage area 1321 that is not marked as a working area by using the second boot loader of any upgrade software, marks the sub storage area 1321 that is written into the nth upgrade software as a working area when detecting the initialization signal, and marks each of the other sub storage areas 1321 as a non-working area.
Specifically, each of the other sub-storage areas 1321 is labeled as a non-operating area, such that only one of the sub-storage areas 1321 is labeled as an operating area for controlling the operation of the vehicle.
Alternatively, when the on-board controller 100 is in the sleep state and awakened, the on-board controller 100 detects an initialization signal, such as: when the vehicle is in a stopped state or the vehicle gear is not in a forward gear and is restarted to move forward, the vehicle-mounted controller 100 detects the initialization signal, and marks the sub-storage area 1321, in which the nth-time upgrade software is written, as a working area, that is, the latest upgrade software is used as vehicle-mounted software to control the operation of the vehicle. Therefore, the existing vehicle-mounted software can control the running of the vehicle all the time in the running process of the vehicle, and after the new upgrade software is written, the vehicle-mounted software is switched to the new upgrade software when the vehicle is required to be controlled to run next time, so that the running safety of the vehicle is further ensured.
In some embodiments, writing the nth upgrade software to any of the child storage areas 1321 not marked as working areas using the second boot loader of any of the upgrade software includes:
the sub storage area 1321 to which the upgrade software of the nth time is to be written is determined.
The nth-time upgrade software is written to the nth-time upgrade software's sub storage area 1321 to be written to, using the second boot loader of the upgrade software of the sub storage area 1321 marked as the work area.
Optionally, the sub-storage area 1321 to which the nth upgrade software is to be written is a sub-storage area that is not marked as a working area. At this time, the sub storage area 1321 marked as the work area is the sub storage area 1321 to which the upgrade software of the nth-1 st time is written, and the sub storage area 1321 to which the upgrade software of the nth time is to be written is the sub storage area 1321 other than the sub storage area 1321 to which the upgrade software of the nth-1 st time is written.
Optionally, determining the sub storage area 1321 to be written with the nth upgrade software includes: any sub-storage area 1321 which is not marked as a working area is selected as the sub-storage area 1321 to be written with the upgrade software for the Nth time.
Optionally, determining the sub storage area 1321 to be written with the nth upgrade software includes:
if the upgrade software exists in the sub storage area 1321 to which the nth upgrade software is to be written, the upgrade software is erased.
The storage area 132 of the embodiment of the application includes at least two sub-storage areas 1321, and the latest upgrade software may be written into the sub-storage area 1321 that is not marked as the working area by using the second boot loader, that is, the latest upgrade software is written into the sub-storage area 1321 that is in the non-working state, and the upgrade software of the sub-storage area 1321 marked as the working area is in the working state as the vehicle-mounted software, so that the operation of the vehicle may be normally controlled. Therefore, the upgrading process of the vehicle-mounted software does not affect the normal operation of the vehicle, the vehicle can upgrade the vehicle-mounted software in the operation process, and potential safety hazards are avoided.
In one possible embodiment, the present application provides an upgrading method for vehicle-mounted software, which is applied to the vehicle-mounted controller 100 shown in fig. 1, and referring to fig. 3, the upgrading method for vehicle-mounted software includes the following steps:
s301, determining whether the original vehicle-mounted software exists in the storage area 132; if the original vehicle-mounted software exists in the storage area 132, executing step S302; if the original in-vehicle software does not exist in the storage area 132, step S303 is executed.
S302, taking the area where the original vehicle-mounted software is located as a sub-storage area 1321, dividing the rest storage area 132 into at least one sub-storage area 1321, and then executing the step S304.
S303, divide the storage area 132 into at least two sub-storage areas 1321.
S304, determining whether the original vehicle-mounted software exists in the sub-storage area 1321; if the original vehicle-mounted software exists in the sub-storage area 1321, executing the step S305; if the original in-vehicle software does not exist in the sub storage area 1321, step S306 is executed.
S305, the sub storage area 1321 is used as the sub storage area 1321 to which the first upgrade software is to be written, and then step S307 is executed.
S306, selecting any sub-storage area 1321 as the sub-storage area 1321 to which the upgrade software is to be written for the first time, and then executing the step S308.
S307, if the original vehicle-mounted software exists in the sub-storage area 1321 to which the first-time upgrading software is to be written, erasing the original vehicle-mounted software, writing the first-time upgrading software into the sub-storage area 1321 to which the first-time upgrading software is to be written, marking the sub-storage area into which the first-time upgrading software is to be written as a working area, and then executing the step S309.
S308, if the primary on-board software does not exist in the sub-storage area 1321 to which the first-time upgrade software is written, writing the first-time upgrade software into the sub-storage area 1321 to which the first-time upgrade software is written, marking the sub-storage area into which the first-time upgrade software is written as a working area, and then executing the step S309.
S309, determining a sub storage area 1321 to be written into the upgrade software of the Nth time.
S310, writing the nth upgrade software into the nth sub storage area 1321 of the upgrade software to be written into the nth sub storage area 1321 by using the second boot loader of the upgrade software of the sub storage area 1321 marked as the working area.
S311, when the initialization signal is detected, marking the sub storage area 1321, in which the nth upgrade software is written, as a working area, and marking each of the other sub storage areas 1321 as a non-working area.
Referring to fig. 4, the memory area 132 includes a first sub memory area 1321a and a second sub memory area 1321b, and each of the first sub memory area 1321a and the second sub memory area 1321b may run upgrade software, which is a controller application. In one possible embodiment, taking the example that the storage area 132 includes the first sub-storage area 1321a and the second sub-storage area 1321b, the embodiment of the present application provides an upgrade method for vehicle-mounted software, including the following steps:
step one, a first boot loader is adopted to write the first-time upgrade software into the first sub-storage area 1321a of the storage area 132, mark the first sub-storage area 1321a as a working area, and mark the second sub-storage area 1321b as a non-working area.
Optionally, the first-time upgrade software is sent by the upper computer, the first-time upgrade software is APP (Application), which is denoted as APP1, and APP1 includes a second boot loader.
Optionally, the first sub-storage area 1321a runs APP1, controlling the operation of the vehicle.
Step two, a second boot loader of the first-time upgrade software (i.e., APP1) is used to write the second-time upgrade software into the second sub-storage area 1321b, and when the initialization signal is detected, the second sub-storage area 1321b is marked as a working area, and the first sub-storage area 1321a is marked as a non-working area.
Optionally, the second time of the upgrade software is sent by the upper computer, the second time of the upgrade software is APP (Application), which is denoted as APP2, and APP2 includes a second boot loader. During this process, APP1 is in a normal operating mode, ensuring that the vehicle can perform normal functions.
Alternatively, when the on-board controller 100 is in the sleep state and awakened, the on-board controller 100 detects an initialization signal, such as: when the vehicle is in a stopped state or the vehicle gear is not in a forward gear and the vehicle is restarted to move forward, the vehicle-mounted controller 100 detects the initialization signal.
And step three, writing the upgraded software for the third time into the first sub-storage area 1321a by using a second boot loader of the upgraded software for the second time (namely, the APP2), and marking the first sub-storage area 1321a as a working area and marking the second sub-storage area 1321b as a non-working area when the initialization signal is detected.
And when the software is upgraded again, the software upgrading is carried out by analogy with the principle of the second step and the third step.
Based on the same inventive concept, an embodiment of the present application further provides an upgrading apparatus for vehicle-mounted software, and as shown in fig. 5, the upgrading apparatus 500 for vehicle-mounted software includes: a first upgrade module 501 and a second upgrade module 502.
The first upgrade module 501 is configured to write the first-time upgrade software into one sub-storage area 1321 of the storage area 132 by using a first boot loader, and mark the sub-storage area 1321 into which the first-time upgrade software is written as a working area; the storage area 132 comprises at least two sub-storage areas 1321, all the upgrade software comprises a second boot loader, and the upgrade software in the sub-storage area 1321 marked as a working area controls the running of the vehicle as on-board software;
the second upgrade module 502 is configured to write the nth upgrade software into any sub storage area 1321 that is not marked as a working area, by using the second boot loader of any upgrade software, mark the sub storage area 1321 that is written into the nth upgrade software as a working area when the initialization signal is detected, and mark each of the other sub storage areas 1321 as a non-working area.
Optionally, referring to fig. 6, the upgrading apparatus 500 for vehicle-mounted software according to the embodiment of the present application includes a partition module 503 in addition to a first upgrading module 501 and a second upgrading module 502.
In particular, the partitioning module 503 is configured to divide the storage area 132 into at least two sub-storage areas 1321; each sub-storage area 1321 is used to store upgrade software.
Optionally, the partitioning module 503 is specifically configured to determine whether the original in-vehicle software exists in the storage area 132; the original vehicle-mounted software has no second boot loader; if the original vehicle-mounted software exists in the storage area 132, taking the area where the original vehicle-mounted software exists as a sub-storage area 1321, and dividing the rest storage areas 132 into at least one sub-storage area 1321; if the storage area 132 does not have the original in-vehicle software, the storage area 132 is divided into at least two sub-storage areas 1321.
Optionally, the first upgrade module 501 is specifically configured to determine a sub storage area 1321 of the upgrade software to be written for the first time; if the primary vehicle-mounted software exists in the sub-storage area 1321 to which the primary upgrade software is to be written, erasing the primary vehicle-mounted software, and writing the primary upgrade software into the sub-storage area 1321 to which the primary upgrade software is to be written; and if the original vehicle-mounted software does not exist in the sub-storage area 1321 into which the first-time upgrade software is to be written, writing the first-time upgrade software into the sub-storage area 1321 into which the first-time upgrade software is to be written.
Optionally, the first upgrade module 501 is specifically configured to, if the original vehicle-mounted software exists in the sub storage area 1321, use the sub storage area 1321 as the sub storage area 1321 to which the first-time upgrade software is to be written; if the original vehicle-mounted software does not exist in the sub-storage area 1321, selecting any sub-storage area 1321 as the sub-storage area 1321 to which the first-time upgrade software is to be written.
Optionally, the second upgrade module 502 is specifically configured to determine a sub storage area 1321 of the upgrade software to be written for the nth time; the nth-time upgrade software is written to the nth-time upgrade software's sub storage area 1321 to be written to, using the second boot loader of the upgrade software of the sub storage area 1321 marked as the work area.
Optionally, the second upgrade module 502 is specifically configured to erase the upgrade software if the sub storage area 1321 to which the nth upgrade software is to be written has the upgrade software.
Based on the same inventive concept, embodiments of the present application further provide a computer-readable storage medium, where the computer-readable storage medium is used for storing computer instructions, and when the computer instructions run on a computer, the method for upgrading vehicle-mounted software according to any embodiment of the present application is implemented.
It should be noted that the computer readable medium of the present application can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer-readable medium of the embodiments of the present application may be embodied in an electronic device; or may be present alone without being incorporated into the electronic device.
Alternatively, a computer-readable medium of an embodiment of the present application carries one or more programs, which, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.
Computer program code for carrying out operations for embodiments of the present application may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules or units described in the embodiments of the present application may be implemented by software or hardware. Wherein the designation of a module or unit does not in some cases constitute a limitation of the unit itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of embodiments of the present application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
By applying the embodiment of the application, at least the following beneficial effects can be realized:
(1) the upgrading process of the vehicle-mounted software does not affect the normal operation of the vehicle, the vehicle can upgrade the vehicle-mounted software in the operation process, and potential safety hazards are avoided.
(2) According to the embodiment of the application, the upgrade software is sent to the vehicle-mounted controller 100 through the upper computer, so that the upgrade software does not need to be downloaded remotely, and the interference of remote upgrade on the vehicle operation and the risk of bringing potential safety hazards are reduced.
(3) In the vehicle running process, the existing vehicle-mounted software always controls the running of the vehicle, and after the new upgrade software is written, the vehicle is switched to the new upgrade software when the vehicle is required to be controlled to run next time, so that the running safety of the vehicle is further guaranteed.
Those of skill in the art will appreciate that the various operations, methods, steps in the processes, acts, or solutions discussed in this application can be interchanged, modified, combined, or eliminated. Further, other steps, measures, or schemes in various operations, methods, or flows that have been discussed in this application can be alternated, altered, rearranged, broken down, combined, or deleted. Further, steps, measures, schemes in the prior art having various operations, methods, procedures disclosed in the present application may also be alternated, modified, rearranged, decomposed, combined, or deleted.
The terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present application, "a plurality" means two or more unless otherwise specified.
In the description herein, particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present application, and it should be noted that, for those skilled in the art, several modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations should also be regarded as the protection scope of the present application.

Claims (10)

1. A method for upgrading vehicle-mounted software is characterized by comprising the following steps:
writing first-time upgrading software into a sub-storage area of a storage area by adopting a first boot loader, and marking the sub-storage area written into the first-time upgrading software as a working area; the storage area comprises at least two sub-storage areas, all the upgrading software comprises a second boot loader, and the upgrading software in the sub-storage area marked as the working area is used as vehicle-mounted software to control the running of the vehicle;
writing the upgrading software of the Nth time into any sub-storage area which is not marked as a working area by adopting a second boot loader of any upgrading software, wherein N is a positive integer greater than 1; when an initialization signal is detected, marking the sub-storage area written into the upgrade software of the Nth time as a working area, and marking other sub-storage areas as non-working areas.
2. The method for upgrading vehicle-mounted software according to claim 1, wherein before writing the first-time upgraded software into one sub-memory area of the memory area by using the first boot loader, the method further comprises:
dividing the storage area into at least two sub-storage areas; each of the sub-storage areas is used for storing upgrade software.
3. The method for upgrading vehicle-mounted software according to claim 2, wherein the dividing the storage area into at least two sub-storage areas comprises:
determining whether the original vehicle-mounted software exists in the storage area;
if the original vehicle-mounted software exists in the storage area, taking the area where the original vehicle-mounted software is located as a sub-storage area, and dividing the rest of the storage area into at least one sub-storage area;
and if the original vehicle-mounted software does not exist in the storage area, dividing the storage area into at least two sub-storage areas.
4. The method for upgrading vehicle-mounted software according to claim 3, wherein the writing of the first-time upgraded software into one sub-storage area of the storage area by using the first boot loader comprises:
determining a sub-storage area to be written in the first-time upgrade software;
if the original vehicle-mounted software exists in the sub-storage area of the upgrade software to be written for the first time, erasing the original vehicle-mounted software, and writing the upgrade software for the first time into the sub-storage area of the upgrade software to be written for the first time;
and if the original vehicle-mounted software does not exist in the sub-storage area to which the first-time upgrading software is to be written, writing the first-time upgrading software into the sub-storage area to which the first-time upgrading software is to be written.
5. The upgrading method of the vehicle-mounted software according to claim 4, wherein the determining the sub-storage area to be written with the first-time upgraded software comprises:
if the original vehicle-mounted software exists in the sub-storage area, taking the sub-storage area as a sub-storage area to which the first-time upgrade software is to be written;
and if the original vehicle-mounted software does not exist in the sub-storage areas, selecting any sub-storage area as the sub-storage area to which the first-time upgrade software is to be written.
6. The method for upgrading vehicle-mounted software according to claim 1, wherein the writing of the nth-time upgrade software into any sub-storage area which is not marked as a working area by using the second boot loader of any upgrade software comprises:
determining a sub-storage area to be written into the upgrading software of the Nth time;
and writing the upgrade software of the Nth time into the sub storage area of the upgrade software to be written into the Nth time by adopting a second boot loader of the upgrade software of the sub storage area marked as the working area.
7. An upgrading device for vehicle-mounted software, characterized by comprising:
the first upgrading module is used for writing first-time upgrading software into one sub-storage area of a storage area by adopting a first boot loader and marking the sub-storage area written into the first-time upgrading software as a working area; the storage area comprises at least two sub-storage areas, all the upgrading software comprises a second boot loader, and the upgrading software in the sub-storage area marked as the working area is used as vehicle-mounted software to control the running of the vehicle;
and the second upgrading module is used for writing the upgrading software for the Nth time into any sub-storage area which is not marked as a working area by adopting a second boot loader of any upgrading software, marking the sub-storage area written into the upgrading software for the Nth time as the working area when an initialization signal is detected, and marking other sub-storage areas as non-working areas.
8. An onboard controller, comprising:
the communication unit is in communication connection with the upper computer and used for receiving the upgrade software sent by the upper computer;
a processor;
the memory is electrically connected with the processor and comprises a reserved area and a storage area, and the storage area comprises at least two sub-storage areas;
the reserved area is configured to store a first boot loader, and when the first boot loader is executed by the processor, the first boot loader writes first-time upgrade software into one of the sub-storage areas; all the upgraded software comprises a second boot loader; marking a sub-storage area written in the first-time upgrading software as a working area; the upgrading software in the sub-storage area marked as the working area is used as vehicle-mounted software to control the running of the vehicle;
a second boot loader of the upgrading software in any one of the sub storage areas writes the upgrading software of the Nth time into any one of the sub storage areas which are not marked as working areas when being executed by the processor; n is a positive integer greater than 1; when the initialization signal is detected, the sub-storage area written in the nth upgrading software is marked as a working area, and all other sub-storage areas are marked as non-working areas.
9. A vehicle, characterized by comprising: an on-board controller as claimed in claim 8.
10. A computer-readable storage medium for storing computer instructions for implementing a method for upgrading on-board software according to any one of claims 1-6 when the computer instructions are run on a computer.
CN202010797765.8A 2020-08-10 2020-08-10 Vehicle-mounted software upgrading method, vehicle-mounted controller, vehicle and storage medium Pending CN114064095A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010797765.8A CN114064095A (en) 2020-08-10 2020-08-10 Vehicle-mounted software upgrading method, vehicle-mounted controller, vehicle and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010797765.8A CN114064095A (en) 2020-08-10 2020-08-10 Vehicle-mounted software upgrading method, vehicle-mounted controller, vehicle and storage medium

Publications (1)

Publication Number Publication Date
CN114064095A true CN114064095A (en) 2022-02-18

Family

ID=80232978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010797765.8A Pending CN114064095A (en) 2020-08-10 2020-08-10 Vehicle-mounted software upgrading method, vehicle-mounted controller, vehicle and storage medium

Country Status (1)

Country Link
CN (1) CN114064095A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023241458A1 (en) * 2022-06-14 2023-12-21 中国第一汽车股份有限公司 Software upgrade method and apparatus for vehicle-mounted controller, and device and storage medium
WO2024108456A1 (en) * 2022-11-24 2024-05-30 华为技术有限公司 Controller upgrading method, and apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023241458A1 (en) * 2022-06-14 2023-12-21 中国第一汽车股份有限公司 Software upgrade method and apparatus for vehicle-mounted controller, and device and storage medium
WO2024108456A1 (en) * 2022-11-24 2024-05-30 华为技术有限公司 Controller upgrading method, and apparatus

Similar Documents

Publication Publication Date Title
US20200272450A1 (en) Software updating apparatus, vehicle, and software updating method
CN110244958B (en) Method and device for updating calibration data of a vehicle
CN114064095A (en) Vehicle-mounted software upgrading method, vehicle-mounted controller, vehicle and storage medium
US10261773B2 (en) Information processing device, information processing method, and computer readable medium
EP3084593B1 (en) Updatable integrated-circuit radio
US8036786B2 (en) On-vehicle control apparatus
CN110825403A (en) Method and system for flashing ECU (electronic control Unit) of automobile
CN108604207B (en) System and method for hardware independent memory storage
CN109857426A (en) Bootloader method for updating program, device, electronic equipment and storage medium
US11263001B2 (en) Car onboard control device and program updating software
CN115061713A (en) Method and device for upgrading electronic equipment
CN111158607B (en) Data erasing operation processing method, system, electronic equipment and storage medium
CN110764486B (en) Method and device for operating vehicle-mounted controller, vehicle-mounted controller and storage medium
CN113341924A (en) ECU power-off method, device, equipment and storage medium
CN115136122A (en) Host device, data distribution system, and update control program
CN116455694A (en) Baud rate setting method, baud rate setting device, baud rate setting equipment and storage medium
US7904896B2 (en) Program rewriting system, boot loader, storage medium, and electronic control unit
JP2019016086A (en) Automobile electronic control device
CN114895947A (en) Software upgrading method, device, equipment and storage medium of vehicle-mounted controller
JP2019109745A (en) Automobile electronic controller
CN103339603A (en) Computer reprogramming method, data storage medium and motor vehicle computer
EP3432190A1 (en) Processing system, related integrated circuit and method for handling password management
JP7087334B2 (en) Electronic control device
US20220244946A1 (en) Ota master, update control method, non-transitory storage medium, and vehicle
US20220035620A1 (en) Software update device, update control method, non-transitory storage medium, and server

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