Calibration method and device for electronic control unit, electronic control unit and carrier

Through common communication hardware and spreadsheet files, calibration messages are sent based on a predetermined calibration protocol stack, which solves the problem of complex and high-cost calibration methods of electronic control units in the existing technology, and achieves a simplified and cost-reduced calibration process.

CN117806272BActive Publication Date: 2024-09-27CONTEMPORARY AMPEREX INTELLIGENCE TECHNOLOGY (SHANGHAI) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311645687.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-01
Publication Date
2024-09-27
Estimated Expiration
2043-12-01

AI Technical Summary

Technical Problem

Existing calibration methods for automotive electronic control units use expensive calibration software and dedicated communication hardware, which are complex and costly to operate, making it difficult to achieve a simplified calibration process.

Method used

By using common communication hardware and spreadsheet files, and sending calibration messages based on a predetermined calibration protocol stack, the electronic control unit is calibrated, simplifying the calibration operation process and reducing costs.

Benefits of technology

It realizes the simplification and cost reduction of the calibration process of the electronic control unit, reduces the dependence on specialized software, and improves the convenience and efficiency of calibration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117806272B
    Figure CN117806272B
Patent Text Reader

Abstract

The embodiments of the present application provide a calibration method and device for an electronic control unit, an electronic control unit, and a carrier, which belong to the field of automobile technology. The host computer is connected to the electronic control unit through communication hardware; the communication hardware can communicate based on a first communication protocol; the calibration method of the electronic control unit includes: loading a spreadsheet file; the spreadsheet file is used to store the attributes of at least one calibration variable; based on the spreadsheet file, a calibration message that complies with the first communication protocol is sent to the electronic control unit, so that the electronic control unit executes the calibration command carried by the calibration message based on a predetermined calibration protocol stack to calibrate the electronic control unit; the physical layer of the predetermined calibration protocol stack adopts the first communication protocol. The calibration method and device for an electronic control unit, an electronic control unit, and a carrier provided in the embodiments of the present application can simplify the calibration operation, be more convenient to use, and reduce the cost of calibration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automobile technology, and more specifically, to a calibration method and device for an electronic control unit, an electronic control unit, and a carrier. Background Art

[0002] At present, the parameters of the electronic control unit (ECU) of the automobile are calibrated online by integrating a software protocol stack based on the Controller Area Network (CAN) calibration protocol (CAN Calibration Protocol, CCP) or the Universal Measurement and Calibration Protocol (XCP) developed by the Arbeitskreis zurStandardisierung von Applikationssystemen (ASAP) in the ECU, and using the matching upper computer software (also called "calibration software") that can be used for calibration and the communication hardware for connecting the upper computer and the ECU. The calibration software and communication hardware used in the existing electronic control unit calibration method are expensive, costly, complicated to operate, and inconvenient to use. Summary of the invention

[0003] The present application provides a calibration method and device for an electronic control unit, an electronic control unit, and a carrier to achieve simpler and more convenient calibration of the electronic control unit.

[0004] In a first aspect, an embodiment of the present application provides a calibration method for an electronic control unit, which is applied to a host computer, and is characterized in that the host computer is connected to the electronic control unit through communication hardware; the communication hardware can communicate based on a first communication protocol; the method includes:

[0005] Loading a spreadsheet file; the spreadsheet file is used to store properties of at least one calibration variable;

[0006] Based on the electronic spreadsheet file, a calibration message that complies with the first communication protocol is sent to the electronic control unit, so that the electronic control unit executes the calibration command carried by the calibration message based on a predetermined calibration protocol stack to calibrate the electronic control unit; the physical layer of the predetermined calibration protocol stack adopts the first communication protocol.

[0007] In the above technical solution, the host computer and the electronic control unit are connected through universal communication hardware, and a calibration message is sent to the electronic control unit based on the electronic spreadsheet file by loading a spreadsheet file storing the attributes of at least one calibration variable, so that the electronic control unit executes the calibration command carried by the calibration message based on a predetermined calibration protocol stack to calibrate the electronic control unit. The calibration can be achieved through the spreadsheet file and the predetermined calibration protocol stack, which can simplify the calibration operation and make it more convenient to use. In addition, since the universal communication hardware is low in price and cost-effective, the cost of integrating this type of calibration protocol stack in the electronic control unit is low, and there is no need to use expensive calibration software and dedicated communication hardware, which can greatly reduce the cost of electronic control unit calibration.

[0008] In some embodiments, the sending, based on the electronic spreadsheet file, a calibration message that complies with the first communication protocol to the electronic control unit includes:

[0009] Based on the attribute of the target calibration variable in the electronic spreadsheet file, obtaining an operation code and an operand of a calibration command for calibrating the target calibration variable;

[0010] Based on the first communication protocol, encapsulate the operation code and the operand to generate the calibration message;

[0011] The calibration message is sent to the electronic control unit.

[0012] In the above technical solution, based on the attributes of the target calibration variables stored in the spreadsheet, the operation code and operand of the calibration command are obtained, and based on the first communication protocol, the operation code and operand are encapsulated to generate a calibration message. This can simplify the calibration process and eliminate the very complicated operation of using special calibration software, making the entire calibration process simpler and more convenient.

[0013] In some embodiments, the obtaining, based on the attribute of the target calibration variable in the electronic spreadsheet file, an operation code and an operand of a calibration command for calibrating the target calibration variable comprises:

[0014] In a case where the attributes include a read-write attribute, a component identification number, a unit, a data type, a conversion coefficient, and an address offset, and do not include a virtual mapping attribute, a base set automatic reconstruction attribute, a paged access attribute, and a byte sequence access attribute, determining the operation code based on the read-write attribute, and obtaining the operand based on the unit, the data type, the conversion coefficient, and the address offset;

[0015] In a case where the attributes include read-write attributes, component identification numbers, units, data types, conversion coefficients, address offsets, virtual mapping attributes, base set automatic reconstruction attributes, paging access attributes, and byte sequence access attributes, the operation code is determined based on the read-write attributes, and the operand is obtained based on the units, the data types, the conversion coefficients, the address offsets, the virtual mapping attributes, the base set automatic reconstruction attributes, the paging access attributes, and the byte sequence access attributes.

[0016] In the above technical scheme, by constructing the calibration variables in the NVM calibration mode, the operation code of the calibration instruction is determined based on the read and write attributes of the target tag variable, and the operand of the calibration instruction is obtained based on the unit, data type, conversion coefficient, address offset, virtual mapping attribute, basic set automatic reconstruction attribute, paging access attribute and byte sequence access attribute of the target tag variable. The calibration in the NVM calibration mode can be realized, and the final value of the calibration variable confirmed after the RAM calibration mode can be flushed to the mass-produced products to solidify the product-level calibration value in stages.

[0017] In some embodiments, encapsulating the operation code and the operand based on the first communication protocol to generate the calibration message includes:

[0018] Determine an operation command number field in the calibration message based on the operation code, determine a component identification number field in the calibration message based on the component identification number, determine a data field in the calibration message based on the operand, and determine a frame length field in the calibration message based on the operation code, the component identification number and the operand;

[0019] Based on the first communication protocol, the operation command number field, the component identification number field, the data field and the frame length field are encapsulated to generate the calibration message.

[0020] In some embodiments, before loading the electronic spreadsheet file, the method further includes:

[0021] receiving a first input;

[0022] In response to the first input, the spreadsheet file is generated.

[0023] In some embodiments, before sending a calibration command that complies with the first communication protocol to the electronic control unit based on the electronic spreadsheet file, the method further includes:

[0024] receiving a second input; the second input being used to indicate a type of the communication hardware;

[0025] Based on the type of the communication hardware, the communication hardware is driven.

[0026] In some embodiments, the application layer of the predetermined calibration protocol stack does not use the controller area network calibration protocol and does not use the general measurement and calibration protocol.

[0027] In a second aspect, an embodiment of the present application provides a calibration method for an electronic control unit, which is applied to an electronic control unit, wherein the electronic control unit is connected to a host computer via communication hardware; the communication hardware can communicate based on a first communication protocol; the method comprises:

[0028] Receiving a calibration message that complies with the first communication protocol and is sent by the host computer; the calibration message is sent by the host computer based on an electronic spreadsheet file; the electronic spreadsheet file is used to store attributes of at least one calibration variable;

[0029] Based on a predetermined calibration protocol stack, the calibration command carried in the calibration message is executed to calibrate the electronic control unit; the physical layer of the predetermined calibration protocol stack adopts the first communication protocol.

[0030] In some embodiments, executing the calibration command carried by the calibration message to calibrate the electronic control unit based on a predetermined calibration protocol stack includes:

[0031] Based on the predetermined calibration protocol stack, parsing the calibration message to obtain the calibration command;

[0032] The calibration command is executed to calibrate the electronic control unit.

[0033] In a third aspect, an embodiment of the present application provides a calibration device for an electronic control unit, which is applied to a host computer, wherein the host computer is connected to the electronic control unit via communication hardware; the communication hardware can communicate based on a first communication protocol; the device includes:

[0034] A loading module, used to load a spreadsheet file; the spreadsheet file is used to store the attributes of at least one calibration variable;

[0035] A sending module, configured to send a calibration message conforming to the first communication protocol to the electronic control unit based on the electronic spreadsheet file;

