Electronic control unit updating method and apparatus, device, and storage medium

By using the file reading function of the Flutter application, cross-platform electronic control unit updates were achieved, solving the problem that program updates could only run on a single operating system, and improving the flexibility and convenience of updates.

WO2026066627A1PCT designated stage Publication Date: 2026-04-02BYD CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-07-30
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

In the existing technology, the program update device can only run on one operating system. This means that when the electronic control unit needs to be updated on other operating systems, the software of the program update device needs to be redeveloped, which makes the update inconvenient.

Method used

It utilizes the file reading function provided by Flutter applications to retrieve updated data across platforms and send it to the electronic control unit in response to the operation of obtaining updated data, supporting updates on Android, iOS and Windows operating systems.

Benefits of technology

It enables cross-platform electronic control unit updates, avoiding redundant development of device software for program updates and improving the flexibility and convenience of updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025111516_02042026_PF_FP_ABST
    Figure CN2025111516_02042026_PF_FP_ABST
Patent Text Reader

Abstract

An electronic control unit updating method and apparatus, a device, and a storage medium. The method comprises: in response to an operation of acquiring update data, acquiring update data from a data source by means of a file reading function provided by a Flutter application and matched with an operating system of the program update device; and sending the update data to an electronic control unit, such that the electronic control unit performs update on the basis of the update data.
Need to check novelty before this filing date? Find Prior Art

Description

Electronic control unit updating method, device, equipment and storage medium

[0001] The present application claims priority to Chinese Patent Application No. 202411393374.4, filed on September 30, 2024, the entire contents of which are incorporated herein by reference. TECHNICAL FIELD

[0002] The present disclosure relates to the field of automotive electronic control technology, and particularly relates to an electronic control unit updating method, device, equipment and storage medium. BACKGROUND

[0003] An electronic control unit is an important component of a vehicle controller. With the upgrading of vehicle control algorithms, in order to enable the performance of the vehicle to meet the requirements of the vehicle control algorithm, the electronic control unit needs to be updated. SUMMARY

[0004] The present disclosure provides an electronic control unit updating method, device, equipment and storage medium, aiming to solve the technical problem that the program updating device in the related art cannot meet the simultaneous operation on multiple platforms, when the operating system changes, the software of the program updating device needs to be developed again, resulting in the inconvenience of updating the electronic control unit.

[0005] In a first aspect, an electronic control unit updating method is provided, applied to a program updating device, and the method comprises: in response to an operation of obtaining update data, obtaining the update data from a data source based on a file reading function provided by a Flutter application in the program updating device, the file reading function provided by the Flutter application matching an operating system type; and sending the update data to an electronic control unit, so that the electronic control unit is updated based on the update data.

[0006] The electronic control unit updating method provided by some embodiments of the present disclosure comprises the following steps: in response to an operation of obtaining update data, obtaining the update data from a data source based on a file reading function provided by a Flutter application and matching an operating system of a program updating device, and sending the update data to an electronic control unit so that the electronic control unit is updated based on the update data. It can be understood that different types of operating systems have different operations when reading data, that is, different types of operating systems have different file reading functions, and the file reading function provided by the Flutter application installed in the program updating device in some embodiments of the present disclosure matches the operating system of the program updating device. In this way, no matter what type of operating system the program updating device has, the update data can be read from the data source based on the file reading function provided by the Flutter application. That is, the electronic control unit updating method provided by some embodiments of the present disclosure does not limit the operating system used by the program updating device, that is, the update of the electronic control unit can be completed, and the electronic control unit updating method can be implemented across platforms.

[0007] In some embodiments, the method further comprises: obtaining a target Flutter application package matching the operating system used by the program updating device; and constructing the Flutter application based on the target Flutter application package.

[0008] In some embodiments, the sending of the update data to the electronic control unit comprises: sending the update data to a CAN device through a CAN protocol, so that the CAN device sends the update data to the electronic control unit through CAN communication.

[0009] In some embodiments, the protocol stack of the CAN protocol comprises an application layer, and the application layer encapsulates a communication service interface and a parameter configuration service interface related to a diagnostic message, so that the program updating device can interact with at least one of the CAN device or the data source through at least one of the communication service interface or the parameter configuration service interface.

[0010] In some embodiments, the protocol stack of the CAN protocol further comprises a presentation layer and a session layer, and the presentation layer is used to encode and convert instructions received by the application layer and then send the instructions to the session layer; the encoding and conversion comprises at least one of the following: binary-to-hexadecimal conversion or binary-to-decimal conversion.

[0011] In some embodiments, the session layer realizes data communication with the CAN device through a Socket library of Dart language.

[0012] In some embodiments, when the operating system used by the program updating device is an Android system, the file reading function is written based on Java or Kotlin; when the operating system used by the program updating device is an IOS system, the file reading function is written based on Objective-C or Swift; when the operating system used by the program updating device is a Windows system, the file reading function is written based on C++ or C#.

[0013] In some embodiments, when the operating system used by the program updating device is an Android system, the target Flutter application toolkit is built based on Gradle, and the program updating device builds the Flutter application by running the Flutter bulid apk command; when the operating system used by the program updating device is an IOS system, the target Flutter application toolkit is built based on Xcode, and the program updating device builds the Flutter application by running the Flutter bulid ios command; when the operating system used by the program updating device is a Windows system, the program updating device builds the Flutter application by running the Flutter bulid windows command.

[0014] In some embodiments, when the operating system used by the program updating device is an Android system, the file reading function is written based on Java or Kotlin; when the operating system used by the program updating device is an IOS system, the file reading function is written based on Objective-C or Swift; when the operating system used by the program updating device is a Windows system, the file reading function is written based on C++ or C#.

