WO2022017125A1 - 程序刷写方法、装置、车辆及存储介质 - Google Patents

程序刷写方法、装置、车辆及存储介质 Download PDF

Info

Publication number
WO2022017125A1
WO2022017125A1 PCT/CN2021/102614 CN2021102614W WO2022017125A1 WO 2022017125 A1 WO2022017125 A1 WO 2022017125A1 CN 2021102614 W CN2021102614 W CN 2021102614W WO 2022017125 A1 WO2022017125 A1 WO 2022017125A1
Authority
WO
WIPO (PCT)
Prior art keywords
diagnostic
diagnostic identifier
identifier
controller
target
Prior art date
Application number
PCT/CN2021/102614
Other languages
English (en)
French (fr)
Inventor
姜珊
许凯程
孙忠刚
张晓谦
Original Assignee
中国第一汽车股份有限公司
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 中国第一汽车股份有限公司 filed Critical 中国第一汽车股份有限公司
Publication of WO2022017125A1 publication Critical patent/WO2022017125A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/577Assessing vulnerabilities and evaluating computer system security

Definitions

  • the present application relates to the technical field of data processing, for example, to a program flashing method, device, vehicle and storage medium.
  • ECU Electronic Control Unit
  • the way to solve the above problem is to sequentially assign the IDs of multiple cluster ECUs through the input/output (I/O) line in a master-slave structure, or, in a distributed deployment structure, specify the master ECU , and multiple operations are initiated by the main ECU, but both methods have limitations.
  • a program flashing method including:
  • the controller selects the target diagnostic identifier from the diagnostic identifier pool
  • the controller verifies the security of the target diagnostic identifier
  • the controller performs program flashing based on the target diagnostic identifier.
  • program flashing device comprising:
  • a verification module configured to verify the security of the target diagnostic identifier
  • the flashing module is configured to perform program flashing based on the target diagnostic identifier when the security check of the target diagnostic identifier is passed.
  • a vehicle is also provided.
  • the vehicle includes a memory, a controller, and a computer program stored in the memory and running on the controller.
  • the controller executes the computer program, the above-mentioned program flashing method is implemented.
  • a computer-readable storage medium is also provided, on which a computer program is stored, and when the computer program is executed by the controller, the above-mentioned program flashing method is implemented.
  • FIG. 1 is a flowchart of a method for flashing a program provided by an embodiment of the present application
  • FIG. 3 is a flowchart of another program flashing method provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a program flashing device according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a vehicle according to an embodiment of the present application.
  • words such as “optionally” or “exemplarily” are used to represent examples, illustrations or illustrations.
  • the use of words such as “optionally” or “exemplarily” is intended to present the related concepts in a specific manner.
  • FIG. 1 is a flowchart of a program flashing method provided by an embodiment of the present application. The method can be applied to a vehicle to solve the management and flashing problems of different software programs under the same ECU hardware. As shown in Figure 1, the method includes:
  • the controller selects a target diagnostic identifier from a diagnostic identifier pool.
  • the above-mentioned controller can be a controller in a vehicle, and a plurality of diagnostic marks designed in advance by software are stored in the diagnostic identification pool, and the controller can select a diagnostic identification as the target diagnosis from a plurality of diagnostic identifications in the designed diagnostic identification pool. Flag, used to make changes to the previous diagnostic flag.
  • the controller verifies the security of the target diagnostic identifier.
  • the controller determines the target diagnostic identifier based on the above step S101, the security of the target diagnostic identifier can be verified.
  • the embodiment of the present application provides a verification method in which the diagnostic instrument on the vehicle sends the first frame of diagnostic message to the controller based on the diagnostic identifier in the diagnostic identifier pool, and the controller receives the first frame of the diagnostic message. After the message is sent, it is judged whether the diagnostic identifier corresponding to the sent message is the same as the target diagnostic identifier, that is, the security of the target diagnostic identifier is verified by judging whether the diagnostic instrument sends the first frame of diagnostic message through the selected target diagnostic identifier.
  • the controller performs program flashing based on the target diagnostic identifier.
  • the controller determines that the security check of the target diagnostic identifier has passed. Furthermore, program flashing may be performed based on the target diagnostic identifier.
  • the program flashing process can use the flashing process in related technologies, for example, first diagnose whether the service identifier (Service Identifier, SID) 0x27 security access is passed, and in the case that the SID 0x27 security confirmation is passed, determine whether the SID 0x31 check is passed. , if the SID 0x31 verification is passed, the security confirmation is passed, and the program is flashed.
  • SID Service Identifier
  • the security confirmation fails, and the selected target diagnostic identifier fails to change.
  • the safety confirmation flag can be set to indicate that the diagnostic flag has been changed successfully. In this way, the safety confirmation flag can be judged after the power is turned on again.
  • program flashing can be performed directly according to the previously selected target diagnostic identifier, that is, the solution provided by the embodiment of the present application can permanently use the target diagnostic identifier after the security check has passed.
  • the diagnostic flag can be changed in the same way as above, and the program can be flashed.
  • An embodiment of the present application provides a program flashing method.
  • the method includes that a controller selects a target diagnostic identifier from a diagnostic identifier pool, and the controller verifies the security of the target diagnostic identifier. If the security of the target diagnostic identifier is verified Through, the controller performs program flashing based on the target diagnostic identification. In this way, a safety confirmation step is added in the process of changing the diagnosis mark. Only in the case of safety confirmation, the target diagnosis mark can be allocated in the pre-designed diagnosis mark pool and used for a long time. On the basis of ensuring the universality of the ECU, the safety is improved. sex.
  • the method for the controller to select the target diagnostic identifier from the diagnostic identifier pool in the above step S101 may be that the controller obtains the external hard-wired signal, and according to the correspondence between the external hard-wired signal and the diagnostic identifier, selects the target diagnostic identifier from the Select the target diagnostic ID corresponding to the external hard-wired signal from the diagnostic ID pool.
  • an IO signal or an analog-to-digital (Analog-to-Digital, AD) signal can be used to trigger the selection of the diagnostic marker, and both of these two external hard-wired signals can use a simple circuit to adjust the signal level, which can be implemented as the same ECU
  • the hardware assigns different diagnostic identifiers, which has the advantage of being simple to implement.
  • X nodes can be set on the CAN bus to select the same specification hardware, and the AD should have sufficient accuracy to judge the X levels.
  • the CAN bus BootLoader of any type of ECU can realize the change and selection of the diagnostic identifier. .
  • the diagnostic identifiers in the designed diagnostic identifier pool are 0x7AA, 0x7BB, and 0x7CC
  • 2 IOs are reserved for hard-wired signal triggering, where 00 means no triggering, 01 means triggering 0x7AA, 10 means triggering 0x7BB, and 11 means triggering 0x7CC.
  • the controller After the controller is powered on, it detects the external hard-wired trigger, and selects the corresponding diagnostic identifier according to the correspondence between the external hard-wired signal and the diagnostic identifier.
  • an implementation manner may also be provided, including:
  • This step can be understood as determining the diagnostic identifiers in the diagnostic identifier pool before acquiring the diagnostic identifiers in the diagnostic identifier pool, for example, updating the identifiers in the diagnostic identifier pool according to the actual needs of the node and so on.
  • the controller can acquire the replacement diagnostic identifier, and update the diagnostic identifier in the diagnostic identifier pool according to the replacement diagnostic identifier. This expands the range of optional diagnostic identifiers and improves versatility.
  • the controller can obtain 4 replacement diagnostic IDs, and replace the diagnostic IDs in the diagnostic ID pool with the diagnostic IDs Update, so as to ensure that each of the 8 nodes corresponds to a different diagnostic identifier.
  • the above-mentioned replacement diagnostic identifier may be a human-input diagnostic identifier.
  • an implementation manner may also be provided, including:
  • the controller can use a verification algorithm to verify the diagnostic identifiers in the diagnostic identifier pool, and the verification algorithm can be any verification algorithm in the related art. For example, if the memory stores the sum of all diagnostic identifiers in the diagnostic identifier pool, then during verification, all diagnostic identifiers in the diagnostic identifier pool can be added, and the obtained sum is compared with the stored sum of all diagnostic identifiers, If the two sums are consistent, the verification is passed, and if they are inconsistent, the diagnostic ID in the diagnostic ID pool has been changed, posing a security risk.
  • the verification algorithm can be any verification algorithm in the related art. For example, if the memory stores the sum of all diagnostic identifiers in the diagnostic identifier pool, then during verification, all diagnostic identifiers in the diagnostic identifier pool can be added, and the obtained sum is compared with the stored sum of all diagnostic identifiers, If the two sums are consistent, the verification is passed, and if they are inconsistent, the diagnostic ID in the diagnostic ID pool has been changed
  • the diagnostic identifier pool is verified first, and such a double verification method can effectively ensure security.
  • FIG. 4 is a schematic structural diagram of a program flashing device provided by an embodiment of the present application.
  • the device includes: a selection module 401, a verification module 402, and a flashing module 403; wherein, the selection module is set to be from Select the target diagnostic ID from the diagnostic ID pool; the verification module is set to verify the security of the target diagnostic ID; the flash module is set to execute the program based on the target diagnostic ID if the security check of the target diagnostic ID passes. flash.
  • the above-mentioned selection module 401 is configured to obtain the external hard-wired signal, and select the target diagnosis corresponding to the external hard-wired signal from the diagnostic identifier pool according to the correspondence between the external hard-wired signal and the diagnostic identifier. logo.
  • the above verification module 402 may include a receiving unit and a verification unit; wherein, the receiving unit is configured to receive the first frame diagnostic message; the verifying unit is configured to determine the corresponding diagnostic message of the first frame Whether the diagnostic ID is the same as the target diagnostic ID.
  • the verification unit may determine that the security verification of the target diagnostic identifier has passed.
  • the above-mentioned device may also include a determination module; the determination module may be configured to determine the diagnostic identifiers in the diagnostic identifier pool, for example, the determination module may obtain replacement diagnostic identifiers, and according to the replacement diagnostic identifiers, check the diagnostic identifiers in the diagnostic identifier pool. to update.
  • the determination module may be configured to determine the diagnostic identifiers in the diagnostic identifier pool, for example, the determination module may obtain replacement diagnostic identifiers, and according to the replacement diagnostic identifiers, check the diagnostic identifiers in the diagnostic identifier pool. to update.
  • the above verification module 402 may also be configured to verify the diagnostic identifier in the diagnostic pool through a verification algorithm.
  • the above-mentioned program flashing device can implement the program flashing method provided in FIG. 1 , FIG. 2 and FIG. 3 , and has the corresponding devices and effects in this embodiment.
  • FIG. 5 is a schematic structural diagram of a vehicle according to an embodiment of the application.
  • the vehicle includes a controller 501, a memory 502, an input device 503, and an output device 504; the number of controllers 501 in the vehicle may be one
  • One controller 501 is taken as an example in FIG. 5 ; the controller 501 , the memory 502 , the input device 503 and the output device 504 in the vehicle can be connected through a bus or other means, and the connection through a bus is taken as an example in FIG. 5 .
  • the memory 502 can be configured to store software programs, computer-executable programs and modules, such as program instructions/modules (for example, program instructions/modules corresponding to the program flashing methods in FIG. 1 , FIG. 2 , and FIG. 3 ).
  • the controller 501 executes various functional applications and data processing of the vehicle by running the software programs, instructions and modules stored in the memory 502 , that is, implements the above-mentioned program flashing method.
  • the memory 502 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Additionally, memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 502 may include memory located remotely from the controller 501, and these remote memories may be connected to the vehicle/terminal/server through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the input device 503 may be configured to receive input numerical or character information, and to generate key signal input related to user settings and function control of the vehicle.
  • the output device 504 may include a display screen or the like to display the vehicle.
  • Embodiments of the present application also provide a storage medium containing computer-executable instructions, where the computer-executable instructions are used to execute a program flashing method when executed by a computer controller, and the method includes:
  • the controller selects the target diagnostic identifier from the diagnostic identifier pool; the controller verifies the security of the target diagnostic identifier; if the security verification of the target diagnostic identifier passes, the controller performs program flashing based on the target diagnostic identifier.
  • a storage medium containing computer-executable instructions provided by an embodiment of the present application the computer-executable instructions of the computer-executable instructions are not limited to the above-mentioned method operations, and can also execute related program flashing methods provided by any embodiment of the present application. operate.
  • the present application can be implemented by software and necessary general-purpose hardware, and can also be implemented by hardware.
  • the technical solution of the present application can be embodied in the form of a software product in essence, and the computer software product can be stored in a computer-readable storage medium, such as a floppy disk of a computer, a read-only memory (Read-Only Memory, ROM), a random access A memory (Random Access Memory, RAM), a flash memory (FLASH), a hard disk or an optical disk, etc., including multiple instructions to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to implement the embodiments of the present application.
  • a computer-readable storage medium such as a floppy disk of a computer, a read-only memory (Read-Only Memory, ROM), a random access A memory (Random Access Memory, RAM), a flash memory (FLASH), a hard disk or an optical disk, etc.

