CN117544648A - Upgrade method and device for electronic control unit, electronic equipment and storage medium - Google Patents

Upgrade method and device for electronic control unit, electronic equipment and storage medium Download PDF

Info

Publication number
CN117544648A
CN117544648A CN202311422674.6A CN202311422674A CN117544648A CN 117544648 A CN117544648 A CN 117544648A CN 202311422674 A CN202311422674 A CN 202311422674A CN 117544648 A CN117544648 A CN 117544648A
Authority
CN
China
Prior art keywords
file
target
upgrading
upgraded
upgrade
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
CN202311422674.6A
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.)
Chongqing Seres New Energy Automobile Design Institute Co Ltd
Original Assignee
Chongqing Seres New Energy Automobile Design Institute 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 Chongqing Seres New Energy Automobile Design Institute Co Ltd filed Critical Chongqing Seres New Energy Automobile Design Institute Co Ltd
Priority to CN202311422674.6A priority Critical patent/CN117544648A/en
Publication of CN117544648A publication Critical patent/CN117544648A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to the technical field of system upgrading and provides an upgrading method and device of an electronic control unit, electronic equipment and a storage medium. The method monitors the upgrade state of an electronic control unit in a current vehicle; if the upgrading state of the electronic control unit is monitored to be an abnormal state, determining a file to be upgraded corresponding to the electronic control unit; verifying the integrity of the file to be upgraded, if the file to be upgraded is a missing file, determining an upgrading task corresponding to the file to be upgraded, and determining an influence factor corresponding to the file to be upgraded based on the upgrading task; the method comprises the steps of determining a target upgrading file according to the influence factors, upgrading the electronic control unit based on the target upgrading file, determining the influence factors corresponding to the file to be upgraded when the file to be upgraded is a missing file, determining the target upgrading file based on the influence factors, and achieving the acquisition mode of various target upgrading files.

Description