[0015] In some embodiments, when the operating system used by the program updating device is an Android system, the target Flutter application toolkit is built based on Gradle, and the program updating device builds the Flutter application by running the Flutter bulid apk command; when the operating system used by the program updating device is an IOS system, the target Flutter application toolkit is built based on Xcode, and the program updating device builds the Flutter application by running the Flutter bulid ios command; when the operating system used by the program updating device is a Windows system, the program updating device builds the Flutter application by running the Flutter bulid windows command.

[0016] In some embodiments, the device further comprises a second acquisition unit and a construction unit; the second acquisition unit is configured to acquire a target Flutter application package matching an operating system used by the program updating device; and the construction unit is configured to construct a Flutter application based on the target Flutter application package.

[0017] In some embodiments, the updating unit is configured to send the update data to the CAN device through a CAN protocol, so that the CAN device sends the update data to the electronic control unit through CAN communication.

[0018] In some embodiments, the protocol stack of the CAN protocol comprises an application layer, and the application layer encapsulates a communication service interface and a parameter configuration service interface related to the diagnostic message, so that the program updating device can interact with at least one of the CAN device or the data source through the communication service interface and / or the parameter configuration service interface.

[0019] In some embodiments, the protocol stack of the CAN protocol further comprises a presentation layer and a session layer, and the presentation layer is configured to encode and convert instructions received by the application layer and send the encoded and converted instructions to the session layer; the encoding and conversion comprises at least one of binary-to-hexadecimal conversion or binary-to-decimal conversion.

[0020] In some embodiments, the session layer implements data communication with the CAN device through a Socket library of Dart language.

[0021] In some embodiments, when the operating system used by the program updating device is an Android system, the file reading function is written based on Java or Kotlin; when the operating system used by the program updating device is an IOS system, the file reading function is written based on Objective-C or Swift; and when the operating system used by the program updating device is a Windows system, the file reading function is written based on C++ or C#.

[0022] In some embodiments, when the operating system used by the program updating device is an Android system, the target Flutter application toolkit is built based on Gradle, and the program updating device builds the Flutter application by running the Flutter bulid apk command; when the operating system used by the program updating device is an IOS system, the target Flutter application toolkit is built based on Xcode, and the program updating device builds the Flutter application by running the Flutter bulid ios command; when the operating system used by the program updating device is a Windows system, the program updating device builds the Flutter application by running the Flutter bulid windows command.

[0023] In a fourth aspect, a device is provided, comprising: a processor and a memory configured to store processor-executable instructions; the processor is configured to execute the instructions to implement the electronic control unit updating method in the first aspect.

[0024] In a fifth aspect, a computer-readable storage medium is provided, and the computer-readable storage medium stores instructions, when the instructions in the computer-readable storage medium are executed by a device, the device can execute the electronic control unit updating method in the first aspect.

[0025] In a sixth aspect, a computer program product is provided, and the computer program product comprises computer instructions, when the computer instructions are run on a processor of a device, the device can execute the electronic control unit updating method in the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of some embodiments of the present disclosure, the drawings needed in the embodiment description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can also be obtained by those skilled in the art without creative labor.

[0027] FIG. 1 is a block diagram of an electronic control unit updating system according to some embodiments;

[0028] FIG. 2 is a flowchart of an electronic control unit updating method according to some embodiments;

[0029] FIG. 3A is a flowchart of another electronic control unit updating method according to some embodiments;

[0030] FIG. 3B is a flowchart of yet another electronic control unit updating method according to some embodiments;

[0031] FIG. 4 is a block diagram of an ISO seven-layer network model according to some embodiments;

[0032] FIG. 5 is a schematic diagram of building a Flutter application in different operating systems according to some embodiments;

[0033] FIG. 6 is a block diagram of CAN communication and file service cross-platform plug-ins according to some embodiments;

[0034] FIG. 7 is a schematic diagram of a page of a Flutter application running in a program updating device according to some embodiments;

[0035] FIG. 8 is a flowchart of updating an electronic control unit according to some embodiments;

[0036] FIG. 9 is a block diagram of an electronic control unit updating device according to some embodiments;

[0037] FIG. 10 is a block diagram of a device according to some embodiments. DETAILED DESCRIPTION

[0038] The technical solutions in some embodiments of the present disclosure will be described clearly and completely below in conjunction with the drawings of some embodiments of the present disclosure. Obviously, the described embodiments are only some of the embodiments of the present disclosure, not all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present disclosure.

[0039] In the description of the present disclosure, it should be understood that the terms "upper", "lower", "left", "right", "front", "back", "inner", "outer" and the like indicate the orientation or positional relationship shown in the drawings, and are only for the purpose of facilitating the description of the present disclosure and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present disclosure. Unless otherwise specified, the above orientation description can be flexibly arranged in the process of actual application, as long as the relative positional relationship shown in the drawings is met.

[0040] The terms "first", "second" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present disclosure, unless otherwise specified, the meaning of "a plurality of" is two or more.

[0041] In some embodiments of the disclosure, the term "comprising" or "including" or any other variant thereof is intended to mean non-exclusive inclusion, such that processes, articles, or apparatuses that comprise a list of elements are not limited to those elements, but can include other elements not expressly listed or inherent to such processes, articles, or apparatuses. Without further limitation, an element defined by the statement "comprising" does not exclude the presence of additional identical elements in the process, article, or apparatus that includes the element.

[0042] In some embodiments of the disclosure, the word "exemplary" or "for example" is used to mean serving as an example, instance, or illustration. Any embodiment or design described in this disclosure as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of "exemplary" or "for example" is intended to present concepts in a concrete manner.

[0043] In the description of the specification, example features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0044] Term explanation:

[0045] 1、Electronic Control Unit (ECU), is a miniaturized computer management center, which takes signal (data) acquisition, calculation processing, analysis and judgment, and decision-making as input, and then takes issuing control instructions and commanding actuators to work as output, and also provides stable power supply or reference voltage for sensors. In some embodiments of the disclosure, the electronic control unit can be a vehicle ECU.

