A method for generating an upgrade file, a method and device for configuring functions of a vehicle

By generating upgrade files, the vehicle function configuration is automatically processed, and the problem of inefficient manual configuration in the prior art is solved, and efficient and low-cost vehicle function configuration is achieved.

CN114489744BActive Publication Date: 2025-07-18ECARX (HUBEI) TECHCO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210061087.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-19
Publication Date
2025-07-18
Estimated Expiration
2042-01-19

AI Technical Summary

Technical Problem

In the prior art, different types of vehicles are configured manually by modifying software programs, resulting in higher labor and time costs and low efficiency.

Method used

A method of generating an upgrade file is to obtain a pending data file containing multiple data items, convert it to ASCII format, and determine the storage address according to the storage location and size of the vehicle machine. Based on the data format supported by the vehicle machine, the vehicle function configuration is automatically completed and manual intervention is reduced.

Benefits of technology

It improves the efficiency of vehicle functional configuration, reduces labor costs and time costs, and realizes automated vehicle functional configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114489744B_ABST
    Figure CN114489744B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a method for generating an upgrade file, a method and device for configuring vehicle functions. Obtain a data file to be processed including a first data item; the first data item includes function parameters of in-vehicle functions and configuration parameter values matching different vehicle types. Convert the configuration parameter values in the first data item into ASCII format to obtain a second data item; determine the storage addresses of the second data items in the vehicle head unit according to the specified storage location for loading the upgrade file in the vehicle head unit and the sizes of the second data items; based on the data format supported by the vehicle head unit, process a third data item determined based on the second data item and the corresponding storage address to obtain an upgrade file. The target vehicle head unit obtains the configuration parameter values in the upgrade file that match the vehicle type of the vehicle to which the target vehicle head unit belongs, and stores them in the corresponding storage addresses in the vehicle head unit to complete the function configuration of the vehicle to which the target vehicle head unit belongs, which can improve the efficiency of function configuration for vehicles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and particularly to a method for generating an upgrade file, a method and device for configuring functions of a vehicle. Background Art

[0002] With the improvement of people's living standards, vehicles are becoming increasingly inseparable from people's daily lives. People will choose to drive a vehicle when traveling daily or on a long journey. Vehicles of the same series can include three types: high - configuration, medium - configuration, and low - configuration vehicles. The in - vehicle functions provided by high - configuration vehicles are more than those provided by medium - configuration vehicles, and the in - vehicle functions provided by medium - configuration vehicles are more than those provided by low - configuration vehicles.

[0003] In the related art, when configuring functions for a vehicle, technicians need to configure functions for different types of vehicles. For example, technicians develop a software program with more in - vehicle functions and apply the developed software program to high - configuration vehicles to complete the function configuration of high - configuration vehicles. Then, the technicians modify the software program to disable some in - vehicle functions and apply the modified software program to medium - configuration vehicles to complete the function configuration of medium - configuration vehicles.

[0004] It can be seen that in the related art, manually configuring functions for different types of vehicles by modifying software programs requires a large amount of labor cost and time cost, resulting in low efficiency of vehicle function configuration. Summary of the Invention

[0005] The purpose of the embodiments of the present invention is to provide a method for generating an upgrade file, a method and device for configuring functions of a vehicle, so as to improve the efficiency of vehicle function configuration. The specific technical solutions are as follows:

[0006] In a first aspect, to achieve the above object, an embodiment of the present invention provides a method for generating an upgrade file, the method including:

[0007] Obtain a data file to be processed including a plurality of first data items; wherein each first data item includes a configuration parameter value matching the function parameters of an in - vehicle function with different vehicle types; the configuration parameter value represents the value that needs to be set for the corresponding function parameter in the vehicle;

[0008] For each first data item, convert the configuration parameter value in the first data item into ASCII format to obtain a corresponding second data item;

[0009] Determine the storage addresses of the second data items in the vehicle head unit according to the specified storage location in the vehicle head unit for loading the upgrade file and the sizes of the second data items;

[0010] Process each third data item based on the data format supported by the in-vehicle unit to obtain an upgrade file; one third data item is determined based on one second data item and the corresponding storage address; so that the target in-vehicle unit obtains the configuration parameter value corresponding to each storage address in the upgrade file and matching the vehicle type of the vehicle to which the target in-vehicle unit belongs, and stores it in the storage address to complete the function configuration of the vehicle to which the target in-vehicle unit belongs.

[0011] Optionally, a first data item further includes the default parameter values of the function parameters of the corresponding in-vehicle function for different types of vehicles;

[0012] For each first data item, converting the configuration parameter value in the first data item into ASCII format to obtain the corresponding second data item, including:

[0013] For each first data item, determine whether the configuration parameter value in the first data item is a valid value;

[0014] If the configuration parameter value in the first data item is a valid value, convert the configuration parameter value in the first data item into ASCII format to obtain the corresponding second data item;

[0015] The method further includes:

[0016] If the configuration parameter value in the first data item is not a valid value, convert the default parameter value in the first data item into ASCII format to obtain the corresponding second data item.

[0017] Optionally, the data type of the configuration parameter value in a first data item is any one of an integer, a decimal, and a hexadecimal value;

[0018] The determination of whether the configuration parameter value in the first data item is a valid value includes:

[0019] Determine whether the configuration parameter value in the first data item belongs to a preset parameter value range;

[0020] If the configuration parameter value in the first data item does not belong to the preset parameter value range, determine that the configuration parameter value in the first data item is not a valid value;

[0021] If the configuration parameter value in the first data item belongs to the preset parameter value range, determine whether the difference between the configuration parameter value in the first data item and the lower limit value of the preset parameter value range is an integer multiple of the specified step size; if the difference between the configuration parameter value in the first data item and the lower limit value of the preset parameter value range is an integer multiple of the specified step size, determine that the configuration parameter value in the first data item is a valid value, and if the difference between the configuration parameter value in the first data item and the lower limit value of the preset parameter value range is not an integer multiple of the specified step size, determine that the configuration parameter value in the first data item is not a valid value.

[0022] Optionally, before processing each third data item based on the data format supported by the in-vehicle unit to obtain an upgrade file, the method further includes:

[0023] Create a blank file in the file format corresponding to the function test device;

[0024] For each second data item, generate a check code for the second data item based on the second data item and its storage address as the first check code; wherein, when the function test device loads the second data item in each third data item, the function test device verifies the second data item based on the corresponding first check code;

[0025] Assemble the address type of the second data item, the size of the second data item, the storage address of the second data item, the second data item, and the second check code of the second data item to obtain the corresponding third data item;

[0026] Write the obtained multiple third data items into the blank file to obtain an intermediate data file containing multiple third data items, so that the function test device can obtain each third data item in the intermediate data file and store the configuration parameter value in each third data item to the corresponding storage address in the function test device to test the vehicle-mounted function.

[0027] Optionally, the processing of each third data item based on the data format supported by the in-vehicle unit to obtain an upgrade file includes:

[0028] Create a blank general binary format file;

[0029] Obtain a third data item in the arrangement order as the current data item to be processed;

[0030] Cache the second data item in the current data item to be processed into the preset cache space in binary format;

[0031] Determine whether the size of the data currently stored in the preset cache space is an integer multiple of the preset value;

[0032] If the size of the data currently stored in the preset cache space is an integer multiple of the preset value, use the data currently stored in the preset cache space as a data block;

[0033] Write the storage address of the first second data item included in the data block, the size of the data block, the data block, and the second check code of the data block into the general binary format file, and return to execute the step of obtaining a third data item in the arranged order as the current data item to be processed until the last third data item is processed, obtaining a general binary format file containing multiple data blocks as the upgrade file.

[0034] Optionally, before caching the second data item in the current data item to be processed into the preset cache space in the binary format, the method further includes:

[0035] Determine whether the first storage address of the second data item in the current data item to be processed and the second storage address of the second data item in the previous third data item are consecutive storage addresses;

[0036] If the first storage address and the second storage address are not consecutive storage addresses, determine the size of the storage addresses between the first storage address and the second storage address as the first value;

[0037] Caching the second data item in the current data item to be processed into the preset cache space in the binary format includes:

[0038] Cache the specified padding data of the first value and the second data item in the current data item to be processed into the preset cache space in the binary format.

[0039] Optionally, after determining whether the size of the data currently stored in the preset cache space is an integer multiple of the preset value, the method further includes:

[0040] If the size of the data currently stored in the preset cache space is not an integer multiple of the preset value, determine, from the integer multiples of the preset value, the integer multiple with the smallest absolute value of the difference from the size of the data currently stored in the preset cache space as the second value;

[0041] Calculate the difference between the second value and the size of the data currently stored in the preset cache space as the third value;

[0042] If the third value is not less than the preset difference, return to execute the step of obtaining a third data item in the order of arrangement as the current data item to be processed, until the last third data item is processed, to obtain a general binary format file including a plurality of data blocks as the upgrade file;

[0043] If the third value is less than the preset difference, cache the specified padding data of the third value to the preset cache space, and use the data currently stored in the preset cache space as a data block; write the storage address of the first second data item included in the data block, the size of the data block, the data block, and the second check code of the data block into the general binary format file, return to execute the step of obtaining a third data item in the order of arrangement as the current data item to be processed, until the last third data item is processed, to obtain a general binary format file including a plurality of data blocks as the upgrade file.

[0044] In a second aspect, to achieve the above object, an embodiment of the present invention provides a method for configuring functions of a vehicle. The method is applied to a vehicle head unit, and the method includes:

[0045] Obtain an upgrade file for configuring functions of the vehicle; wherein, the upgrade file is obtained by processing each third data item based on the data format supported by the vehicle head unit; a third data item is determined based on a second data item and the storage address of the second data item in the vehicle head unit; the storage addresses of each second data item in the vehicle head unit are determined according to the specified storage location in the vehicle head unit for loading the upgrade file and the size of each second data item; a second data item is obtained by converting the configuration parameter value in a first data item in the data file to be processed into the ASCII format; each first data item includes the function parameters of an in-vehicle function and the configuration parameter values matching different vehicle types; the configuration parameter value represents the value that needs to be set for the corresponding function parameter in the vehicle;

[0046] Obtain each storage address from the upgrade file, and the configuration parameter value corresponding to the storage address and matching the vehicle type of the vehicle to which the vehicle head unit belongs;

[0047] Store the obtained configuration parameter values to the corresponding storage addresses in the vehicle head unit to complete the function configuration of the vehicle to which the vehicle head unit belongs.

[0048] In a third aspect, to achieve the above object, an embodiment of the present invention provides a device for generating an upgrade file. The device includes:

[0049] An acquisition module, configured to acquire a data file to be processed including a plurality of first data items; wherein each first data item includes configuration parameter values of a function parameter of a vehicle-mounted function matching different vehicle types; the configuration parameter values represent the values that need to be set for the corresponding function parameter in the vehicle.

[0050] A conversion module, configured to convert the configuration parameter value in each first data item into ASCII format for each first data item, to obtain a corresponding second data item.

[0051] A determination module, configured to determine the storage addresses of the second data items in the in-vehicle computer according to the specified storage location in the in-vehicle computer for loading the upgrade file and the sizes of the second data items.

[0052] A generation module, configured to process each third data item based on the data format supported by the in-vehicle computer to obtain an upgrade file; a third data item is determined based on a second data item and the corresponding storage address; so that the target in-vehicle computer acquires the configuration parameter values matching the vehicle type of the vehicle to which the target in-vehicle computer belongs corresponding to each storage address in the upgrade file, and stores them to the storage address, to complete the function configuration of the vehicle to which the target in-vehicle computer belongs.

[0053] In a fourth aspect, to achieve the above object, an embodiment of the present invention provides a function configuration device for a vehicle, the device is applied to an in-vehicle computer, and the device includes:

[0054] A first acquisition module, configured to acquire an upgrade file for function configuration of a vehicle; wherein, the upgrade file is obtained by processing each third data item based on the data format supported by the in-vehicle computer; a third data item is determined based on a second data item and the storage address of the second data item in the in-vehicle computer; the storage addresses of the second data items in the in-vehicle computer are determined according to the specified storage location in the in-vehicle computer for loading the upgrade file and the sizes of the second data items; a second data item is obtained by converting the configuration parameter value in a first data item in the data file to be processed into ASCII format; each first data item includes configuration parameter values of a function parameter of a vehicle-mounted function matching different vehicle types; the configuration parameter values represent the values that need to be set for the corresponding function parameter in the vehicle.

[0055] A second acquisition module, configured to acquire each storage address from the upgrade file, and the configuration parameter value corresponding to the storage address and matching the vehicle type of the vehicle to which the in-vehicle computer belongs.

[0056] A configuration module, configured to store the acquired configuration parameter values to the corresponding storage addresses in the in-vehicle computer, to complete the function configuration of the vehicle to which the in-vehicle computer belongs.

[0057] An embodiment of the present invention further provides an electronic device, including a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus;

[0058] The memory is used to store a computer program;

[0059] When the processor is used to execute the program stored on the memory, the method steps for generating the upgrade file described in the first aspect above are implemented.

[0060] An embodiment of the present invention further provides a vehicle-mounted computer, including a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus;

[0061] The memory is used to store a computer program;

[0062] When the processor is used to execute the program stored on the memory, the method steps for the function configuration of the vehicle described in the second aspect above are implemented.

[0063] An embodiment of the present invention further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps for generating the upgrade file described in the first aspect above are implemented, or the method steps for the function configuration of the vehicle described in the second aspect above are implemented.

[0064] An embodiment of the present invention further provides a computer program product containing instructions. When it runs on a computer, it causes the computer to execute the method for generating the upgrade file described in the first aspect above, or execute the method for the function configuration of the vehicle described in the second aspect above.

[0065] Advantageous effects of the embodiments of the present invention:

[0066] A method for generating an upgrade file provided by an embodiment of the present invention includes: obtaining a data file to be processed that contains multiple first data items; each first data item includes a function parameter of an in-vehicle function and configuration parameter values matching different vehicle types; the configuration parameter value represents the value that needs to be set for the corresponding function parameter in the vehicle; for each first data item, converting the configuration parameter value in the first data item into ASCII format to obtain a corresponding second data item; determining the storage addresses of the second data items in the in-vehicle unit according to the specified storage location in the in-vehicle unit for loading the upgrade file and the sizes of the second data items; processing the third data items based on the data format supported by the in-vehicle unit to obtain an upgrade file; a third data item is determined based on a second data item and the corresponding storage address; so that the target in-vehicle unit obtains the configuration parameter values matching the vehicle type of the vehicle to which the target in-vehicle unit belongs corresponding to each storage address in the upgrade file and stores them at the storage address to complete the function configuration of the vehicle to which the target in-vehicle unit belongs.

[0067] Based on the above processing, since the first data items in the data file to be processed contain function parameters of multiple in-vehicle functions and configuration parameter values matching different vehicle types, the upgrade file obtained based on the data file to be processed also contains function parameters of multiple in-vehicle functions and configuration parameter values matching different vehicle types. Correspondingly, when it is necessary to perform function configuration on a vehicle, the in-vehicle unit can obtain the configuration parameter values matching the vehicle type of the vehicle to which the in-vehicle unit belongs from the upgrade file, as well as the storage addresses of the obtained configuration parameter values in the in-vehicle unit, and store the obtained configuration parameter values at the storage addresses in the in-vehicle unit to complete the function configuration of the vehicle to which the in-vehicle unit belongs. Technical personnel only need to input the configuration parameter values of the function parameters of each in-vehicle function matching different vehicle types into the data file to be processed, and subsequent function configuration of in-vehicle functions can be automatically performed based on the data file to be processed, without the need for technical personnel to perform function configuration on vehicles of different vehicle types by modifying software programs, which can reduce the labor cost and time cost consumed and improve the efficiency of function configuration for vehicles.

[0068] Of course, when implementing any product or method of the present invention, it is not necessarily required to achieve all the above-mentioned advantages simultaneously. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other embodiments based on these drawings.

[0070] Figure 1 It is a flowchart of a method for generating an upgrade file provided by an embodiment of the present invention;

[0071] Figure 2 Flow chart of another method for generating an upgrade file provided by an embodiment of the present invention;

[0072] Figure 3 Flow chart of another method for generating an upgrade file provided by an embodiment of the present invention;

[0073] Figure 4 Flow chart of another method for generating an upgrade file provided by an embodiment of the present invention;

[0074] Figure 5 Flow chart of another method for generating an upgrade file provided by an embodiment of the present invention;

[0075] Figure 6 Flow chart of another method for generating an upgrade file provided by an embodiment of the present invention;

[0076] Figure 7 Flow chart of a method for configuring functions of a vehicle provided by an embodiment of the present invention;

[0077] Figure 8 Flow chart of another method for generating an upgrade file provided by an embodiment of the present invention;

[0078] Figure 9 Flow chart of another method for generating an upgrade file provided by an embodiment of the present invention;

[0079] Figure 10 Flow chart of another method for generating an upgrade file provided by an embodiment of the present invention;

[0080] Figure 11 Structural diagram of an apparatus for generating an upgrade file provided by an embodiment of the present invention;

[0081] Figure 12 Structural diagram of an apparatus for configuring functions of a vehicle provided by an embodiment of the present invention;

[0082] Figure 13 Structural diagram of an electronic device provided by an embodiment of the present invention;

[0083] Figure 14 Structural diagram of a vehicle-mounted computer provided by an embodiment of the present invention. Detailed implementation manners

[0084] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art based on this application belong to the scope of protection of the present invention.

[0085] In the related art, manually modifying software programs to perform function configuration for different types of vehicles requires a large amount of labor cost and time cost, resulting in low efficiency of vehicle function configuration.

[0086] To solve the above problems, an embodiment of the present invention provides a method for generating an upgrade file. This method is applied to an electronic device, which may be installed with an operating system, such as the Windows system, or the Linux system, or the MACOS system, or the Unix system, etc. The method for generating an upgrade file provided by the embodiment of the present invention can run in the operating system of the electronic device. The electronic device can obtain a to-be-processed data file containing function parameters of multiple vehicle-mounted functions and configuration parameter values matching different vehicle types, and generate an upgrade file containing function parameters of multiple vehicle-mounted functions and configuration parameter values matching different vehicle types based on the to-be-processed data file. Correspondingly, the in-vehicle computer in the vehicle can obtain the configuration parameter values matching the vehicle type of the vehicle to which the in-vehicle computer belongs from the upgrade file, as well as the storage address of the obtained configuration parameter values in the in-vehicle computer, and store the obtained configuration parameter values in the storage address in the in-vehicle computer to complete the function configuration of the vehicle to which the in-vehicle computer belongs, without the need for technicians to modify software programs to perform function configuration for vehicles of different vehicle types, which can reduce the consumed labor cost and time cost and improve the efficiency of vehicle function configuration.

[0087] See Figure 1 , Figure 1 which is a flowchart of a method for generating an upgrade file provided by an embodiment of the present invention. This method is applied to an electronic device and may include the following steps:

[0088] S101: Obtain a to-be-processed data file containing multiple first data items.

[0089] Wherein, each first data item includes function parameters of a vehicle-mounted function and configuration parameter values matching different vehicle types; the configuration parameter values represent the values that need to be set for the corresponding function parameters in the vehicle.

[0090] S102: For each first data item, convert the configuration parameter value in the first data item into ASCII format to obtain a corresponding second data item.

[0091] S103: Determine the storage addresses of the second data items in the in-vehicle unit according to the specified storage location for loading the upgrade file in the in-vehicle unit and the sizes of the second data items.

[0092] S104: Process each third data item based on the data formats supported by the in-vehicle unit to obtain an upgrade file; a third data item is determined based on a second data item and the corresponding storage address; so that the target in-vehicle unit can obtain the configuration parameter values matching the vehicle type of the vehicle to which the target in-vehicle unit belongs for each storage address in the upgrade file and store them at the storage address to complete the function configuration of the vehicle to which the target in-vehicle unit belongs.

[0093] Based on the upgrade file generation method provided in the embodiments of the present invention, if the function parameters of multiple in-vehicle functions in the first data item of the data file to be processed include the configuration parameter values matching different vehicle types, the upgrade file obtained based on the data file to be processed also includes the configuration parameter values of the function parameters of multiple in-vehicle functions matching different vehicle types. Correspondingly, when it is necessary to perform function configuration on a vehicle, the in-vehicle unit can obtain the configuration parameter values matching the vehicle type of the vehicle to which the in-vehicle unit belongs from the upgrade file, as well as the storage addresses of the obtained configuration parameter values in the in-vehicle unit, and store the obtained configuration parameter values at the storage addresses in the in-vehicle unit to complete the function configuration of the vehicle to which the in-vehicle unit belongs. Technicians only need to input the configuration parameter values of the function parameters of each in-vehicle function matching different vehicle types into the data file to be processed, and subsequent in-vehicle function configuration can be automatically performed based on the data file to be processed, without the need for technicians to perform function configuration on vehicles of different vehicle types by modifying software programs, which can reduce the consumed labor cost and time cost and improve the efficiency of vehicle function configuration.