[0036] The calibration message is used to enable the electronic control unit to execute the calibration command carried in the calibration message based on a predetermined calibration protocol stack to calibrate the electronic control unit; the physical layer of the predetermined calibration protocol stack adopts the first communication protocol.

[0037] In some embodiments, the sending module includes:

[0038] an acquisition unit, configured to acquire an operation code and an operand of a calibration command for calibrating the target calibration variable based on the attribute of the target calibration variable in the electronic spreadsheet file;

[0039] A generating unit, configured to encapsulate the operation code and the operand based on the first communication protocol to generate the calibration message;

[0040] A sending unit is used to send the calibration message to the electronic control unit.

[0041] In some embodiments, the acquisition unit is specifically used to:

[0042] In a case where the attributes include a read-write attribute, a component identification number, a unit, a data type, a conversion coefficient, and an address offset, and do not include a virtual mapping attribute, a base set automatic reconstruction attribute, a paged access attribute, and a byte sequence access attribute, determining the operation code based on the read-write attribute, and obtaining the operand based on the unit, the data type, the conversion coefficient, and the address offset;

[0043] In a case where the attributes include read-write attributes, component identification numbers, units, data types, conversion coefficients, address offsets, virtual mapping attributes, base set automatic reconstruction attributes, paging access attributes, and byte sequence access attributes, the operation code is determined based on the read-write attributes, and the operand is obtained based on the units, the data types, the conversion coefficients, the address offsets, the virtual mapping attributes, the base set automatic reconstruction attributes, the paging access attributes, and the byte sequence access attributes.

[0044] In some embodiments, the generating unit is specifically configured to:

[0045] Determine an operation command number field in the calibration message based on the operation code, determine a component identification number field in the calibration message based on the component identification number, determine a data field in the calibration message based on the operand, and determine a frame length field in the calibration message based on the operation code, the component identification number and the operand;

[0046] Based on the first communication protocol, the operation command number field, the component identification number field, the data field and the frame length field are encapsulated to generate the calibration message.

[0047] In some embodiments, the calibration device of the electronic control unit further includes:

[0048] A receiving module, configured to receive a first input;

[0049] A generating module is used to generate the electronic spreadsheet file in response to the first input.

[0050] In some embodiments, the receiving module is further used to receive a second input; the second input is used to indicate the type of the communication hardware;

[0051] The calibration device of the electronic control unit also includes:

[0052] A driver module is used to drive the communication hardware based on the type of the communication hardware.

[0053] In some embodiments, the application layer of the predetermined calibration protocol stack does not use the controller area network calibration protocol and does not use the general measurement and calibration protocol.

[0054] In a fourth aspect, an embodiment of the present application provides a calibration device for an electronic control unit, which is applied to an electronic control unit, wherein the electronic control unit is connected to a host computer via communication hardware; the communication hardware can communicate based on a first communication protocol; the device includes:

[0055] A receiving module, used for receiving a calibration message sent by the host computer and conforming to the first communication protocol; the calibration message is sent by the host computer based on an electronic spreadsheet file; the electronic spreadsheet file is used for storing the attributes of at least one calibration variable;

[0056] An execution module is used to execute the calibration command carried in the calibration message to calibrate the electronic control unit based on a predetermined calibration protocol stack; the physical layer of the predetermined calibration protocol stack adopts the first communication protocol.

[0057] In some embodiments, the execution module includes:

[0058] A parsing unit, configured to parse the calibration message based on the predetermined calibration protocol stack to obtain the calibration command;

[0059] An execution unit is used to execute the calibration command.

[0060] In a fifth aspect, an embodiment of the present application provides an electronic control unit, comprising a calibration device for the electronic control unit as described in the fourth aspect.

[0061] In a sixth aspect, an embodiment of the present application provides a vehicle, characterized in that it includes an electronic control unit as described in the fifth aspect.

[0062] In the seventh aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the calibration method of the electronic control unit as described in the first aspect or the second aspect above is implemented.

[0063] In an eighth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the calibration method of the electronic control unit as described in the first aspect above is implemented.

[0064] In a ninth aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the calibration method of the electronic control unit as described in the first aspect or the second aspect.

[0065] In a tenth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the calibration method of the electronic control unit as described in the first aspect or the second aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0067] Figure 1 A schematic diagram of an application scenario of a calibration method for an electronic control unit provided in some embodiments of the present application;

[0068] Figure 2 One of the flowcharts of the calibration method of the electronic control unit provided in some embodiments of the present application;

[0069] Figure 3 A schematic diagram of the functional architecture of a communication program of a host computer provided in some embodiments of the present application;

[0070] Figure 4 A schematic diagram of a human-machine interface of a host computer provided in some embodiments of the present application;

[0071] Figure 5 A second flowchart of a calibration method for an electronic control unit provided in some embodiments of the present application;

[0072] Figure 6 A schematic diagram of the architecture of a predetermined calibration protocol stack provided for some embodiments of the present application;

[0073] Figure 7 One of the structural schematic diagrams of the calibration device of the electronic control unit provided in some embodiments of the present application;

[0074] Figure 8 A second structural schematic diagram of a calibration device for an electronic control unit provided in some embodiments of the present application;

[0075] Fig. 9 A schematic diagram of the structure of an electronic device provided for some embodiments of the present application. DETAILED DESCRIPTION

[0076] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0077] Unless otherwise defined, all technical and scientific terms used in this application have the same meanings as those commonly understood by technicians in the technical field of this application; the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned drawings and any variations thereof are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of this application or the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order or a primary and secondary relationship.

[0078] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.

[0079] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", and "attached" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0080] The term "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.

[0081] The term "multiple" as used in this application refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple sheets" refers to more than two sheets (including two sheets).

[0082] The electronic control unit mentioned in the embodiments of the present application is a comprehensive control device for an engine or electric motor. Engines and electric machinery are widely used in various vehicles such as automobiles, ships or airplanes to drive the vehicles. Vehicles are vehicles, which refer to equipment used for transporting people or goods.

[0083] ECU is composed of large-scale integrated circuits. The main functions of ECU include: according to the programs and data stored in its memory, it performs operations such as calculation, processing and judgment on the information input by various sensors, so as to output control instructions to other devices on the vehicle accordingly. The above memory can include random access memory (RAM) and non-volatile memory (NVM).

[0084] The RAM mentioned above can be any static random access memory (SRAM) or any dynamic random access memory (SRAM).

[0085] The NVM may include any type of read-only memory (ROM) and / or any type of flash memory. The ROM may be, but is not limited to, any type of programmable read-only memory (PROM), any type of electrically alterable read-only memory (EAROM), any type of erasable programmable read-only memory (EPROM), or any type of electrically erasable programmable read-only memory (EEPROM or E2PROM or E2PROM). 2 The flash memory is a non-volatile flash memory (NOR Flash). The flash memory can be, but is not limited to, any type of program flash memory (PFlash) or any type of data flash memory (DFlash).

[0086] In recent years, with the development of electronic control technology, ECU, as an extremely important control node in the vehicle, can accurately control the vehicle's engine (or motor), chassis and transmission system, etc., to improve the performance and safety of the vehicle. In order to achieve the purpose of precise control through the vehicle's engine and / or motor, the vehicle's ECU needs to be calibrated. The maximum potential that ECU can exert on the basis of established software and hardware is determined by the quality of the calibration work, and the quality of the calibration work also directly affects the length of the electronic control system development cycle and the quality of the final engine performance.

[0087] The inventor of the present application has found that in general online automobile ECU calibration, dedicated software and hardware are required, the operation is relatively complicated, and the use is inconvenient.

[0088] Based on the above considerations, in order to solve the problem of how to simplify the operation of ECU calibration, the inventors conducted in-depth research and designed a fully autonomous calibration software tool chain and a method for ECU calibration based on the tool chain, so as to realize ECU calibration based on general hardware and lightweight software.

[0089] The electronic control unit disclosed in the embodiment of the present application may be, but is not limited to, the electronic control unit of various vehicles such as automobiles, ships, or airplanes. Therefore, the calibration method and device of the electronic control unit provided in the embodiment of the present application may be applicable to, but not limited to, the calibration of electronic control units of various vehicles such as automobiles, ships, or airplanes.

[0090] In the following, in combination with the accompanying drawings, the calibration method and device of the electronic control unit, the electronic control unit and the carrier provided in the embodiments of the present application are described in detail through specific embodiments and their application scenarios.

[0091] The electronic control unit calibration method may be applied to a host computer or ECU, and may be specifically executed by hardware or software in the host computer or ECU.

[0092] The host computer may be a terminal. The terminal may include, but is not limited to, a portable communication device such as a mobile phone or a tablet computer having a touch-sensitive surface (e.g., a touch screen display and / or a touch pad). It should also be understood that in some embodiments, the terminal may not be a portable communication device, but a desktop computer having a touch-sensitive surface (e.g., a touch screen display and / or a touch pad).

[0093] In the following various embodiments, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, a mouse and a joystick.

[0094] like Figure 1 , which is a schematic diagram of an application scenario of the calibration method of an electronic control unit provided in some embodiments of the present application. In this application scenario, a host computer 110 is connected to an electronic control unit 120 via a communication hardware 130 .