Upgrade method and device for electronic control unit, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of system upgrade technologies, and in particular, to an upgrade method and apparatus for an electronic control unit, an electronic device, and a storage medium.
Background
With the increasing number of vehicles and the continuous development of computer technology, network technology and the like, the intelligent requirements, safety requirements and the like of people on the vehicles are also higher, and the vehicles are more intelligent and multimedia. Various hardware and software (applications) are often deployed in the current vehicles, for example, intelligent cabins, sensing systems, automatic driving systems, on-board operating systems, navigation applications, video and audio playing applications and the like are configured in the vehicles. Such hardware, software, while making the vehicle more functional, is also more vulnerable to vulnerabilities, or needs to be replaced with more advanced versions, etc. Therefore, it is necessary to upgrade and update the hardware and software (application) systems of the vehicle.
At the time of the software update, the vehicle may download a vehicle upgrade package from an OTA upgrade server based on an Over The Air (OTA), and implement the software update through the vehicle upgrade package. In the related art, after an Electronic Control Unit (ECU) fails to upgrade due to an abnormality such as power failure, an upgrade file needs to be obtained again from an upgrade server, which causes excessive consumption of communication resources and causes a problem of communication resource waste.
Disclosure of Invention
In view of this, the embodiments of the present application provide an upgrade method, apparatus, electronic device, and storage medium for an electronic control unit, so as to solve the problem in the prior art that after an upgrade failure of an Electronic Control Unit (ECU) is caused by an abnormality such as power failure, an upgrade file needs to be obtained from an upgrade server again.
In a first aspect of an embodiment of the present application, there is provided a method for upgrading an electronic control unit, including: monitoring the upgrade state of an electronic control unit in a current vehicle; if the upgrading state of the electronic control unit is monitored to be an abnormal state, determining a file to be upgraded corresponding to the electronic control unit; verifying the integrity of the file to be upgraded, if the file to be upgraded is a missing file, determining an upgrading task corresponding to the file to be upgraded, and determining an influence factor corresponding to the file to be upgraded based on the upgrading task; determining whether to obtain a target missing file corresponding to a file to be upgraded from an upgrade server according to the influence factors; if the target missing file corresponding to the file to be upgraded is obtained from the upgrading server, determining a target upgrading file according to the file to be upgraded and the target missing file, and upgrading the electronic control unit based on the target upgrading file.
In a second aspect of the embodiments of the present application, there is provided an upgrade apparatus for an electronic control unit, including: the detection module is used for monitoring the upgrading state of the electronic control unit in the current vehicle; if the upgrading state of the electronic control unit is monitored to be an abnormal state, determining a file to be upgraded corresponding to the electronic control unit; the verification module is used for verifying the integrity of the file to be upgraded, determining an upgrading task corresponding to the file to be upgraded if the file to be upgraded is a missing file, and determining an influence factor corresponding to the file to be upgraded based on the upgrading task; the upgrading module is used for determining whether to obtain a target missing file corresponding to a file to be upgraded from an upgrading server according to the influence factors; if the target missing file corresponding to the file to be upgraded is obtained from the upgrading server, determining a target upgrading file according to the file to be upgraded and the target missing file, and upgrading the electronic control unit based on the target upgrading file.
In a third aspect of the embodiments of the present application, there is provided an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
In a fourth aspect of the embodiments of the present application, there is provided a readable storage medium storing a computer program which, when executed by a processor, implements the steps of the above method.
Compared with the prior art, the embodiment of the application has the beneficial effects that: in the example of the application, the upgrade state of the electronic control unit in the current vehicle is monitored; if the upgrading state of the electronic control unit is monitored to be an abnormal state, determining a file to be upgraded corresponding to the electronic control unit; verifying the integrity of the file to be upgraded, if the file to be upgraded is a missing file, determining an upgrading task corresponding to the file to be upgraded, and determining an influence factor corresponding to the file to be upgraded based on the upgrading task; the method comprises the steps of determining a target upgrading file according to the influence factors, upgrading the electronic control unit based on the target upgrading file, determining the influence factors corresponding to the file to be upgraded when the file to be upgraded is a missing file, determining the target upgrading file based on the influence factors, and realizing a plurality of target upgrading file acquisition modes, so that the problem of resource waste caused by repeated transmission of the same file due to direct re-acquisition of the target upgrading file from an upgrading server after the electronic control unit fails to upgrade caused by power failure and other anomalies is solved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following description will briefly introduce the drawings that are needed in the embodiments or the description of the prior art, it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of an upgrade method of an electronic control unit according to an embodiment of the present application;
fig. 2 is a flow chart of another method for upgrading an electronic control unit according to an embodiment of the present application;
fig. 3 is a flow chart of an upgrade method of another electronic control unit according to an embodiment of the present application;
fig. 4 is a flow chart of another method for upgrading an electronic control unit according to an embodiment of the present application;
FIG. 5 is a flow chart of an upgrade method of an alternative electronic control unit according to an embodiment of the present application;
FIG. 6 is a flow chart of an alternative method for upgrading an electronic control unit according to an embodiment of the present disclosure;
FIG. 7 is a flow chart of an upgrade method of an alternative electronic control unit according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an upgrade apparatus for an electronic control unit according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
An upgrade method and apparatus for an electronic control unit according to embodiments of the present application will be described in detail with reference to the accompanying drawings.
Fig. 1 is an upgrade method of an electronic control unit according to an embodiment of the present application, as shown in fig. 1, where the method includes:
s101, monitoring the upgrading state of an electronic control unit in a current vehicle;
s102, if the upgrading state of the electronic control unit is monitored to be an abnormal state, determining a file to be upgraded corresponding to the electronic control unit;
s103, verifying the integrity of the file to be upgraded, if the file to be upgraded is a missing file, determining an upgrading task corresponding to the file to be upgraded, and determining an influence factor corresponding to the file to be upgraded based on the upgrading task;
s104, determining whether to obtain a target missing file corresponding to the file to be upgraded from the upgrading server according to the influence factors;
s105, if the target missing file corresponding to the file to be upgraded is obtained from the upgrade server, determining a target upgrade file according to the file to be upgraded and the target missing file, and upgrading the electronic control unit based on the target upgrade file.
Specifically, the upgrade method of the electronic control unit provided in this example is applied to vehicles including vehicles with automatic driving or intelligent driving (including passenger function vehicles (e.g., sedans, buses, wagons, etc.), cargo function vehicles (e.g., general trucks, vans, dump trucks, closed trucks, tank trucks, flatcars, container cars, dump trucks, special structure trucks), special vehicles (e.g., logistics distribution vehicles, automated guided vehicles AGVs, patrol cars, cranes, excavators, bulldozers, forklift trucks, road rollers, loaders, off-road engineering vehicles, armored vehicles, sewage treatment vehicles, sanitation vehicles, dust trucks, floor washing vehicles, watering vehicles, sweeping robots, meal delivery robots, shopping guide robots, mowers, golf carts, etc.), recreational vehicles (e.g., recreational vehicles, amusement park automatic driving devices, balance cars, etc.), rescue vehicles (e.g., fire fighting vehicles, ambulances, electric power emergency vehicles, engineering vehicles, etc.), and the like).
In the above example, the vehicle includes at least one Electronic Control Unit (ECU) that can be updated according to the update file.
In some examples, when the ECU performs the upgrade in step S101, the current vehicle may acquire the upgrade status of the electronic control unit in the current vehicle in real time, and if it is monitored that there is an incomplete upgrade issue for the electronic control unit, it is determined that the upgrade status of the electronic control unit is an abnormal status; if the electronic control unit is monitored to have no incomplete upgrading matters, determining that the upgrading state of the electronic control unit is a normal state.
If the upgrading state of the electronic control unit is detected to be an abnormal state, determining a file to be upgraded corresponding to the electronic control unit; it can be understood that after the electronic control unit is updated and interrupted due to power outage, system, network abnormality, other faults and the like, the file to be updated transmitted to the electronic control unit may have the conditions of missing, damage and the like, so as to avoid the influence on the stability of the electronic control unit caused by directly using the file to be updated with the problems, and further verification on the integrity of the file to be updated is required in this embodiment.
It can be appreciated that methods of verifying the integrity of a file to be upgraded include, but are not limited to: acquiring a target verification code (including but not limited to MD5 code of a file) transmitted by an upgrade server, generating a file verification code according to the file to be upgraded, comparing the target verification code with the file verification code, and if the target verification code is the same as the file verification code, obtaining the file to be upgraded as a complete file; otherwise, if the target verification code and the file verification code are different, the file to be upgraded is a complete file; the method for verifying the integrity of the file to be upgraded is not limited, and related personnel can flexibly select the method for verifying the integrity of the file to be upgraded according to actual requirements.
In some examples, if the file to be upgraded is a complete file, directly taking the file to be upgraded as a target upgrade file, and upgrading the electronic control unit based on the target upgrade file; in some examples, if the file to be upgraded is a missing file, determining an upgrade task corresponding to the file to be upgraded, where the upgrade task is used to determine a function of upgrading the electronic control unit; for example, the electronic control unit is an audio-visual electronic control unit, and the audio-visual electronic control unit includes: video function, audio function, brightness adjusting function, touch screen control function, etc., wherein if the upgrade task is to optimize the brightness adjusting function, the function of upgrading the electronic control unit is determined to be the brightness adjusting function.
After determining the upgrade task, determining an influence factor corresponding to the file to be upgraded based on the upgrade task, including: determining an importance score of the upgrade task in the electronic control unit, and determining a current stability score of the electronic control unit, wherein the stability score is used for representing the health condition of the electronic control unit; and determining an influence factor corresponding to the file to be upgraded according to the importance score and the stability score. Specifically, determining an importance score of an upgrade task in an electronic control unit includes: the corresponding relation between the preset function and the importance score and the upgrading function corresponding to the upgrading task determine the importance score of the upgrading task in the electronic control unit; for example, the electronic control unit is an audio-visual electronic control unit, wherein the audio-visual electronic control unit comprises: video function, audio frequency function, luminance adjustment function, touch screen control function etc. wherein video function, audio frequency function are the core function of audio-visual electronic control unit, consequently, relevant personnel can set up video function, audio frequency function's importance score and be X, luminance adjustment function, touch screen control function are not the core function of audio-visual electronic control unit, consequently, set up luminance adjustment function, touch screen control function's importance score as Y (wherein X > Y), after determining that the upgrading function that the upgrading task corresponds is luminance adjustment function, then determine that the importance score of upgrading task in electronic control unit is Y.
It can be appreciated that the present example is not limited to implementing the "determine importance score of upgrade task in electronic control unit" only by the above steps, and the related person may flexibly set the step of implementing the "determine importance score of upgrade task in electronic control unit" according to actual needs.
In some embodiments, a current stability score for the electronic control unit is determined, including, but not limited to: determining the number of times of breakdown of the electronic control unit in unit time, and determining a stability score of the electronic control unit based on the number of times of breakdown, wherein it can be understood that the smaller the number of times of breakdown of the electronic control unit in unit time is, the higher the stability score is; conversely, the more the electronic control unit collapses per unit time, the lower the stability score. Wherein the stability score is used to characterize the health of the electronic control unit.
After the importance score and the stability score are determined, determining an influence factor corresponding to the file to be upgraded based on the importance score and the stability score, wherein the higher the importance score is, the higher the influence molecule is, and the lower the importance score is, the lower the influence molecule is; the lower the stability score is, the higher the influence molecule is, the importance score and the weight of the stability score can be set based on the rule, and further the influence factor corresponding to the file to be upgraded is determined under the rule, wherein the specific calculation formula is as follows:
M=X*A+Y*B;
wherein M is an influence factor, X is an importance score, A is an importance score weight, the value of A is greater than zero, Y is a stability score, B is a stability score, and the value of B is less than zero. It will be appreciated that this example is not intended to be limiting, and that the influence factors may be determined from the importance scores and the stability scores in the manner described above, and that the relevant personnel may be flexibly set according to actual needs.
It can be understood that according to the importance score and the stability score, the influence factors corresponding to the files to be upgraded are determined, so that the importance degree of the upgrading task in the electronic control unit and the stability degree of the electronic control unit are comprehensively considered, the effect of accurately acquiring the influence factors is realized, and the problem that the influence factors cannot be acquired in the related technology is avoided.
According to the technical scheme provided by the embodiment of the application, the upgrading state of the electronic control unit in the current vehicle is monitored; if the upgrading state of the electronic control unit is monitored to be an abnormal state, determining a file to be upgraded corresponding to the electronic control unit; verifying the integrity of the file to be upgraded, if the file to be upgraded is a missing file, determining an upgrading task corresponding to the file to be upgraded, and determining an influence factor corresponding to the file to be upgraded based on the upgrading task; the method comprises the steps of determining a target upgrading file according to the influence factors, upgrading the electronic control unit based on the target upgrading file, determining the influence factors corresponding to the file to be upgraded when the file to be upgraded is a missing file, determining the target upgrading file based on the influence factors, and realizing a plurality of target upgrading file acquisition modes, so that the problem of resource waste caused by repeated transmission of the same file due to direct re-acquisition of the target upgrading file from an upgrading server after the electronic control unit fails to upgrade caused by power failure and other anomalies is solved.
In some embodiments, as shown in fig. 2, determining the target upgrade file according to the impact factor includes:
s201, determining whether to obtain a target missing file corresponding to a file to be upgraded from an upgrade server according to an influence factor;
s202, if a target missing file corresponding to the file to be upgraded is obtained from the upgrade server, determining a target upgrade file according to the file to be upgraded and the target missing file.
In some examples, after determining the influence factor, determining whether to obtain a target missing file corresponding to the file to be upgraded from the upgrade server according to the influence factor; determining whether to obtain a target missing file corresponding to a file to be upgraded from an upgrade server according to an influence factor, wherein the target missing file comprises the following three conditions:
first case: if the target missing file corresponding to the file to be upgraded is obtained from the upgrading server, determining the target upgrading file according to the file to be upgraded and the target missing file, and upgrading the electronic control unit based on the target upgrading file, wherein the influence factor can determine the importance degree of the upgrading task corresponding to the file to be upgraded, if the influence factor is lower, the importance degree of the upgrading task corresponding to the current file to be upgraded is lower, so that the target missing file is directly obtained from the upgrading server, and the file to be upgraded is supplemented, thereby obtaining the target upgrading file, and further avoiding the problem of resource waste caused by repeated transmission of the same file because all the target upgrading files are required to be obtained from the upgrading server after upgrading faults occur.
Second case: if the target upgrade file is determined to be directly obtained from the upgrade server, the target upgrade file is directly obtained from the upgrade server, and the electronic control unit is upgraded based on the target upgrade file; specifically, when the target upgrade file is determined to be directly obtained from the upgrade server, deleting the current file to be upgraded, and directly upgrading the electronic control unit based on the target upgrade file after the target upgrade file is obtained; it can be understood that, the above-mentioned influence factor can determine the importance degree of the file to be upgraded corresponding to the upgrade task, if the above-mentioned influence factor is larger, it represents that the importance degree of the current file to be upgraded corresponding to the upgrade task is higher, so, in order to avoid the file to be upgraded itself from missing, and causing abnormal functions subsequently, the target upgrade file is directly obtained from the upgrade server again, and the problem of abnormal functions of the electronic control unit caused by directly upgrading according to the file to be upgraded is avoided.
Third case: if the target missing file corresponding to the file to be upgraded is not obtained from the upgrading server, and the target upgrading file is not obtained from the upgrading server, further judging whether the file to be upgraded can directly upgrade the electronic control unit, if the file to be upgraded can upgrade the electronic control unit, directly taking the file to be upgraded as the target upgrading file, and directly carrying out subsequent upgrading according to the target upgrading file; specifically, if the influence factor is determined to be lower than the preset threshold influence factor, directly determining that the target missing file corresponding to the file to be upgraded is not acquired from the upgrade server, and determining that the target upgrade file is not acquired from the upgrade server.
According to the technical scheme provided by the embodiment of the application, the upgrading state of the electronic control unit in the current vehicle is monitored; if the upgrading state of the electronic control unit is monitored to be an abnormal state, determining a file to be upgraded corresponding to the electronic control unit; verifying the integrity of the file to be upgraded, if the file to be upgraded is a missing file, determining an upgrading task corresponding to the file to be upgraded, and determining an influence factor corresponding to the file to be upgraded based on the upgrading task; the method comprises the steps of determining a target upgrading file according to the influence factor, upgrading the electronic control unit based on the target upgrading file, determining the influence factor corresponding to the file to be upgraded when the file to be upgraded is a missing file, and obtaining the target missing file from the upgrading server when the target missing file corresponding to the file to be upgraded is determined to be obtained from the server based on the influence factor judgment, so that the problem of resource waste caused by repeated transmission of the same file due to the fact that the target upgrading file needs to be obtained from the upgrading server again after the electronic control unit fails due to power failure and other anomalies is solved.
In some embodiments, as shown in fig. 3, determining whether to obtain a target missing file corresponding to a file to be upgraded from an upgrade server according to an impact factor includes:
s301, determining a preset target influence factor, and comparing the influence factor with the target influence factor;
s302, when the comparison result shows that the influence factor is lower than the target influence factor, determining to acquire a target missing file corresponding to the file to be upgraded from the upgrading server.
Specifically, a related person determines a target influence factor according to actual task requirements, then compares the influence factor determined by the example with the target influence factor, and when the comparison result is that the influence factor is lower than the target influence factor, acquires a target missing file corresponding to the file to be upgraded from the upgrade server.
It can be understood that when the influence factor is lower than the target influence factor, the influence factor is lower, and the importance degree of the current file to be upgraded corresponding to the upgrading task is lower, so that the target missing file is directly obtained from the upgrading server at the moment, the files to be upgraded are supplemented to obtain the target upgrading file, and further the problem of resource waste caused by repeated transmission of the same file because all the target upgrading files are required to be obtained from the upgrading server after the upgrading failure occurs is avoided.
When the comparison result is that the influence factor is not lower than the target influence factor, the target upgrade file is determined to be directly obtained from the upgrade server, the file to be upgraded is directly discarded at the moment, and after the target upgrade file is directly obtained from the upgrade server, the system upgrade is directly performed based on the target upgrade file.
According to the technical scheme provided by the embodiment of the application, a preset target influence factor is determined, and the influence factor and the target influence factor are compared; when the comparison result shows that the influence factor is lower than the target influence factor, determining to acquire a target missing file corresponding to the file to be upgraded from the upgrading server, and acquiring the target missing file from the upgrading server in the subsequent step, so that the problem of resource waste caused by repeated transmission of the same file due to the fact that in the related technology, after the upgrading failure occurs, all target upgrading files need to be acquired from the upgrading server is avoided.
In some embodiments, as shown in fig. 4, if the comparison result is that the impact factor is higher than the target impact factor, the method further includes:
s401, generating a target upgrade file acquisition request of a target upgrade file, and sending the target upgrade file request to an upgrade server;
s402, receiving a target upgrade file returned by the upgrade server aiming at the target upgrade file acquisition request.
Specifically, if the comparison result is that the influence factor is higher than the target influence factor, discarding the file to be upgraded, and directly obtaining the target upgrade file from the upgrade server, it can be understood that the influence factor can determine the importance degree of the upgrade task corresponding to the file to be upgraded, if the influence factor is larger, the importance degree of the upgrade task corresponding to the current file to be upgraded is higher, so that in order to avoid the defect of the file to be upgraded, which results in the subsequent function abnormality, the target upgrade file is directly obtained from the upgrade server again, and the problem of the function abnormality of the electronic control unit caused by directly upgrading according to the file to be upgraded is avoided.
In some examples, when it is determined that the target upgrade file is directly acquired from the upgrade server, an acquisition request corresponding to the target upgrade file is directly generated, the target upgrade file request is sent to the upgrade server, the upgrade server returns the target upgrade file to the vehicle after receiving the target upgrade file acquisition request, and the vehicle upgrades according to the target upgrade file.
According to the technical scheme provided by the embodiment of the application, a target upgrade file acquisition request of a target upgrade file is generated, and the target upgrade file request is sent to an upgrade server; the target upgrade file returned by the upgrade server aiming at the target upgrade file acquisition request is received, so that the target upgrade file is directly acquired from the upgrade server under the condition of high influence factor.
In some embodiments, as shown in fig. 5, obtaining, from an upgrade server, a target missing file corresponding to a file to be upgraded, includes:
s501, generating a missing file acquisition request according to a file to be upgraded, sending the missing file acquisition request to an upgrade server, analyzing the missing file acquisition request by the upgrade server, and transmitting a target missing file to a current vehicle according to an analysis result;
s502, receiving a target missing file transmitted by the upgrade server.
Specifically, generating the missing file acquisition request from the file to be upgraded includes, but is not limited to: and generating corresponding verification information (including but not limited to MD5 information) according to the file to be upgraded, and taking the verification information as a missing file acquisition request. It can be understood that the embodiment is not limited to a specific method for generating the missing file obtaining request according to the file to be upgraded, and may be flexibly set by related personnel.
After the missing file obtaining request is generated, the missing file obtaining request is sent to the upgrading server, the upgrading server is used for analyzing the missing file obtaining request, further obtaining a file to be upgraded existing on the vehicle currently, determining the missing file according to the file to be upgraded and the target upgrading file on the vehicle, and then transmitting the missing file to the current vehicle.
In some examples, after receiving the missing file, the current vehicle determines a target upgrade file according to the file to be upgraded and the target missing file, and upgrades the electronic control unit based on the target upgrade file.
According to the technical scheme provided by the embodiment of the application, a missing file acquisition request is generated according to the file to be upgraded, the missing file acquisition request is sent to the upgrading server, and the upgrading server is used for analyzing the missing file acquisition request and transmitting a target missing file to the current vehicle according to the analysis result; the target missing file transmitted by the upgrade server is received, so that the target missing file can be accurately acquired, and the problem of resource waste caused by repeated transmission of the same file due to the fact that the target missing file is required to be acquired from the upgrade server again after the upgrade of the electronic control unit fails due to the fact that the target missing file cannot be acquired in the related technology is solved.
In some examples, as shown in fig. 6, before upgrading the electronic control unit based on the target upgrade file, the method further comprises:
s601, acquiring a verification value of a target upgrade file;
s602, verifying the integrity of the target upgrade file according to the verification value and a verification value corresponding to the target upgrade file, wherein the verification value is determined by the upgrade server according to the target upgrade file.
Specifically, a verification value of the target upgrade file is obtained according to a preset verification value obtaining method, and then the integrity of the target upgrade file is verified according to the verification value and a verification value corresponding to the target upgrade file, wherein the verification value is determined by the upgrade server processing the target upgrade file according to the preset verification value obtaining method.
If the verification value is the same as the verification value, determining that the target upgrade file is complete, and upgrading the electronic control unit based on the target upgrade file; if the verification value and the verification value are different, determining that the target upgrade file is incomplete, and discarding the target upgrade file at the moment.
According to the technical scheme provided by the embodiment of the application, the verification value of the target upgrade file is obtained; the integrity of the target upgrade file is verified according to the verification value and the verification value corresponding to the target upgrade file, wherein the verification value is determined by the upgrade server according to the target upgrade file, so that the integrity of the target upgrade file is verified, in the subsequent upgrade step, only when the target upgrade file is complete, the upgrade is performed according to the target upgrade file, and the problem that the electronic control unit system collapses due to incomplete target upgrade file due to direct upgrade based on the target upgrade file is avoided.
In some examples, as shown in fig. 7, the method further comprises:
s701, after upgrading according to a target upgrading file, determining a system stability score of the electronic control unit;
s702, if the system stability score is lower than the target stability score, performing version rollback on the electronic control unit.
Specifically, after upgrades according to the target upgrade file, a system stability score of the electronic control unit is determined, wherein determining the system stability score of the electronic control unit includes, but is not limited to: acquiring the number of times of breakdown of the electronic control unit in unit time, and determining a system stability score of the electronic control unit based on the determined number of times of breakdown, wherein it can be understood that the system stability score is higher as the number of times of breakdown of the electronic control unit in unit time is smaller after the electronic control unit is upgraded according to the target upgrade file; otherwise, the more the electronic control unit is crashed in unit time after upgrading according to the target upgrading file, the lower the system stability score is.
After determining the system stability score, comparing the score with the target stability score, and if the system stability score is lower than the target stability score, performing version rollback on the electronic control unit, and returning to the system version before upgrading according to the target upgrading file; and if the system stability score is higher than the target stability score, ending the flow.
According to the technical scheme provided by the embodiment of the application, after upgrading is carried out according to the target upgrading file, the system stability score of the electronic control unit is determined; if the system stability score is lower than the target stability score, version rollback is carried out on the electronic control unit, detection on the electronic control unit after system updating is achieved, and the problem that in the related art, after updating according to the target updating file, the system of the electronic control unit is not stable enough, so that the using experience is affected is avoided.
Any combination of the above optional solutions may be adopted to form an optional embodiment of the present application, which is not described herein in detail.
The following are device embodiments of the present application, which may be used to perform method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
The embodiment also provides an upgrade apparatus for an electronic control unit, as shown in fig. 8, where the apparatus includes:
a detection module 801, configured to monitor an upgrade status of an electronic control unit in a current vehicle;
if the upgrading state of the electronic control unit is monitored to be an abnormal state, determining a file to be upgraded corresponding to the electronic control unit;
the verification module 802 is configured to verify the integrity of the file to be upgraded, determine an upgrade task corresponding to the file to be upgraded if the file to be upgraded is a missing file, and determine an impact factor corresponding to the file to be upgraded based on the upgrade task;
the upgrade module 803 is configured to determine whether to obtain a target missing file corresponding to a file to be upgraded from the upgrade server according to the impact factor;
if the target missing file corresponding to the file to be upgraded is obtained from the upgrading server, determining a target upgrading file according to the file to be upgraded and the target missing file, and upgrading the electronic control unit based on the target upgrading file.
In some examples, the verification module 802 is further configured to determine an importance score of the escalation task in the electronic control unit and to determine a current stability score of the electronic control unit, the stability score being used to characterize a health of the electronic control unit; and determining an influence factor corresponding to the file to be upgraded according to the importance score and the stability score.
In some examples, the upgrade module 803 is further configured to determine a preset target impact factor, and compare the impact factor with the target impact factor; when the comparison result shows that the influence factor is lower than the target influence factor, determining to acquire a target missing file corresponding to the file to be upgraded from the upgrading server.
In some examples, the upgrade module 803 is further configured to generate a target upgrade file acquisition request for the target upgrade file, and send the target upgrade file request to the upgrade server; and receiving a target upgrade file returned by the upgrade server aiming at the target upgrade file acquisition request.
In some examples, the upgrade module 803 is further configured to generate a missing file obtaining request according to the file to be upgraded, send the missing file obtaining request to the upgrade server, and the upgrade server is configured to parse the missing file obtaining request, and transmit the target missing file to the current vehicle according to the parsing result; and receiving the target missing file transmitted by the upgrade server.
In some examples, the upgrade module 803 is further configured to obtain a verification value of the target upgrade file; and verifying the integrity of the target upgrade file according to the verification value and a verification value corresponding to the target upgrade file, wherein the verification value is determined by the upgrade server according to the target upgrade file.
In some examples, the upgrade module 803 is further configured to determine a system stability score for the electronic control unit after upgrading according to the target upgrade file; and if the system stability score is lower than the target stability score, performing version rollback on the electronic control unit.
According to the technical scheme provided by the embodiment of the application, the device of the embodiment of the application monitors the upgrading state of the electronic control unit in the current vehicle; if the upgrading state of the electronic control unit is monitored to be an abnormal state, determining a file to be upgraded corresponding to the electronic control unit; verifying the integrity of the file to be upgraded, if the file to be upgraded is a missing file, determining an upgrading task corresponding to the file to be upgraded, and determining an influence factor corresponding to the file to be upgraded based on the upgrading task; determining whether to obtain a target missing file corresponding to a file to be upgraded from an upgrade server according to the influence factors; if the target missing file corresponding to the file to be upgraded is obtained from the upgrading server, determining the target upgrading file according to the file to be upgraded and the target missing file, and upgrading the electronic control unit based on the target upgrading file, so that the problems that when the file to be upgraded is the missing file, an influence factor corresponding to the file to be upgraded is determined, and when the target missing file corresponding to the file to be upgraded is obtained from the upgrading server based on judgment of the influence factor, the target missing file is obtained from the upgrading server are solved, and resource waste caused by repeated transmission of the same file is avoided because the target upgrading file is required to be obtained from the upgrading server after the electronic control unit fails to upgrade due to power failure and the like.
Fig. 9 is a schematic diagram of an electronic device 9 provided in an embodiment of the present application. As shown in fig. 9, the electronic apparatus 9 of this embodiment includes: a processor 901, a memory 902 and a computer program 903 stored in the memory 902 and executable on the processor 901. The steps of the various method embodiments described above are implemented when the processor 901 executes the computer program 903. Alternatively, the processor 901 performs the functions of the modules/units in the above-described apparatus embodiments when executing the computer program 903.
The electronic device 9 may be a desktop computer, a notebook computer, a palm computer, a cloud server, or the like. The electronic device 9 may include, but is not limited to, a processor 901 and a memory 902. It will be appreciated by those skilled in the art that fig. 9 is merely an example of the electronic device 9 and is not limiting of the electronic device 9 and may include more or fewer components than shown, or different components.
The processor 901 may be a central processing unit (Central Processing Unit, CPU) or other general purpose processor, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like.
The memory 902 may be an internal storage unit of the electronic device 9, for example, a hard disk or a memory of the electronic device 9. The memory 902 may also be an external storage device of the electronic device 9, for example, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the electronic device 9. The memory 902 may also include both internal and external memory units of the electronic device 9. The memory 902 is used to store computer programs and other programs and data required by the electronic device.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit.
The integrated modules/units may be stored in a readable storage medium if implemented in the form of software functional units and sold or used as stand-alone products. Based on such understanding, the present application implements all or part of the flow in the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a readable storage medium, where the computer program may implement the steps of the method embodiments described above when executed by a processor. The computer program may comprise computer program code, which may be in source code form, object code form, executable file or in some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the content of the computer readable medium can be appropriately increased or decreased according to the requirements of the area and the patent practice, for example, in some areas, the computer readable medium does not include the electric carrier signal and the telecommunication signal according to the area requirements and the patent practice.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A method of upgrading an electronic control unit, the method comprising:
monitoring the upgrade state of an electronic control unit in a current vehicle;
if the upgrading state of the electronic control unit is monitored to be an abnormal state, determining a file to be upgraded corresponding to the electronic control unit;
verifying the integrity of the file to be upgraded, if the file to be upgraded is a missing file, determining an upgrading task corresponding to the file to be upgraded, and determining an influence factor corresponding to the file to be upgraded based on the upgrading task;
and determining a target upgrading file according to the influence factors, and upgrading the electronic control unit based on the target upgrading file.
2. The method of claim 1, wherein determining a target upgrade file from the impact factor comprises:
determining whether to obtain a target missing file corresponding to the file to be upgraded from an upgrading server according to the influence factors;
if the target missing file corresponding to the file to be upgraded is obtained from the upgrading server, determining the target upgrading file according to the file to be upgraded and the target missing file.
3. The method of claim 2, wherein determining whether to obtain the target missing file corresponding to the file to be upgraded from the upgrade server according to the influence factor includes:
determining a preset target influence factor, and comparing the influence factor with the target influence factor;
and when the comparison result is that the influence factor is lower than the target influence factor, determining to acquire a target missing file corresponding to the file to be upgraded from the upgrading server.
4. A method according to claim 3, wherein if the comparison result is that the influence factor is higher than the target influence factor, the method further comprises:
generating a target upgrade file acquisition request of the target upgrade file, and sending the target upgrade file request to the upgrade server;
and receiving a target upgrade file acquisition request aiming at the target upgrade file by the upgrade server, and returning the target upgrade file.
5. The method of claim 3, wherein obtaining, from the upgrade server, a target missing file corresponding to the file to be upgraded, comprises:
generating a missing file acquisition request according to the file to be upgraded, and sending the missing file acquisition request to an upgrade server, wherein the upgrade server is used for analyzing the missing file acquisition request and transmitting the target missing file to the current vehicle according to an analysis result;
and receiving the target missing file transmitted by the upgrade server.
6. The method of claim 1, wherein prior to upgrading the electronic control unit based on the target upgrade file, the method further comprises:
acquiring a verification value of the target upgrade file;
and verifying the integrity of the target upgrade file according to the verification value and a verification value corresponding to the target upgrade file, wherein the verification value is determined by an upgrade server according to the target upgrade file.
7. The method according to claim 1, wherein the method further comprises:
after upgrading according to the target upgrading file, determining a system stability score of the electronic control unit;
and if the system stability score is lower than the target stability score, performing version rollback on the electronic control unit.
8. An upgrade apparatus for an electronic control unit, said apparatus comprising:
the detection module is used for monitoring the upgrading state of the electronic control unit in the current vehicle;
if the upgrading state of the electronic control unit is monitored to be an abnormal state, determining a file to be upgraded corresponding to the electronic control unit;
the verification module is used for verifying the integrity of the file to be upgraded, if the file to be upgraded is a missing file, determining an upgrading task corresponding to the file to be upgraded, and determining an influence factor corresponding to the file to be upgraded based on the upgrading task;
the upgrading module is used for determining whether to obtain a target missing file corresponding to the file to be upgraded from an upgrading server according to the influence factors;
if the target missing file corresponding to the file to be upgraded is obtained from the upgrading server, determining a target upgrading file according to the file to be upgraded and the target missing file, and upgrading the electronic control unit based on the target upgrading file.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 7 when the computer program is executed.
10. A storage medium storing a computer program, which when executed by a processor performs the steps of the method according to any one of claims 1 to 7.
CN202311422674.6A 2023-10-30 2023-10-30 Upgrade method and device for electronic control unit, electronic equipment and storage medium Pending CN117544648A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311422674.6A CN117544648A (en) 2023-10-30 2023-10-30 Upgrade method and device for electronic control unit, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311422674.6A CN117544648A (en) 2023-10-30 2023-10-30 Upgrade method and device for electronic control unit, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117544648A true CN117544648A (en) 2024-02-09