[0094] Regarding step S101, the vehicle types may include: high-end vehicles, mid-range vehicles, low-end vehicles, etc. High-end vehicles provide more in-vehicle functions than mid-range vehicles, and mid-range vehicles provide more in-vehicle functions than low-end vehicles. The in-vehicle unit in the vehicle can be used to implement user-vehicle interaction and vehicle-vehicle communication. For example, the in-vehicle unit in the vehicle can be an MCU (Micro Control Unit).

[0095] When it is necessary to perform function configuration on a vehicle, technicians can first determine all the in-vehicle functions corresponding to the vehicles of all vehicle types that need to be configured as the currently required in-vehicle functions to be configured. Then, determine the configuration parameter values of the function parameters of each currently required in-vehicle function matching different vehicle types.

[0096] For example, the in-vehicle functions that need to be configured for low-end vehicles include: Function A, Function B, and Function C. The in-vehicle functions that need to be configured for mid-range vehicles include: Function A, Function B, Function C, and Function D. The in-vehicle functions that need to be configured for high-end vehicles include: Function A, Function B, Function C, Function D, and Function F.

[0097] Correspondingly, the technician can determine that the in-vehicle functions that need to be configured currently include: Function A, Function B, Function C, Function D, and Function F, and determine the configuration parameter values of the function parameters of each in-vehicle function that need to be configured currently that match different vehicle types. For example, Function A is a reverse camera, and the function parameters of the reverse camera include the type of picture taken. The configuration parameter value of the type of picture taken that matches the low-end vehicle is a 2D picture, and the configuration parameter values that match the mid-range vehicle and the high-end vehicle are 3D pictures.

[0098] Then, the technician can use a text editing tool to organize the configuration parameter values of the function parameters of each in-vehicle function that match different vehicle types to obtain a data file to be processed. The data file to be processed can be an Excel file, or a Word file, or an HTML (Hyper Text Mark-up Language) file, etc., which is not specifically limited in the embodiments of the present invention.

[0099] For example, the technician can input the configuration parameter values of the function parameters of each in-vehicle function that match different vehicle types in the Excel editing tool in the form of one line for each first data item, and can obtain the corresponding Excel file. The obtained Excel file is the data file to be processed in the embodiments of the present invention.

[0100] In an embodiment of the present invention, a default parameter value of the function parameter of the corresponding in-vehicle function for different types of vehicles is further included in one first data item. On Figure 1 this basis, referring to Figure 2 , step S102 may include the following steps:

[0101] S1021: For each first data item, determine whether the configuration parameter value in the first data item is a valid value.

[0102] S1022: If the configuration parameter value in the first data item is a valid value, convert the configuration parameter value in the first data item to the ASCII format to obtain the corresponding second data item.

[0103] Correspondingly, the method may further include the following steps:

[0104] S1023: If the configuration parameter value in the first data item is not a valid value, convert the default parameter value in the first data item into ASCII format to obtain the corresponding second data item.

[0105] When the configuration parameter value of the function parameter of the in-vehicle function corresponding to the first data item is numeric (e.g., integer, decimal, etc.), the first data item may further include: the default parameter value, the maximum parameter value, the minimum parameter value, and the specified step size of the function parameter of the in-vehicle function corresponding to different vehicle types. The maximum parameter value, the minimum parameter value, and the specified step size in the first data item can be used to determine whether the configuration parameter value in the first data item is a valid value. The specific determination method can refer to the relevant introduction in the subsequent embodiments.

[0106] For each first data item, if the function parameter of the in-vehicle function corresponding to the first data item must be configured according to the configuration parameter value to implement the in-vehicle function, the default parameter value in the first data item is a backup of the configuration parameter value, that is, the default parameter value in the first data item is the same as the configuration parameter value. For example, when the in-vehicle function is a 3D panoramic reverse camera, the function parameter of the in-vehicle function is the type of picture taken. When the type of picture taken is a 3D picture, the 3D panoramic reverse camera function can be implemented. Then the default parameter value and the configuration parameter value in the first data item are both 3D pictures.

[0107] If configuring the function parameter of the in-vehicle function corresponding to the first data item according to the configuration parameter value can make the in-vehicle function achieve a better effect, but configuring it according to other parameter values outside the configuration parameter value can also implement the in-vehicle function, the default parameter value in the first data item can be the parameter value that can implement the corresponding in-vehicle function, that is, the default parameter value in the first data item can be different from the configuration parameter value. For example, when the in-vehicle function is voice navigation, the function parameter of the in-vehicle function is the volume. When the volume is 60dB, the voice navigation function can be implemented, and the user can clearly hear the navigation sound without it being too loud. When the volume is 70dB, the voice navigation function can also be implemented, but the sound will be louder. Then the configuration parameter value in the first data item can be 60dB, and the default parameter value can be 70dB.

[0108] The parameter value range from the minimum parameter value to the maximum parameter value (i.e., the preset parameter value range in the subsequent embodiments) includes: all parameter values that can implement the corresponding in-vehicle function. For example, when the in-vehicle function is voice navigation, the function parameter of the in-vehicle function is the volume, and the volume range that enables the user to clearly hear is 50dB to 100dB. Then the minimum parameter value is 50dB, and the maximum parameter value is 100dB.

[0109] The specified step size is the unit value that can be increased (or decreased) each time when adjusting the configuration parameter value during the test of in-vehicle functions. For example, when the specified step size is 10 dB and the in-vehicle function is voice navigation, the function parameter of the in-vehicle function is volume. When testing the voice navigation function, if the configuration parameter value is 20 dB and the user cannot hear the voice navigation sound, that is, the voice navigation function cannot be realized, the configuration parameter value can be increased by 2 unit values, that is, the configuration parameter value is adjusted to 40 dB.

[0110] When the configuration parameter value of the in-vehicle function corresponding to the first data item is non-numeric (for example, a string), the first data item may only include the configuration parameter value and the default parameter value.

[0111] In addition, a first data item may further include: the name of the function parameter of the corresponding in-vehicle function, the annotation information of the function parameter of the corresponding in-vehicle function. Users can find the first data item that meets the corresponding query conditions in the data file to be processed according to the annotation information. For example, the annotation information may be the number of times of adjusting the configuration parameter value during the test of the in-vehicle function.

[0112] Exemplarily, the data file to be processed may include 2 first data items, which are the first data item 1 and the first data item 2 respectively. The in-vehicle function corresponding to the first data item 1 is the voice navigation function. The first data item 1 may include: the function parameter of the voice navigation function is volume, the configuration parameter value matching the vehicle type A is 70 dB, the default parameter value is 60 dB, the maximum parameter value is 100 dB, the minimum parameter value is 20 dB, the specified step size is 10 dB, and the annotation information is that the configuration parameter value has been adjusted 5 times.

[0113] The in-vehicle function corresponding to the first data item 2 is the reverse image. The first data item 2 may include that the function parameter of the reverse image is the type of the captured picture, and the configuration parameter value matching the vehicle type B is a 3D picture, and the default parameter value matching the vehicle type B is a 3D picture.

[0114] Each first data item in the data file to be processed also contains the number of the first data item. The electronic device can obtain a first data item from the data file to be processed in ascending order of the numbers of the first data items, and determine whether the configuration parameter value in the first data item is a valid value.

[0115] When the configuration parameter value in the first data item is a valid value, it indicates that the in-vehicle unit can implement the corresponding in-vehicle function based on the configuration parameter value. Correspondingly, the electronic device can directly convert the configuration parameter value in the first data item into ASCII (American Standard Code for Information Interchange) format to obtain the corresponding second data item. When the second data item contains the configuration parameter value, the second data item may further include: the name of the configuration parameter value of the corresponding in-vehicle function and the data type of the configuration parameter value.

[0116] When the configuration parameter value in the first data item is not a valid value, it indicates that the in-vehicle unit cannot implement the corresponding in-vehicle function based on the configuration parameter value. Correspondingly, the electronic device can convert the default parameter value in the first data item into ASCII format to obtain the corresponding second data item. When the second data item contains the default parameter value, the second data item may further include: the name of the configuration parameter value of the corresponding in-vehicle function and the data type of the default parameter value.

[0117] It can be understood that if the electronic device converts the default parameter value in the first data item into ASCII format to obtain the corresponding second data item, then the subsequent target in-vehicle unit obtains the default parameter value from the upgrade file and stores the default parameter value in the corresponding storage location in the target in-vehicle unit to complete the function configuration of the vehicle to which the target in-vehicle unit belongs.

[0118] Then, the electronic device can obtain the next first data item from the data file to be processed in ascending order of the numbers of the first data items, and so on until the last first data item is processed, and multiple second data items can be obtained.

[0119] In an embodiment of the present invention, when each second data item is obtained, the electronic device can directly cache the second data item locally. Alternatively, the electronic device can also write the second data as a line of data into a pre-created blank text file to obtain a data file containing multiple second data items (which can be referred to as the first intermediate data file). The first intermediate data file is an ASCII text file, and the second data items in the first intermediate data file record the configuration parameter values matching the function parameters of multiple in-vehicle functions for different vehicle types.

[0120] In an embodiment of the present invention, the electronic device can determine whether the configuration parameter value in the first data item is a valid value based on the data type of the configuration parameter value in the first data item.

[0121] Method 1:

[0122] The data type of the configuration parameter value in a first data item can be BOOL (Boolean variable), and the valid values of BOOL data are True or False. Correspondingly, the electronic device can determine whether the configuration parameter value in the first data item is True or False. If the configuration parameter value in the first data item is True or False, the electronic device can determine that the configuration parameter value in the first data item is a valid value. If the configuration parameter value in the first data item is not True or False, it indicates that the configuration parameter value in the first data item is not BOOL data, and the vehicle-mounted device cannot implement the corresponding vehicle-mounted function based on the configuration parameter value. The electronic device can determine that the configuration parameter value in the first data item is not a valid value.

[0123] Method 2:

[0124] The data type of the configuration parameter value in a first data item can be a MAC (Media Access Control) address. The MAC address consists of 12 hexadecimal values, and a ":" is used to separate every two hexadecimal values.

[0125] Correspondingly, the electronic device can determine whether the configuration parameter value in the first data item is 12 hexadecimal values with a ":" separating every two hexadecimal values. If the configuration parameter value in the first data item is 12 hexadecimal values with a ":" separating every two hexadecimal values, the electronic device can determine that the configuration parameter value in the first data item is a valid value. If the configuration parameter value in the first data item is not 12 hexadecimal values, or a ":" is not used to separate every two hexadecimal values, it indicates that the configuration parameter value in the first data item is not a MAC address, and the vehicle-mounted device cannot implement the corresponding vehicle-mounted function based on the configuration parameter value. The electronic device can determine that the configuration parameter value in the first data item is not a valid value.