[0046] 2、Flutter, is an application development framework open sourced by Google, which can run on six operating systems, including Android, iOS, Web, Windows, macOS and Linux. In some embodiments of the disclosure, Flutter allows developers to write code and then compile it into an application that can run on iOS, Android and Windows operating systems.

[0047] 3、Controller Area Network (CAN), is a serial communication protocol bus for real-time applications, commonly used for vehicle communication.

[0048] 4. Unified Diagnostic Services (UDS), which realizes precise fault diagnosis and maintenance operation through a set of specific instruction sets (such as reading fault codes and data streams). The unified diagnostic service is located in the application layer.

[0049] 5. Computer programming language (Dart), which is an object-oriented, class-defined, and single-inheritance language. Dart is the main development language of Flutter application. In some embodiments of the present disclosure, Flutter allows developers to write code using Dart, and then compile it into an application that can run on three operating systems: iOS, Android, and Windows.

[0050] With the rapid development of automobile technology, especially the continuous upgrading of vehicle control algorithms, the performance and functions of ECU as the core component of the automobile control system must also be updated accordingly to meet higher demands.

[0051] In the related art, the update of ECU is based on the design process requirements of a certain vehicle model, and a PC-side program is developed to write the host computer based on the diagnostic protocol. The application program is in the form of an S19 file, and data transmission is performed through CAN network according to the communication protocol process to realize ECU program update and upgrade. This process generally requires the PC to prepare the application program S19 file to be updated in advance, and then the CAN box is connected to the PC through the USB line, and the automobile ECU is connected through the DB9. The PC installs the program to write the host computer to update the ECU program by selecting the S19 file. However, this way of program writing tool can only run on the PC, and there is a problem of single running platform.

[0052] Alternatively, in the related art, ECU program update can also be performed through a diagnostic instrument. This method can update a certain ECU installed on a vehicle, and can also upgrade the ECU before disassembly or installation. The mobile ECU software upgrade scheme can be realized through a wireless diagnostic instrument or a wireless CAN device. However, for the mobile ECU software upgrade scheme, due to the WiFi wireless CAN device or diagnostic instrument supplier, an Android software development kit (Software Development Kit, SDK) is generally provided for the purchaser to develop a native Android secondary development, so that the current mobile ECU burning scheme of some domestic automobile controller suppliers is a native Android App, which downloads or loads the local ECU update file from the server through the native Android App to upgrade the software.

[0053] It can be seen that the program updating device in the related art can only run on one operating system, and when program updating based on other operating systems is required, the software of the program updating device needs to be developed again, which causes inconvenience in updating the electronic control unit.

[0054] Based on this, some embodiments of the present disclosure provide an electronic control unit updating method applied to a program updating device. The method acquires update data from a data source based on a file reading function provided by a Flutter application and matching an operating system of the program updating device in response to an operation of acquiring the update data, and sends the update data to an electronic control unit, so that the electronic control unit is updated based on the update data.

[0055] It can be understood that different types of operating systems have different operations when reading data, that is, different types of operating systems have different file reading functions, and the file reading function provided by the Flutter application installed in the program updating device in some embodiments of the present disclosure matches the operating system of the program updating device. In this way, no matter what type of operating system the program updating device has, the update data can be read from the data source based on the file reading function provided by the Flutter application. That is, the electronic control unit updating method provided by some embodiments of the present disclosure does not limit the operating system used by the program updating device, that is, the update of the electronic control unit can be completed, and the electronic control unit updating can be realized across platforms.

[0056] The electronic control unit updating method provided by some embodiments of the present disclosure can be applied to an electronic control unit updating system 10, as shown in FIG. 1. The electronic control unit updating system 10 includes a data source 100, a program updating device 200, and an electronic control unit 300.

[0057] Here, the data source 100 is configured to store update data.

[0058] The program updating device 200 is configured to acquire the update data from the data source 100 based on a file reading function provided by a Flutter application in the program updating device 200 in response to an operation of acquiring the update data. Here, the file reading function provided by the Flutter application matches the type of the operating system.

[0059] The program updating device 200 is further configured to send the update data to the electronic control unit 300, so that the electronic control unit 300 is updated based on the update data.

[0060] It should be understood that the present disclosure does not limit the operating system used by the program updating device 200, and the operating system used by the program updating device 200 can be an Android system, an IOS system, or a Windows system.

[0061] In some embodiments, as shown in FIG. 1, the control unit updating system 10 further comprises a CAN device 400. The program updating device 200 communicates with the CAN device 400 through WIFI, and the electronic control unit 300 is connected with the CAN device 400 through a DB9 connector. After the program updating device 200 obtains the update data from the data source 100, the program updating device 200 sends the update data to the electronic control unit 300 through the CAN device 400, so that the electronic control unit 300 is updated according to the update data.

[0062] It should be understood that in the related art, the program updating device 200 and the CAN device 400 need to be connected through a USB, and there is a problem of connection line length limitation. Some embodiments of the present disclosure realize the connection between the program updating device 200 and the CAN device 400 through WIFI, which avoids the update of the electronic control unit 300 limited by the length of the communication bus.

[0063] In some embodiments, the data source 100 can be a device with data storage capability, for example, it can be a server.

[0064] It should be noted that the data source 100 and the program updating device 200 can be integrated devices, or two separate devices with communication connection, and the present disclosure does not limit this.

[0065] In some embodiments of the present disclosure, the program updating device 200 can be a terminal device, such as a PC, a notebook computer, a mobile device, a tablet computer, a laptop computer, etc., and the present disclosure does not limit the form of the electronic device. Alternatively, the program updating device 200 can also be a single server, or a server cluster composed of multiple servers. In some implementation manners, the server cluster can be a distributed cluster server, and the present disclosure does not limit the form of the program updating device 200.

