CN116804911A - Controller software partition synchronization method, system, equipment and medium - Google Patents

Controller software partition synchronization method, system, equipment and medium Download PDF

Info

Publication number
CN116804911A
CN116804911A CN202310658993.0A CN202310658993A CN116804911A CN 116804911 A CN116804911 A CN 116804911A CN 202310658993 A CN202310658993 A CN 202310658993A CN 116804911 A CN116804911 A CN 116804911A
Authority
CN
China
Prior art keywords
software
controller
partition
synchronous
partitions
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
CN202310658993.0A
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.)
United Automotive Electronic Systems Co Ltd
Original Assignee
United Automotive Electronic Systems 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 United Automotive Electronic Systems Co Ltd filed Critical United Automotive Electronic Systems Co Ltd
Priority to CN202310658993.0A priority Critical patent/CN116804911A/en
Publication of CN116804911A publication Critical patent/CN116804911A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The application provides a controller software partition synchronization method, a system, equipment and a medium, comprising the following steps: acquiring a software upgrade package of a controller; performing software upgrading on one partition of the controller according to the software upgrading packet to take the partition after successful upgrading as a target partition, and starting to operate the target partition, wherein the controller at least comprises two partitions; and monitoring the running state of the vehicle, and synchronously updating the software upgrading package which is successfully upgraded last time to other partitions of the controller when the running state of the vehicle meets a preset synchronous condition so as to enable the software versions of all the partitions of the controller to be consistent. The application can effectively improve the robustness and usability of the product.

Description

