CN116501373A - Software version switching method, device, equipment and storage medium - Google Patents
Software version switching method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN116501373A CN116501373A CN202310507089.XA CN202310507089A CN116501373A CN 116501373 A CN116501373 A CN 116501373A CN 202310507089 A CN202310507089 A CN 202310507089A CN 116501373 A CN116501373 A CN 116501373A
- Authority
- CN
- China
- Prior art keywords
- region
- current
- running
- area
- software
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 230000009191 jumping Effects 0.000 claims abstract description 19
- 238000003745 diagnosis Methods 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 11
- 238000005192 partition Methods 0.000 abstract description 37
- 238000004891 communication Methods 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 5
- 238000012423 maintenance Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
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
The application relates to the technical field of communication, and discloses a software version switching method, device, equipment and storage medium, comprising the following steps: acquiring a switching instruction, and determining a current operation area according to the switching instruction; different software versions of the vehicle controller software are stored in two different operating areas of the target system; adjusting the operation priorities of the two different operation areas so that the operation priority of the current non-operation area is higher than the operation priority of the current operation area; and jumping to a current non-running area with high running priority, and running the software version stored in the current non-running area. Therefore, the vehicle controller software of different versions is stored by setting the double partitions, and the running priority of the double partitions is adjusted to control the switching of the software versions, so that the vehicle controller software always runs in the running area with high priority, multiple times of flexible switching among different software versions is realized, and the user experience is enhanced.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a storage medium for switching software versions.
Background
Software upgrading requirements exist in the development process and after the product quantity of the automobile controller product, so that the problem of subsequent discovery of the product is corrected on one hand, the function of the product is upgraded, and the product competitiveness is improved on the other hand. This process may also have the need to return to the pre-upgrade version after the upgrade, which may involve the need to rollback after the upgrade.
In the related art, more and more automobile host factories select FOTA (Flash Over The Area), namely prompt the user for upgrading by remote pushing. Typically, a single partition is used, and prior to upgrading a new version of software, the old software needs to be erased and the new software written. Although the method can achieve the aim of upgrading the software, once the situation of upgrading failure is met, the upgrade cannot be performed again, the product also loses function, and the product can be upgraded again only by using a special tool to a professional maintenance point.
Accordingly, the above technical problems are to be solved by those skilled in the art.
Disclosure of Invention
In view of the above, the present invention aims to provide a method, an apparatus, a device and a storage medium for switching software versions, which can implement multiple flexible switching between different software versions, and enhance user experience. The specific scheme is as follows:
a first aspect of the present application provides a software version switching method, including:
acquiring a switching instruction, and determining a current operation area according to the switching instruction; different software versions of the vehicle controller software are stored in two different operating areas of the target system;
adjusting the operation priorities of two different operation areas so that the operation priority of a current non-operation area is higher than the operation priority of the current operation area;
and jumping to the current non-running area with high running priority, and running the software version stored in the current non-running area.
Optionally, the adjusting the operation priorities of the two different operation areas so that the operation priority of the current non-operation area is higher than the operation priority of the current operation area includes:
and adjusting the operation priorities of the current operation area and the current non-operation area by adjusting the area version numbers of the operation areas, so that the operation priority of the current non-operation area is higher than that of the current operation area.
Optionally, the adjusting the running priority of the current running area and the running priority of the current non-running area by adjusting the area version number includes:
and setting the region version number of the current non-running region to be larger than the target value of the region version number of the current running region.
Optionally, the setting the region version number of the current non-running region to be greater than the target value of the region version number of the current running region includes:
reading the region version number of the current running region;
performing incremental operation on the area version number of the current operation area, and determining an incremental operation result as the target value;
and setting the region version number of the current non-running region as the target value.
Optionally, the reading the region version number of the current running region includes:
reading the region version number of the current running region from the storage space of the current running region; the region version number of the current operation region is a value written by executing the latest updating operation aiming at the region version number of the current operation region;
correspondingly, the setting the region version number of the current non-running region as the target value includes:
and writing the target value into the storage space of the current non-running area so as to update the area version number of the current non-running area.
Optionally, the jumping to the current non-running area with high running priority includes:
restarting the target system, and respectively reading the region version numbers of the corresponding regions from the storage spaces of the two different operation regions;
and judging the values of the read two regional version numbers, and jumping to the currently non-running region with the large value of the regional version number.
Optionally, the acquiring the switching instruction includes:
and acquiring a diagnosis request packaged with the switching instruction, and analyzing the diagnosis request to obtain the switching instruction.
A second aspect of the present application provides a software version switching device, including:
the instruction acquisition and region determination module is used for acquiring a switching instruction and determining a current running region according to the switching instruction; different software versions of the vehicle controller software are stored in two different operating areas of the target system;
the priority adjustment module is used for adjusting the operation priorities of two different operation areas so that the operation priority of the current non-operation area is higher than the operation priority of the current operation area;
and the jump and operation module is used for jumping to the current non-operation area with high operation priority and operating the software version stored in the current non-operation area.
A third aspect of the present application provides an electronic device comprising a processor and a memory; wherein the memory is for storing a computer program that is loaded and executed by the processor to implement the aforementioned software version switching method.
A fourth aspect of the present application provides a computer-readable storage medium having stored therein computer-executable instructions that, when loaded and executed by a processor, implement the foregoing software version switching method.
In the application, a switching instruction is acquired firstly, and a current operation area is determined according to the switching instruction; different software versions of the vehicle controller software are stored in two different operating areas of the target system; then, the operation priorities of the two different operation areas are adjusted so that the operation priority of the current non-operation area is higher than the operation priority of the current operation area; and finally, jumping to the current non-running area with high running priority, and running the software version stored in the current non-running area. Therefore, the vehicle controller software of different versions is stored by setting the double partitions, and the running priority of the double partitions is adjusted to control the switching of the software versions, so that the vehicle controller software always runs in the running area with high priority, multiple times of flexible switching among different software versions is realized, and the user experience is enhanced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a software version switching method provided in the present application;
FIG. 2 is a flowchart of a specific software version switching method provided in the present application;
FIG. 3 is a logic implementation schematic diagram of a specific software version switching method provided in the present application;
fig. 4 is a schematic structural diagram of a software version switching device provided in the present application;
fig. 5 is a block diagram of a software version switching electronic device provided in the present application.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Currently, more and more automobile host factories select FOTA (Flash Over The Area) to prompt a user for upgrades by remote pushing. Typically, a single partition is used, and prior to upgrading a new version of software, the old software needs to be erased and the new software written. Although the method can achieve the aim of upgrading the software, once the situation of upgrading failure is met, the upgrade cannot be performed again, the product also loses function, and the product can be upgraded again only by using a special tool to a professional maintenance point. Aiming at the technical defects, the application provides a software version switching scheme, and the vehicle controller software of different versions is stored by setting the double partitions, so that the operation priority of the double partitions is adjusted to control the switching of the software version, the vehicle controller software is always operated in an operation area with high priority, the multiple times of flexible switching among different software versions is realized, and the user experience is enhanced.
Fig. 1 is a flowchart of a software version switching method provided in an embodiment of the present application. Referring to fig. 1, the software version switching method includes:
s11: acquiring a switching instruction, and determining a current operation area according to the switching instruction; different software versions of the vehicle controller software are stored in two different operating areas of the target system.
In this embodiment, a switching instruction is acquired first, and a current operation area is determined according to the switching instruction. The above-described switch instruction may also be referred to as an upgrade instruction, essentially an instruction to switch between different software versions. Wherein different software versions of the vehicle controller software are stored in two different operating areas of the target system, e.g. one operating area stores a new software version and the other operating area stores an old software version. The method opens up two partitions for writing different software versions in different partitions, so that when the software is upgraded, the current partition does not need to be erased, but a new software version is written in another partition, and even if the upgrading process fails, the software version of the current partition can still normally operate, and the functions are not affected. The dual partition mechanism can reduce the high maintenance cost caused by the failure of the upgrade with small probability relative to a single partition in consideration of the complex and changeable environment of the actual vehicle form.
It should be noted that, the target system is generally a vehicle ECU, and specifically, two separately erasable areas, that is, a dual-partition band a and a dual-partition band b, may be opened up in a FLASH area of the vehicle ECU, where, under normal conditions, one area is in an operating state and is a current operating area (denoted as an Active band), and the other area is in a non-operating state and is a current non-operating area (denoted as an INactive band). The current operating region and the current non-operating region are two relative concepts, not specific to which region. For example, the software version in BankA at the present time is running, then BankA is referred to as the current running region, and BankB is referred to as the current non-running region.
S12: and adjusting the operation priorities of the two different operation areas so that the operation priority of the current non-operation area is higher than the operation priority of the current operation area.
In this embodiment, after determining the current operation area, the operation priorities of the two different operation areas are adjusted so that the operation priority of the current non-operation area is higher than the operation priority of the current operation area. Specifically, the operation priorities of the two different operation areas are adjusted so that the operation priority of the current non-operation area is higher than the operation priority of the current operation area. Of course, the rule of this embodiment is that the region with the higher priority operates at the same time, and similarly, the region with the lower priority operates at the same time.
In this embodiment, the priority level is based on the region version number, that is, the region version number of the running region is used to measure the priority level of the running region, and the above process may be to adjust the running priority of the current running region and the current non-running region by adjusting the region version number of the running region, so that the running priority of the current non-running region is higher than the running priority of the current running region. In order to make the operation priority of the current non-operation area higher than that of the current operation area, the area version number of the current non-operation area may be specifically set to be greater than the target value of the area version number of the current operation area.
S13: and jumping to a current non-running area with high running priority, and running the software version stored in the current non-running area.
In this embodiment, since the vehicle controller software is always running in the running area with high priority, after the priority is adjusted, the vehicle controller jumps to the currently non-running area with high running priority and runs the software version stored in the currently non-running area, so that a switch, that is, a so-called rollback, is realized. For example, when the user is used to the function of the old version software and is not suitable for the updated new version software, the old software version can be returned through a rollback mechanism after the new software is updated to the new version or the user experience is not suitable, and the new version software can be rolled back again when the user needs to experience after rollback, so that the new version software is switched to the new software version to run. The process realizes flexible selection of software in a partition priority management mode, and the actual situation of each user can be more easily attached.
As can be seen, in the embodiment of the present application, a switching instruction is first acquired, and a current operation area is determined according to the switching instruction; different software versions of the vehicle controller software are stored in two different operating areas of the target system; then, the operation priorities of the two different operation areas are adjusted so that the operation priority of the current non-operation area is higher than the operation priority of the current operation area; and finally, jumping to a current non-running area with high running priority, and running the software version stored in the current non-running area. According to the embodiment of the application, the double partitions are set to store the vehicle controller software of different versions, and then the operation priorities of the double partitions are adjusted to control the switching of the software versions, so that the vehicle controller software is always operated in an operation area with high priority, multiple times of flexible switching among different software versions is realized, and the user experience is enhanced.
Fig. 3 is a flowchart of a specific software version switching method provided in an embodiment of the present application. Referring to fig. 3, the software version switching method includes:
s21: and acquiring a diagnosis request packaged with the switching instruction, and analyzing the diagnosis request to obtain the switching instruction.
In this embodiment, a diagnosis request encapsulated with a switching instruction is obtained first, and then the switching instruction is obtained by analyzing the diagnosis request. The switching instruction can be triggered and generated in a diagnosis request mode, and the switching instruction can be prevented from occupying too much bus communication resources by triggering and generating in the diagnosis request mode, so that the internal network of the whole vehicle is improved. Of course, for software switching triggering, besides using a diagnosis request, a message may also be applied, and the user may autonomously select and flexibly switch versions according to actual situations, which is not limited in this embodiment.
It can be appreciated that the above process uses a frame of diagnostic request as the trigger of the software rollback command, and if there are multiple switching requirements, the rollback switching can be completed by multiple diagnostic triggers for upgrading the software version.
S22: and determining the current operation area according to the switching instruction.
In this embodiment, the specific process of step S22 may refer to the disclosure of the foregoing embodiment, and will not be described herein.
S23: and reading the area version number of the current running area.
In this embodiment, when adjusting the priority, the region version number of the current running region is read first. It is noted here that the region version number (denoted Partition Version) of each partition is stored in the corresponding running region. After a diagnosis request carrying a switching instruction is received, reading out the region version number of the current operation region, and specifically, reading the region version number of the current operation region from the storage space of the current operation region, wherein the region version number of the current operation region is a value written by executing the latest updating operation aiming at the region version number of the current operation region. This is because, since the region version number is adjusted instantaneously, the region version number written in the run region should be the latest adjusted value.
S24: and performing increment operation on the area version number of the current operation area, and determining the increment operation result as a target value.
S25: and setting the zone version number of the current non-running zone as a target value.
In this embodiment, after the region version number of the current running region is read, in order to make the region priority of the current non-running region higher than that of the current running region, the value of the region version number of the current non-running region needs to be made larger than that of the region version number of the current running region. Here, the method is implemented by performing an increment operation on the region version number of the current running region, determining the increment operation result as a target value, and finally setting the region version number of the current non-running region as the target value.
The increment operation may be to add 1 to the value of the original region version number or add 2 to the value of the original region version number, which is not limited in this embodiment. For example, 1 is added to the value of the read region version number of the current running region, so as to obtain a final target value. Further, in order to smoothly perform the next switching, it is also necessary to write the target value into the storage space of the current non-running area, so as to update the area version number of the current non-running area. I.e. for the read partition Version +1 and then writing to another partition, this ensures that the Version number of the software to be rolled back is higher than the Version number of the region currently running software.
S26: restarting the target system, and respectively reading the region version numbers of the corresponding regions from the storage spaces of the two different running regions.
S27: judging the values of the read two regional version numbers, and jumping to the current non-running region with the large value of the regional version number, and running the software version stored in the current non-running region.
In this embodiment, after the switching operation, the system is generally restarted, the region version numbers of the corresponding regions need to be read from the storage spaces of the two different running regions respectively before the software is displayed, then the values of the read two region version numbers are judged, and the system jumps to the current non-running region with the large value of the region version number and runs the software version stored in the current non-running region. Here, in the factory state, the area version numbers of the two partitions are identical, that is, if it is determined that the values of the two read area version numbers are identical, the switching may not be performed.
Therefore, in the embodiment of the application, the diagnostic request packaged with the switching instruction is acquired, the diagnostic request is analyzed to obtain the switching instruction, then the current running area is determined according to the switching instruction, the area version number of the current running area is read, the area version number of the current running area is subjected to incremental operation, the incremental operation result is determined to be the target value, and the area version number of the current non-running area is set to be the target value. On the basis, restarting the target system, respectively reading the region version numbers of the corresponding regions from the storage spaces of the two different running regions, judging the values of the two read region version numbers, jumping to the current non-running region with the large value of the region version number, and running the software version stored in the current non-running region. According to the embodiment of the application, the version number of the partition is used for managing the software version in the double partition, the software always runs in one partition with a higher version number, and the robustness of upgrading and the possibility of switching for multiple times after upgrading are ensured through the double partition.
The following describes a software switching scheme of the present application taking a specific application scenario as an example, and fig. 3 is a schematic diagram of corresponding logic execution:
the Flash area of APPL is opened up with the separately erasable areas BankA and BankB, and the corresponding area is stored with the area version number Partition Version. Software code will always run in the higher version number partition of the region. And after receiving the diagnosis request of switching, the ECU reads the partition Version of the current running area Active Bank (the current assumption is BankA), and writes the read partition Version +1 into the other area Active Bank. In this way, the region version number of the region where the version software to be switched to is located is ensured to be higher than the region version number where the software is currently running. After resetting or restarting, the FBL judges the regional version numbers in the two partitions, and then jumps to one partition with a high regional version number to finish one software switching. If there are multiple switching requests, the software version can be upgraded to complete switching through diagnosis triggering.
Referring to fig. 4, the embodiment of the present application further correspondingly discloses a software version switching device, including:
the instruction acquisition and region determination module 11 is configured to acquire a switching instruction, and determine a current operation region according to the switching instruction; different software versions of the vehicle controller software are stored in two different operating areas of the target system;
a priority adjustment module 12, configured to adjust the operation priorities of the two different operation areas so that the operation priority of the current non-operation area is higher than the operation priority of the current operation area;
and the jump and operation module 13 is used for jumping to the current non-operation area with high operation priority and operating the software version stored in the current non-operation area.
As can be seen, in the embodiment of the present application, a switching instruction is first acquired, and a current operation area is determined according to the switching instruction; different software versions of the vehicle controller software are stored in two different operating areas of the target system; then, the operation priorities of the two different operation areas are adjusted so that the operation priority of the current non-operation area is higher than the operation priority of the current operation area; and finally, jumping to a current non-running area with high running priority, and running the software version stored in the current non-running area. According to the embodiment of the application, the double partitions are set to store the vehicle controller software of different versions, and then the operation priorities of the double partitions are adjusted to control the switching of the software versions, so that the vehicle controller software is always operated in an operation area with high priority, multiple times of flexible switching among different software versions is realized, and the user experience is enhanced.
In some embodiments, the instruction fetch and region determination module 11 specifically includes:
an acquisition unit configured to acquire a diagnosis request encapsulated with a switching instruction;
and the analysis unit is used for analyzing the diagnosis request to obtain a switching instruction.
In some embodiments, the priority adjustment module 12 is specifically configured to adjust the operation priorities of the current operation area and the current non-operation area by adjusting the area version number of the operation area, so that the operation priority of the current non-operation area is higher than the operation priority of the current operation area.
In some embodiments, the priority adjustment module 12 is further specifically configured to set the region version number of the currently non-running region to be greater than the target value of the region version number of the currently running region.
In some embodiments, the priority adjustment module 12 specifically includes:
the reading unit is used for reading the region version number of the current running region;
the incremental unit is used for performing incremental operation on the area version number of the current operation area and determining an incremental operation result as a target value;
and the setting unit is used for setting the area version number of the current non-running area as a target value.
In some embodiments, the reading unit is specifically configured to read an area version number of the current running area from a storage space of the current running area; the region version number of the current running region is a value written by executing the latest update operation with respect to the region version number of the current running region.
In some embodiments, the software version switching device further includes:
and the updating module is used for writing the target value into the storage space of the current non-running area so as to update the area version number of the current non-running area.
In some embodiments, the jump and run module 13 specifically includes:
the restarting unit is used for restarting the target system and respectively reading the region version numbers of the corresponding regions from the storage spaces of the two different running regions;
and the judging unit is used for judging the values of the two read regional version numbers and jumping to the currently non-running region with the large value of the regional version number.
Further, the embodiment of the application also provides electronic equipment. Fig. 5 is a block diagram of an electronic device 20, according to an exemplary embodiment, and the contents of the diagram should not be construed as limiting the scope of use of the present application in any way.
Fig. 5 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein the memory 22 is used for storing a computer program which is loaded and executed by the processor 21 for realizing at least the following steps:
acquiring a switching instruction, and determining a current operation area according to the switching instruction; different software versions of the vehicle controller software are stored in two different operating areas of the target system;
adjusting the operation priorities of the two different operation areas so that the operation priority of the current non-operation area is higher than the operation priority of the current operation area;
and jumping to a current non-running area with high running priority, and running the software version stored in the current non-running area.
In this embodiment, the power supply 23 is configured to provide an operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input/output interface 25 is used for acquiring external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon may include an operating system 221, a computer program 222, data 223, and the like, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device 20 and the computer program 222, so as to implement the operation and processing of the processor 21 on the mass data 223 in the memory 22, which may be Windows Server, netware, unix, linux, etc. The computer program 222 may further include a computer program capable of performing other specific tasks in addition to the computer program capable of performing the software version switching method performed by the electronic device 20 as disclosed in any of the foregoing embodiments. The data 223 may include instruction data collected by the electronic device 20.
Further, the embodiment of the application also discloses a storage medium, wherein a computer program is stored in the storage medium, and when the computer program is loaded and executed by a processor, the computer program at least realizes the following steps:
acquiring a switching instruction, and determining a current operation area according to the switching instruction; different software versions of the vehicle controller software are stored in two different operating areas of the target system;
adjusting the operation priorities of the two different operation areas so that the operation priority of the current non-operation area is higher than the operation priority of the current operation area;
and jumping to a current non-running area with high running priority, and running the software version stored in the current non-running area.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The software version switching method, device, equipment and storage medium provided by the invention are described in detail, and specific examples are applied to illustrate the principle and implementation of the invention, and the description of the above examples is only used for helping to understand the method and core idea of the invention; meanwhile, as those skilled in the art will vary in the specific embodiments and application scope according to the idea of the present invention, the present disclosure should not be construed as limiting the present invention in summary.
Claims (10)
1. A software version switching method, comprising:
acquiring a switching instruction, and determining a current operation area according to the switching instruction; different software versions of the vehicle controller software are stored in two different operating areas of the target system;
adjusting the operation priorities of two different operation areas so that the operation priority of a current non-operation area is higher than the operation priority of the current operation area;
and jumping to the current non-running area with high running priority, and running the software version stored in the current non-running area.
2. The software version switching method according to claim 1, wherein said adjusting the operation priorities of the two different operation areas such that the operation priority of the current non-operation area is higher than the operation priority of the current operation area includes:
and adjusting the operation priorities of the current operation area and the current non-operation area by adjusting the area version numbers of the operation areas, so that the operation priority of the current non-operation area is higher than that of the current operation area.
3. The software version switching method according to claim 2, wherein said adjusting the running priorities of the current running area and the current non-running area by adjusting the area version numbers includes:
and setting the region version number of the current non-running region to be larger than the target value of the region version number of the current running region.
4. The software version switching method according to claim 3, wherein the setting the region version number of the currently non-running region to be greater than the target value of the region version number of the currently running region includes:
reading the region version number of the current running region;
performing incremental operation on the area version number of the current operation area, and determining an incremental operation result as the target value;
and setting the region version number of the current non-running region as the target value.
5. The software version switching method according to claim 4, wherein the reading the region version number of the current running region includes:
reading the region version number of the current running region from the storage space of the current running region; the region version number of the current operation region is a value written by executing the latest updating operation aiming at the region version number of the current operation region;
correspondingly, the setting the region version number of the current non-running region as the target value includes:
and writing the target value into the storage space of the current non-running area so as to update the area version number of the current non-running area.
6. The software version toggle method of claim 5, wherein the jumping to the current non-operating region with a high operating priority comprises:
restarting the target system, and respectively reading the region version numbers of the corresponding regions from the storage spaces of the two different operation regions;
and judging the values of the read two regional version numbers, and jumping to the currently non-running region with the large value of the regional version number.
7. The software version switching method according to any one of claims 1 to 6, wherein the acquiring a switching instruction includes:
and acquiring a diagnosis request packaged with the switching instruction, and analyzing the diagnosis request to obtain the switching instruction.
8. A software version switching device, comprising:
the instruction acquisition and region determination module is used for acquiring a switching instruction and determining a current running region according to the switching instruction; different software versions of the vehicle controller software are stored in two different operating areas of the target system;
the priority adjustment module is used for adjusting the operation priorities of two different operation areas so that the operation priority of the current non-operation area is higher than the operation priority of the current operation area;
and the jump and operation module is used for jumping to the current non-operation area with high operation priority and operating the software version stored in the current non-operation area.
9. An electronic device comprising a processor and a memory; wherein the memory is for storing a computer program to be loaded and executed by the processor for implementing the software version switching method according to any one of claims 1 to 7.
10. A computer readable storage medium storing computer executable instructions which when loaded and executed by a processor implement the software release switching method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310507089.XA CN116501373A (en) | 2023-05-05 | 2023-05-05 | Software version switching method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310507089.XA CN116501373A (en) | 2023-05-05 | 2023-05-05 | Software version switching method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116501373A true CN116501373A (en) | 2023-07-28 |
Family
ID=87330095
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310507089.XA Pending CN116501373A (en) | 2023-05-05 | 2023-05-05 | Software version switching method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116501373A (en) |
-
2023
- 2023-05-05 CN CN202310507089.XA patent/CN116501373A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110231952B (en) | ECU program backup and cyclic upgrade control method and device | |
CN109933348B (en) | Method and device for updating Bootloader in electronic control unit | |
CN110633091A (en) | Electronic module and software wireless upgrading method thereof | |
CA2860657C (en) | Installation engine and package format for parallelizable, reliable installations | |
CN110427258A (en) | Scheduling of resource control method and device based on cloud platform | |
CN112667265A (en) | Method and device for updating bootstrap program | |
CN112199109B (en) | Firmware upgrading method, device, equipment and medium | |
CN116501373A (en) | Software version switching method, device, equipment and storage medium | |
JPH1021060A (en) | Communication system with automatic program update processing function, and recording medium equipped with program performing program update processing | |
CN110688135A (en) | Program flashing method, device and medium for controller | |
US20090138865A1 (en) | Performing an operating system upgrade without multiple system interruptions | |
CN107526615B (en) | Single-machine program upgrading method and device in service operation process | |
CN114035831B (en) | CPLD upgrading method, system and computer readable storage medium | |
CN115934213A (en) | Controller stack calling method, device, equipment and storage medium | |
US7827215B2 (en) | Real-time operation by a diskless client computer | |
JP2011175352A (en) | Firmware updating device, communication apparatus, electronic apparatus, firmware updating system, firmware updating method and program | |
Martorell et al. | Partial Updates of AUTOSAR Embedded Applications--To What Extent? | |
CN111651179B (en) | Earphone, program upgrading method thereof, control device and readable storage medium | |
CN113721959A (en) | Information processing method and device and electronic equipment | |
JP7446537B1 (en) | Programmable logic controller, control method and program | |
CN116820512A (en) | Method, device, equipment and storage medium for updating bootstrap program | |
KR100222620B1 (en) | Multiprogram download method | |
US11537718B2 (en) | Method for reprogramming data of a software function executed by at least one computer provided with at least one execution core, at least one security core and at least one non-volatile memory | |
CN118034995A (en) | Service process running method, device, equipment, storage medium and program product | |
KR20220135891A (en) | System and method for operating camping car control platform based on docker container |
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 |