[0095] In some embodiments, the operating system of the host computer 110 may include Android, iOS, Windows, macOS, Unix or Linux, etc.

[0096] The electronic control unit 120 integrates a new software protocol stack for ECU calibration. The new software protocol stack is called a predetermined calibration protocol stack. The predetermined calibration protocol stack has a complete function for calibrating the ECU, and its physical layer adopts a first communication protocol. In some embodiments, the application layer of the predetermined calibration protocol stack can adopt a custom protocol, and it is not necessary to adopt the CCP protocol or the XCP protocol. The embodiment of the present application does not limit the protocols adopted by the other layers of the predetermined calibration protocol stack. The embodiment of the present application also does not limit the specific protocol content of the various protocols adopted by the predetermined calibration protocol stack.

[0097] The predetermined calibration protocol stack may be used only to implement the calibration function, but not to implement any other functions. Therefore, the predetermined calibration protocol stack may be very lightweight, and the cost of integrating the predetermined calibration protocol stack in the electronic control unit 120 is low.

[0098] In some embodiments, the predetermined calibration protocol stack may include: a calibration protocol stack, a calibration service task and a non-volatile memory driver. The calibration service task is used to ensure that the electronic control unit 120 can correctly perform various operations according to the calibration protocol stack.

[0099] The predetermined calibration protocol stack supports various types of memories, including EEPROM, PFLASH, DFLASH and other types of non-volatile memories.

[0100] In some embodiments, the electronic control unit 120 may be installed with software for implementing each layer protocol of the predetermined calibration protocol stack to integrate the predetermined calibration protocol stack.

[0101] The communication hardware 130 supports the first communication protocol and can be used as an intermediate device for communication to realize bidirectional communication between the host computer 110 and the electronic control unit 120 based on the first communication protocol. The communication hardware 130 is a universal hardware that can improve the versatility and convenience of the device. The first communication protocol is a universal communication protocol used for internal communication of the vehicle.

[0102] In some embodiments, the first communication protocol may be, but is not limited to, a CAN protocol, a Local Interconnect Network (LIN) protocol, a FlexRay protocol, a Media Oriented Systems Transport (MOST) protocol, or any Ethernet protocol applicable to a vehicle (e.g., an Ethernet protocol dedicated to vehicle Ethernet or an Ethernet protocol dedicated to marine Ethernet), etc. The first communication protocol specifically adopted is not limited in the embodiments of the present application.

[0103] The communication hardware 130 may be connected to the electronic control unit 120 in a manner supported by the first communication protocol.

[0104] For example, when the first communication protocol is the CAN protocol, the connection method supported by the CAN protocol is the CAN bus, and the communication hardware 130 can be connected to the electronic control unit 120 through the CAN bus; when the first communication protocol is an Ethernet protocol dedicated to vehicle Ethernet, the connection method supported by the Ethernet protocol is a network cable, and the communication hardware 130 can be connected to the electronic control unit 120 through a network cable.

[0105] In some embodiments, the communication hardware 130 may also be connected to the host computer 110 in a manner supported by the first communication protocol.

[0106] In some embodiments, the communication hardware 130 also supports a second communication protocol, so that it can be connected to a communication interface of the host computer 110 , and the communication protocol used by the communication interface is the second communication protocol.

[0107] In some embodiments, the second communication protocol may be, but is not limited to, a serial communication protocol such as Universal Serial Bus (USB), EIA-485 or Peripheral Component Interconnect Express (PCI-Express or PCIe), or a parallel communication protocol such as IEEE1284. The specific second communication protocol used is not limited in the embodiments of the present application.

[0108] In some embodiments, the communication hardware 130 may be a universal interface card. For example, the first communication protocol supported by the communication hardware 130 may be a variable-rate CAN (CAN with Flexible Data rate, CAN-FD) protocol, the second communication protocol supported by the communication hardware 130 is USB, and the communication hardware 130 may be a CAN-FD interface card such as USBCANFD-100U, USBCANFD-200U or USBCANFD-100U-mini. For another example, the first communication protocol supported by the communication hardware 130 may be a variable-rate CAN (CAN with Flexible Data rate, CAN-FD) protocol, the second communication protocol supported by the communication hardware 130 is PCIe, and the communication hardware 130 may be a CAN-FD interface card such as PCIeCANFD-400U or PCIeCANFD-200U.

[0109] In some embodiments, the first communication protocol is the CAN-FD protocol. The CAN-FD protocol can be a lightweight protocol that can efficiently utilize bandwidth. The communication hardware 130 uses a CAN-FD interface card, and its development cost is not much different from that of a traditional CAN interface card, and it is well compatible with the traditional CAN protocol, but supports variable rates and longer data lengths. Compared with the FlexRay protocol, the development cost is much smaller, the additional overhead ratio is much smaller, and the FlexRay protocol is not friendly to the flashing of the ECU. Compared with the Ethernet protocol, the development cost is much smaller, the additional overhead ratio is much smaller, and it is more suitable for vehicles.

[0110] The electronic control unit 120 may include a microprocessor unit (MCU) 121, at least one random access memory 122, and at least one non-volatile memory 123. The microprocessor unit 121 is installed with the above-mentioned predetermined calibration protocol stack.

[0111] Calibration is an indispensable part of the development process of the electronic control system of any vehicle. In the development process of the electronic control system, after the hardware design and software design stages of the electronic control unit are completed, the calibration stage is entered. The performance of the electronic control system mainly depends on the quality of various map spectra (MAP), curves and parameters. The calibration work of the ECU is to optimize the control parameters in the ECU so that it meets the power, economy, reliability, safety, and pollution discharge of the engine and determines the requirements of fuel combustion and / or battery charging and discharging under various working conditions. To achieve the above purpose, the staff of ECU calibration must obtain (read operation) and calibrate (write operation) different control parameters, analyze the performance changes brought about by the changes in the values ​​of the control parameters, and complete the calibration after repeated iterative updates. The above control parameters are the calibration variables in the embodiments of the present application.

[0112] In the embodiment of the present application, the predetermined calibration protocol stack can support two calibration modes: RAM calibration mode and NVM calibration mode. RAM calibration mode refers to a mode of calibration by reading and writing RAM. NVM calibration mode refers to a mode of calibration by reading and writing NVM.

[0113] Accordingly, a read operation refers to reading the value of a calibration variable from the random access memory 122 or the non-volatile memory 123. A write operation refers to writing a predetermined value of a calibration variable (which may be referred to as a “calibration value”) into the random access memory 122 or the non-volatile memory 123.

[0114] In some embodiments, in the RAM calibration mode, the values ​​of the calibration variables are read from the random access memory 122 and written to the random access memory 122; and in the NVM calibration mode, the values ​​of the calibration variables are read from the non-volatile memory 123 and written to the non-volatile memory 123.

[0115] The RAM calibration mode is suitable for the tentative, exploratory or repetitive calibration of a calibration variable during the research and development process. During the calibration of the calibration variable, only the value of the calibration variable in the random access memory 122 used by the ECU in real time is rewritten, and the value of the calibration variable in the non-volatile memory 123 is not rewritten, which can reduce the number of NVM writes and extend the service life of the NVM.

[0116] The NVM calibration mode is suitable for relatively fixed calibration during the R&D process. It is more suitable for writing the final value of the calibration variable confirmed by the RAM calibration mode into mass-produced products to solidify the product-level calibration value in stages.

[0117] It should be noted that the write operation is a narrow sense of calibration, and the broad sense of calibration includes the read operation and the write operation. In the case where it is not specified that the calibration refers only to the write operation, the calibration in the embodiments of the present application refers to the broad sense of calibration.

[0118] Each calibration variable can have multiple attributes. The attributes of a calibration variable can be used to indicate the identification of the calibration variable, the type of reading or writing, or the storage address, etc.

[0119] Both the random access memory 122 and the non-volatile memory 123 may be used to store the properties of the calibration variables. The properties of a calibration variable may be stored in at least one random access memory 122 and / or at least one non-volatile memory 123.

[0120] In the embodiment of the present application, since the host computer 110 does not use the currently commonly used calibration software, the host computer 110 does not use the A2L file for calibration description, and a widely used general format electronic spreadsheet file can be used instead of the A2L file for calibration description. The calibration description refers to the description of the calibration variables, specifically the description of each attribute of the calibration variable.

[0121] In some embodiments, the format of the electronic spreadsheet file may be a general format such as xls, xlsx, xlsm, xml, csv, et or ett, etc. The specific format of the electronic spreadsheet file is not limited in the embodiments of the present application.

[0122] In actual execution, the host computer 110 may load a spreadsheet file storing the attributes of at least one calibration variable.

[0123] For any calibration variable, the host computer 110 can determine the calibration command used to calibrate the calibration variable based on the attributes of the calibration variable stored in the spreadsheet; after determining the calibration command, the host computer 110 can generate a calibration message carrying the calibration command, and the calibration message complies with the first communication protocol; after generating the calibration message, the host computer 110 can send the calibration message to the electronic control unit 120 through the communication link from the host computer 110 to the electronic control unit 120 via the communication hardware 130.