Abstract

一种程序刷写方法、装置、车辆及存储介质。该程序刷写方法:包括控制器从诊断标识池中选择目标诊断标识(S101);控制器对目标诊断标识的安全性进行校验(S102);在目标诊断标识的安全性校验通过的情况下,控制器基于目标诊断标识进行程序刷写(S103)。

Description

程序刷写方法、装置、车辆及存储介质
本申请要求在2020年07月22日提交中国专利局、申请号为202010712372.2的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据处理技术领域,例如涉及一种程序刷写方法、装置、车辆及存储介质。
背景技术
在车辆软件功能控制领域,电子控制单元(Electronic Control Unit,ECU)常有两种部署方式,一种是将相同或相近功能的ECU以分布式网络方式布局,使用多个相同的ECU硬件,基于不同的软件共同实现一项功能;另一种是将运算功能强大的ECU和实际操作被控对象的控制板分别设置,ECU采用通用的硬件设计方案,烧录不同的软件程序实现不同的功能。
上述两种部署方式都可能会出现控制器局域网络(Controller Area Network,CAN)总线中,多个硬件节点的ECU完全一致的情况,而CAN总线规范要求节点诊断标识(Identity,ID)不能重复。因此,在上述两种部署方式中,对多个硬件节点对应的诊断ID的引导装载程序(Bootloader)的开发和管理存在较大的困难。例如,针对相同硬件规格的ECU,需要根据多个节点的诊断ID,开发多套Bootloader,软件配置管理和版本管理的难度都比较大;或者,在刷写一节点ECU时,只选择烧录有对应Bootloader的硬件节点,使得硬件规格相同的ECU,在烧录Bootloader后成为不同的零部件,储备、更换备用硬件的成本和难度较大,这样使得控制器的通用性降低。
解决上述问题的方式是按照主从结构的方式通过输入输出(Input/Output,I/O)线依次对多个丛属ECU的ID进行分配,或者,在分布式部署的结构中,指定主ECU,由主ECU发起多项操作,但这两种方式均存在局限性。
发明内容
提供了一种程序刷写方法,包括:
控制器从诊断标识池中选择目标诊断标识;
所述控制器对所述目标诊断标识的安全性进行校验;
在所述目标诊断标识的安全性校验通过的情况下,所述控制器基于所述目 标诊断标识进行程序刷写。
还提供了一种程序刷写装置,该装置包括:
选择模块,设置为从诊断标识池中选择目标诊断标识;
校验模块,设置为对所述目标诊断标识的安全性进行校验;
刷写模块,设置为在所述目标诊断标识的安全性校验通过的情况下,基于所述目标诊断标识进行程序刷写。
还提供了一种车辆,该车辆包括存储器、控制器及存储在存储器上并可在控制器上运行的计算机程序,当控制器执行计算机程序时,实现上述的程序刷写方法。
还提供了一种计算机可读存储介质,其上存储有计算机程序,在计算机程序被控制器执行时,实现上述的程序刷写方法。
附图说明
图1为本申请实施例提供的一种程序刷写方法流程图;
图2为本申请实施例提供的另一种程序刷写方法流程图;
图3为本申请实施例提供的另一种程序刷写方法流程图;
图4为本申请实施例提供的一种程序刷写装置结构示意图;
图5为本申请实施例提供的一种车辆的结构示意图。
具体实施方式
下面结合附图和实施例对本申请进行说明。
在本申请实施例中,“可选地”或者“示例性地”等词用于表示作例子、例证或说明。使用“可选地”或者“示例性地”等词旨在以具体方式呈现相关概念。
图1为本申请实施例提供的一种程序刷写方法流程图,该方法可以应用于车辆中,用于解决在相同ECU硬件情况下,不同软件程序的管理和刷写问题。如图1所示,该方法包括:
S101、控制器从诊断标识池中选择目标诊断标识。
上述控制器可以为车辆中的控制器,诊断标识池中存储有多个预先通过软件设计的诊断标识,控制器可以从设计的诊断标识池中的多个诊断标识中选择一个诊断标识作为目标诊断标识,用于对之前的诊断标识进行变更。
S102、控制器对目标诊断标识的安全性进行校验。
控制器基于上述步骤S101确定目标诊断标识后,可以对该目标诊断标识的安全性进行校验。
示例性地,本申请实施例提供了一种校验方式可以为车辆上的诊断仪基于诊断标识池中的诊断标识向控制器发送第一帧诊断报文,控制器接收到第一帧诊断报文后,判断发送该报文对应的诊断标识与目标诊断标识是否相同,即通过判断诊断仪是否通过选择的目标诊断标识发送第一帧诊断报文对目标诊断标识的安全性进行校验。
S103、若目标诊断标识的安全性校验通过,控制器基于目标诊断标识进行程序刷写。
在控制器判断诊断仪发送的第一帧诊断报文对应的诊断标识与目标诊断标识相同的情况下,控制器确定目标诊断标识的安全性校验通过。进而,可以基于该目标诊断标识进行程序刷写。该程序刷写过程可以采用相关技术中的刷写流程,例如,首先诊断服务标识(Service Identifier,SID)0x27安全访问是否通过,在SID 0x27安全确认通过的情况下,判断SID 0x31校验是否通过,若SID 0x31校验通过,则安全确认通过,进行程序刷写。若SID 0x27和SID 0x31任意一个校验未通过,则安全确认不通过,选择的目标诊断标识变更失败。在目标诊断标识、程序刷写校验通过的情况下,可以置位安全确认标志位,表示诊断标识变更成功,这样在再次上电后可以对安全确认标志位进行判断,在有安全确认标识时,可以根据之前选择的目标诊断标识直接进行程序刷写,即本申请实施例提供的方案可以长期固定使用安全校验通过后的目标诊断标识。
在再次检测到有外部硬线信号触发的情况下,可以以上述相同的方式变更诊断标识,并进行程序刷写。
本申请实施例提供了一种程序刷写方法,该方法包括控制器从诊断标识池中选择目标诊断标识,控制器对目标诊断标识的安全性进行校验,若目标诊断标识的安全性校验通过,控制器基于目标诊断标识进行程序刷写。这样在诊断标识变更过程中增加安全确认步骤,仅能在安全确认的情况下,在预先设计的诊断标识池中分配目标诊断标识并固定长期使用,在保证ECU通用性的基础上,提高了安全性。
在一种示例中,上述步骤S101中控制器从诊断标识池中选择目标诊断标识的方式可以为,控制器获取外部硬线信号,并根据外部硬线信号与诊断标识之间的对应关系,从诊断标识池中选择与外部硬线信号对应的目标诊断标识。
示例性地,可以选用IO信号或模拟数字(Analog-to-Digital,AD)信号触 发选择诊断标识,这两种外部硬线信号都可以采用简单的电路调整信号电平,即可实现为相同ECU硬件分配不同的诊断标识,具有实现简单的优势。
在使用IO信号触发选择诊断标识时,可以在CAN总线设置X个节点选用同样规格硬件,并预留N个IO用于触发选择诊断标识,其中,X、N均为大于0的整数,且满足如下条件:
2 N-1<X<2 N
在使用AD信号触发选择诊断标识时,可以在CAN总线上设置X个节点选用同样规格硬件,AD应有足够精度判断X个电平。
也可以采用其他方式触发选择诊断标识,本申请实施例对此不作限定。
通过这样的实现方式在不局限于具有主从结构的控制器系统的前提下,不需要仅由主控制器发起诊断标识变更选择,任何类型ECU的CAN总线BootLoader均可以实现诊断标识的变更与选择。
下面以使用IO信号触发选择诊断标识为例对上述实现方式进行说明。
假设设计的诊断标识池中的诊断标识为0x7AA、0x7BB、0x7CC,预留2个IO进行硬线信号触发,其中,00表示无触发,01表示触发0x7AA,10表示触发0x7BB,11表示触发0x7CC。控制器上电后检测外部硬线触发,并根据外部硬线信号与诊断标识之间的对应关系选择对应的诊断标识。
如图2所示,在一种示例中,在上述步骤S101之前,还可以提供一种实现方式包括:
S1010、确定诊断标识池中的诊断标识。
该步骤可以理解为在获取诊断标识池中的诊断标识之前,对诊断标识池中的诊断标识做确定,例如,根据节点实际需要对诊断标识池中的标识进行更新等等。该实现方式可以为控制器获取替换诊断标识,并根据替换诊断标识对诊断标识池中的诊断标识进行更新。这样可以扩大可选诊断标识的范围,提高通用性。
比如,假设存在8个节点,诊断标识池中有4个诊断标识,其中,必然存在部分节点的诊断标识相同,那么控制器可以获取4个替换诊断标识,并将诊断标识池中的诊断标识替换更新,从而可以确保8个节点各自对应不同的诊断标识。上述替换诊断标识可以为人为输入的诊断标识。
如图3所示,在一种示例中,在上述步骤S101之前,还可以提供一种实现方式包括:
S1011、对诊断标识池中的诊断标识进行校验。
控制器可以采用校验算法对诊断标识池中的诊断标识进行校验,该校验算法可以为相关技术中的任意校验算法。例如,假设存储器中存储有诊断标识池中所有诊断标识的和,那么在校验时可以对诊断标识池中所有诊断标识进行相加,将得到的和与存储的所有诊断标识的和进行比较,若两个和一致,表示校验通过,若不一致表示诊断标识池中的诊断标识被更改,存在安全风险。
通过这样的方式,在对诊断标识池中的目标诊断标识校验之前,先对诊断标识池进行校验,这样的双重校验方式可以有效保证安全性。
图4为本申请实施例提供的一种程序刷写装置结构示意图,如图4所示,该装置包括:选择模块401、校验模块402、刷写模块403;其中,选择模块,设置为从诊断标识池中选择目标诊断标识;校验模块,设置为对目标诊断标识的安全性进行校验;刷写模块,设置为若目标诊断标识的安全性校验通过,则基于目标诊断标识进行程序刷写。
在一种示例中,上述选择模块401,是设置为获取外部硬线信号,并根据外部硬线信号与诊断标识之间的对应关系,从诊断标识池中选择与外部硬线信号对应的目标诊断标识。
在一种示例中,上述校验模块402可以包括接收单元和校验单元;其中,接收单元,设置为接收第一帧诊断报文;校验单元,设置为判断第一帧诊断报文对应的诊断标识与目标诊断标识是否相同。
示例性地,若第一帧诊断报文对应的诊断标识与目标诊断标识相同,则校验单元可以确定目标诊断标识的安全性校验通过。
可选地,上述装置还可以包括确定模块;确定模块,可以设置为确定诊断标识池中的诊断标识,例如,确定模块可以获取替换诊断标识,并根据替换诊断标识对诊断标识池中的诊断标识进行更新。
在一种示例中,上述校验模块402还可以设置为通过校验算法对诊断池中的诊断标识进行校验。
上述程序刷写装置可以实现图1、图2和图3所提供的程序刷写方法,具备该实施例中相应的器件和效果。
图5为本申请实施例提供的一种车辆的结构示意图,如图5所示,该车辆包括控制器501、存储器502、输入装置503和输出装置504;车辆中控制器501的数量可以是一个或多个,图5中以一个控制器501为例;车辆中的控制器501、存储器502、输入装置503和输出装置504可以通过总线或其他方式连接,图5中以通过总线连接为例。
存储器502作为一种计算机可读存储介质,可设置为存储软件程序、计算 机可执行程序以及模块,如图1、图2和图3中的程序刷写方法对应的程序指令/模块(例如,程序刷写装置中的选择模块401、校验模块402、刷写模块403)。控制器501通过运行存储在存储器502中的软件程序、指令以及模块,从而执行车辆的多种功能应用以及数据处理,即实现上述的程序刷写方法。
存储器502可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端的使用所创建的数据等。此外,存储器502可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实例中,存储器502可包括相对于控制器501远程设置的存储器,这些远程存储器可以通过网络连接至车辆/终端/服务器。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
输入装置503可设置为接收输入的数字或字符信息,以及产生与车辆的用户设置以及功能控制有关的键信号输入。输出装置504可包括显示屏等显示车辆。
本申请实施例还提供一种包含计算机可执行指令的存储介质,该计算机可执行指令在由计算机控制器执行时用于执行一种程序刷写方法,该方法包括:
控制器从诊断标识池中选择目标诊断标识;控制器对目标诊断标识的安全性进行校验;若目标诊断标识的安全性校验通过,控制器基于目标诊断标识进行程序刷写。
本申请实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的方法操作,还可以执行本申请任意实施例所提供的程序刷写方法中的相关操作。
通过以上关于实施方式的描述,本申请可借助软件及必需的通用硬件来实现,也可以通过硬件实现。本申请的技术方案本质上可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如计算机的软盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、闪存(FLASH)、硬盘或光盘等,包括多个指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)实现本申请实施例所述的方法。