Controller software partition synchronization method, system, equipment and medium
Technical Field
The present application relates to the field of vehicle control applications, and in particular, to a method, system, device, and medium for controller software partition synchronization.
Background
As the architecture of the whole vehicle EE (Electronic Engineering) evolves and ICT (Information and Communications Technology) technology develops, SOC (System On Chip) computing forces can bear more services, and the architecture of the whole vehicle electronic and electrical appliance tends to be changed from a distributed architecture to a domain-centralized architecture. Therefore, the whole-vehicle cross-domain controller generally adopts a micro-processing unit (SOC) and micro-control unit (MCU) heterogeneous configuration design, the MPU mainly bears a complex computing function, the MCU mainly bears a real-time control computing function, and the software of the MPU and the software of the MCU are closely interacted and mutually dependent. Typically, both MPU and MCU software package mirror spaces are designed as a dual partition system of A partition and B partition.
The upgrading of different partitions of the existing cross-domain controller is asynchronous, and when the partitions fail or fail, the software versions of the different partitions are difficult to be compatible due to the fact that the partitions are switched, and the system cannot normally operate. And the compatibility judgment based on the software version identification detection method depends on complex software design, and has high complexity and cost.
Disclosure of Invention
In view of the problems in the prior art, the application provides a controller software partition synchronization method, a system, equipment and a medium, which mainly solve the problems of complex synchronization mode and high cost of the existing cross-domain controller software.
In order to achieve the above and other objects, the present application adopts the following technical scheme.
The application provides a controller software partition synchronization method, which comprises the following steps:
acquiring a software upgrade package of a controller;
performing software upgrading on one partition of the controller according to the software upgrading packet to take the partition after successful upgrading as a target partition, and starting to operate the target partition, wherein the controller at least comprises two partitions;
and monitoring the running state of the vehicle, and synchronously updating the software upgrading package which is successfully upgraded last time to other partitions of the controller when the running state of the vehicle meets a preset synchronous condition so as to enable the software versions of all the partitions of the controller to be consistent.
In an embodiment of the present application, performing software upgrade on one of the partitions of the controller according to the software upgrade package includes:
calling one partition of the controller according to the power-on signal of the controller;
loading the software upgrading package into the called partition to perform software upgrading, obtaining an upgraded target partition, and generating a synchronous flag bit to perform synchronous updating of the software upgrading package based on the synchronous flag bit;
and starting the target partition to run the updated corresponding software.
In an embodiment of the present application, when the running state of the vehicle meets a preset synchronization condition, synchronously updating a software upgrade package used for upgrade to other partitions of the controller, including:
in the synchronous updating process, if the running state of the vehicle does not meet the preset synchronous condition, stopping updating and storing the current synchronous state;
and when the running state of the vehicle meets the preset synchronous condition again, continuing to update the synchronization according to the current synchronous state.
In one embodiment of the present application, the step of synchronously updating the software upgrade package that has been successfully updated last time to other partitions of the controller includes:
Acquiring a target upgrade package of which the upgrade is completed last time;
and calling the image file of the target upgrade package, and synchronously updating the image file to other partitions of the controller.
In an embodiment of the present application, the method synchronously updates the software upgrade package used for upgrade to other partitions of the controller, further includes:
when the synchronous update fails, starting an update retry;
and when the number of the update retries reaches a preset number threshold, clearing the synchronous flag bit.
In an embodiment of the present application, the method synchronously updates the software upgrade package used for upgrade to other partitions of the controller, further includes: if the controller does not complete synchronous updating after multiple retries and the number of retries reaches a preset number threshold, generating a failure time stamp; if the time interval between the failure time stamp and the current time node exceeds the preset time interval, a software upgrading request is generated and sent to the cloud, if the cloud responds to the software upgrading request, a software upgrading package is acquired again from the cloud, and remote upgrading is carried out based on the acquired software upgrading package.
In an embodiment of the present application, before synchronously updating the software upgrade package used for upgrade to other partitions of the controller, the method further includes: acquiring the size and the current synchronous rate of the software upgrading packet; calculating the time length for completing synchronous update according to the size of the upgrade package and the current synchronous rate as the update time length; and outputting the updated time length to a vehicle display terminal.
In an embodiment of the present application, the method synchronously updates the software upgrade package used for upgrade to other partitions of the controller, further includes: when the latest synchronization update is not completed, acquiring the progress of the latest synchronization update; calculating the size of an unfinished software upgrade package according to the progress; and calculating the required time length for completing synchronous updating of the incomplete software upgrading packet according to the current synchronous rate, and outputting the required time length to the vehicle display terminal.
In an embodiment of the present application, the preset synchronization condition includes: the vehicle speed signal is effective, the current vehicle speed is smaller than a preset speed threshold value, the hand brake is in a braking state, the hand brake has no fault and/or the whole vehicle power system is not in a working state.
The application also provides a controller software partition synchronization system, which comprises: the upgrade package acquisition module is configured to acquire a software upgrade package of the controller; the upgrading module is configured to upgrade software of one partition of the controller according to the software upgrading package, take the partition after being upgraded successfully as a target partition, and start to operate the target partition, wherein the controller at least comprises two partitions; and the synchronous updating module is configured to monitor the running state of the vehicle, and synchronously update the software upgrading package which is successfully upgraded last time to other partitions of the controller when the running state of the vehicle meets a preset synchronous condition so as to enable the software versions of all the partitions of the controller to be consistent.
The application also provides a computer device, which comprises a processor and a memory; the memory is used for storing a computer program; the processor is used for executing the controller software partition synchronization method according to the computer program.
The application also provides a computer readable storage medium for storing a computer program for the controller software partition synchronization method.
As described above, the controller software partition synchronization method, system, device and medium of the present application have the following beneficial effects.
After one partition of the controller finishes software upgrading, the application can finish synchronous updating from the target partition to other partitions when the running state of the vehicle meets the preset synchronous condition, thereby ensuring the consistency of software versions of different partitions, recovering any partition fault in the using process of the vehicle through switching the partitions, and improving the robustness and usability of the product. In addition, based on the running state of the vehicle, the vehicle can be used for synchronization in a relatively stable running state, the real-time and high-efficiency synchronization can be ensured, the synchronization mode is simple and convenient, the version monitoring is not needed by additional software, and unnecessary development and maintenance costs are avoided.
Drawings
FIG. 1 is a flowchart of a method for synchronizing controller software partitions according to an embodiment of the application.
FIG. 2 is a block diagram of a controller software partition synchronization system in accordance with one embodiment of the present application.
Fig. 3 is a schematic structural diagram of an apparatus according to an embodiment of the present application.
Detailed Description
Other advantages and effects of the present application will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present application with reference to specific examples. The application may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present application. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict.
It should be noted that the illustrations provided in the following embodiments merely illustrate the basic concept of the present application by way of illustration, and only the components related to the present application are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complicated.
When The system operates in one partition in A or B during upgrading through FOTA (Firmware Over-The-Air) and OBD (On-Board Diagnostics, on-board self-diagnosis system), the cross-domain controller can upgrade The non-operated partition preferentially, and restart and switch to The upgraded partition operation after upgrading, and since The MPU and MCU are not upgraded at The same time during each upgrading, the software versions of The respective A/B partitions of The MPU and MCU are determined to have different, and The software AB partition versions between The MPU and MCU are not synchronous and even The AB surface random combination of The MPU and MCU cannot be compatible for operation. If one of the MPU or MCU fails or fails in the current software running partition (assumed to be the partition A), the partition B is switched at this time, and the product cannot normally run or even cannot normally start due to the problem of compatibility of the starting partition version between the MPU and MCU. OEM (Original Equipment Manufacturer), original equipment manufacturer) customers require that the switching partition also be compatible with the compliant version and not accept the running software version rollback.
The feasible solution is to design special strategy in software to identify the information of the protocol version of the software mirror image interaction between the MPU and the MCU and realize backward compatibility of the protocol interaction version. And if the version information is compatible, allowing to switch to another partition for operation, and if the version information is incompatible, not allowing or not switching to another partition, and waiting for recovery of manual rescue. This solution not only increases the complexity of the software and the cost of software version management, but also fails to address the need for software version rollback.
Based on the problems in the prior art, the application provides a controller software partition synchronization method, a system, equipment and a medium. The following describes the embodiments of the present application in detail.
Referring to fig. 1, the present application provides a method for synchronizing controller software partitions, which includes the following steps:
step S100, obtaining a software upgrade package of the controller.
In an embodiment, the controller mainly refers to a domain controller at a vehicle end, and cross-domain fusion is realized based on functional interaction of different domain controllers. The architecture of the controller may include an MPU+MCU architecture, a plurality of MPUs architecture, a plurality of MCUs architecture, and the like. The consistency of software versions is ensured among the controllers in different domains, the software upgrading package can be obtained from a provider end, the software upgrading packages required by the controllers in different domains are different, and each controller can obtain the corresponding software upgrading package based on the self requirement.
In one embodiment, obtaining a software upgrade package for a controller includes: the method comprises the steps of connecting a vehicle-end preset interface with upgrading equipment to obtain a software upgrading packet in the upgrading equipment; or, by accessing the cloud device, downloading the software upgrade package from the cloud device.
Specifically, the OBD interface of the vehicle end may be used as a preset interface, the vehicle machine establishes a connection with an external upgrade device through the OBD interface, and downloads the software upgrade package from the upgrade device, where the upgrade device may be a memory device storing the latest software upgrade package, or may be a special device used for software upgrade by a software provider, and specific upgrade devices are different according to differences of the software provider, which is not limited herein.
In an embodiment, the vehicle end may also establish a network connection with the cloud end, and the cloud end may store the latest software upgrade package uploaded by the provider. The cloud end periodically initiates a software version collection request to the vehicle end, compares whether the version information of each software version of the vehicle end is consistent with the version of the software upgrading packet currently stored in the cloud end after the cloud end receives the version information of each software version information of the vehicle end, further determines whether the version of the software running by the corresponding controller of the vehicle end is the latest, if not, issues the latest version of the software upgrading packet stored in the cloud end to the vehicle end, and the vehicle end upgrades the software of the corresponding system of the controller based on the downloaded software upgrading packet.
In an embodiment, the loading of the software upgrade package can be performed by combining the two modes of the vehicle-end OBD interface and the cloud access loading. Specifically, when the vehicle is in an idle state or is upgraded for the first time, the software upgrade package is loaded by connecting the OBD interface of the vehicle end, and other conditions can access the cloud to acquire the software upgrade package. The specific software upgrade package obtaining manner may be configured according to the user requirement and the usage scenario difference, which is not limited herein.
And step S110, carrying out software upgrading on one partition of the controller according to the software upgrading package, taking the partition after upgrading success as a target partition, and starting to operate the target partition, wherein the controller at least comprises two partitions.
In an embodiment, each controller on the vehicle may be preconfigured with at least two partitions, and when one partition fails or an abnormal operation state occurs, the controller may be switched to another partition to continue operation, so as to ensure high robustness of the controller. In the following embodiments, taking an example that each controller includes two partitions, the software synchronization update manner of more partitions is similar to that of two partitions, and will not be described again.
In an embodiment, after the software upgrade package is obtained, the software upgrade package may be stored in a preset storage space of the vehicle end, where the software upgrade package required by each vehicle-mounted control area in a period of time may be stored in the preset storage space. When the vehicle is powered on and started, the corresponding controller software can be upgraded based on the software upgrading package in the preset storage space.
In one embodiment, performing software upgrade on one of the partitions of the controller according to the software upgrade package includes: calling one partition of the controller according to the power-on signal of the controller; loading the software upgrading package into the called partition to perform software upgrading, obtaining an upgraded target partition, and generating a synchronous flag bit to perform synchronous updating of the software upgrading package based on the synchronous flag bit; and starting the target partition to run the updated corresponding software.
Specifically, after the controller is powered on, the controller may first detect whether the latest software upgrade package exists in the preset storage space of the vehicle end. The different controllers can perform corresponding judgment based on that the unique identifier of the controller matches with the corresponding software upgrade package in the preset storage space, and the specific unique identifier can comprise an MAC address, an identification code and the like, which is not limited herein. For example, the download timestamp of the software upgrade package stored in the preset storage space may be read, and the download timestamp may be compared with the timestamp of the last time the controller has completed the software upgrade, so as to determine whether the latest software upgrade package exists. Of course, whether the latest software upgrade package exists can also be determined based on the information such as the software version or the corresponding number of the software upgrade package, and the specific process is not described herein. After determining that the vehicle end has acquired the latest software upgrade package, the software upgrade package can be loaded to one of the partitions of the controller for software upgrade. After the upgrading is finished, a synchronous flag bit is generated, and the upgraded partition is used as a target partition. When the system reads the synchronization flag bit, it can be determined that software in the partition needs to be mirror copied to another partition corresponding to the controller for synchronization update. After the target partition is updated, the target partition can be started, so that a controller corresponding system runs on the target partition, and further interaction with other controllers is realized to realize cross-domain function fusion and the like.
In one embodiment, before a target partition is obtained for one partition of the controller through the software upgrade package, an image file of the software upgrade package may be generated and stored in the cache space, so as to update the other partition of the controller synchronously based on the image file in the cache space. The response speed of synchronous update can be improved by synchronous update based on the cache space, so that the synchronous efficiency is improved, and software upgrading is smoother.
And step S120, monitoring the running state of the vehicle, and synchronously updating the software upgrading package which is successfully upgraded to other partitions of the controller when the running state of the vehicle meets the preset synchronous condition so as to enable the software versions of all the partitions of the controller to be consistent.
In an embodiment, each controller may read a vehicle-end signal corresponding to a vehicle running state in real time, so as to compare the vehicle running state with a preset synchronization condition, and synchronously update an image file of software running in a target partition to another partition only when the preset synchronization condition is achieved.
In one embodiment, the preset synchronization conditions include: the vehicle speed signal is effective, the current vehicle speed is smaller than a preset vehicle speed threshold value, the hand brake is in a braking state, the hand brake has no fault, the whole vehicle power system is not in a working state or the selective combination of the above conditions. Of course, the specific synchronization conditions may also be adaptively adjusted according to the requirements of the user or the specific application scenario, and the description herein is only illustrative and should not be taken as limiting the embodiments of the present application.
In one embodiment, synchronously updating the software upgrade package that was last upgraded successfully to other partitions of the controller includes: acquiring a target upgrade package of which the upgrade is completed last time; and calling the image file of the target upgrade package, and synchronously updating the image file to other partitions of the controller.
Specifically, the preset synchronization condition may be expressed as: the vehicle speed signal is Valid, i.e., vehspd= Valid; the current speed is less than 5Km/h, namely VehSpd is less than 5Km/h; the hand brake is in a braking state, i.e., epbstatus= Closed; handbrake is currently fault-free, i.e., epbstatus= No Error; the whole vehicle power system is not in a working state, namely powtrainsts|=ready & Limphome. After the controller finishes the software upgrading to determine the target partition, the synchronous zone bit can be generated, and after the synchronous zone bit is read, the system can read the vehicle-end related signal to judge whether the preset synchronous condition is met. When all the preset synchronization conditions are met, the software image file which is updated successfully last time can be copied to another partition of the controller, so that the software of the two partitions corresponding to the controller is consistent. After the software upgrading is completed on the currently running target partition of the controller, the controller can copy the successfully-upgraded software upgrading packet as a target upgrading packet to a preset cache space to generate an image file of the target upgrading packet. When the preset synchronization condition is met, calling the image file in the preset cache space, and loading the image file to the other partition of the controller for software upgrading, so that the software synchronization of the two partitions of the controller is realized.
In an embodiment, when the running state of the vehicle meets a preset synchronization condition, synchronously updating the software upgrade package used for upgrading the latest time to other partitions of the controller, including: in the synchronous updating process, if the running state of the vehicle does not meet the preset synchronous condition, stopping updating and storing the current synchronous state; and when the running state of the vehicle meets the preset synchronous condition again, continuing to update the synchronization according to the current synchronous state.
Specifically, in the process of upgrading the synchronous software, whether the preset synchronous condition is met or not can be continuously judged, if one of the conditions is not met, if the speed exceeds 5km/h or the vehicle is in a driving state, the synchronous updating is stopped, and the current synchronous state is stored. For example, a synchronization log may be generated, the progress of the present synchronization is recorded, or a progress mark may be generated at the current synchronization position, and the progress mark may be recorded in the synchronization log. When the next preset synchronization conditions are all met, the synchronization log can be adjusted to acquire the corresponding synchronization progress or progress mark, and further the synchronization updating of the corresponding image file is continuously completed on the basis of the last synchronization until the synchronization of the whole software is completed.
In an embodiment, the software upgrade package for the last upgrade is synchronously updated to other partitions of the controller, and further comprises: when the synchronous update fails, starting an update retry; and when the number of the update retries reaches a preset number threshold, clearing the synchronous flag bit.
In an embodiment, during the synchronization update process, since the software upgrade package itself may have an operation failure, other factors that may cause an upgrade failure exist in the acquisition, and thus the synchronization update fails. The controller may make multiple retries for synchronization update failures caused by such factors. Specifically, the threshold value of the number of retries may be set to three, that is, when the synchronization update fails, the controller may be allowed to have 3 opportunities of retries, if one success occurs in the 3 retries, the synchronization update is continuously completed, and if all three retries fail, the generated synchronization flag bit is cleared, so that the software image file which is successfully updated at this time is not synchronized any more. Waiting for obtaining a new software upgrading packet from the cloud end or based on the OBD interface of the vehicle end, generating a new synchronization zone bit based on the new software upgrading packet, and finishing next synchronization updating based on the synchronization zone bit.
In one embodiment, before synchronously updating the software upgrade package for upgrade to other partitions of the controller, the method further comprises: acquiring the size and the current synchronous rate of the software upgrading packet; calculating the time length for completing synchronous update according to the size of the upgrade package and the current synchronous rate as the update time length; and outputting the updated time length to a target terminal.
Specifically, before the software upgrade package is synchronously updated, the size of the software upgrade package may be obtained, and a current synchronization rate may be obtained, where the current synchronization rate is used to represent a transmission rate of the current controller for the upgrade package. And calculating the time length for completing the transmission and updating of the corresponding software upgrading packet according to the current synchronous rate, and recording the time length as the updating time length. And sending the updated time length to a target terminal for display, so that related operators reasonably plan the time nodes synchronously updated according to the displayed updated time length.
In an embodiment, the software upgrade package for the last upgrade is synchronously updated to other partitions of the controller, and further comprises: when the latest synchronization update is not completed, acquiring the progress of the latest synchronization update; calculating the size of an unfinished software upgrade package according to the progress; and calculating the required time length for completing synchronous updating of the incomplete software upgrading packet according to the current synchronous rate, and outputting the required time length to the vehicle display terminal.
Specifically, there may be a case where the current synchronization update needs to be suspended due to the operation requirement of the controller itself or an abnormality in the course of performing the synchronization update. The update progress may be saved after the synchronization update is suspended. The size of the remaining incomplete software upgrade package may be calculated according to the saved update progress. When the condition of restarting synchronous updating is met, the required time for completing updating of the remaining incomplete software upgrading package can be calculated according to the current synchronous rate, and the required time is sent to the target terminal for display, so that related personnel can intuitively know the time length required for completing the remaining updating progress, and further, the relative idle time period of the controller can be selected to complete the updating of the remaining progress.
In one embodiment, the controller may complete software synchronization of the two partitions when the software image itself is running without failure or without other factors that cause the failure to run. The controller always keeps running in the target partition before and after the whole synchronization updating is finished, and does not switch to the starting running of the other partition which is successfully synchronized.
In an embodiment, the software upgrade package for the last upgrade is synchronously updated to other partitions of the controller, and further comprises: if the controller does not complete synchronous updating after multiple retries and the number of retries reaches a preset number threshold, generating a failure time stamp; if the time interval between the failure time stamp and the current time node exceeds the preset time interval, a software upgrading request is generated and sent to the cloud, if the cloud responds to the software upgrading request, a software upgrading package is acquired again from the cloud, and remote upgrading is carried out based on the acquired software upgrading package.
Because the controller performs multiple retries after the first synchronization update fails, if multiple retries all fail and the number of retries exceeds a preset number threshold, a failure timestamp can be generated. Furthermore, the time interval may be preset, if one day, one week, etc. And calculating the time interval from the failure time stamp to the current time node, and if the time interval exceeds the preset time interval, re-acquiring a software upgrade package from the cloud, wherein the software upgrade package can be a software upgrade package failed in the last synchronization or a software upgrade package up to date in the cloud. And generating a corresponding synchronous identifier based on the re-acquired software upgrading packet, and completing a new round of synchronous updating according to the synchronous identifier.
In one embodiment, after synchronously updating the software upgrade package that has been successfully updated last time to other partitions of the controller, the method further includes: after synchronous updating is completed on different partitions of the same controller, generating an updating identifier, and taking the controller with the updating identifier as a target controller, wherein the updating identifier comprises version information of current software; the method comprises the steps of obtaining a software version of a controller connected with a target controller as a software version to be verified, comparing the software version to be verified with a preset compatible software list, if the software version to be verified is in the preset compatible software list, establishing communication connection between the target controller and the controller corresponding to the software version to be verified, and carrying out data interaction between the target controller and the controller through the communication connection, wherein the preset compatible software list contains historical software version information compatible with version information of current software of the target controller.
Specifically, after the synchronous update of the software upgrade package is completed for two partitions of the same controller, an update identifier may be generated, where the software version information of the controller currently completing the synchronous update is recorded in the update identifier. Further, the effective time of the update identifier can be set, and the update identifier is automatically cleared after the effective time is exceeded, so that the mutual influence of synchronous update identifiers among different software versions is avoided. Before the data interaction of the plurality of controllers is required, the update identification can be read, the controller with the update identification in the plurality of interconnected controllers is used as a target controller, and the other controllers are used as controllers to be checked. The software version compatibility judgment between the target controllers is not needed, and only the software version verification is conducted between the target controllers and the controllers to be verified. The compatible software version information can be configured in advance for the synchronously updated software upgrading package, so that a preset compatible software list is generated, and the preset compatible software list is obtained when the synchronously updated software upgrading package is loaded. Comparing the software version information of the controller to be checked with the preset compatible software list, and if the software version information of the controller to be checked exists in the list, considering that the currently running software version of the controller to be checked is compatible with the current software version information of the target controller, and allowing the software version information of the controller to be checked and the current software version information of the target controller to establish communication connection for data interaction. Otherwise, if the software version information of the to-be-verified controller does not exist in the list, the currently running software version of the to-be-verified controller is not compatible with the current software version information of the target controller, and the to-be-verified controller can be forbidden to access the target controller.
Based on the technical scheme, the method and the system automatically synchronize the new version software to the other partition after the new version software is successfully upgraded, keep the two partition software versions of the unified controller consistent, keep the controller to operate on the target partition on the basis of not increasing a complex software strategy, ensure that each controller operates in the updated partition after the vehicle system is started to operate and effectively solve the problem of software compatibility of different control devices. In the using process of the vehicle, if any partition fails, the partition can be switched to be started, so that the normal operation of the vehicle is ensured, and the robustness and the usability of the product are improved. When the software fails, a preset number of retries are carried out, partition switching is not carried out after the retries fail, and next triggering of software synchronization is waited, so that the risk that the software version rollback is contrary to the version expected by a user due to software failure switching is avoided. Based on the synchronous updating method, the software modularization is convenient to realize, the scheme is easy to expand, meanwhile, the development and maintenance cost of the software is reduced, and the research and development cost is reduced.
Referring to fig. 2, fig. 2 is a block diagram of a controller software partition synchronization system according to an embodiment of the application, the system includes: an upgrade package acquisition module 10 configured to acquire a software upgrade package of the controller; the upgrade module 11 is configured to upgrade software of one partition of the controller according to the software upgrade package, so as to take the partition after upgrade success as a target partition, and start to operate the target partition, wherein the controller at least comprises two partitions; the synchronization updating module 12 is configured to monitor a vehicle running state, and synchronously update a software upgrade package which is successfully updated last time to other partitions of the controller when the vehicle running state meets a preset synchronization condition so as to make software versions of the partitions of the controller consistent.
In one embodiment, the upgrade module 11 is further configured to upgrade software of one of the partitions of the controller according to the software upgrade package, including: calling one partition of the controller according to the power-on signal of the controller; loading the software upgrading package into the called partition to perform software upgrading, obtaining an upgraded target partition, and generating a synchronous flag bit to perform synchronous updating of the software upgrading package based on the synchronous flag bit; and starting the target partition to run the updated corresponding software.
In one embodiment, the synchronization update module 12 is further configured to synchronize and update the software upgrade package used for upgrade to other partitions of the controller when the vehicle running state meets a preset synchronization condition, including: in the synchronous updating process, if the running state of the vehicle does not meet the preset synchronous condition, stopping updating and storing the current synchronous state; and when the running state of the vehicle meets the preset synchronous condition again, continuing to update the synchronization according to the current synchronous state.
In one embodiment, the synchronization update module 12 is further configured to synchronize and update the software upgrade package that has been successfully upgraded to other partitions of the controller, including: acquiring a target upgrade package of which the upgrade is completed last time; and calling the image file of the target upgrade package, and synchronously updating the image file to other partitions of the controller.
In one embodiment, the synchronization update module 12 is further configured to synchronize and update the software upgrade package that was last used for upgrade to other partitions of the controller, and further includes: when the synchronous update fails, starting an update retry; and when the number of the update retries reaches a preset number threshold, clearing the synchronous flag bit.
In one embodiment, the synchronization update module 12 is further configured to synchronize and update the software upgrade package that was last used for upgrade to other partitions of the controller, and further includes: if the controller does not complete synchronous updating after multiple retries and the number of retries reaches a preset number threshold, generating a failure time stamp; if the time interval between the failure time stamp and the current time node exceeds the preset time interval, a software upgrading request is generated and sent to the cloud, if the cloud responds to the software upgrading request, a software upgrading package is acquired again from the cloud, and remote upgrading is carried out based on the acquired software upgrading package.
In one embodiment, the synchronization update module 12 is further configured to, before synchronizing and updating the latest software upgrade package for upgrade to the other partition of the controller, further include: acquiring the size and the current synchronous rate of the software upgrading packet; calculating the time length for completing synchronous update according to the size of the upgrade package and the current synchronous rate as the update time length; and outputting the updated time length to a target terminal.
In one embodiment, the synchronization update module 12 is further configured to synchronize and update the software upgrade package that was last used for upgrade to other partitions of the controller, and further includes: when the latest synchronization update is not completed, acquiring the progress of the latest synchronization update; calculating the size of an unfinished software upgrade package according to the progress; and calculating the required time length for completing synchronous updating of the incomplete software upgrading packet according to the current synchronous rate, and outputting the required time length to the target terminal.
The controller software partition synchronization system described above may be implemented in the form of a computer program that is executable on a computer device such as that shown in fig. 3. A computer device, comprising: memory, a processor, and a computer program stored on the memory and executable on the processor.
The various modules in the controller software partition synchronization system described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules can be embedded in the memory of the terminal in a hardware form or independent of the terminal, and can also be stored in the memory of the terminal in a software form, so that the processor can call and execute the operations corresponding to the above modules. The processor may be a Central Processing Unit (CPU), microprocessor, single-chip microcomputer, etc.
As shown in fig. 3, a schematic diagram of the internal structure of the computer device in one embodiment is shown. There is provided a computer device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of: acquiring a software upgrade package of a controller; performing software upgrading on one partition of the controller according to the software upgrading packet to take the partition after successful upgrading as a target partition, and starting to operate the target partition, wherein the controller at least comprises two partitions; and monitoring the running state of the vehicle, and synchronously updating the software upgrading package which is successfully upgraded last time to other partitions of the controller when the running state of the vehicle meets a preset synchronous condition so as to enable the software versions of all the partitions of the controller to be consistent.
In an embodiment, when the processor executes the software upgrade, the software upgrade for one of the partitions of the controller according to the software upgrade package includes: calling one partition of the controller according to the power-on signal of the controller; loading the software upgrading package into the called partition to perform software upgrading, obtaining an upgraded target partition, and generating a synchronous flag bit to perform synchronous updating of the software upgrading package based on the synchronous flag bit; and starting the target partition to run the updated corresponding software.
In an embodiment, when the processor executes the foregoing, when the running state of the vehicle meets a preset synchronization condition, the method implemented to synchronously update the software upgrade package used for upgrading the latest time to other partitions of the controller includes: in the synchronous updating process, if the running state of the vehicle does not meet the preset synchronous condition, stopping updating and storing the current synchronous state; and when the running state of the vehicle meets the preset synchronous condition again, continuing to update the synchronization according to the current synchronous state.
In one embodiment, when the processor executes the software upgrade package, the method includes: acquiring a target upgrade package of which the upgrade is completed last time; and calling the image file of the target upgrade package, and synchronously updating the image file to other partitions of the controller.
In an embodiment, when the processor executes, the implemented method synchronously updates the software upgrade package used for upgrading the latest time to other partitions of the controller, further includes: when the synchronous update fails, starting an update retry; and when the number of the update retries reaches a preset number threshold, clearing the synchronous flag bit.
In an embodiment, when the processor executes, the implemented method synchronously updates the software upgrade package used for upgrading the latest time to other partitions of the controller, further includes: if the controller does not complete synchronous updating after multiple retries and the number of retries reaches a preset number threshold, generating a failure time stamp; if the time interval between the failure time stamp and the current time node exceeds the preset time interval, a software upgrading request is generated and sent to the cloud, if the cloud responds to the software upgrading request, a software upgrading package is acquired again from the cloud, and remote upgrading is carried out based on the acquired software upgrading package.
In an embodiment, when the processor executes, the method further includes, before implementing the step of synchronously updating the software upgrade package used for the latest upgrade to other partitions of the controller: acquiring the size and the current synchronous rate of the software upgrading packet; calculating the time length for completing synchronous update according to the size of the upgrade package and the current synchronous rate as the update time length; and outputting the updated time length to a vehicle display terminal.
In an embodiment, when the processor executes, the implemented method synchronously updates the software upgrade package used for upgrading the latest time to other partitions of the controller, further includes: when the latest synchronization update is not completed, acquiring the progress of the latest synchronization update; calculating the size of an unfinished software upgrade package according to the progress; and calculating the required time length for completing synchronous updating of the incomplete software upgrading packet according to the current synchronous rate, and outputting the required time length to the vehicle display terminal.
In one embodiment, the computer device may be used as a server, including but not limited to a stand-alone physical server, or a server cluster formed by a plurality of physical servers, and may also be used as a terminal, including but not limited to a mobile phone, a tablet computer, a personal digital assistant, a smart device, or the like. As shown in FIG. 3, the computer device includes a processor, a non-volatile storage medium, an internal memory, a display screen, and a network interface connected by a system bus.
Wherein the processor of the computer device is configured to provide computing and control capabilities to support the operation of the entire computer device. The non-volatile storage medium of the computer device stores an operating system and a computer program. The computer program is executable by a processor for implementing a controller software partition synchronization method provided by the above embodiments. Internal memory in a computer device provides a cached operating environment for an operating system and computer programs in a non-volatile storage medium. The display interface can display data through the display screen. The display screen may be a touch screen, such as a capacitive screen or an electronic screen, and the corresponding instruction may be generated by receiving a click operation on a control displayed on the touch screen.
It will be appreciated by those skilled in the art that the architecture of the computer device illustrated in fig. 3 is merely a block diagram of portions of the architecture in connection with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements are applicable, and that a particular computer device may include more or less components than those illustrated, or may be combined with certain components, or have a different arrangement of components.
In one embodiment, a computer readable storage medium is provided having stored thereon a computer program which when executed by a processor performs the steps of: acquiring a software upgrade package of a controller; performing software upgrading on one partition of the controller according to the software upgrading packet to take the partition after successful upgrading as a target partition, and starting to operate the target partition, wherein the controller at least comprises two partitions; and monitoring the running state of the vehicle, and synchronously updating the software upgrading package which is successfully upgraded last time to other partitions of the controller when the running state of the vehicle meets a preset synchronous condition so as to enable the software versions of all the partitions of the controller to be consistent.
In one embodiment, when the computer program is executed by the processor, the software upgrade for one of the partitions of the controller according to the software upgrade package includes: calling one partition of the controller according to the power-on signal of the controller; loading the software upgrading package into the called partition to perform software upgrading, obtaining an upgraded target partition, and generating a synchronous flag bit to perform synchronous updating of the software upgrading package based on the synchronous flag bit; and starting the target partition to run the updated corresponding software.
In one embodiment, when the computer program is executed by the processor, the method for implementing that the latest software upgrade package for upgrade is synchronously updated to other partitions of the controller when the running state of the vehicle meets a preset synchronization condition includes: in the synchronous updating process, if the running state of the vehicle does not meet the preset synchronous condition, stopping updating and storing the current synchronous state; and when the running state of the vehicle meets the preset synchronous condition again, continuing to update the synchronization according to the current synchronous state.
In one embodiment, when the computer program is executed by the processor, the implemented method for synchronously updating the software upgrade package which is successfully updated last time to other partitions of the controller includes: acquiring a target upgrade package of which the upgrade is completed last time; and calling the image file of the target upgrade package, and synchronously updating the image file to other partitions of the controller.
In one embodiment, when the computer program is executed by the processor, the implemented method synchronously updates the software upgrade package used for upgrade to other partitions of the controller, and further comprises: when the synchronous update fails, starting an update retry; and when the number of the update retries reaches a preset number threshold, clearing the synchronous flag bit.
In one embodiment, when the computer program is executed by the processor, the implemented method synchronously updates the software upgrade package used for upgrade to other partitions of the controller, and further comprises: if the controller does not complete synchronous updating after multiple retries and the number of retries reaches a preset number threshold, generating a failure time stamp; if the time interval between the failure time stamp and the current time node exceeds the preset time interval, a software upgrading request is generated and sent to the cloud, if the cloud responds to the software upgrading request, a software upgrading package is acquired again from the cloud, and remote upgrading is carried out based on the acquired software upgrading package.
In one embodiment, when the computer program is executed by the processor, the method further includes, before implementing the step of synchronously updating the software upgrade package for upgrade to other partitions of the controller, the steps of: acquiring the size and the current synchronous rate of the software upgrading packet; calculating the time length for completing synchronous update according to the size of the upgrade package and the current synchronous rate as the update time length; and outputting the updated time length to a vehicle display terminal.
In one embodiment, when the computer program is executed by the processor, the implemented method synchronously updates the software upgrade package used for upgrade to other partitions of the controller, and further comprises: when the latest synchronization update is not completed, acquiring the progress of the latest synchronization update; calculating the size of an unfinished software upgrade package according to the progress; and calculating the required time length for completing synchronous updating of the incomplete software upgrading packet according to the current synchronous rate, and outputting the required time length to the vehicle display terminal.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a non-volatile computer readable storage medium, and where the program, when executed, may include processes in the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), or the like.
The above embodiments are merely illustrative of the principles of the present invention and its effectiveness, and are not intended to limit the invention. Modifications and variations may be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the invention. Accordingly, it is intended that all equivalent modifications and variations of the invention be covered by the claims, which are within the ordinary skill of the art, be within the spirit and scope of the present disclosure.