[0124] Based on the aforementioned predetermined calibration protocol stack, the electronic control unit 120 can receive the calibration message from the communication hardware 130; after receiving the calibration message, based on the aforementioned predetermined calibration protocol stack, the electronic control unit 120 can obtain the calibration command from the calibration message; after obtaining the calibration command, the calibration command can be executed to calibrate the calibration variable and complete the addressing and data reading and writing of the calibration variable.

[0125] The above calibration process can be implemented stably and reliably, and can meet various functions of conventional calibration, including: reading the values ​​of calibration variables stored in the memory of the electronic control unit and rewriting the values ​​of calibration variables stored in the memory of the electronic control unit.

[0126] Reading the calibration variable values ​​stored in the memory of the electronic control unit can specifically include at least one of the following reading methods: single reading and periodic reading of the value of a single calibration variable (not all calibration quantities), single reading and periodic reading of the values ​​of multiple calibration variables (not all calibration quantities), or single reading and periodic reading of the values ​​of all calibration variables.

[0127] Rewriting the values ​​of calibration variables stored in the memory of the electronic control unit may specifically include at least one of the following rewriting methods: rewriting the value of a single calibration variable (not all calibration quantities), rewriting the values ​​of multiple calibration variables (not all calibration quantities), or rewriting the values ​​of all calibration variables.

[0128] According to the calibration method of the electronic control unit provided in the embodiment of the present application, the host computer and the electronic control unit are connected through universal communication hardware, and a spreadsheet file storing the attributes of at least one calibration variable is loaded, and a calibration message is sent to the electronic control unit based on the spreadsheet file, so that the electronic control unit executes the calibration command carried by the calibration message based on a predetermined calibration protocol stack, and calibrates the electronic control unit. The calibration can be realized through the spreadsheet file and the predetermined calibration protocol stack, which can simplify the calibration operation and make it more convenient to use. In addition, since the universal communication hardware is low in price and cost-effective, the cost of integrating this type of calibration protocol stack in the electronic control unit 120 is low, and there is no need to use expensive calibration software and dedicated communication hardware, which can greatly reduce the cost of electronic control unit calibration. In addition, universal communication hardware is easy to obtain, and is not affected by the difficulty of purchasing the above-mentioned dedicated communication hardware or the long delivery cycle caused by the shortage of dedicated chips, and will not affect the development process of the electronic controller and its downstream products. In addition, there is no need to use special calibration software. It is only necessary to ensure that the electronic control unit can successfully receive the calibration message and correctly obtain the calibration command carried by the calibration message. This can simplify the calibration process and eliminate the very complicated operation of using special calibration software. The entire calibration process is simpler and more convenient. In addition, the use of a general spreadsheet file for calibration description achieves almost "zero threshold" entry. There is no need for professional training for the staff who perform ECU calibration, which can reduce training costs. The spreadsheet file can be in the native language of the staff who perform ECU calibration or other languages ​​they are proficient in, which can reduce human resource costs.

[0129] The calibration method for an electronic control unit provided in an embodiment of the present application may be executed by an electronic device or a functional module or functional entity in the electronic device that can implement the calibration method for the electronic control unit. The electronic devices mentioned in the embodiment of the present application include but are not limited to mobile phones, tablet computers, computers, cameras, and wearable devices. The calibration method for an electronic control unit provided in an embodiment of the present application is described below using an electronic device as an example of the execution subject.

[0130] According to some embodiments of the present application, referring to Figure 2 , Figure 2 This is one of the flow charts of the calibration method of the electronic control unit provided in some embodiments of the present application. The present application provides a calibration method of the electronic control unit, which is applied to the host computer 110. The calibration method of the electronic control unit may include: step 210 and step 220.

[0131] The host computer 110 is connected to the electronic control unit 120 via the communication hardware 130 ; the communication hardware 130 can communicate based on the first communication protocol.

[0132] In actual execution, the electronic device serving as the execution subject may be the host computer 110 .

[0133] Before executing step 210, it is necessary to first connect the host computer 110 and the electronic control unit 120 through the communication hardware 130. Due to the functional requirements of the electronic control unit 120 itself, it can communicate with the engine (or motor), brake system or multimedia system included in the vehicle through the universal communication protocol it already supports for internal communication of the vehicle. One of the above-mentioned supported communication protocols can be used as the first communication protocol, and the appropriate communication hardware 130 can be selected, without introducing an unsupported communication protocol to the electronic control unit 120, so as to avoid increasing the complexity and workload of the calibration work and avoid introducing additional costs.

[0134] Step 210, loading a spreadsheet file; the spreadsheet file is used to store the attributes of at least one calibration variable.

[0135] In actual implementation, any of the aforementioned common formats of electronic spreadsheet files may be used to store the attributes of the calibration variables. The number of calibration variables stored in the electronic spreadsheet file is greater than or equal to one.

[0136] In some embodiments, before step 210, after the other electronic device sends the electronic spreadsheet file, the electronic spreadsheet file sent by the other electronic device may be received to obtain the electronic spreadsheet file.

[0137] In some embodiments, before step 210, the spreadsheet file may be generated based on user input, thereby obtaining the spreadsheet file.

[0138] After acquiring the electronic spreadsheet file, the electronic spreadsheet file can be loaded into a communication program for communicating with the electronic control unit 120. In the embodiment of the present application, the calibration of the ECU can be realized based on the communication program, and the communication program can replace the currently widely used calibration software.

[0139] In some embodiments, the above communication program may be, but is not limited to, written in a programming language such as Python.

[0140] In some embodiments, reference Figure 3 , Figure 3 Schematic diagram of the functional architecture of the communication program of the host computer provided in some embodiments of the present application. Figure 3 As shown, the communication program function may include but is not limited to loading a spreadsheet file, and a series of functions related to the read operation of the calibration variables and a series of functions related to the write operation of the calibration variables implemented based on the spreadsheet file. The above series of functions related to the read operation of the calibration variables may include but are not limited to: executing a read instruction for calibration, executing a send instruction, executing a receive instruction, writing a spreadsheet file, updating a spreadsheet file, and displaying a spreadsheet file. The above series of functions related to the write operation of the calibration variables may include but are not limited to: executing a write instruction for calibration, executing a send instruction, and executing a receive instruction.

[0141] Step 220: Based on the spreadsheet file, a calibration message that complies with the first communication protocol is sent to the electronic control unit 120, so that the electronic control unit 120 executes the calibration command carried in the calibration message based on a predetermined calibration protocol stack to calibrate the electronic control unit 120; the physical layer of the predetermined calibration protocol stack adopts the first communication protocol.

[0142] In actual execution, after the communication program loads the spreadsheet file, a calibration variable, a class of calibration variables, or all calibration variables stored in the spreadsheet file may be used as a target calibration variable, and the following processing may be performed on the target calibration variable:

[0143] Determining, based on the attributes of each calibration variable included in the target calibration variable stored in the electronic form, a calibration command for calibrating each calibration variable included in the target calibration variable;

[0144] Generating a calibration message carrying the calibration command, wherein the calibration message complies with the first communication protocol;

[0145] The calibration message is sent to the electronic control unit 120 .

[0146] In some embodiments, the above-mentioned type of calibration variables may be calibration variables stored in the same sheet of a spreadsheet file.

[0147] In some embodiments, the above-mentioned type of calibration variables may be calibration variables with the same target attribute. The target attribute may be at least one of the above-mentioned attributes.

[0148] In some embodiments, the calibration command may be one command or a batch of commands including multiple commands.

[0149] Since the physical layer of the aforementioned predetermined calibration protocol stack adopts the first communication protocol, the electronic control unit 120 can receive the aforementioned calibration message from the communication hardware 130. Based on the protocol adopted by the application layer of the aforementioned predetermined calibration protocol stack, the electronic control unit 120 can obtain the aforementioned calibration command from the aforementioned calibration message. After obtaining the aforementioned calibration command, the electronic control unit 120 can execute the aforementioned calibration command to calibrate each calibration variable included in the aforementioned target calibration variable, that is, read through a read operation to read the value of the calibration variable, or write through a write operation to rewrite the value of the calibration variable.

[0150] In some embodiments, step 220 further includes:

[0151] Receiving an observation message that complies with the first communication protocol and is sent by the electronic control unit 120; the observation message carries the value of the target calibration variable read by the electronic control unit 120 from its own memory;

[0152] Write the values ​​of the target calibration variables carried in the observation message into a spreadsheet file.

[0153] In some embodiments, after writing the value of the target calibration variable carried in the observation message into the spreadsheet file, the spreadsheet file may also be displayed so that the user can observe the target calibration variable.

[0154] It can be understood that, through the above steps, it is possible to observe or rewrite the value of the variable based on the spreadsheet file.

[0155] In some embodiments, the application layer of the predetermined calibration protocol stack can adopt a customized protocol, and it is not necessary to adopt the controller area network calibration protocol or the general measurement and calibration protocol, so that the application layer protocol of the predetermined calibration protocol stack can be simpler, the predetermined calibration protocol stack is more lightweight, and its implementation is also simpler.