[0126] Method 3:

[0127] The data type of the configuration parameter value in a first data item can be an IP (Internet Protocol) address, and the IP address contains values from 0 to 255.

[0128] Correspondingly, the electronic device can determine whether the configuration parameter value in the first data item contains a value that does not belong to 0 to 255. If the configuration parameter value in the first data item does not contain a value that does not belong to 0 to 255, the electronic device can determine that the configuration parameter value in the first data item is a valid value. If the configuration parameter value in the first data item contains a value that does not belong to 0 to 255, it indicates that the configuration parameter value in the first data item is not an IP address, and the vehicle head unit cannot implement the corresponding in-vehicle function based on the configuration parameter value. Then, the electronic device can determine that the configuration parameter value in the first data item is not a valid value.

[0129] Method 4:

[0130] In an embodiment of the present invention, the data type of the configuration parameter value in a first data item is any one of an integer, a decimal, and a hexadecimal value. Correspondingly, step S1021 may include the following steps:

[0131] Step 1: Determine whether the configuration parameter value in the first data item belongs to a preset parameter value range.

[0132] Step 2: If the configuration parameter value in the first data item does not belong to the preset parameter value range, determine that the configuration parameter value in the first data item is not a valid value.

[0133] Step 3: If the configuration parameter value in the first data item belongs to the preset parameter value range, determine whether the difference between the configuration parameter value in the first data item and the lower limit value of the preset parameter value range is an integer multiple of a specified step size.

[0134] Step 4: If the difference between the configuration parameter value in the first data item and the lower limit value of the preset parameter value range is an integer multiple of the specified step size, determine that the configuration parameter value in the first data item is a valid value.

[0135] Step 5: If the difference between the configuration parameter value in the first data item and the lower limit value of the preset parameter value range is not an integer multiple of the specified step size, determine that the configuration parameter value in the first data item is not a valid value.

[0136] The preset parameter value range is the parameter value range from the minimum parameter value to the maximum parameter value in the foregoing embodiment. The preset parameter value range includes: all parameter values that can implement the corresponding in-vehicle function. The minimum parameter value is the lower limit value of the preset parameter value range, and the maximum parameter value is the upper limit value of the preset parameter value range.

[0137] For each first data item, the electronic device may first determine whether the configuration parameter value in the first data item belongs to a preset parameter value range. If the configuration parameter value in the first data item does not belong to the preset parameter value range, it indicates that the in-vehicle unit cannot implement the corresponding in-vehicle function based on the configuration parameter value in the first data item. Then the electronic device may determine that the configuration parameter value in the first data item is not a valid value.

[0138] If the configuration parameter value in the first data item belongs to the preset parameter value range, it indicates that the in-vehicle unit can implement the corresponding in-vehicle function based on the configuration parameter value in the first data item. Then the electronic device may continue to determine whether the difference between the configuration parameter value in the first data item and the lower limit value of the preset parameter value range is an integer multiple of the specified step size. Since the specified step size represents the unit value that can be increased (or decreased) each time when adjusting the configuration parameter value during the process of testing the in-vehicle function, if the difference between the configuration parameter value in the first data item and the lower limit value of the preset parameter value range is not an integer multiple of the specified step size, it indicates that during the process of testing the in-vehicle function, the configuration parameter value is not adjusted according to the specified step size, and the configuration parameter value may be an incorrect parameter value. The in-vehicle unit may not be able to implement the corresponding in-vehicle function based on the configuration parameter value in the first data item. Then the electronic device may determine that the configuration parameter value in the first data item is not a valid value.

[0139] Regarding step S103, the specified storage location in the in-vehicle unit for loading the upgrade file refers to the memory (Flash) in the in-vehicle unit for storing the configuration parameter values in the upgrade file. For example, the specified storage locations in the in-vehicle unit for loading the upgrade file may include: the storage location in Flash1 and the storage location in Flash2.

[0140] The electronic device may first obtain a second data item from each second data item. For example, when the electronic device caches multiple second data items locally, the electronic device may obtain a second data item from the first intermediate data file in the order of the generation time of each second data item. Or, when the electronic device generates the first intermediate data file containing multiple second data items, the electronic device may obtain a second data item from the first intermediate data file in the arrangement order of each second data item in the first intermediate data file.

[0141] Then, the electronic device can determine the storage address of the second data item in the in-vehicle unit based on the specified storage location, the storage address corresponding to the previous second data item of the second data item, and the size of the obtained second data item. Furthermore, the electronic device can obtain the next second data item from each second data item, and determine the storage address of the next second data item in the in-vehicle unit based on the specified storage location, the storage address of the second data item, and the size of the obtained next second data item, and so on, to obtain the storage addresses of each second data item in the in-vehicle unit.

[0142] For example, the specified storage location of Flash1 is from the 1st byte to the 255th byte. If the size of the first second data item obtained by the electronic device is 5 bytes, the electronic device can determine that the storage address of the first second data item in Flash1 is from the 1st byte to the 5th byte. If the size of the second second data item obtained by the electronic device is 10 bytes, the electronic device can determine that the storage address of the second second data item in Flash1 is from the 6th byte to the 15th byte, and so on, to obtain the storage addresses of each second data item in the in-vehicle unit.

[0143] For step S104, the electronic device can first determine multiple third data items based on each second data item and the corresponding storage address. In one implementation, for each second data item, the electronic device can directly use the second data item and the corresponding storage address as the corresponding third data item.

[0144] In another implementation, based on Figure 1 , referring to Figure 3 , before step S104, the method may further include the following steps:

[0145] S105: Create a blank file in the file format corresponding to the functional test device.

[0146] S106: For each second data item, generate a check code of the second data item based on the second data item and the storage address of the second data item as the first check code.

[0147] Among them, when the functional test device loads the second data item in each third data item, the functional test device verifies the second data item based on the corresponding first check code.

[0148] S107: Assemble the address type of the second data item, the size of the second data item, the storage address of the second data item, the second data item, and the second check code of the second data item to obtain the corresponding third data item.

[0149] S108: Write the obtained multiple third data items into a blank file to obtain an intermediate data file containing the multiple third data items, so that the function test device can obtain each third data item in the intermediate data file and store the configuration parameter values in each third data item to the corresponding storage addresses in the function test device to test the vehicle functions.

[0150] The function test device can be a JTAG (Joint Test Action Group). The file format corresponding to the function test device is the HEX format or the S-record format.

[0151] The HEX (full name: Intel HEX) format file is a text file composed of multiple lines of ASCII text conforming to the Intel HEX format. In the HEX format file, each line contains a HEX record. The HEX format file is used to transfer data to be stored in a ROM (Read-Only Memory) or an EPROM (Erasable Programmable Read Only Memory).

[0152] The S-record (full name: Motorola S-record) format file is a text file composed of multiple lines of ASCII text conforming to the S-record format. A line of ASCII text conforming to the S-record format includes: Type (the address type of the data in this line), count (the size of the data in this line), address (the storage address of the data in this line), data (the data in this line), and checksum (the checksum of the data in this line).

[0153] Since the corresponding vehicle functions may not be achievable based on the configuration parameter values in the first data item, if an upgrade file is directly generated, it may cause the function configuration of the vehicle to fail. The electronic device can generate an intermediate data file (which can be called the second intermediate data file) for testing the vehicle functions, and the second intermediate data file can be loaded into the function test device. Correspondingly, the function test device can obtain each third data item in the second intermediate data file and store the configuration parameter values in each third data item to the corresponding storage addresses in the function test device to test the vehicle functions. The memory in the function test device for loading the second intermediate data file is the same as the memory in the in-vehicle unit for loading the upgrade file.

[0154] During the process of testing vehicle functions, if the corresponding vehicle function cannot be implemented based on the configuration parameter values in the first data item, the configuration parameter values in the first data item can be adjusted, and the vehicle function can be tested again based on the adjusted configuration parameter values until the configuration parameter values that can better implement the corresponding vehicle function are determined. Subsequently, an upgrade file can be generated based on the determined configuration parameter values, which can, to a certain extent, avoid the situation where the function configuration of the vehicle cannot be completed due to incorrect configuration parameter values.

[0155] The electronic device can calculate the checksum of the second data item and the storage address of the second data item as the first checksum of the second data item. The electronic device can also determine the address type of the second data item based on the storage address of the second data item. When the file format corresponding to the function test device is the S-record format, the address type of a second data item represents the length of the storage address of the second data item. For example, if the address type of a second data item is S3, it means the storage address of the second data item is 3 bytes. If the address type of a second data item is S5, it means the storage address of the second data item is 5 bytes.

[0156] Then, the electronic device can assemble the address type of the second data item, the size of the second data item, the storage address of the second data item, the second data item, and the second checksum of the second data item to obtain the corresponding third data item. Furthermore, the electronic device can write the obtained third data items into the created blank file to obtain a second intermediate data file containing multiple third data items.

[0157] Exemplarily, a third data item can be in the following form:

[0158] |Type|count|address|data|checksum|

[0159] Type represents the address type of the second data item, count represents the size of the second data item, address represents the storage address of the second data item, data represents the second data item, and checksum represents the first checksum of the second data item. The electronic device can write the third data item as a line of data in the S-record format into the blank file in the S-record format.

[0160] In an embodiment of the present invention, on the basis of Figure 1 refer to Figure 4 step S104 may include the following steps:

[0161] S1041: Create a blank general binary format file.

[0162] S1042: Obtain a third data item in the arranged order as the current data item to be processed.

[0163] S1043: Cache the second data item in the current data item to be processed into a preset cache space in binary format.

[0164] S1044: Determine whether the size of the data currently stored in the preset cache space is an integer multiple of a preset value.

[0165] S1045: If the size of the data currently stored in the preset cache space is an integer multiple of the preset value, regard the data currently stored in the preset cache space as a data block.

[0166] S1046: Write the storage address of the first second data item included in the data block, the size of the data block, the data block, and the second check code of the data block into a general binary format file, and return to execute the step of obtaining a third data item in the arranged order as the current data item to be processed until the last third data item is processed, obtaining a general binary format file containing multiple data blocks as the upgrade file.

[0167] A general binary format (English: Versatile Binary Format, abbreviated as: VBF) file can be loaded into the in-vehicle unit, and the in-vehicle unit can read data from the general binary format file. The electronic device can first create a blank general binary format file.