Claims (12)

1. A method for synchronizing controller software partitions, comprising:
acquiring a software upgrade package of a controller;
performing software upgrading on one partition of the controller according to the software upgrading packet to take the partition after successful upgrading as a target partition, and starting to operate the target partition, wherein the controller at least comprises two partitions;
And monitoring the running state of the vehicle, and synchronously updating the software upgrading package which is successfully upgraded last time to other partitions of the controller when the running state of the vehicle meets a preset synchronous condition so as to enable the software versions of all the partitions of the controller to be consistent.
2. The method of claim 1, wherein software upgrading one of the partitions of the controller according to the software upgrade package comprises:
calling one partition of the controller according to the power-on signal of the controller;
loading the software upgrading package into the called partition to perform software upgrading, obtaining an upgraded target partition, and generating a synchronous flag bit to perform synchronous updating of the software upgrading package based on the synchronous flag bit;
and starting the target partition to run the updated corresponding software.
3. The controller software partition synchronization method according to claim 2, wherein when the vehicle running state satisfies a preset synchronization condition, synchronizing and updating a software upgrade package for upgrade last time to other partitions of the controller, comprises:
in the synchronous updating process, if the running state of the vehicle does not meet the preset synchronous condition, stopping updating and storing the current synchronous state;
And when the running state of the vehicle meets the preset synchronous condition again, continuing to update the synchronization according to the current synchronous state.
4. The method of claim 3, wherein synchronizing the update of the last successfully updated software upgrade package to the other partitions of the controller comprises:
acquiring a target upgrade package of which the upgrade is completed last time;
and calling the image file of the target upgrade package, and synchronously updating the image file to other partitions of the controller.
5. The controller software partition synchronization method of claim 3, wherein the software upgrade package last used for upgrade is synchronously updated to other partitions of the controller, further comprising:
when the synchronous update fails, starting an update retry;
and when the number of the update retries reaches a preset number threshold, clearing the synchronous flag bit.
6. The method of claim 5, wherein the step of synchronously updating the latest software upgrade package for upgrade to other partitions of the controller further comprises:
if the controller does not complete synchronous updating after multiple retries and the number of retries reaches a preset number threshold, generating a failure time stamp;
If the time interval between the failure time stamp and the current time node exceeds the preset time interval, a software upgrading request is generated and sent to the cloud, if the cloud responds to the software upgrading request, a software upgrading package is acquired again from the cloud, and remote upgrading is carried out based on the acquired software upgrading package.
7. The method of claim 5, wherein synchronizing the latest software upgrade package for upgrade to other partitions of the controller is preceded by:
acquiring the size and the current synchronous rate of the software upgrading packet;
calculating estimated synchronous time length as update time length according to the size of the upgrade package and the current synchronous rate;
and outputting the updated time length to a vehicle display terminal.
8. The controller software partition synchronization method of claim 7, wherein the software upgrade package last used for upgrade is synchronously updated to other partitions of the controller, further comprising:
when the latest synchronization update is not completed, acquiring the progress of the latest synchronization update;
calculating the size of an unfinished software upgrade package according to the progress;
And calculating the required time length for completing synchronous updating of the incomplete software upgrading packet according to the current synchronous rate, and outputting the required time length to the vehicle display terminal.
9. The controller software partition synchronization method of claim 1, wherein the preset synchronization conditions include: the vehicle speed signal is effective, the current vehicle speed is smaller than a preset speed threshold value, the hand brake is in a braking state, the hand brake has no fault and/or the whole vehicle power system is not in a working state.
10. A controller software partition synchronization system, comprising:
the upgrade package acquisition module is configured to acquire a software upgrade package of the controller;
the upgrading module is configured to upgrade software of one partition of the controller according to the software upgrading package, take the partition after being upgraded successfully as a target partition, and start to operate the target partition, wherein the controller at least comprises two partitions;
and the synchronous updating module is configured to monitor the running state of the vehicle, and synchronously update the software upgrading package which is successfully upgraded last time to other partitions of the controller when the running state of the vehicle meets a preset synchronous condition so as to enable the software versions of all the partitions of the controller to be consistent.
11. A computer device, the device comprising a processor and a memory;
the memory is used for storing a computer program;
the processor is configured to perform the controller software partition synchronization method of any one of claims 1-9 in accordance with the computer program.
12. A computer readable storage medium storing a computer program for the controller software partition synchronization method of any one of claims 1-9.
CN202310658993.0A 2023-06-05 2023-06-05 Controller software partition synchronization method, system, equipment and medium Pending CN116804911A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310658993.0A CN116804911A (en) 2023-06-05 2023-06-05 Controller software partition synchronization method, system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310658993.0A CN116804911A (en) 2023-06-05 2023-06-05 Controller software partition synchronization method, system, equipment and medium