[0156] According to the calibration method of the electronic control unit provided in the embodiment of the present application, the host computer and the electronic control unit are connected through universal communication hardware, and a spreadsheet file storing the attributes of at least one calibration variable is loaded, and a calibration message is sent to the electronic control unit based on the spreadsheet file, so that the electronic control unit executes the calibration command carried by the calibration message based on a predetermined calibration protocol stack, and calibrates the electronic control unit. The calibration can be realized through the spreadsheet file and the predetermined calibration protocol stack, which can simplify the calibration operation and make it more convenient to use. In addition, since the universal communication hardware is low in price and cost-effective, the cost of integrating this type of calibration protocol stack in the electronic control unit 120 is low, and there is no need to use expensive calibration software and dedicated communication hardware, which can greatly reduce the cost of electronic control unit calibration. In addition, universal communication hardware is easy to obtain, and is not affected by the difficulty of purchasing the above-mentioned dedicated communication hardware or the long delivery cycle caused by the shortage of dedicated chips, and will not affect the development process of the electronic controller and its downstream products. In addition, there is no need to use special calibration software. It is only necessary to ensure that the electronic control unit can successfully receive the calibration message and correctly obtain the calibration command carried by the calibration message. This can simplify the calibration process and eliminate the very complicated operation of using special calibration software. The entire calibration process is simpler and more convenient. In addition, the use of a general spreadsheet file for calibration description achieves almost "zero threshold" entry. There is no need for professional training for the staff who perform ECU calibration, which can reduce training costs. The spreadsheet file can be in the native language of the staff who perform ECU calibration or other languages ​​they are proficient in, which can reduce human resource costs.

[0157] According to some embodiments of the present application, a calibration message conforming to the first communication protocol is sent to the electronic control unit 120 based on a spreadsheet file, including: based on the attributes of the target calibration variable in the spreadsheet file, obtaining an operation code and operand of a calibration command for calibrating the target calibration variable.

[0158] In actual execution, the target calibration variable may be at least one calibration variable selected by a user or determined based on a preset rule.

[0159] The preset rules may include, but are not limited to, the target attribute being a specific value or being stored in the same form in a spreadsheet file.

[0160] The calibration command consists of an operation code and an operand. The properties of the calibration variables can be divided into at least two categories, one for determining the operation code and the other for determining the operand. The operation code and operand can be obtained from the properties of the target calibration variable.

[0161] Based on the first communication protocol, the operation code and the operand are encapsulated to generate a calibration message.

[0162] In actual execution, the operation code and operand of the calibration command for calibrating the target calibration variable may be encapsulated based on the first communication protocol to obtain a calibration message that complies with the first communication protocol.

[0163] The operation command is determined when the operation code and operand of an operation command are determined. Since the calibration message carries the operation code and operand of the calibration command for calibrating the target calibration variable, the calibration message carries the calibration command for calibrating the target calibration variable.

[0164] Send a calibration message to the electronic control unit 120.

[0165] In actual execution, after the calibration message is generated, the calibration message may be sent to the electronic control unit 120 via the communication hardware 130 .

[0166] According to the calibration method of the electronic control unit provided in the embodiment of the present application, based on the attributes of the target calibration variables stored in the electronic spreadsheet, the operation code and operand of the calibration command are obtained, and based on the first communication protocol, the operation code and operand are encapsulated to generate a calibration message. This can simplify the calibration process and eliminate the very complicated operation of using special calibration software. The entire calibration process is simpler and more convenient.

[0167] According to some embodiments of the present application, based on the attributes of the target calibration variable in the electronic spreadsheet file, obtaining an operation code and an operand of a calibration command for calibrating the target calibration variable includes:

[0168] In a case where the attributes include a read-write attribute, a component identification number, a unit, a data type, a conversion factor, and an address offset, and do not include a virtual mapping attribute, a base set automatic reconstruction attribute, a paged access attribute, and a byte sequence access attribute, determining an operation code based on the read-write attribute, and obtaining an operand based on the unit, the data type, the conversion factor, and the address offset;

[0169] In the case where the attributes include read / write attributes, component identification number, unit, data type, conversion factor, address offset, virtual mapping attribute, base set automatic reconstruction attribute, paged access attribute, and byte sequence access attribute, an operation code is determined based on the read / write attributes, and an operand is obtained based on the unit, data type, conversion factor, address offset, virtual mapping attribute, base set automatic reconstruction attribute, paged access attribute, and byte sequence access attribute. The calibration command is used to perform a read operation or a write operation on a random access memory in the electronic control unit 120.

[0170] In actual execution, for access to NVM, it is necessary to pre-build the virtual memory corresponding to NVM. Virtual memory can be constructed according to the paging of physical memory to obtain pages of discrete data. Efficient access can be achieved by page, which can greatly shorten the reading and writing time of data stored in NVM (generally more than 50% shorter). For access to RAM, there is no need to build virtual memory. Therefore, reading and writing NVM requires virtual mapping attributes, basic set automatic reconstruction attributes, paging access attributes, and byte sequence access attributes.

[0171] Therefore, it can be determined whether the target calibration variable is stored in the random access memory 122 or the non-volatile memory 123 based on whether the virtual mapping attribute, the base set automatic reconstruction attribute, the paged access attribute, and the byte sequence access attribute are included.

[0172] Without including the virtual mapping attribute, the base set automatic reconstruction attribute, the paged access attribute and the byte sequence access attribute, the target calibration variable is stored in the random access memory 122 , and the calibration command is used to perform a read operation or a write operation on the random access memory 122 in the electronic control unit 120 .

[0173] In the case of including virtual mapping attributes, basic set automatic reconstruction attributes, paged access attributes and byte sequence access attributes, the target calibration variable is stored in the non-volatile memory 123, and the calibration command is used to perform a read operation or a write operation on the non-volatile memory 123 in the electronic control unit 120.

[0174] For any tag variable stored in the random access memory 122, the attributes of the tag variable stored in the spreadsheet file include at least read-write attributes, component identifier (CID), unit, data type, conversion coefficient (Gain) and address offset (Offset). It is understandable that, for the tag variable, the attributes of the tag variable stored in the spreadsheet file may include other attributes or may not include other attributes.

[0175] The read-write attribute of the tag variable is used to indicate whether the value of the tag variable is to be rewritten or read, and the specific method of reading. That is, the read-write attribute of the tag variable is used to indicate whether the memory is to be read or written.

[0176] Exemplarily, the read / write attribute of the tag variable is R, indicating a single read of the tag variable's value; the read / write attribute of the tag variable is R10ms, indicating a periodic read of the tag variable's value with a period of 10ms; the read / write attribute of the tag variable is W, indicating an overwrite of the tag variable's value.

[0177] The CID of the marking variable is used to indicate the component that the marking variable is used to control. The CID of each calibration variable is uniformly compiled and unique.

[0178] The data type of the tag variable may include, but is not limited to, at least one of an 8-bit binary number, a 16-bit binary number, a 32-bit binary number, an array of multiple 8-bit binary numbers, an array of multiple 16-bit binary numbers, and an array of multiple 32-bit binary numbers.

[0179] The conversion factor of a marker variable is used to convert the computer value of this marker variable into a physical value.

[0180] The address offset of the tag variable is used to determine the address of the tag variable in the random access memory 122.

[0181] The virtual mapping attribute is used to indicate whether to map the NVM to the virtual memory.

[0182] The Base collection automatic reconstruction property is used to indicate whether to perform automatic reconstruction of the Base collection.

[0183] The page access attribute is used to indicate whether to perform page access.

[0184] The byte sequence access attribute is used to indicate whether to access according to the byte sequence.

[0185] In some embodiments, the attribute of the tag variable stored in the electronic spreadsheet file may further include at least one of a read value or a write value. The read value is a value read from the memory, and the write value is a target value to be written to the memory.

[0186] When the read-write attribute indicates that the value of the tag variable is to be rewritten, the attributes of the tag variable stored in the spreadsheet file also include the write value; when the read-write attribute indicates that the value of the tag variable is to be read, the attributes of the tag variable stored in the spreadsheet file also include the read value.

[0187] Since the read-write attribute of the tag variable is used to indicate whether to rewrite or read the value of the tag variable, and the specific reading method, the operation code of the calibration command can be determined based on the read-write attribute.

[0188] For example, when the read-write attribute indicates writing to the value of the mark variable, the operation code of the calibration command can be determined as the operation code corresponding to the write operation; when the read-write attribute indicates a single reading of the value of the mark variable, the operation code of the calibration command can be determined as the operation code corresponding to the single read operation; when the read-write attribute indicates a periodic reading of the value of the mark variable, the operation code of the calibration command can be determined as the operation code corresponding to the periodic read operation.

[0189] When the attributes include read-write attributes, component identification numbers, units, data types, conversion coefficients, and address offsets, and do not include virtual mapping attributes, basic set automatic reconstruction attributes, paged access attributes, and byte sequence access attributes, the source of the data required for the operation performed by the calibration command can be determined based on the units, data types, conversion coefficients, and address offsets of the target tag variables, thereby obtaining the operands of the calibration command.

[0190] When the attributes include read-write attributes, component identification numbers, units, data types, conversion coefficients, address offsets, virtual mapping attributes, basic set automatic reconstruction attributes, paging access attributes, and byte sequence access attributes, the source of the data required for the operation performed by the calibration command can be determined based on the units, data types, conversion coefficients, address offsets, virtual mapping attributes, basic set automatic reconstruction attributes, paging access attributes, and byte sequence access attributes of the target tag variable, thereby obtaining the operands of the calibration command.