[0168] The electronic device can obtain a third data item (i.e., the current data item to be processed) in the arranged order of each third data item. If the electronic device directly uses a second data item and the corresponding storage address as the corresponding third data item, the arranged order of each third data item can be the chronological order of the generation time of the corresponding second data item. Or, if the electronic device generates a second intermediate data file containing multiple third data items, the arranged order of each third data item can be the arranged order of each third data item in the second intermediate data file.

[0169] Then, the electronic device can determine the second data item in the current data item to be processed. For example, if the electronic device directly uses a second data item and the corresponding storage address as the corresponding third data item, the electronic device can directly obtain the second data item in the current data item to be processed. Or, if a second intermediate data file containing multiple third data items is generated, the electronic device can parse the current data item to be processed to obtain the second data item and the corresponding storage address included in the current data item to be processed.

[0170] The electronic device can cache the second data item in the current data item to be processed in a preset cache space local to the electronic device in binary format. The electronic device can determine whether the size of the data currently stored in the preset cache space is an integer multiple of a preset value. The preset value can be set by a technician based on experience. For example, the preset value can be 20 bytes.

[0171] When the current data item to be processed is the first third data item, the data currently stored in the preset cache space includes: the second data item in the first third data item. When the current data item to be processed is not the first third data item, the data currently stored in the preset cache space includes: the second data items that have been obtained currently and for which data blocks have not been generated.

[0172] If the size of the data currently stored in the preset cache space is an integer multiple of the preset value, the electronic device can use the data currently stored in the preset cache space as a data block, and write the storage address of the first second data item included in the data block, the size of the data block, the data block, and the second checksum of the data block into a general binary format file. The electronic device can obtain the next third data item in the arrangement order as the current data item to be processed, and cache the second data item in the current data item to be processed in the preset cache space in binary format, and so on, until the last third data item is processed, obtaining a general binary format file containing multiple data blocks as an upgrade file, and the upgrade file contains the function parameters of multiple vehicle functions and the configuration parameter values matching different vehicle types.

[0173] The storage address of the first second data item included in a data block can be expressed as: the starting address of the storage location of the data block in the in-vehicle computer. When the in-vehicle computer loads the data block in the upgrade file, it can determine the storage address of the data block in the in-vehicle computer based on the storage address of the first second data item included in the data block and the size of the data block. For example, if the storage address of the first second data item included in the data block is the 1st byte to the 5th byte in the memory of the in-vehicle computer, and the size of the data block is 20 bytes, then the storage address of the data block in the in-vehicle computer is the 1st byte to the 20th byte in the memory.

[0174] The second checksum of a data block is generated based on a preset encryption algorithm, a preset secret key, and the data block. The preset encryption algorithm can be the AES (The Advanced Encryption Standard) algorithm, or it can also be the RSA algorithm, etc. The embodiments of the present invention do not make specific limitations.

[0175] In an embodiment of the present invention, on the basis of Figure 4 refer toFigure 5 After step S1044, the method may further include the following steps:

[0176] S1047: If the size of the data currently stored in the preset cache space is not an integer multiple of a preset value, determine, from the integer multiples of the preset value, the integer multiple with the smallest absolute value of the difference from the size of the data currently stored in the preset cache space as the second value.

[0177] S1048: Calculate the difference between the second value and the size of the data currently stored in the preset cache space as the third value.

[0178] S1049: If the third value is not less than a preset difference, return to execute the step of obtaining a third data item in the arrangement order as the current data item to be processed until the last third data item is processed to obtain a general binary format file containing multiple data blocks as the upgrade file.

[0179] S10410: If the third value is less than the preset difference, cache the specified padding data of the third value into the preset cache space, and regard the data currently stored in the preset cache space as a data block; write the storage address of the first second data item included in the data block, the size of the data block, the data block, and the second check code of the data block into the general binary format file, and return to execute the step of obtaining a third data item in the arrangement order as the current data item to be processed until the last third data item is processed to obtain a general binary format file containing multiple data blocks as the upgrade file.

[0180] The specified padding data can be set by technicians according to experience. For example, the specified padding data can be the hexadecimal value "F", or it can also be "0", but it is not limited to this.

[0181] If the size of the data currently stored in the preset cache space is not an integer multiple of a preset value, the electronic device can determine, from the integer multiples of the preset value, the integer multiple with the smallest absolute value of the difference from the size of the data currently stored in the preset cache space as the second value.

[0182] Exemplarily, the preset value is 20. If the size of the data currently stored in the preset cache space is 56 bytes, among the integer multiples of the preset value, the integer multiple with the smallest absolute value of the difference from the size of the data currently stored in the preset cache space is 60 (i.e., the second value).

[0183] Then, the electronic device can calculate the difference (i.e., the third value) between the second value and the size of the data currently stored in the preset cache space. If the third value is not less than the preset difference, it indicates that the difference between the size of the data currently stored in the preset cache space and an integer multiple of the preset value is relatively large. If the specified padding data is directly cached, it will result in a relatively large amount of useless data in the generated data block.

[0184] Exemplarily, the preset difference is 5, and the preset value is 20. If the size of the data currently stored in the preset cache space is 45 bytes, and if the electronic device directly caches 15 bytes of the specified padding data into the preset cache space, the size of the data currently stored in the preset cache space can be made 60 bytes, that is, the size of the data currently stored in the preset cache space is an integer multiple of the preset value, but the generated data block will contain a relatively large amount of useless data (i.e., 15 bytes of the specified padding data).

[0185] Correspondingly, the electronic device can obtain the next third data item in the arrangement order as the current data item to be processed, and cache the second data item in the current data item to be processed into the preset cache space in binary format, and so on until the last third data item is processed, obtaining a general binary format file containing multiple data blocks as the upgrade file.

[0186] If the third value is less than the preset difference, it indicates that the difference between the size of the data currently stored in the preset cache space and an integer multiple of the preset value is relatively small. Caching a new second data item into the preset cache space may cause the size of the data currently stored in the preset cache space to exceed the second value, that is, the size of the data currently stored in the preset cache space is still not an integer multiple of the preset value. Correspondingly, the electronic device can cache the specified padding data of the third value into the preset cache space.

[0187] Exemplarily, the preset difference is 5, and the preset value is 20. If the size of the data currently stored in the preset cache space is 57 bytes, and if the size of the next second data item is 10 bytes, caching the next second data item into the preset cache space will cause the size of the data currently stored in the preset cache space to be 66 bytes, that is, the size of the data currently stored in the preset cache space is still not an integer multiple of the preset value. The electronic device can cache 4 bytes of the specified padding data into the preset cache space, which can make the size of the data currently stored in the preset cache space 60 bytes, that is, the size of the data currently stored in the preset cache space is an integer multiple of the preset value.

[0188] Then, the electronic device may use the data currently stored in the preset cache space as a data block, and write the storage address of the first second data item included in the data block, the size of the data block, the data block, and the second check code of the data block into a general binary format file. The electronic device may obtain the next third data item in the arrangement order as the current data item to be processed, and cache the second data item in the current data item to be processed into the preset cache space in binary format, and so on until the last third data item is processed, obtaining a general binary format file containing multiple data blocks as the upgrade file.

[0189] In an embodiment of the present invention, on the basis of Figure 4 , referring to Figure 6 , before step S1043, the method may further include the following steps:

[0190] S10411: Determine whether the first storage address of the second data item in the current data item to be processed is a consecutive storage address with the second storage address of the second data item in the previous third data item.

[0191] S10412: If the first storage address and the second storage address are not consecutive storage addresses, determine the size of the storage addresses between the first storage address and the second storage address as the first value.

[0192] Correspondingly, step S1043 may include the following steps:

[0193] S10431: Cache the specified padding data of the first value and the second data item in the current data item to be processed into the preset cache space in binary format.

[0194] Before caching the second data item into the preset cache space, the electronic device may determine whether the storage address of the second data item in the current data item to be processed (i.e., the first storage address) is a consecutive storage address with the storage address of the second data item in the previous third data item (i.e., the second storage address). If the first storage address and the second storage address are not consecutive storage addresses, it indicates that the storage address of the second data item in the current data item to be processed in the in-vehicle unit is not a consecutive storage address with the storage address of the second data item in the previous third data item in the in-vehicle unit.

[0195] To facilitate the subsequent in-vehicle unit to obtain the configuration parameter value in the second data item from the upgrade file, the electronic device may determine the data size corresponding to the storage addresses between the first storage address and the second storage address (i.e., the first value), and obtain the specified padding data of the second value. Furthermore, the electronic device may cache the specified padding data of the second value and the second data item in the current data item to be processed into the preset cache space.

[0196] For example, the first storage address of the second data item in the current data item to be processed is from the 10th byte to the 15th byte, and the second storage address of the second data item in the previous third data item is from the 1st byte to the 5th byte. Then, the first storage address and the second storage address are not consecutive storage addresses, and the data size corresponding to the storage addresses between the first storage address and the second storage address is 4 bytes. Then, the electronic device can cache the hexadecimal value "F" of 4 bytes and the second data item in the current data item to be processed into a preset cache space in binary format.

[0197] In an embodiment of the present invention, referring to Figure 6 , step S1043 may include the following steps:

[0198] S10432: If the first storage address and the second storage address are consecutive storage addresses, cache the second data item in the current data item to be processed into a preset cache space in binary format.

[0199] In an embodiment of the present invention, the electronic device may further obtain the header information of the upgrade file to be generated, and generate the upgrade file based on the obtained header information. The header information may include: the erase start and end addresses of the upgrade file, the file type, the file number, the start address, the check start and end addresses, and the third check code.

[0200] The erase start and end addresses indicate: the specified storage location in the in-vehicle computer for loading the upgrade file. The specified storage location may refer to the relevant introduction in the foregoing embodiment. The start address indicates: when the configuration parameter value in the upgrade file is code, the running address of the code in the in-vehicle computer.

[0201] The check start and end addresses indicate: the storage location in the in-vehicle computer for loading the second check code of the data block in the upgrade file; when the upgrade file is loaded into the in-vehicle computer, the in-vehicle computer can check the data block corresponding to the second check code based on the second check code. When the upgrade file is loaded into the in-vehicle computer, the in-vehicle computer can check the upgrade file based on the third check code.