[0066] It should be noted that the structure shown in FIG. 1 does not constitute a limitation on the electronic control unit updating system. In other embodiments, the system can include fewer or more components than shown, or combine certain components, or different component arrangements, and the present disclosure does not limit this.

[0067] It should be understood that the electronic control unit updating method provided by some embodiments of the present disclosure can be applied to the program updating device in the electronic control unit updating system shown in FIG. 1. As shown in FIG. 2, the electronic control unit updating method provided by some embodiments of the present disclosure comprises S201-S202. It should be understood that the electronic control unit updating method provided by some embodiments of the present disclosure can be applied to the program updating device in the electronic control unit updating system shown in FIG. 1. As shown in FIG. 2, the electronic control unit updating method provided by some embodiments of the present disclosure comprises S201-S202.

[0068] S201, in response to the operation of acquiring the update data, acquiring the update data from the data source based on a file reading function provided by a Flutter application in the program updating device.

[0069] Here, the file reading function provided by the Flutter application matches the type of the operating system. The Flutter application is a program developed based on the Flutter platform. Since the Flutter platform is a cross-platform application development framework, the Flutter application developed based on the Flutter platform can run in multiple types of operating systems.

[0070] It should be noted that the method of the file reading function corresponding to different operating systems is different. In some embodiments of the present disclosure, the operating system includes an Android system, an IOS system and a Windows system.

[0071] In some embodiments, when the operating system used by the program updating device is an Android system, the file reading function is written based on a Java programming language (Java) or a static programming language (Kotlin).

[0072] It can be understood that the Android system is an open source mobile operating system based on the Linux kernel, but the application layer thereof is mainly written in Java language and is run through Dalvik or ART (Android Runtime) virtual machine. Java, as an object-oriented programming language, has become the basis for building the Android system and its application framework due to its simplicity, efficiency and cross-platform characteristics. In recent years, Kotlin, as another static programming language, has also been widely used in Android development because it is highly interoperable with Java and provides more concise syntax and richer functions. Therefore, when the operating system used by the program updating device is an Android system, the file reading function can be written based on the Java programming language or the static programming language.

[0073] The process of acquiring the update data based on Java or Kotlin generally includes determining the path of reading data, creating a FileInputStream object, reading data and closing the stream, and the path of reading data can be reading from the internal storage, external storage or a specific directory of the application. In some embodiments of the present disclosure, the path of reading data is to read the update data from the data source, and the data source can be local or a server. The local can be understood as the internal storage, and the server can be understood as the external storage.

[0074] In some other embodiments, when the operating system used by the program updating device is an IOS system, the file reading function is written based on Objective-C or Swift.

[0075] It can be understood that the IOS system is a mobile operating system developed by developers, based on the efficient execution of the C language and the object-oriented capabilities of the Smalltalk language, the developers specially proposed the Objective-C language. Due to the close integration of the Objective-C language with the Apple system, the Objective-C language has become one of the standard languages for application development of the Apple system. Swift, as a substitute for the Objective-C language, has been widely used due to its more concise syntax and more powerful functions compared to the Objective-C language. Therefore, when the operating system used by the program updating device is an IOS system, the file reading function can be written based on the Objective-C language or Swift.

[0076] The process of obtaining update data based on the Objective-C language or Swift generally includes determining the path of reading data and reading data. Here, the Objective-C language uses NSString's stringWithContentsOfFile:encoding:error: to read data.

[0077] In some other embodiments, when the operating system used by the program updating device is a Windows system, the file reading function is written based on C++ or C#.

[0078] It can be understood that the Windows system is an operating system based on multiple programming languages. Mainly including: C++, C#, C language, assembly language, etc. C++ is a compiled language, its program will be compiled into machine code before execution, so C++ has high execution efficiency, and C++ has good compatibility, which makes C++ become the basis for building application framework of Windows system. C# is a high-level language, under the support of.NET framework, it can quickly develop safe and reliable application programs. When the operating system used by the program updating device is a Windows system, the file reading function can be written based on C++ or C#.

[0079] The process of obtaining update data based on C++ or C# generally includes determining the path of reading data and reading data. When using C++, the header file needs to be included, and ifstream can be used to read update data. When using C#, the file reading function can be written in the.NET environment.

[0080] As an implementation manner, when the electronic control unit is updated based on the update data, the user clicks the "update" button in the program update device, that is, the program update device obtains the control instruction for updating the electronic control unit, and the program update device obtains the update data from the data source according to the file reading function provided by the Flutter application. Here, the data source can be local or a server.

[0081] S202, send the update data to the electronic control unit, so that the electronic control unit is updated based on the update data.

[0082] In some embodiments, when the ECU controls the operation of the vehicle, the continuity and stability of its work are crucial. If the update is allowed in the working state of the ECU, the ECU may fail due to unexpected interruption during the update process (such as sudden power failure, unstable network connection, etc.), which may affect the normal operation and safety of the vehicle. Therefore, the electronic control unit cannot complete the update when it is in the working state.

[0083] Therefore, as an implementation manner, before the program update device sends the update data to the electronic control unit, the program update device can send a program update request to the electronic control unit to obtain the state of the electronic control unit, and then update the electronic control unit in the non-working state, so as to avoid affecting the driving of the vehicle due to updating the electronic control unit.

[0084] In some embodiments, before the program update device sends the update data to the electronic control unit, the program update device can send a program update request to the electronic control unit, the electronic control unit confirms whether the electronic control unit can be updated after receiving the program update request, and replies to the program update device that the update can be performed or the update cannot be performed. In the case that the reply message received by the program update device is that the update can be performed, the update data is sent to the electronic control unit.