[0191] According to the calibration method of the electronic control unit provided by the embodiment of the present application, by constructing the calibration variables under different calibration modes, the calibration mode can be determined more flexibly based on the type of the attribute of the calibration variable. Through the construction of the calibration variables under the RAM calibration mode, based on the read-write attribute of the target tag variable, the operation code of the calibration instruction is determined, and based on the unit, data type, conversion coefficient and address offset of the target tag variable, the operand of the calibration instruction is obtained, the calibration under the RAM calibration mode can be realized, and the task of tentative, exploratory and repetitive calibration of the calibration variable can be completed. Through the construction of the calibration variables under the NVM calibration mode, based on the read-write attribute of the target tag variable, the operation code of the calibration instruction is determined, and based on the unit, data type, conversion coefficient, address offset, virtual mapping attribute, basic set automatic reconstruction attribute, paging access attribute and byte sequence access attribute of the target tag variable, the operand of the calibration instruction is obtained, the calibration under the NVM calibration mode can be realized, and the final value of the calibration variable confirmed after the RAM calibration mode can be written to the mass-produced product to solidify the calibration value of the product level in stages.

[0192] According to some embodiments of the present application, based on the first communication protocol, the operation code and the operand are encapsulated to generate a calibration message, including: based on the operation code, determining the operation command number field in the calibration message, based on the component identification number, determining the component identification number field in the calibration message, based on the operand, determining the data field in the calibration message, and based on the operation code, the component identification number and the operand, determining the frame length field in the calibration message.

[0193] In actual implementation, the message conforming to the first communication protocol may include an operation command number field, a component identification number field, a data field, and a frame length field.

[0194] The operation command code (CMD) corresponds to the operation code. Therefore, the operation command number field in the calibration message can be determined based on the operation code of the calibration command.

[0195] The data field is the data transmitted in the message, and therefore, the data field in the calibration message can be determined based on the operand of the calibration command.

[0196] The frame length field is used to indicate the frame length of the calibration message. Therefore, the frame length field in the calibration message can be determined based on the length of each field included in the calibration message, that is, based on the operation code of the calibration command, the component identification number and the operand of the calibration command.

[0197] Based on the first communication protocol, the operation command number field, the component identification number field, the data field and the frame length field are encapsulated to generate a calibration message.

[0198] In actual execution, the operation command number field, component identification number field, data field and frame length field obtained through the above steps can be encapsulated in the format specified by the first communication protocol to generate a calibration message that complies with the first communication protocol.

[0199] According to the calibration method of an electronic control unit provided in an embodiment of the present application, an operation command number field in a calibration message is determined based on an operation code, a component identification number field in the calibration message is determined based on a component identification number, a data field in the calibration message is determined based on an operand, and a frame length field in the calibration message is determined based on the operation code, the component identification number and the operand. Based on a first communication protocol, the operation command number field, the component identification number field, the data field and the frame length field are encapsulated to generate a calibration message. The structure of the calibration message is simpler, so that the bandwidth can be used more efficiently.

[0200] According to some embodiments of the present application, before loading the electronic spreadsheet file, the method further includes: receiving a first input.

[0201] In actual implementation, you can refer to Figure 4 , Figure 4 This is a schematic diagram of the human-machine interface of the host computer provided in some embodiments of the present application. Figure 4 The human-machine interface of the host computer 110 shown obtains the electronic spreadsheet file.

[0202] like Figure 4 As shown, the read / write properties (Read / Write), component identification number (CID), read value (Read Value), write value (Write Value), unit (Unit), data type (Data Type), conversion factor (Gain), address offset (Offset), virtual mapping properties, basic set automatic reconstruction properties, paged access properties and byte sequence access properties of the calibration variables are defined in the human-machine interface.

[0203] The first input is an input for editing a spreadsheet file. The first input may be input through a keyboard, input through a mouse click operation, handwriting input, or voice input, etc. The specific form of the first input is not specifically limited in the embodiment of the present application.

[0204] In response to the first input, a spreadsheet file is generated.

[0205] In actual execution, after receiving the first input, a response is made to the first input, and data determined based on the first input is filled into a template of the electronic form to generate an electronic form file.

[0206] According to the calibration method of the electronic control unit provided in the embodiment of the present application, a spreadsheet file is generated through a human-machine interface, making the calibration description simpler and more convenient.

[0207] According to some embodiments of the present application, before sending a calibration command conforming to the first communication protocol to the electronic control unit 120 based on the spreadsheet file, the method further includes: receiving a second input; the second input is used to indicate the type of the communication hardware 130.

[0208] In actual execution, the type of the communication hardware 130 may be determined based on the human-machine interface of the host computer 110 .

[0209] The second input is an input for indicating the type of the communication hardware 130. The second input may be input through a keyboard, input through a mouse click operation, handwriting input, or voice input, etc. The specific form of the second input is not specifically limited in the embodiment of the present application.

[0210] After receiving the second input, the type of the communication hardware 130 may be determined according to the information carried in the second input and used to indicate the type of the communication hardware 130. The above information may be, but is not limited to, the model of the communication hardware 130.

[0211] Based on the type of the communication hardware 130 , the communication hardware 130 is driven.

[0212] In actual execution, after the type of the communication hardware 130 is determined, the communication hardware 130 may be driven based on a driver program for the type of hardware.

[0213] In some embodiments, the driver of the communication hardware 130 may be, but is not limited to, written in a programming language such as Python.

[0214] The embodiment of the present application determines the type of communication hardware 130 through the second input to drive the communication hardware 130, which can quickly adapt to various types of communication hardware 130 without being bound to use a single hardware, thereby increasing the flexibility of calibration hardware selection and improving the applicability of the calibration method.

[0215] According to some embodiments of the present application, referring to Figure 5 , Figure 5 The second flow chart of the calibration method of the electronic control unit provided in some embodiments of the present application. The present application also provides a calibration method of the electronic control unit, which is applied to the electronic control unit 120. The calibration method of the electronic control unit may include: step 510 and step 520.

[0216] The electronic control unit 120 is connected to the host computer 110 via the communication hardware 130 ; the communication hardware 130 can communicate based on the first communication protocol.

[0217] In actual execution, the electronic device serving as the execution subject may be the electronic control unit 120 .

[0218] Step 510, receiving a calibration message that complies with the first communication protocol and is sent by the host computer 110; the calibration message is sent by the host computer based on a spreadsheet file; the spreadsheet file is used to store attributes of at least one calibration variable.

[0219] In actual execution, the calibration message may be received through a communication link from the host computer 110 to the electronic control unit 120 via the communication hardware 130 .

[0220] The process of the host computer 110 sending the calibration message based on the electronic spreadsheet file can be referred to the above embodiment and will not be described again here.

[0221] Step 520: Based on a predetermined calibration protocol stack, execute the calibration command carried in the calibration message to calibrate the electronic control unit 120; the physical layer of the predetermined calibration protocol stack adopts the first communication protocol.

[0222] In actual execution, since the physical layer of the aforementioned predetermined calibration protocol stack adopts the first communication protocol, the electronic control unit 120 can receive the above calibration message from the communication hardware 130. Based on the protocol adopted by the application layer of the aforementioned predetermined calibration protocol stack, the electronic control unit 120 can obtain the above calibration command from the above calibration message. After obtaining the above calibration command, the electronic control unit 120 can execute the above calibration command to calibrate each calibration variable included in the above target calibration variable, that is, read through a read operation or rewrite through a write operation.

[0223] In some embodiments, step 520 further includes:

[0224] the value of the target calibration variable read from the memory of the electronic control unit 120;

[0225] Based on the value of the target calibration variable, an observation message that complies with the first communication protocol is sent to the host computer 110; the observation message carries the value of the target calibration variable.

[0226] In some embodiments, reference Figure 6 , Figure 6 A schematic diagram of the architecture of a predetermined calibration protocol stack provided in some embodiments of the present application. Figure 6 As shown, the predetermined calibration protocol stack Cal_Protocol_Stack may include: node hardware, a protocol stack for calibration, a service task for calibration, and a driver (NVM Driver) for a non-volatile memory.

[0227] Node hardware is hardware that communicates with other devices. Exemplarily, the node hardware can be CAN node hardware.

[0228] The service task for calibration may include a plurality of subtasks, so as to ensure that the electronic control unit 120 can correctly perform various operations according to the protocol stack for calibration through the above subtasks.

[0229] The driver of non-volatile memory may include two levels: physical memory level and virtual memory level. The physical memory level and virtual memory level are corresponding. The physical memory level may include EEPROM and PFlash. Both EEPROM and PFlash can interact with the virtual memory level in a bidirectional manner. The virtual memory level may include two instructions and toolkits. The two instructions are NVM read and NVM write. The toolkit may include byte read, byte write, page read, and page write.

[0230] Based on the above architecture, the predetermined calibration protocol stack Cal_Protocol_Stack can be used to receive calibration messages from the CAN-FD interface card, and complete the addressing and data reading and writing of calibration variables based on the calibration commands carried by the calibration messages.