[0202] The target in-vehicle device can be the in-vehicle device of any vehicle that needs to be functionally configured. After the electronic device generates the upgrade file, it can send the upgrade file to the target in-vehicle device. Correspondingly, the target in-vehicle device can obtain the configuration parameter values that match the vehicle type of the vehicle to which the in-vehicle device belongs from the upgrade file, and obtain the storage address of the configuration parameter values that match the vehicle type of the vehicle to which the in-vehicle device belongs. It can be understood that if the electronic device converts the default parameter values in the first data item to ASCII format when generating the second data item, the default parameter values are obtained by the target in-vehicle device from the upgrade file. Then, the target in-vehicle device can store the obtained configuration parameter values (or default parameter values) to the corresponding storage address in the target in-vehicle device to complete the functional configuration of the vehicle to which the in-vehicle device belongs.

[0203] See Figure 7 , Figure 7 is a flowchart of a method for functionally configuring a vehicle provided by an embodiment of the present invention. This method is applied to an in-vehicle device, and the method may include the following steps:

[0204] S701: Obtain an upgrade file for functionally configuring the vehicle.

[0205] Wherein, the upgrade file is obtained by processing each third data item based on the data format supported by the in-vehicle device; a third data item is determined based on a second data item and the storage address of the second data item in the in-vehicle device; the storage addresses of each second data item in the in-vehicle device are determined according to the specified storage location for loading the upgrade file in the in-vehicle device and the size of each second data item; a second data item is obtained by converting the configuration parameter value in a first data item in the data file to be processed into ASCII format; each first data item includes the configuration parameter values matching different vehicle types of the functional parameters of an in-vehicle function; the configuration parameter value represents the value that needs to be set for the corresponding functional parameter in the vehicle.

[0206] S702: Obtain each storage address from the upgrade file, and the configuration parameter value that matches the vehicle type of the vehicle to which the in-vehicle device belongs corresponding to the storage address.

[0207] S703: Store the obtained configuration parameter values to the corresponding storage address in the in-vehicle device to complete the functional configuration of the vehicle to which the in-vehicle device belongs.

[0208] In an embodiment of the present invention, after obtaining the upgrade file, the electronic device may send the upgrade file to the in-vehicle unit. Correspondingly, the in-vehicle unit may obtain each storage address from the upgrade file, as well as the configuration parameter value corresponding to the storage address and matching the vehicle type of the vehicle to which the in-vehicle unit belongs, and store the obtained configuration parameter value in the corresponding storage address in the in-vehicle unit to complete the function configuration of the vehicle to which the in-vehicle unit belongs. Technicians only need to input the function parameters of each vehicle-mounted function and the configuration parameter values matching different vehicle types into the data file to be processed, and then the function configuration of the vehicle can be automatically performed based on the data file to be processed, without the need for technicians to perform function configuration on vehicles of different vehicle types by modifying software programs, which can reduce the labor cost and time cost consumed and improve the efficiency of vehicle function configuration.

[0209] See Figure 8 , Figure 8 FIG. is a flowchart of another method for generating an upgrade file provided by an embodiment of the present invention. This method can run in the PC (Personal Computer) system (such as the Windows system) of the electronic device.

[0210] Technicians can use a text editing tool to organize the function parameters of each vehicle-mounted function and the configuration parameter values matching different vehicle types to obtain an edited data file (i.e., the data file to be processed) containing multiple first data items.