[0085] It should be noted that the electronic control unit control system can include multiple electronic control units. At this time, the program update device carries the identifier of the electronic control unit in the program update request sent to the electronic control unit. The program update device can send the update data to the electronic control unit corresponding to the identifier based on the identifier of the electronic control unit, so that the electronic control unit corresponding to the identifier is updated based on the update data.

[0086] The electronic control unit updating method provided by some embodiments of the present disclosure responds to the operation of obtaining update data, obtains update data from a data source based on the file reading function provided by the Flutter application and matched with the operating system of the program update device, and sends the update data to the electronic control unit, so that the electronic control unit is updated based on the update data.

[0087] It can be understood that different types of operating systems have different operations when reading data, that is, different types of operating systems have different file reading functions, and the file reading function provided by the Flutter application installed in the program updating device in some embodiments of the present disclosure matches the operating system of the program updating device. In this way, no matter what type of operating system the program updating device has, the updating data can be read from the data source based on the file reading function provided by the Flutter application. That is, the electronic control unit updating method provided by some embodiments of the present disclosure does not limit the operating system used by the program updating device, that is, the updating of the electronic control unit can be completed, and the characteristic of being able to realize the updating of the electronic control unit across platforms is achieved.

[0088] It should be noted that the technical solutions of some embodiments of the present disclosure only illustrate the operating system as the Android system, the IOS system and the Windows system, and do not constitute a limitation on the present solutions. The technical solutions of some embodiments of the present disclosure are also applicable to other operating systems applicable to Flutter.

[0089] In combination with FIG. 1, as shown in FIG. 3A, in an implementation provided by some embodiments of the present disclosure, before the updating data is obtained, the Flutter application needs to be built in the operating system, so the above-mentioned electronic control unit updating method can further include S301-S302.

[0090] S301, obtaining a target Flutter application tool package matching the operating system used by the program updating device.

[0091] It can be understood that different operating systems have different performance, compatibility and other characteristics, so the construction process of the Flutter application tool package corresponding to different operating systems is also different.

[0092] In some embodiments, in the case where the operating system used by the program updating device is the Android system, the target Flutter application tool package is constructed based on the project automation construction open source tool (Gradle).

[0093] It can be understood that Gradle supports cross-platform functions, and Gradle supports incremental builds, high efficiency of building projects, and Android Studio has built-in support for Gradle, so that developers can manage the build process of the project, so Gradle is widely used in the Android system when building the Flutter application package. Therefore, in the case that the operating system used by the program updating device is an Android system, the target Flutter application package can be built based on the open source tool (Gradle) for project automation construction.

[0094] In some embodiments, in the case that the operating system used by the program updating device is an IOS system, the target Flutter application package is built based on the integrated development tool (Xcode) running on the Mac OS X operating system.

[0095] It can be understood that Xcode is the official integrated development environment provided by the IOS system, and Xcode provides comprehensive development tools and framework support, improves development efficiency, and reduces development difficulty. Moreover, Xcode can reduce the cost and time of cross-platform development, so Xcode has become one of the preferred tools for iOS application development. Therefore, in the case that the operating system used by the program updating device is an IOS system, the target Flutter application package can be built based on the integrated development tool (Xcode) running on the Mac OS X operating system.

[0096] In some embodiments, since Flutter has prepared the necessary build logic, configuration and dependencies for the Windows system, developers do not need to install or configure the package additionally to build Flutter applications in the Windows system. In the case that the operating system used by the program updating device is a Windows system, Flutter applications can be built in the Windows system by installing Visual Studio, using the Flutter create command to create a new Flutter project, and selecting to add Windows support when creating.

[0097] It should be noted that the process of building Flutter applications corresponding to each operating system has been written in the program when developing Flutter applications, and when building Flutter applications, only the Flutter application package matching the operating system needs to be called to build Flutter applications in the operating system.

[0098] S302, building a Flutter application based on a target Flutter application package.

[0099] In some embodiments, in the case that the operating system used by the program updating device is an Android system, the program updating device builds the Flutter application by running the Flutter bulid apk command. The building process includes: running the Flutter build apk command to build the APK file. This command compiles the Dart code into machine code and packages all necessary resources into an APK file, which can be installed and run on an Android device.

[0100] In some embodiments, in the case that the operating system used by the program updating device is an IOS system, the program updating device builds the Flutter application by running the Flutter bulid ios command. The building process includes: running the Flutter build ios command to build the iOS application, which generates an Xcode project. In the Xcode project, the Archive function can be used to package the application and publish the packaged application to the App Store or for Ad Hoc distribution.

[0101] In some embodiments, in the case that the operating system used by the program updating device is a Windows system, the program updating device builds the Flutter application by running the Flutter bulid windows command. The building process includes: running the Flutter build windows command generates an executable file (.exe), which can run in the Windows system.

[0102] In some embodiments of the present disclosure, when developing the Flutter application, the process of building the Flutter application corresponding to each operating system has been written in the program. When building the Flutter application, only the Flutter application toolkit matching the operating system needs to be called to build the Flutter application in the operating system. That is, no matter what type of operating system the program updating device has, the Flutter application can be built in the program updating device.

[0103] In some embodiments of the present disclosure, as shown in FIG. 3B, the above-mentioned sending the update data to the electronic control unit (S202) can include S401.

[0104] S401, sending the update data to the CAN device through the CAN protocol, so that the CAN device sends the update data to the electronic control unit through CAN communication.

[0105] In some embodiments, as shown in FIG. 4, the ISO seven-layer network model includes, from bottom to top, a physical layer, a data link layer, a network layer, a transport layer, a session layer, a presentation layer, and an application layer, based on which different systems and different networks can communicate with each other. In some embodiments of the present disclosure, the CAN device and the program update device communicate with each other based on the ISO seven-layer network model.