Family

ID=89792843

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311422674.6A Pending CN117544648A (en) 2023-10-30 2023-10-30 Upgrade method and device for electronic control unit, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117544648A (en)

Similar Documents

Publication Publication Date Title
CN105278994A (en) Updating method and updating system for vehicle-mounted ECU software
CN110017082B (en) Train door opening and closing control method, device and system
CN110673576A (en) Automatic test method and device, vehicle and storage medium
US11935341B2 (en) Data storage device and non-transitory tangible computer readable storage medium
US9569404B2 (en) In-vehicle controller and non-transitory tangible computer readable medium
CN113497819A (en) Remote upgrade security guarantee method and system and vehicle-mounted Tbox equipment
CN113050960B (en) OTA upgrading method and device, vehicle-mounted terminal and storage medium
CN109922079B (en) Service agent method and device based on block chain
CN116028092A (en) Method, device, equipment and storage medium for fusing automobile OTA upgrading task
CN111857774A (en) Method and system for upgrading software of vehicle-mounted equipment
CN117544648A (en) Upgrade method and device for electronic control unit, electronic equipment and storage medium
CN113037850A (en) Application program upgrading method and device, electronic equipment and storage medium
CN117950702A (en) OTA upgrading sequence determining method and device for vehicle parts, electronic equipment and medium
CN117234560A (en) Remote upgrading method and device for automobile
CN117081925A (en) Upgrade data transmission method and device, electronic equipment and storage medium
CN115384536A (en) Evaluation method, device, equipment and medium for driving assistance system controller
CN115731653A (en) Shared vehicle, control method and control device thereof
CN113791800A (en) Automatic parking control module remote upgrading method and system and automobile
CN114253568A (en) Application program upgrading method, device and equipment
CN117014505A (en) Message processing method and device, electronic equipment and storage medium
CN118259939B (en) Electronic control unit upgrading method and device, vehicle terminal and storage medium
US12143363B2 (en) CANBUS cybersecurity firewall
US20230179570A1 (en) Canbus cybersecurity firewall
CN118227163A (en) Upgrade method and device for electronic control unit, electronic equipment and storage medium
CN117270923A (en) Data processing method and device, electronic equipment 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