[0211] Then, an upgrade file in a common binary format can be generated based on the edited data file through a development language or script. That is, through a development language (such as C# language, VBA language, PYTHON language, SHELL language, Objective-C language, etc.), the method for generating an upgrade file provided by an embodiment of the present invention can be integrated into an executable application program (which can be called a target application program). The electronic device can parse, screen, and assemble the edited data file through the target application program to obtain an intermediate data file (i.e., the first intermediate data file). Then, the electronic device can call the SREC tool through the target application program. The SREC tool is an application program integrating the method for generating a second intermediate data file based on the first intermediate data file provided by an embodiment of the present invention. The SREC tool is used to generate a HEX file or an S-record file (i.e., the second intermediate data file) based on the first intermediate data file.

[0212] Furthermore, the electronic device can call a common binary file conversion tool through the target application program. The common binary file conversion tool is an application program integrating the method for generating an upgrade file based on the second intermediate data file provided by an embodiment of the present invention. The common binary file conversion tool is used to generate an upgrade file in a common binary format based on the second intermediate data file.

[0213] Based on the above processing, if the function parameters of multiple in-vehicle functions in the first data item of the data file to be processed contain configuration parameter values that match different vehicle types, the upgrade file obtained based on the data file to be processed also contains configuration parameter values that match different vehicle types for the function parameters of multiple in-vehicle functions. Correspondingly, when it is necessary to perform function configuration on a vehicle, the in-vehicle computer can obtain the configuration parameter values that match the vehicle type of the vehicle to which the in-vehicle computer belongs from the upgrade file, as well as the storage address of the obtained configuration parameter values in the in-vehicle computer, and store the obtained configuration parameter values at this storage address in the in-vehicle computer to complete the function configuration of the vehicle to which the in-vehicle computer belongs. Technicians only need to input the configuration parameter values that match the function parameters of each in-vehicle function and different vehicle types into the data file to be processed, and subsequent in-vehicle function configuration can be automatically performed based on the data file to be processed, without the need for technicians to perform function configuration on vehicles of different vehicle types by modifying software programs, which can reduce the consumed labor costs and time costs and improve the efficiency of performing function configuration on vehicles.

[0214] See Figure 9 , Figure 9 which is a flowchart of another method for generating an upgrade file provided by an embodiment of the present invention.

[0215] The electronic device can open the file and obtain new configuration items, that is, the electronic device opens the data file to be processed and obtains the configuration parameter values in a first data item of the data file to be processed. If no new configuration items are obtained, that is, the configuration parameter values in the first data item are not obtained, the file can be directly closed without performing other processing.

[0216] If new configuration items are obtained, that is, the configuration parameter values in the first data item are obtained, the electronic device can determine the data type of the configuration parameter values in the first data item.

[0217] When the data type of the configuration parameter values in the first data item is BOOL, it is determined whether the configuration parameter values in the first data item are valid values. If the configuration parameter values in the first data item are valid values, the configuration parameter values in the first data item are converted into ASCII format to obtain a second data item, and the second data item is written into the created blank text file. If the configuration parameter values in the first data item are not valid values, the default parameter values in the first data item are converted into ASCII format to obtain a second data item, and the second data item is written into the created blank text file.

[0218] When the data type of the configuration parameter value in the first data item is a MAC address, determine whether the MAC address is valid, that is, determine whether the configuration parameter value in the first data item is a valid value. If the MAC address is valid, that is, the configuration parameter value in the first data item is a valid value, convert the configuration parameter value in the first data item to ASCII format to obtain a second data item, and write the second data item into the created blank text file. If the MAC address is invalid, that is, the configuration parameter value in the first data item is not a valid value, convert the default parameter value in the first data item to ASCII format to obtain a second data item, and write the second data item into the created blank text file.

[0219] When the data type of the configuration parameter value in the first data item is an IP address, determine whether the IP address is valid, that is, determine whether the configuration parameter value in the first data item is a valid value. If the IP address is valid, that is, the configuration parameter value in the first data item is a valid value, convert the configuration parameter value in the first data item to ASCII format to obtain a second data item, and write the second data item into the created blank text file. If the IP address is invalid, that is, the configuration parameter value in the first data item is not a valid value, convert the configuration parameter value in the first data item to ASCII format to obtain a second data item, and write the second data item into the created blank text file.

[0220] When the data type of the configuration parameter value in the first data item is any one of an integer, a decimal, and a hexadecimal value, determine whether the first data item contains a maximum parameter value. If the first data item does not contain a maximum parameter value, the electronic device can directly determine that the configuration parameter value in the first data item is not a valid value, and convert the default parameter value in the first data item to ASCII format to obtain a second data item, and write the second data item into the created blank text file.

[0221] If the first data item contains a maximum parameter value, the electronic device can determine whether the configuration parameter value in the first data item is less than the maximum parameter value. If the configuration parameter value in the first data item is not less than the maximum parameter value, the electronic device can directly determine that the configuration parameter value in the first data item is not a valid value, and convert the default parameter value in the first data item to ASCII format to obtain a second data item, and write the second data item into the created blank text file.

[0222] If the configuration parameter value in the first data item is less than the maximum parameter value, the electronic device can determine whether the minimum parameter value is included in the first data item. If the minimum parameter value is not included in the first data item, the electronic device can directly determine that the configuration parameter value in the first data item is not a valid value, convert the default parameter value in the first data item into ASCII format to obtain a second data item, and write the second data item into the created blank text file.

[0223] If the minimum parameter value is included in the first data item, the electronic device determines whether the configuration parameter value in the first data item is greater than the minimum parameter value. If the configuration parameter value in the first data item is not greater than the minimum parameter value, the electronic device can directly determine that the configuration parameter value in the first data item is not a valid value, convert the default parameter value in the first data item into ASCII format to obtain a second data item, and write the second data item into the created blank text file.

[0224] If the configuration parameter value in the first data item is greater than the minimum parameter value, the electronic device can determine whether the specified step length is included in the first data item. If the specified step length is not included in the first data item, the electronic device can directly determine that the configuration parameter value in the first data item is not a valid value, convert the default parameter value in the first data item into ASCII format to obtain a second data item, and write the second data item into the created blank text file.

[0225] If the specified step length is included in the first data item, it is determined whether the difference between the configuration parameter value in the first data item and the minimum parameter value is an integer multiple of the specified step length. If the difference between the configuration parameter value in the first data item and the minimum parameter value is not an integer multiple of the specified step length, the electronic device can directly determine that the configuration parameter value in the first data item is not a valid value, convert the default parameter value in the first data item into ASCII format to obtain a second data item, and write the second data item into the created blank text file.

[0226] If the difference between the configuration parameter value in the first data item and the minimum parameter value is an integer multiple of the specified step length, it is determined that the configuration parameter value in the first data item is a valid value, convert the configuration parameter value in the first data item into ASCII format to obtain a second data item, and write the second data item into the created blank text file. Furthermore, an intermediate data file (i.e., the first intermediate data file) containing multiple second data items can be obtained.

[0227] Then, the electronic device can input the first intermediate data file into the SREC tool, and through the SREC tool, generate a HEX file or an S-record file (i.e., the second intermediate data file) based on the first intermediate data file, and through the general binary file conversion tool, generate an upgrade file in the general binary format based on the second intermediate data file.

[0228] Based on the above processing, if the first data item in the data file to be processed contains the function parameters of multiple vehicle-mounted functions and the configuration parameter values matching different vehicle types, then the upgrade file obtained based on the data file to be processed also contains the function parameters of multiple vehicle-mounted functions and the configuration parameter values matching different vehicle types. Correspondingly, when it is necessary to perform function configuration on a vehicle, the in-vehicle computer can obtain the configuration parameter values matching the vehicle type of the vehicle to which the in-vehicle computer belongs from the upgrade file, as well as the storage address of the obtained configuration parameter values in the in-vehicle computer, and store the obtained configuration parameter values in the storage address in the in-vehicle computer to complete the function configuration of the vehicle to which the in-vehicle computer belongs. Technicians only need to input the function parameters of each vehicle-mounted function and the configuration parameter values matching different vehicle types into the data file to be processed, and subsequent function configuration of vehicles of different vehicle types can be automatically performed based on the data file to be processed, without the need for technicians to perform function configuration on vehicles of different vehicle types by modifying software programs, which can reduce the labor cost and time cost consumed and improve the efficiency of function configuration for vehicles.

[0229] See Figure 10 , Figure 10 which is a flowchart of another method for generating an upgrade file provided by an embodiment of the present invention.

[0230] The electronic device can obtain command line parameters and open the data file (i.e., the second intermediate data file). The generation method of the second intermediate data file can refer to the relevant introduction in the foregoing embodiments. The command line parameters include the storage address of the second intermediate data file, the header information of the upgrade file to be generated, and a preset value. The electronic device can obtain the second intermediate data file according to the storage address of the second intermediate data file and open the obtained second intermediate data file.

[0231] Then, the electronic device can obtain a new line of data, that is, obtain a third data item from the second intermediate data file. If the third data item is not obtained, the electronic device can close the data file and do nothing. If the third data item is obtained, the electronic device can perform data assembly. That is, the electronic device can generate a corresponding data block based on the second data item in the obtained third data item and the corresponding storage address. Then, obtain the next third data item from the second intermediate data file and generate a corresponding data block based on the second data item in the obtained third data item and the corresponding storage address.

[0232] Furthermore, the electronic device can create an upgrade file and output information such as the header, address, data, and check code in a custom format. That is, the electronic device can write the storage address of the first second data item included in a data block, the size of the data block, the data block, and the second check code of the data block into a created blank general binary format file, and output information such as the tail in a custom format, so as to obtain an upgrade file containing multiple data blocks.

[0233] Based on the above processing, if the first data item in the data file to be processed contains configuration parameter values that match the function parameters of multiple in-vehicle functions with different vehicle types, then the upgrade file obtained based on the data file to be processed also contains configuration parameter values that match the function parameters of multiple in-vehicle functions with different vehicle types. Correspondingly, when it is necessary to configure the functions of a vehicle, the in-vehicle computer can obtain the configuration parameter values that match the vehicle type of the vehicle to which the in-vehicle computer belongs from the upgrade file, as well as the storage address of the obtained configuration parameter values in the in-vehicle computer, and store the obtained configuration parameter values at the storage address in the in-vehicle computer to complete the function configuration of the vehicle to which the in-vehicle computer belongs. Technicians only need to input the configuration parameter values that match the function parameters of each in-vehicle function with different vehicle types into the data file to be processed, and subsequent in-vehicle function configuration can be automatically performed based on the data file to be processed, without the need for technicians to configure the functions of vehicles of different vehicle types by modifying software programs, which can reduce the labor cost and time cost consumed and improve the efficiency of vehicle function configuration.

[0234] Corresponding to Figure 1 the method embodiment of Figure 11 , Figure 11 FIG.

[0235] An obtaining module 1101, configured to obtain a data file to be processed that contains multiple first data items; wherein, each first data item includes a configuration parameter value that matches the function parameter of an in-vehicle function with different vehicle types; the configuration parameter value represents the value that needs to be set for the corresponding function parameter in the vehicle;

[0236] A conversion module 1102, configured to convert the configuration parameter value in each first data item into ASCII format for each first data item to obtain a corresponding second data item;

[0237] A determination module 1103, configured to determine the storage address of each second data item in the in-vehicle computer according to the specified storage location in the in-vehicle computer for loading the upgrade file and the size of each second data item;

[0238] A generation module 1104, configured to process each third data item based on a data format supported by a vehicle-mounted computer to obtain an upgrade file; a third data item is determined based on a second data item and a corresponding storage address; so that a target vehicle-mounted computer obtains a configuration parameter value corresponding to each storage address in the upgrade file and matching the vehicle type of the vehicle to which the target vehicle-mounted computer belongs, and stores the value to the storage address, so as to complete the function configuration of the vehicle to which the target vehicle-mounted computer belongs.

[0239] Based on the upgrade file generation device provided in the embodiments of the present invention, if the first data item in the data file to be processed contains configuration parameter values of function parameters of multiple in-vehicle functions that match different vehicle types, the upgrade file obtained based on the data file to be processed also contains configuration parameter values of function parameters of multiple in-vehicle functions that match different vehicle types. Correspondingly, when it is necessary to perform function configuration on a vehicle, the vehicle-mounted computer can obtain the configuration parameter value that matches the vehicle type of the vehicle to which the vehicle-mounted computer belongs from the upgrade file, as well as the storage address of the obtained configuration parameter value in the vehicle-mounted computer, and store the obtained configuration parameter value to the storage address in the vehicle-mounted computer, so as to complete the function configuration of the vehicle to which the vehicle-mounted computer belongs. Technical personnel only need to input the configuration parameter values of the function parameters of each in-vehicle function that match different vehicle types into the data file to be processed, and subsequent in-vehicle function configuration can be automatically performed based on the data file to be processed, without the need for technical personnel to perform function configuration on vehicles of different vehicle types by modifying software programs, which can reduce the consumed labor cost and time cost and improve the efficiency of performing function configuration on vehicles.

[0240] And Figure 7 corresponding to the method embodiment of Figure 12 , Figure 12 As shown in

[0241] A first acquisition module 1201, configured to acquire an upgrade file for performing function configuration on a vehicle; wherein, the upgrade file is obtained by processing each third data item based on a data format supported by a vehicle-mounted computer; a third data item is determined based on a second data item and the storage address of the second data item in the vehicle-mounted computer; the storage addresses of each second data item in the vehicle-mounted computer are determined according to a specified storage location in the vehicle-mounted computer for loading the upgrade file and the size of each second data item; a second data item is obtained by converting the configuration parameter value in a first data item in the data file to be processed into ASCII format; each first data item includes configuration parameter values of function parameters of an in-vehicle function that match different vehicle types; the configuration parameter value represents the value that needs to be set for the corresponding function parameter in the vehicle.

[0242] A second acquisition module 1202, configured to acquire each storage address from the upgrade file, and a configuration parameter value corresponding to the storage address and matching the vehicle type of the vehicle to which the in-vehicle unit belongs;

[0243] A configuration module 1203, configured to store the acquired configuration parameter value into a corresponding storage address in the in-vehicle unit, so as to complete the function configuration of the vehicle to which the in-vehicle unit belongs.

[0244] Based on the vehicle function configuration device provided by the embodiment of the present invention, if the first data item in the data file to be processed contains configuration parameter values of function parameters of multiple in-vehicle functions matching different vehicle types, the upgrade file obtained based on the data file to be processed also contains configuration parameter values of function parameters of multiple in-vehicle functions matching different vehicle types. Correspondingly, when it is necessary to perform function configuration on a vehicle, the in-vehicle unit can acquire a configuration parameter value matching the vehicle type of the vehicle to which the in-vehicle unit belongs from the upgrade file, and the storage address of the acquired configuration parameter value in the in-vehicle unit, and store the acquired configuration parameter value into the storage address in the in-vehicle unit, so as to complete the function configuration of the vehicle to which the in-vehicle unit belongs. Technical personnel only need to input the configuration parameter values of the function parameters of each in-vehicle function matching different vehicle types into the data file to be processed, and subsequent in-vehicle function configuration can be automatically performed based on the data file to be processed, without the need for technical personnel to perform function configuration on vehicles of different vehicle types by modifying software programs, which can reduce the consumed labor cost and time cost, and improve the efficiency of vehicle function configuration.

[0245] The embodiment of the present invention further provides an electronic device, as Figure 13 shown, including a processor 1301, a communication interface 1302, a memory 1303, and a communication bus 1304. Among them, the processor 1301, the communication interface 1302, and the memory 1303 complete mutual communication through the communication bus 1304,

[0246] The memory 1303 is used for storing a computer program;

[0247] The processor 1301 is configured to implement the method for generating the upgrade file according to any one of the above embodiments when executing the program stored on the memory 1303.

[0248] The embodiment of the present invention further provides an in-vehicle unit, as Figure 14 shown, including a processor 1401, a communication interface 1402, a memory 1403, and a communication bus 1404. Among them, the processor 1401, the communication interface 1402, and the memory 1403 complete mutual communication through the communication bus 1404,

[0249] The memory 1403 is used for storing a computer program;

[0250] A processor 1401, when executing a program stored in a memory 1403, implements the function configuration method of the vehicle according to any one of the above embodiments.

[0251] The communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0252] The communication interface is used for communication between the above electronic device and other devices.

[0253] The memory may include a Random Access Memory (RAM), or may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.

[0254] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0255] In another embodiment provided by the present invention, a computer-readable storage medium is further provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps of the method for generating an upgrade file according to the above embodiment, or implements the steps of the function configuration method of the vehicle according to the above embodiment.

[0256] In another embodiment provided by the present invention, there is also provided a computer program product including instructions. When it runs on a computer, it causes the computer to execute the method for generating an upgrade file described in the above embodiment, or execute the method for functionally configuring a vehicle described in the above embodiment.

[0257] In the above embodiment, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).

[0258] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including", or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article, or device including the element.

[0259] Each embodiment in this specification is described in a related manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the device, electronic device, vehicle-mounted computer, computer-readable storage medium, and computer program product, since they are basically similar to the method embodiments, the description is relatively simple, and reference can be made to the relevant parts of the method embodiments for the related content.

[0260] The above are only the preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention are all included in the protection scope of the present invention.

Claims