[0106] As an implementation manner, the protocol stack of the CAN protocol includes an application layer, which encapsulates a communication service interface and a parameter configuration service interface related to the diagnostic message, so that the program update device can interact with at least one of the CAN device or the data source through at least one of the communication service interface or the parameter configuration service interface.

[0107] In some embodiments, the communication service interface can include a data sending request service interface (N_USData_request), a request confirmation service interface (N_USData_comfirm), a first frame indication service interface (N_USData_FF_indication), and a data indication service interface (N_USData_indication), and the parameter configuration service interface can include a parameter configuration request service interface (N_ChangeParameter_request) and a parameter configuration confirmation service interface (N_ChangeParameter_comfirm).

[0108] Here, the data sending request service is used to indicate sending of a data sending request to the electronic control unit. The request confirmation service is used to indicate that the electronic control unit confirms whether the update data is successfully sent in response to the data sending request. The first frame indication service is used to indicate the first frame of the update data. The data indication service is used to indicate start of reception or completion of reception of the update data. The parameter configuration request service is used to indicate adjustment of parameters for sending the update data. The parameter configuration confirmation service is used to indicate confirmation of whether the parameters are successfully adjusted in response to the parameter configuration request.

[0109] In some embodiments, since the CAN device and the vehicle controller (i.e., the electronic control unit) need to comply with the ISO15765-2 specification at the network layer and the transport layer, the protocol stack of the CAN protocol further includes a presentation layer and a session layer, the presentation layer being used to encode and convert instructions received by the application layer and send them to the session layer. The session layer implements data communication with the CAN device through a Socket library of Dart language.

[0110] Here, the encoding conversion includes at least one of binary-to-hexadecimal conversion or binary-to-decimal conversion. Through the encoding conversion, the encoding complying with the UDS specification and the encoding complying with the ISO15765-2 specification are converted to each other.

[0111] It should be noted that the session layer in the ISO seven-layer network model is used to provide a method for establishing a connection between entity devices and implement communication between devices. In some embodiments of the present disclosure, the session layer provides a method for establishing a connection between a program update device and a CAN device, and uses a Socket library of Dart language to implement data communication with the CAN. The communication method includes establishing a TCP / IP connection, sending message data, data monitoring, closing the connection, and the like.

[0112] In some embodiments of the present disclosure, as shown in FIG. 5, FIG. 5 is a schematic diagram of building a Flutter application in different operating systems, which includes four parts: a CAN communication and file service cross-platform plug-in, a specific burning business, a Flutter application, and building the Flutter application in an Android system, an IOS system, and a Windows system through bulid apk, bulid ios, and bulid windows instructions.

[0113] Here, the CAN communication and file service cross-platform plug-in of the Flutter application is to realize the CAN communication function and the file service function. Here, the CAN communication function is used to establish communication between the program update device and the CAN device for quality inspection. The file service function is used to obtain update data and send the update data to the CAN device through the CAN protocol, so that the CAN device sends the update data to the electronic control unit through the CAN communication.

[0114] The specific burning business means that the update data is obtained and the electronic control unit is updated according to the update data.

[0115] As shown in FIG. 6, the Flutter application can provide a platform channel, based on which the CAN communication and file service plug-in can communicate with the Android system, the IOS system, and the Windows system.

[0116] FIG. 7 is a schematic diagram of a page of the Flutter application running in the program update device according to some embodiments. As shown in FIG. 7, the page of the Flutter application includes a project type search box and a scan barcode button, so that the update data can be obtained by inputting in the search box or scanning the barcode. Connecting CAN means establishing communication with the CAN device. Starting burning means updating the electronic control unit.

[0117] The following describes a method for updating an electronic control unit provided by some embodiments of the present disclosure.

[0118] In some embodiments, as shown in FIG. 8, the process of updating the electronic control unit according to the update data can include:

[0119] S801, diagnose session mode.

[0120] It should be noted that the precondition of UDS program writing is to enter the session mode first. The session mode is used to distinguish the execution state of the diagnostic service under different permissions. The session mode includes three modes: default session, programming session and extended session. The program writing can be realized in the programming session mode.

[0121] S802, secure access.

[0122] It should be noted that the UDS program writing can request a seed and a key to unlock the ECU, so as to obtain the read-write permission.

[0123] S803, erase the original data of the ECU.

[0124] S804, request to download update data.

[0125] S805, transmit update data.

[0126] S806, transmission exit.

[0127] S807, judge whether the data transmission is completed, if yes, execute S808; if not, execute S804.

[0128] S808, check data integrity.

[0129] S809, reset.

[0130] The above embodiment takes the process of UDS program writing as an example to describe the process of updating the electronic control unit according to the update data. Since the ECU update process of different vehicle ECU suppliers or host factories is different, but it is subject to the ISO14229-1 specification. Therefore, the process of updating the electronic control unit according to the update data is not limited in the present disclosure.

[0131] The above mainly introduces the scheme provided by some embodiments of the present disclosure from the perspective of the method. In order to realize the above functions, the electronic control unit updating device includes the hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed in the present disclosure, some embodiments of the present disclosure can be realized in the form of hardware or the combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driven hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present disclosure.

[0132] Some embodiments of the present disclosure can divide the functional modules of the electronic control unit updating device according to the above method. For example, the electronic control unit updating device can include various functional modules corresponding to each functional division, or two or more functions can be integrated into one processing module. The integrated module can be implemented in the form of hardware or in the form of a software functional module. It should be noted that the division of the modules in some embodiments of the present disclosure is illustrative, and is only a logical functional division. Actual implementation can have another division manner.

[0133] The present disclosure also provides an electronic control unit updating system, including a data source, a program updating device and an electronic control unit; the data source is configured to store update data; the program updating device is configured to: in response to an operation of obtaining the update data, obtain the update data from the data source based on a file reading function provided by a Flutter application in the program updating device, the file reading function provided by the Flutter application matching an operating system type; and send the update data to the electronic control unit, so that the electronic control unit is updated based on the update data.