Publications (1)

Publication Number Publication Date
CN116804911A true CN116804911A (en) 2023-09-26

Family

ID=88080170

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310658993.0A Pending CN116804911A (en) 2023-06-05 2023-06-05 Controller software partition synchronization method, system, equipment and medium

Country Status (1)

Country Link
CN (1) CN116804911A (en)

Similar Documents

Publication Publication Date Title
US20180188969A1 (en) Server Management Method and Server
CN111273924B (en) Software updating method and device
JP7345921B2 (en) OTA differential update method and system for master-slave architecture
CN112199240B (en) Method for switching nodes during node failure and related equipment
CN109361542A (en) The fault handling method of client, device, system, terminal and server
CN104503861A (en) Abnormality handling method and system, agency device and control device
CN113641548A (en) Control method and device for automatic driving vehicle and automatic driving vehicle
CN111506331A (en) Server BMC refreshing method, system, terminal and storage medium
CN112052230A (en) Multi-machine room data synchronization method, computing equipment and storage medium
CN116133011A (en) Upgrading method, system and device of vehicle-mounted system
CN111752577B (en) Upgrading method and equipment for system version
CN102073523A (en) Method and device for implementing software version synchronization
CN101739406A (en) Method for synchronizing file service operations on double-controller
CN106775636B (en) Battery firmware processing method and device and charging cabinet system
CN107623705B (en) Storage mode upgrading method, device and system based on video cloud storage system
CN112732412A (en) Service configuration file processing method and device, storage medium and electronic equipment
CN111984287A (en) Equipment upgrading method and system
CN116804911A (en) Controller software partition synchronization method, system, equipment and medium
CN111427259A (en) Frame slot type main/standby switching method, intelligent device and storage medium
CN114237722B (en) System starting method, device, equipment and engineering vehicle
CN114124803B (en) Device management method and device, electronic device and storage medium
CN115150457A (en) Micro-service management method, vehicle-mounted system and vehicle-mounted equipment
CN108958757A (en) The upgrade method of complicated embedded device and complicated embedded device
CN114020279A (en) Application software distributed deployment method, system, terminal and storage medium
CN112783535A (en) Firmware upgrading method, embedded device and storage medium

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