[0231] According to the calibration method of the electronic control unit provided in the embodiment of the present application, the host computer and the electronic control unit are connected through universal communication hardware, and a spreadsheet file storing the attributes of at least one calibration variable is loaded, and a calibration message is sent to the electronic control unit based on the spreadsheet file, so that the electronic control unit executes the calibration command carried by the calibration message based on a predetermined calibration protocol stack, and calibrates the electronic control unit. The calibration can be realized through the spreadsheet file and the predetermined calibration protocol stack, which can simplify the calibration operation and make it more convenient to use. In addition, since the universal communication hardware is low in price and cost-effective, the cost of integrating this type of calibration protocol stack in the electronic control unit 120 is low, and there is no need to use expensive calibration software and dedicated communication hardware, which can greatly reduce the cost of electronic control unit calibration. In addition, universal communication hardware is easy to obtain, and is not affected by the difficulty of purchasing the above-mentioned dedicated communication hardware or the long delivery cycle caused by the shortage of dedicated chips, and will not affect the development process of the electronic controller and its downstream products. In addition, there is no need to use special calibration software. It is only necessary to ensure that the electronic control unit can successfully receive the calibration message and correctly obtain the calibration command carried by the calibration message. This can simplify the calibration process and eliminate the very complicated operation of using special calibration software. The entire calibration process is simpler and more convenient. In addition, the use of a general spreadsheet file for calibration description achieves almost "zero threshold" entry. There is no need for professional training for the staff who perform ECU calibration, which can reduce training costs. The spreadsheet file can be in the native language of the staff who perform ECU calibration or other languages ​​they are proficient in, which can reduce human resource costs.

[0232] According to some embodiments of the present application, based on a predetermined calibration protocol stack, a calibration command carried in a calibration message is executed to calibrate the electronic control unit 120, including: based on a predetermined calibration protocol stack, parsing the calibration message and obtaining the calibration command.

[0233] In actual execution, the calibration message can be parsed based on the protocol adopted by the application layer of the aforementioned predetermined calibration protocol stack to obtain each field in the calibration message; based on each field, the operation code and operand of the calibration command can be obtained to obtain the calibration command.

[0234] The calibration command is executed to calibrate the electronic control unit 120 .

[0235] In actual execution, after obtaining the calibration command, the electronic control unit 120 may execute the calibration command to calibrate each calibration variable included in the target calibration variable, that is, read through a read operation or rewrite through a write operation.

[0236] According to the calibration method of the electronic control unit provided in the embodiment of the present application, based on a predetermined calibration protocol stack, the calibration message is parsed and the calibration command is obtained. There is no need to use expensive calibration software. It is only necessary to ensure that the electronic control unit can successfully receive the calibration message and correctly obtain the calibration command carried by the calibration message. This can simplify the calibration process and eliminate the very complicated operation of using special calibration software. The entire calibration process is simpler and more convenient.

[0237] According to some embodiments of the present application, referring to Figure 7 , Figure 7 This is one of the structural schematic diagrams of the calibration device of the electronic control unit provided in some embodiments of the present application. The present application also provides a calibration device of the electronic control unit, which is applied to a host computer 110, and the host computer 110 is connected to the electronic control unit 120 through a communication hardware 130; the communication hardware 130 can communicate based on a first communication protocol; the device includes:

[0238] A loading module 710 is used to load a spreadsheet file; the spreadsheet file is used to store the properties of at least one calibration variable;

[0239] The sending module 720 is used to send a calibration message that complies with the first communication protocol to the electronic control unit 120 based on the electronic spreadsheet file;

[0240] The calibration message is used to enable the electronic control unit 120 to execute the calibration command carried in the calibration message based on a predetermined calibration protocol stack to calibrate the electronic control unit 120; the physical layer of the predetermined calibration protocol stack adopts the first communication protocol.

[0241] According to the calibration device of the electronic control unit provided by the embodiment of the present application, the host computer and the electronic control unit are connected through universal communication hardware, and a calibration message is sent to the electronic control unit based on the electronic spreadsheet file by loading a spreadsheet file storing the attributes of at least one calibration variable, so that the electronic control unit executes the calibration command carried by the calibration message based on a predetermined calibration protocol stack, and calibrates the electronic control unit. The calibration can be realized through the spreadsheet file and the predetermined calibration protocol stack, which can simplify the calibration operation and make it more convenient to use. In addition, since the universal communication hardware has a low price and high cost performance, the cost of integrating this type of calibration protocol stack in the electronic control unit 120 is low, and there is no need to use expensive calibration software and dedicated communication hardware, which can greatly reduce the cost of electronic control unit calibration. In addition, the universal communication hardware is easy to obtain, and is not affected by the difficulty of purchasing the above-mentioned dedicated communication hardware or the long delivery cycle caused by the shortage of dedicated chips, and will not affect the development process of the electronic controller and its downstream products. In addition, there is no need to use special calibration software. It is only necessary to ensure that the electronic control unit can successfully receive the calibration message and correctly obtain the calibration command carried by the calibration message. This can simplify the calibration process and eliminate the very complicated operation of using special calibration software. The entire calibration process is simpler and more convenient. In addition, the use of a general spreadsheet file for calibration description achieves almost "zero threshold" entry. There is no need for professional training for the staff who perform ECU calibration, which can reduce training costs. The spreadsheet file can be in the native language of the staff who perform ECU calibration or other languages ​​they are proficient in, which can reduce human resource costs.

[0242] According to some embodiments of the present application, the sending module 720 includes:

[0243] an acquisition unit, for acquiring an operation code and an operand of a calibration command for calibrating the target calibration variable based on the properties of the target calibration variable in the electronic spreadsheet file;

[0244] A generating unit, configured to encapsulate the operation code and the operand based on the first communication protocol to generate a calibration message;

[0245] The sending unit is used to send a calibration message to the electronic control unit 120.

[0246] According to some embodiments of the present application, the acquisition unit may be specifically used for:

[0247] In a case where the attributes include a read-write attribute, a component identification number, a unit, a data type, a conversion factor, and an address offset, and do not include a virtual mapping attribute, a base set automatic reconstruction attribute, a paged access attribute, and a byte sequence access attribute, determining an operation code based on the read-write attribute, and obtaining an operand based on the unit, the data type, the conversion factor, and the address offset;

[0248] When the attributes include read-write attributes, component identification number, unit, data type, conversion coefficient, address offset, virtual mapping attribute, basic set automatic reconstruction attribute, paging access attribute and byte sequence access attribute, the operation code is determined based on the read-write attributes, and the operand is obtained based on the unit, data type, conversion coefficient, address offset, virtual mapping attribute, basic set automatic reconstruction attribute, paging access attribute and byte sequence access attribute.

[0249] According to some embodiments of the present application, the generating unit may be specifically used for:

[0250] Determine an operation command number field in the calibration message based on the operation code, determine a component identification number field in the calibration message based on the component identification number, determine a data field in the calibration message based on the operand, and determine a frame length field in the calibration message based on the operation code, the component identification number and the operand;

[0251] Based on the first communication protocol, the operation command number field, the component identification number field, the data field and the frame length field are encapsulated to generate a calibration message.

[0252] According to some embodiments of the present application, the calibration device of the electronic control unit further includes:

[0253] A receiving module, configured to receive a first input;

[0254] The generating module is used for generating a spreadsheet file in response to a first input.

[0255] According to some embodiments of the present application, the receiving module is further used to receive a second input; the second input is used to indicate the type of the communication hardware 130;

[0256] The calibration device of the electronic control unit also includes:

[0257] The driver module is used to drive the communication hardware 130 based on the type of the communication hardware 130 .

[0258] According to some embodiments of the present application, referring to Figure 8 , Figure 8 The second structural diagram of the calibration device of the electronic control unit provided in some embodiments of the present application. The present application also provides a calibration device of the electronic control unit, which is applied to the electronic control unit 120, and the electronic control unit 120 is connected to the host computer 110 through the communication hardware 130; the communication hardware 130 can communicate based on the first communication protocol; the device includes:

[0259] The receiving module 810 is used to receive a calibration message that complies with the first communication protocol and is sent by the host computer 110; the calibration message is sent by the host computer based on a spreadsheet file; the spreadsheet file is used to store the attributes of at least one calibration variable;

[0260] The execution module 820 is used to execute the calibration command carried in the calibration message to calibrate the electronic control unit 120 based on a predetermined calibration protocol stack; the physical layer of the predetermined calibration protocol stack adopts the first communication protocol.

[0261] According to the calibration device of the electronic control unit provided by the embodiment of the present application, the host computer and the electronic control unit are connected through universal communication hardware, and a calibration message is sent to the electronic control unit based on the electronic spreadsheet file by loading a spreadsheet file storing the attributes of at least one calibration variable, so that the electronic control unit executes the calibration command carried by the calibration message based on a predetermined calibration protocol stack, and calibrates the electronic control unit. The calibration can be realized through the spreadsheet file and the predetermined calibration protocol stack, which can simplify the calibration operation and make it more convenient to use. In addition, since the universal communication hardware has a low price and high cost performance, the cost of integrating this type of calibration protocol stack in the electronic control unit 120 is low, and there is no need to use expensive calibration software and dedicated communication hardware, which can greatly reduce the cost of electronic control unit calibration. In addition, the universal communication hardware is easy to obtain, and is not affected by the difficulty of purchasing the above-mentioned dedicated communication hardware or the long delivery cycle caused by the shortage of dedicated chips, and will not affect the development process of the electronic controller and its downstream products. In addition, there is no need to use special calibration software. It is only necessary to ensure that the electronic control unit can successfully receive the calibration message and correctly obtain the calibration command carried by the calibration message. This can simplify the calibration process and eliminate the very complicated operation of using special calibration software. The entire calibration process is simpler and more convenient. In addition, the use of a general spreadsheet file for calibration description achieves almost "zero threshold" entry. There is no need for professional training for the staff who perform ECU calibration, which can reduce training costs. The spreadsheet file can be in the native language of the staff who perform ECU calibration or other languages ​​they are proficient in, which can reduce human resource costs.