[0134] In some embodiments, the program updating device is further configured to obtain a target Flutter application package matching an operating system used by the program updating device; and construct the Flutter application based on the target Flutter application package.

[0135] In some embodiments, the program updating device is further configured to send the update data to a CAN device through a CAN protocol, so that the CAN device sends the update data to the electronic control unit through CAN communication.

[0136] In some embodiments, the protocol stack of the CAN protocol includes an application layer, the application layer encapsulates a communication service interface and a parameter configuration service interface related to a diagnostic message, so that the program updating device can interact with at least one of the CAN device or the data source through at least one of the communication service interface or the parameter configuration service interface.

[0137] In some embodiments, the protocol stack of the CAN protocol further includes a presentation layer and a session layer, the presentation layer is configured to encode and convert instructions received by the application layer and send the instructions to the session layer; the encoding and conversion includes at least one of the following: binary-to-hexadecimal conversion or binary-to-decimal conversion.

[0138] In some embodiments, the session layer implements data communication with the CAN device through a Socket library of Dart language.

[0139] In some embodiments, when the operating system used by the program updating device is an Android system, the file reading function is written based on Java or Kotlin; when the operating system used by the program updating device is an IOS system, the file reading function is written based on Objective-C or Swift; when the operating system used by the program updating device is a Windows system, the file reading function is written based on C++ or C#.

[0140] In some embodiments, when the operating system used by the program updating device is an Android system, the target Flutter application toolkit is built based on Gradle, and the program updating device builds the Flutter application by running the Flutter bulid apk command; when the operating system used by the program updating device is an IOS system, the target Flutter application toolkit is built based on Xcode, and the program updating device builds the Flutter application by running the Flutter bulid ios command; when the operating system used by the program updating device is a Windows system, the program updating device builds the Flutter application by running the Flutter bulid windows command.

[0141] FIG. 9 shows a possible block diagram of the electronic control unit updating device involved in the above embodiments. Referring to FIG. 9, the electronic control unit updating device 900 includes a first acquisition unit 901 and an updating unit 902.

[0142] The first acquisition unit 901 is configured to, in response to an operation of acquiring updating data, acquire the updating data from a data source based on a file reading function provided by a Flutter application in the program updating device, the file reading function provided by the Flutter application matching the operating system type.

[0143] The updating unit 902 is configured to send the updating data to the electronic control unit, so that the electronic control unit is updated based on the updating data.

[0144] In some embodiments, the above device further includes a second acquisition unit and a building unit; the second acquisition unit is configured to acquire a target Flutter application toolkit matching the operating system used by the program updating device; and the building unit is configured to build a Flutter application based on the target Flutter application toolkit.

[0145] In some embodiments, the updating unit 902 is configured to send the updating data to a CAN device through a CAN protocol, so that the CAN device sends the updating data to the electronic control unit through CAN communication.

[0146] In some embodiments, the protocol stack of the CAN protocol includes an application layer, the application layer encapsulates a communication service interface and a parameter configuration service interface related to the diagnostic message, so that the program updating device can interact with at least one of the CAN device or the data source through at least one of the communication service interface or the parameter configuration service interface.

[0147] In some embodiments, the protocol stack of the CAN protocol further includes a presentation layer and a session layer, the presentation layer is used to encode and convert the instructions received by the application layer and then send to the session layer; the encoding and conversion includes at least one of the following: binary-to-hexadecimal conversion or binary-to-decimal conversion.

[0148] In some embodiments, the session layer realizes data communication with the CAN device through the Socket library of the Dart language.

[0149] In some embodiments, in the case that the operating system used by the program updating device is an Android system, the file reading function is written based on Java or Kotlin; in the case that the operating system used by the program updating device is an IOS system, the file reading function is written based on Objective-C or Swift; in the case that the operating system used by the program updating device is a Windows system, the file reading function is written based on C++ or C#.

[0150] In some embodiments, in the case that the operating system used by the program updating device is an Android system, the target Flutter application tool package is built based on Gradle, and the program updating device builds the Flutter application by running the Flutter bulid apk command; in the case that the operating system used by the program updating device is an IOS system, the target Flutter application tool package is built based on Xcode, and the program updating device builds the Flutter application by running the Flutter bulid ios command; in the case that the operating system used by the program updating device is a Windows system, the program updating device builds the Flutter application by running the Flutter bulid windows command.

[0151] As to the device in the above-mentioned embodiments, the example manner in which each module performs an operation has been described in detail in the embodiments related to the method, and will not be described in detail here.

[0152] FIG. 10 shows a block diagram of the device involved in the above-mentioned embodiments. As shown in FIG. 10, the device 1000 includes but is not limited to a processor 1001 and a memory 1002.

[0153] The memory 1002 is configured to store executable instructions of the processor 1001. It can be understood that the processor 1001 is configured to execute the instructions to implement the group obstacle detection method in the above embodiments.

[0154] It should be noted that the device structure shown in FIG. 10 does not constitute a limitation on the device, and the device can include more or fewer components than those shown in FIG. 10, or combine certain components, or different component arrangements.

[0155] The processor 1001 is the control center of the device, which connects all parts of the device through various interfaces and lines, executes software programs and / or modules stored in the memory 1002 and calls data stored in the memory 1002, performs various functions of the device and processes data, and thus monitors the whole device. The processor 1001 can include one or more processing units. In some embodiments, the processor 1001 can integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 1001.

[0156] The memory 1002 can be used to store software programs and various data. The memory 1002 can mainly include a program storage area and a data storage area, where the program storage area can store the operating system, application programs (such as determination unit, processing unit, etc.) required by at least one function module, etc. In addition, the memory 1002 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device.

[0157] In some embodiments, a vehicle is also provided, which includes the above device.