1. A method for generating an upgrade file, characterized in that, The method includes: Obtaining a data file to be processed that contains multiple first data items; wherein, each first data item includes configuration parameter values of a function parameter of an in-vehicle function matched with different vehicle types; the configuration parameter values represent the values that need to be set for the corresponding function parameter in the vehicle; For each first data item, converting the configuration parameter value in the first data item into ASCII format to obtain a corresponding second data item; Determining the storage addresses of the second data items in the in-vehicle unit according to the specified storage location in the in-vehicle unit for loading the upgrade file and the sizes of the second data items; Processing the third data items based on the data format supported by the in-vehicle unit to obtain an upgrade file; a third data item is determined based on a second data item and the corresponding storage address; so that the target in-vehicle unit obtains the configuration parameter values matching the vehicle type of the vehicle to which the target in-vehicle unit belongs corresponding to each storage address in the upgrade file and stores them at the storage address to complete the function configuration of the vehicle to which the target in-vehicle unit belongs; The processing the third data items based on the data format supported by the in-vehicle unit to obtain an upgrade file includes: Creating a blank general binary format file; Obtaining a third data item in the arrangement order as the current data item to be processed; Caching the second data item in the current data item to be processed into a preset cache space in binary format; Judging whether the size of the data currently stored in the preset cache space is an integer multiple of a preset value; If the size of the data currently stored in the preset cache space is an integer multiple of the preset value, taking the data currently stored in the preset cache space as a data block; Writing the storage address of the first second data item included in the data block, the size of the data block, the data block, and the second check code of the data block into the general binary format file, and returning to execute the step of obtaining a third data item in the arrangement order as the current data item to be processed until the last third data item is processed to obtain a general binary format file containing multiple data blocks as the upgrade file.

2. The method according to claim 1, wherein A first data item further includes default parameter values of the function parameter of the corresponding in-vehicle function for different types of vehicles; The converting the configuration parameter value in the first data item into ASCII format to obtain a corresponding second data item for each first data item includes: For each first data item, judging whether the configuration parameter value in the first data item is a valid value; If the configuration parameter value in the first data item is a valid value, converting the configuration parameter value in the first data item into ASCII format to obtain a corresponding second data item; The method further includes: If the configuration parameter value in the first data item is not a valid value, converting the default parameter value in the first data item into ASCII format to obtain a corresponding second data item.

3. The method according to claim 2, wherein The data type of the configuration parameter value in a first data item is any one of an integer, a decimal, and a hexadecimal value; The judging whether the configuration parameter value in the first data item is a valid value includes: Determine whether the configuration parameter value in the first data item belongs to a preset parameter value range; If the configuration parameter value in the first data item does not belong to the preset parameter value range, determine that the configuration parameter value in the first data item is not a valid value; If the configuration parameter value in the first data item belongs to the preset parameter value range, determine whether the difference between the configuration parameter value in the first data item and the lower limit value of the preset parameter value range is an integer multiple of a specified step size; if the difference between the configuration parameter value in the first data item and the lower limit value of the preset parameter value range is an integer multiple of the specified step size, determine that the configuration parameter value in the first data item is a valid value, and if the difference between the configuration parameter value in the first data item and the lower limit value of the preset parameter value range is not an integer multiple of the specified step size, determine that the configuration parameter value in the first data item is not a valid value.

4. The method according to claim 1, wherein Before processing each third data item based on the data format supported by the in-vehicle unit to obtain an upgrade file, the method further includes: Create a blank file in the file format corresponding to the function test device; For each second data item, generate a check code of the second data item as the first check code based on the second data item and its storage address; wherein, when the function test device loads the second data item in each third data item, the function test device checks the second data item based on the corresponding first check code; Assemble the address type of the second data item, the size of the second data item, the storage address of the second data item, the second data item, and the second check code of the second data item to obtain the corresponding third data item; Write the obtained multiple third data items into the blank file to obtain an intermediate data file containing multiple third data items, so that the function test device can obtain each third data item in the intermediate data file and store the configuration parameter values in each third data item to the corresponding storage address in the function test device to test the in-vehicle function.

5. The method according to claim 1, wherein Before caching the second data item in the current data item to be processed in the preset cache space in binary format, the method further includes: Determine whether the first storage address of the second data item in the current data item to be processed is a continuous storage address with the second storage address of the second data item in the previous third data item; If the first storage address and the second storage address are not continuous storage addresses, determine the size of the storage address interval between the first storage address and the second storage address as a first value; Caching the second data item in the current data item to be processed in the preset cache space in binary format includes: Caching the specified padding data of the first value and the second data item in the current data item to be processed in the preset cache space in binary format.

6. The method according to claim 1, characterized in that After determining whether the size of the data currently stored in the preset cache space is an integer multiple of a preset value, the method further includes: If the size of the data currently stored in the preset cache space is not an integer multiple of the preset value, determine, from the integer multiples of the preset value, the integer multiple with the smallest absolute value of the difference from the size of the data currently stored in the preset cache space as the second value; Calculate the difference between the second value and the size of the data currently stored in the preset cache space as the third value; If the third value is not less than the preset difference, return to execute the step of obtaining a third data item in the sorting order as the current data item to be processed, until the last third data item is processed, and obtain a general binary format file containing multiple data blocks as the upgrade file; If the third value is less than the preset difference, cache the specified padding data of the third value into the preset cache space, and use the data currently stored in the preset cache space as a data block; write the storage address of the first second data item included in the data block, the size of the data block, the data block, and the second check code of the data block into the general binary format file, return to execute the step of obtaining a third data item in the sorting order as the current data item to be processed, until the last third data item is processed, and obtain a general binary format file containing multiple data blocks as the upgrade file.

7. A functional configuration method for a vehicle, characterized in that The method is applied to a car head unit, and the method includes: Obtain an upgrade file for functional configuration of a vehicle; wherein, the upgrade file is obtained by processing each third data item based on the data format supported by the in-vehicle computer; one third data item is determined based on one second data item and the storage address of the second data item in the in-vehicle computer; the storage addresses of each second data item in the in-vehicle computer are determined according to the specified storage location for loading the upgrade file in the in-vehicle computer and the size of each second data item; one second data item is obtained by converting the configuration parameter value in one first data item in the data file to be processed into ASCII format; each first data item includes the functional parameters of an in-vehicle function and the configuration parameter values matching different vehicle types; the configuration parameter value represents the value that needs to be set for the corresponding functional parameter in the vehicle; the upgrade file is obtained based on the following method: create a blank general binary format file; obtain a third data item in the arrangement order as the current data item to be processed; cache the second data item in the current data item to be processed into a preset cache space in binary format; determine whether the size of the data currently stored in the preset cache space is an integer multiple of a preset value; if the size of the data currently stored in the preset cache space is an integer multiple of the preset value, use the data currently stored in the preset cache space as a data block; write the storage address of the first second data item included in the data block, the size of the data block, the data block, and the second check code of the data block into the general binary format file, and return to execute the step of obtaining a third data item in the arrangement order as the current data item to be processed until the last third data item is processed, obtaining a general binary format file containing multiple data blocks as the upgrade file; From the upgrade file, obtain each storage address and the configuration parameter value corresponding to the storage address and matching the vehicle type of the vehicle to which the in-vehicle computer belongs; Store the obtained configuration parameter value into the corresponding storage address in the in-vehicle computer to complete the functional configuration of the vehicle to which the in-vehicle computer belongs.

8. An apparatus for generating an upgrade file, characterized in that The device includes: An obtaining module, configured to obtain a data file to be processed including multiple first data items; wherein, each first data item includes the functional parameters of an in-vehicle function and the configuration parameter values matching different vehicle types; the configuration parameter value represents the value that needs to be set for the corresponding functional parameter in the vehicle; A conversion module, configured to convert the configuration parameter value in each first data item into ASCII format for each first data item to obtain the corresponding second data item; A determination module, configured to determine the storage addresses of each second data item in the in-vehicle computer according to the specified storage location for loading the upgrade file in the in-vehicle computer and the size of each second data item; A generation module, configured to process each third data item based on the data format supported by the in-vehicle unit to obtain an upgrade file; a third data item is determined based on a second data item and a corresponding storage address; so that the target in-vehicle unit obtains the configuration parameter value corresponding to each storage address in the upgrade file and matching the vehicle type of the vehicle to which the target in-vehicle unit belongs, and stores it in this storage address to complete the function configuration of the vehicle to which the target in-vehicle unit belongs; The generation module is specifically configured to: Create a blank common binary format file; Obtain a third data item in the arrangement order as the current data item to be processed; Cache the second data item in the current data item to be processed into a preset cache space in binary format; Determine whether the size of the data currently stored in the preset cache space is an integer multiple of a preset value; If the size of the data currently stored in the preset cache space is an integer multiple of the preset value, use the data currently stored in the preset cache space as a data block; Write the storage address of the first second data item included in this data block, the size of this data block, this data block, and the second check code of this data block into the common binary format file, and return to execute the step of obtaining a third data item in the arrangement order as the current data item to be processed until the last third data item is processed to obtain a common binary format file containing multiple data blocks as the upgrade file.

9. A functional configuration device for a vehicle, characterized in that, The device is applied to an in-vehicle unit, and the device includes: The first acquisition module is used to acquire an upgrade file for function configuration of a vehicle; wherein, the upgrade file is obtained by processing each third data item based on the data format supported by the in-vehicle computer; one third data item is determined based on one second data item and the storage address of the second data item in the in-vehicle computer; the storage addresses of each second data item in the in-vehicle computer are determined according to the specified storage location for loading the upgrade file in the in-vehicle computer and the size of each second data item; one second data item is obtained by converting the configuration parameter value in one first data item in the data file to be processed into ASCII format; each first data item includes the configuration parameter values of the function parameters of an in-vehicle function matching different vehicle types; the configuration parameter value represents the value that needs to be set for the corresponding function parameter in the vehicle; the upgrade file is obtained based on the following method: create a blank general binary format file; obtain a third data item in the arrangement order as the current data item to be processed; cache the second data item in the current data item to be processed into a preset cache space in binary format; determine whether the size of the data currently stored in the preset cache space is an integer multiple of a preset value; if the size of the data currently stored in the preset cache space is an integer multiple of the preset value, use the data currently stored in the preset cache space as a data block; write the storage address of the first second data item included in the data block, the size of the data block, the data block, and the second check code of the data block into the general binary format file, and return to execute the step of obtaining a third data item in the arrangement order as the current data item to be processed until the last third data item is processed, and obtain a general binary format file including multiple data blocks as the upgrade file; The second acquisition module is used to acquire each storage address from the upgrade file, and the configuration parameter value corresponding to the storage address and matching the vehicle type of the vehicle to which the in-vehicle computer belongs; The configuration module is used to store the acquired configuration parameter values into the corresponding storage addresses in the in-vehicle computer to complete the function configuration of the vehicle to which the in-vehicle computer belongs.

Citation Information

Patent Citations

  • Function and parameter on-line configuration method of automobile integrated automobile body electronic control unit

    CN102768530A

  • On-line upgrading method and device for vehicle-mounted controller, computer equipment and storage medium

    CN112804698A

  • Data processing method and device for interface testing

    CN113806211A