Claims (10)

  1. 一种程序刷写方法,包括:
    控制器从诊断标识池中选择目标诊断标识;
    所述控制器对所述目标诊断标识的安全性进行校验;
    在所述目标诊断标识的安全性校验通过的情况下,所述控制器基于所述目标诊断标识进行程序刷写。
  2. 根据权利要求1所述的方法,其中,所述控制器从诊断标识池中选择目标诊断标识,包括:
    所述控制器获取外部硬线信号;
    所述控制器根据所述外部硬线信号与诊断标识之间的对应关系,从所述诊断标识池中选择与所述外部硬线信号对应的目标诊断标识。
  3. 根据权利要求2所述的方法,其中,所述控制器对所述目标诊断标识的安全性进行校验,包括:
    所述控制器接收第一帧诊断报文;
    所述控制器判断所述第一帧诊断报文对应的诊断标识与所述目标诊断标识是否相同。
  4. 根据权利要求3所述的方法,其中,所述目标诊断标识的安全性校验通过,包括:
    在所述第一帧诊断报文对应的诊断标识与所述目标诊断标识相同的情况下,所述控制器确定所述目标诊断标识的安全性校验通过。
  5. 根据权利要求1-4任一项所述的方法,在所述控制器从诊断标识池中选择目标诊断标识之前,还包括:
    确定所述诊断标识池中的诊断标识;
    或者,对所述诊断标识池中的诊断标识进行校验。
  6. 根据权利要求5所述的方法,其中,所述确定所述诊断标识池中的诊断标识,包括:
    所述控制器获取替换诊断标识;
    所述控制器根据所述替换诊断标识对所述诊断标识池中的诊断标识进行更新。
  7. 根据权利要求5所述的方法,其中,所述对所述诊断标识池中的诊断标识进行校验,包括:
    通过校验算法对所述诊断标识池中的诊断标识进行校验。
  8. 一种程序刷写装置,包括:
    选择模块,设置为从诊断标识池中选择目标诊断标识;
    校验模块,设置为对所述目标诊断标识的安全性进行校验;
    刷写模块,设置为在所述目标诊断标识的安全性校验通过的情况下,基于所述目标诊断标识进行程序刷写。
  9. 一种车辆,包括存储器、控制器及存储在所述存储器上并可在所述控制器上运行的计算机程序,所述控制器执行所述计算机程序时,实现如权利要求1-7任一项所述的程序刷写方法。
  10. 一种计算机可读存储介质,存储有计算机程序,其中,所述计算机程序被处理控制器执行时,实现如权利要求1-7任一项所述的程序刷写方法。