[0262] According to some embodiments of the present application, the execution module includes:

[0263] A parsing unit, used to parse the calibration message and obtain the calibration command based on a predetermined calibration protocol stack;

[0264] The execution unit is used to execute the calibration command.

[0265] According to some embodiments of the present application, the present application also provides an electronic control unit, including the aforementioned calibration device for the electronic control unit applied to the electronic control device.

[0266] According to some embodiments of the present application, the present application also provides a vehicle, comprising an electronic control unit of the aforementioned calibration device including an electronic control unit.

[0267] The vehicle may be, but is not limited to, a car, a ship, an airplane, or other types of vehicles. The car may be a fuel car, an electric vehicle (EV) or a hybrid electric vehicle (HEV).

[0268] The calibration device of the electronic control unit in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0269] The calibration device of the electronic control unit in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0270] The calibration device of the electronic control unit provided in the embodiment of the present application can achieve Figures 1 to 6 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0271] In some embodiments, Fig. 9As shown, an embodiment of the present application also provides an electronic device 900, including a processor 910, a memory 920, and a computer program stored in the memory 920 and executable on the processor 910. When the program is executed by the processor 910, each process of the method embodiment for calibrating the above-mentioned electronic control unit is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0272] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0273] An embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the method embodiment for calibrating the above-mentioned electronic control unit are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0274] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0275] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned method for calibrating the electronic control unit when executed by a processor.

[0276] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0277] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned electronic control unit calibration method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0278] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0279] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0280] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0281] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0282] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0283] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.

[0284] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application may be combined with each other.

[0285] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A calibration method for an electronic control unit, applied to a host computer, characterized in that: The host computer is connected to the electronic control unit via communication hardware; the communication hardware is capable of communicating based on a first communication protocol; the method comprises: Loading a spreadsheet file; the spreadsheet file is used to store properties of at least one calibration variable; Based on the electronic spreadsheet file, a calibration message that complies with the first communication protocol is sent to the electronic control unit, so that the electronic control unit executes the calibration command carried in the calibration message based on a predetermined calibration protocol stack to calibrate the electronic control unit; the physical layer of the predetermined calibration protocol stack adopts the first communication protocol; the application layer of the predetermined calibration protocol stack does not adopt the controller area network calibration protocol and does not adopt the general measurement and calibration protocol; The step of sending a calibration message conforming to the first communication protocol to the electronic control unit based on the electronic spreadsheet file comprises: Based on the attribute of the target calibration variable in the electronic spreadsheet file, obtaining an operation code and an operand of a calibration command for calibrating the target calibration variable; Based on the first communication protocol, encapsulate the operation code and the operand to generate the calibration message; The calibration message is sent to the electronic control unit.

2. The calibration method of the electronic control unit according to claim 1, characterized in that: The obtaining, based on the attribute of the target calibration variable in the electronic spreadsheet file, an operation code and an operand of a calibration command for calibrating the target calibration variable comprises: In a case where the attributes include a read-write attribute, a component identification number, a unit, a data type, a conversion coefficient, and an address offset, and do not include a virtual mapping attribute, a base set automatic reconstruction attribute, a paged access attribute, and a byte sequence access attribute, determining the operation code based on the read-write attribute, and obtaining the operand based on the unit, the data type, the conversion coefficient, and the address offset; or, In a case where the attributes include read-write attributes, component identification numbers, units, data types, conversion coefficients, address offsets, virtual mapping attributes, base set automatic reconstruction attributes, paging access attributes, and byte sequence access attributes, the operation code is determined based on the read-write attributes, and the operand is obtained based on the units, the data types, the conversion coefficients, the address offsets, the virtual mapping attributes, the base set automatic reconstruction attributes, the paging access attributes, and the byte sequence access attributes.

3. The calibration method of the electronic control unit according to claim 2, characterized in that: The step of encapsulating the operation code and the operand based on the first communication protocol to generate the calibration message includes: Determine an operation command number field in the calibration message based on the operation code, determine a component identification number field in the calibration message based on the component identification number, determine a data field in the calibration message based on the operand, and determine a frame length field in the calibration message based on the operation code, the component identification number and the operand; Based on the first communication protocol, the operation command number field, the component identification number field, the data field and the frame length field are encapsulated to generate the calibration message.

4. The calibration method of the electronic control unit according to claim 1, characterized in that: Before loading the electronic spreadsheet file, the method further includes: receiving a first input; In response to the first input, the spreadsheet file is generated.

5. The calibration method of an electronic control unit according to claim 1, characterized in that: Before sending a calibration command that complies with the first communication protocol to the electronic control unit based on the electronic spreadsheet file, the method further includes: receiving a second input; the second input being used to indicate a type of the communication hardware; Based on the type of the communication hardware, the communication hardware is driven.

6. A calibration method for an electronic control unit, applied to an electronic control unit, characterized in that: The electronic control unit is connected to the host computer via communication hardware; the communication hardware is capable of communicating based on a first communication protocol; the method comprises: Receiving a calibration message that complies with the first communication protocol and is sent by the host computer; the calibration message is sent by the host computer based on an electronic spreadsheet file; the electronic spreadsheet file is used to store the attributes of at least one calibration variable; the host computer obtains an operation code and an operand of a calibration command for calibrating the target calibration variable based on the attributes of the target calibration variable in the electronic spreadsheet file, and encapsulates the operation code and the operand based on the first communication protocol to generate the calibration message; Based on a predetermined calibration protocol stack, the calibration command carried in the calibration message is executed to calibrate the electronic control unit; the physical layer of the predetermined calibration protocol stack adopts the first communication protocol; the application layer of the predetermined calibration protocol stack does not adopt the controller area network calibration protocol and does not adopt the general measurement and calibration protocol.

7. The calibration method of the electronic control unit according to claim 6, characterized in that: The step of executing the calibration command carried in the calibration message based on a predetermined calibration protocol stack to calibrate the electronic control unit includes: Based on the predetermined calibration protocol stack, parsing the calibration message to obtain the calibration command; The calibration command is executed to calibrate the electronic control unit.

8. A calibration device for an electronic control unit, applied to a host computer, characterized in that: The host computer is connected to the electronic control unit via communication hardware; the communication hardware is capable of communicating based on a first communication protocol; the device comprises: A loading module, used to load a spreadsheet file; the spreadsheet file is used to store the attributes of at least one calibration variable; A sending module, configured to send a calibration message conforming to the first communication protocol to the electronic control unit based on the electronic spreadsheet file; The calibration message is used to enable the electronic control unit to execute the calibration command carried by the calibration message based on a predetermined calibration protocol stack to calibrate the electronic control unit; the physical layer of the predetermined calibration protocol stack adopts the first communication protocol; the application layer of the predetermined calibration protocol stack does not adopt the controller area network calibration protocol and does not adopt the general measurement and calibration protocol; The sending module comprises: an acquisition unit, configured to acquire an operation code and an operand of a calibration command for calibrating the target calibration variable based on the attribute of the target calibration variable in the electronic spreadsheet file; A generating unit, configured to encapsulate the operation code and the operand based on the first communication protocol to generate the calibration message; A sending unit is used to send the calibration message to the electronic control unit.

9. A calibration device for an electronic control unit, applied to an electronic control unit, characterized in that: The electronic control unit is connected to the host computer via communication hardware; the communication hardware is capable of communicating based on a first communication protocol; the device comprises: A receiving module, used for receiving a calibration message sent by the host computer and conforming to the first communication protocol; the calibration message is sent by the host computer based on an electronic spreadsheet file; the electronic spreadsheet file is used to store the attributes of at least one calibration variable; the host computer obtains an operation code and an operand of a calibration command for calibrating the target calibration variable based on the attributes of the target calibration variable in the electronic spreadsheet file, and encapsulates the operation code and the operand based on the first communication protocol to generate the calibration message; An execution module is used to execute the calibration command carried in the calibration message to calibrate the electronic control unit based on a predetermined calibration protocol stack; the physical layer of the predetermined calibration protocol stack adopts the first communication protocol; the application layer of the predetermined calibration protocol stack does not adopt the controller area network calibration protocol and does not adopt the general measurement and calibration protocol.

10. An electronic control unit, characterized in that: A calibration device comprising an electronic control unit as claimed in claim 9.

11. A carrier, characterized in that: Comprising an electronic control unit as claimed in claim 10.

12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the calibration method of the electronic control unit as described in any one of claims 1-7 is implemented.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the calibration method of the electronic control unit as described in any one of claims 1 to 7 is implemented.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the calibration method of the electronic control unit as claimed in any one of claims 1 to 7 is implemented.