[0158] In some embodiments, a computer readable storage medium including instructions is also provided, for example, the memory 1002 including instructions, which can be executed by the processor 1001 of the device 1000 to implement the method in the above embodiments.

[0159] In actual implementation, the first acquisition unit 901 and the updating unit 902 in FIG. 9 can be implemented by the processor 1001 in FIG. 10 calling the computer program stored in the memory 1002. The implementation process can refer to the description of the method part in the above embodiments, which will not be described here.

[0160] In some embodiments, the computer readable storage medium can be a non-transitory computer readable storage medium, for example, the non-transitory computer readable storage medium can be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0161] In some embodiments, a computer program product including one or more instructions is also provided, which can be executed by the processor 1001 of the device to complete the method in the above embodiments.

[0162] It should be noted that the instructions in the above computer readable storage medium or the one or more instructions in the computer program product are executed by the processor of the device to realize each process of the above method embodiments, and can achieve the same technical effects as the above method. To avoid repetition, it will not be repeated here.

[0163] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of each functional module is taken as an example for illustration. In actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete the full classification or part of the functions described above.

[0164] In several embodiments provided in the present disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. In actual implementation, another division manner can be adopted, for example, a plurality of units or components can be combined or integrated into another device, or some features can be omitted or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0165] The units described as separate components can or can not be physically separate, and the components displayed as units can be one physical unit or multiple physical units, that is, can be located in one place, or can be distributed to multiple different places. According to actual needs, part or all of the units can be selected to achieve the purpose of the present embodiment scheme.

[0166] In addition, each function unit in various embodiments of the present disclosure can be integrated in one processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.

[0167] When the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on such understanding, the technical solutions of some embodiments of the present disclosure or the part of the prior art that essentially contributes or the whole classification part or part of the technical solutions can be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing an apparatus (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute the whole classification part or part of the steps of the method of various embodiments of the present disclosure. The foregoing storage medium includes a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, and various media that can store program codes.

[0168] The above is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present disclosure, which should be covered by the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims

1. An electronic control unit updating method applied to a program updating device, the method comprising: in response to an operation of obtaining update data, obtaining the update data from a data source based on a file reading function provided by a Flutter application in the program updating device, the file reading function provided by the Flutter application matching the operating system type; sending the update data to an electronic control unit, so that the electronic control unit is updated based on the update data.

2. The method of claim 1, further comprising: obtaining a target Flutter application package matching an operating system used by the program updating device; constructing the Flutter application based on the target Flutter application package.

3. The method of claim 1, wherein, The sending of the update data to the electronic control unit comprises: sending the update data to a CAN device through a CAN protocol, so that the CAN device sends the update data to the electronic control unit through CAN communication.

4. The method of claim 3, wherein, The protocol stack of the CAN protocol comprises an application layer, which encapsulates a communication service interface and a parameter configuration service interface related to a diagnostic message, so that the program updating device can interact with at least one of the CAN device or the data source through at least one of the communication service interface or the parameter configuration service interface.

5. The method of claim 4, wherein, The protocol stack of the CAN protocol further comprises a presentation layer and a session layer, the presentation layer being configured to send instructions received by the application layer to the session layer after encoding conversion; the encoding conversion comprises at least one of the following: binary to hexadecimal conversion, or binary to decimal conversion.

6. The method of claim 5, wherein, The session layer realizes data communication with the CAN device through a Socket library of Dart language.

7. The method of any one of claims 1 to 6, wherein, In the case where the operating system used by the program updating device is an Android system, the file reading function is written based on Java or Kotlin; In the case where the operating system used by the program updating device is an IOS system, the file reading function is written based on Objective-C or Swift; In the case where the operating system used by the program updating device is a Windows system, the file reading function is written based on C++ or C#.

8. The method of any one of claims 1 to 6, wherein, In the case where the operating system used by the program updating device is an Android system, the target Flutter application package is constructed based on Gradle, and the program updating device constructs the Flutter application by running a Flutter bulid apk command; In the case where the operating system used by the program updating device is an IOS system, the target Flutter application package is constructed based on Xcode, and the program updating device constructs the Flutter application by running a Flutter bulid ios command; In a case where the operating system used by the program update device is a Windows system, the program update device builds the Flutter application by running a Flutter bulid windows command. 9.An electronic control unit update system, comprising: a data source configured to store update data; a program update device configured to, in response to an operation of acquiring update data, acquire the update data from the data source based on a file reading function provided by a Flutter application in the program update device, the file reading function provided by the Flutter application matching the operating system type; and an electronic control unit to which the update data is transmitted, causing the electronic control unit to update based on the update data. 10.An electronic control unit update apparatus, comprising: a first acquisition unit configured to, in response to an operation of acquiring update data, acquire the update data from a data source based on a file reading function provided by a Flutter application, the file reading function provided by the Flutter application matching the operating system type; and an update unit configured to transmit the update data to an electronic control unit, causing the electronic control unit to update based on the update data. 11.An apparatus, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the method according to any one of claims 1 to 8. The apparatus is capable of performing the method according to any one of claims 1 to 8 when computer-executable instructions stored in the computer-readable storage medium are executed by a processor of the apparatus. The apparatus is caused to be capable of performing the method according to any one of claims 1 to 8 when the computer instructions are run on the processor of the apparatus.

12. A computer readable storage medium, wherein, ​ 13. A computer program product comprising computer instructions, wherein, ​

Citation Information

Patent Citations

  • Method and device for upgrading application program, medium and electronic equipment

    CN111338666A

  • Form dynamic implementation method and device, equipment and storage medium

    CN115544992A

  • Multi-platform multi-application adaptation method and device, development platform, equipment and medium

    CN116089016A

  • Electronic control unit updating method and device, equipment and storage medium

    CN119759384A

  • Method and device for managing update program

    JP2021056700A