PCT/CN2021/102614 2020-07-22 2021-06-28 程序刷写方法、装置、车辆及存储介质 WO2022017125A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010712372.2A CN111857755A (zh) 2020-07-22 2020-07-22 程序刷写方法、装置、车辆及存储介质
CN202010712372.2 2020-07-22

Publications (1)

Publication Number Publication Date
WO2022017125A1 true WO2022017125A1 (zh) 2022-01-27

Family

ID=72949232

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/102614 WO2022017125A1 (zh) 2020-07-22 2021-06-28 程序刷写方法、装置、车辆及存储介质

Country Status (2)

Country Link
CN (1) CN111857755A (zh)
WO (1) WO2022017125A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114706599A (zh) * 2022-03-07 2022-07-05 武汉科技大学 一种车载ecu控制器多通道并行刷写的方法
CN115933591A (zh) * 2022-11-30 2023-04-07 中国第一汽车股份有限公司 一种控制器诊断方法、装置、设备和存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857755A (zh) * 2020-07-22 2020-10-30 中国第一汽车股份有限公司 程序刷写方法、装置、车辆及存储介质
CN114625106A (zh) * 2022-03-07 2022-06-14 深圳市元征科技股份有限公司 车辆诊断的方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053569A (zh) * 2010-12-13 2011-05-11 普华基础软件股份有限公司 用于汽车电子控制器的自刷新方法及其装置
CN109976770A (zh) * 2019-03-22 2019-07-05 深圳市元征科技股份有限公司 一种ecu刷写方法、系统及相关设备
CN110474961A (zh) * 2019-07-14 2019-11-19 江苏开沃汽车有限公司 纯电乘用车基于can总线实现多路远程ota升级方法
US20200110595A1 (en) * 2014-06-10 2020-04-09 Arm Ip Limited Method and device for updating software executed from non-volatile memory
CN111857755A (zh) * 2020-07-22 2020-10-30 中国第一汽车股份有限公司 程序刷写方法、装置、车辆及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053569A (zh) * 2010-12-13 2011-05-11 普华基础软件股份有限公司 用于汽车电子控制器的自刷新方法及其装置
US20200110595A1 (en) * 2014-06-10 2020-04-09 Arm Ip Limited Method and device for updating software executed from non-volatile memory
CN109976770A (zh) * 2019-03-22 2019-07-05 深圳市元征科技股份有限公司 一种ecu刷写方法、系统及相关设备
CN110474961A (zh) * 2019-07-14 2019-11-19 江苏开沃汽车有限公司 纯电乘用车基于can总线实现多路远程ota升级方法
CN111857755A (zh) * 2020-07-22 2020-10-30 中国第一汽车股份有限公司 程序刷写方法、装置、车辆及存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114706599A (zh) * 2022-03-07 2022-07-05 武汉科技大学 一种车载ecu控制器多通道并行刷写的方法
CN115933591A (zh) * 2022-11-30 2023-04-07 中国第一汽车股份有限公司 一种控制器诊断方法、装置、设备和存储介质

Also Published As

Publication number Publication date
CN111857755A (zh) 2020-10-30

Similar Documents

Publication Publication Date Title
WO2022017125A1 (zh) 程序刷写方法、装置、车辆及存储介质
CN107729757A (zh) 软件更新之前的软件认证
CN111381844A (zh) 更新车辆ecu固件的方法及装置
CN110673881B (zh) 微服务集群的配置管理方法、装置和计算机设备
JP2019159401A (ja) 車両制御システム及び車両制御システムにおけるソフトウェアの整合性確認方法
TW201318308A (zh) 分散式電池管理系統及其標識分配方法
CN111065090A (zh) 一种建立网络连接的方法及无线路由设备
CN111918263A (zh) 蓝牙连接方法、装置及物联网设备
CN109375953B (zh) 一种操作系统启动方法及装置
CN113872951B (zh) 混合云安全策略下发方法、装置、电子设备和存储介质
JP2024040359A (ja) 更新データを配信するサーバ、更新データの配信方法及び配信プログラム、ソフトウェア更新システム
CN110392012B (zh) 轻量级机器到机器系统中重新引导的方法和装置
JP5868563B1 (ja) 分散型制御システム用制御機器及びユニット
JP2015210669A (ja) プログラム書き換え方法
JP7356601B1 (ja) 新型ポータブルプログラムアップグレード方法
CN116431186A (zh) 一种车载ecu的升级方法、装置及介质
CN112925546B (zh) 一种防止车载ecu刷新出错的多级校验方法及系统
CN113783863B (zh) 一种写号方法及系统
JP2017044483A (ja) 車両用電子制御装置
CN115225481A (zh) 网关诊断路由配置方法、装置、车载网关、车辆和介质
CN113672258A (zh) 车辆的系统升级方法、装置、计算机设备和存储介质
CN113254030B (zh) 车载微处理器软件应急刷新方法、装置、存储介质及系统
CN114764379A (zh) 应用软件的访问切换方法、设备和计算机可读存储介质
JP6935694B2 (ja) 電子制御装置
CN101931545A (zh) 一种防火墙重复生产或重复升级的方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21845670

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21845670

Country of ref document: EP

Kind code of ref document: A1