Method and device for switching vehicle driving modes, medium, equipment and vehicle

By establishing the mapping relationship between calibration parameters and proxy variables, a calibration file with optimal values ​​is generated and merged into the target file, which solves the problems of high R&D costs and waste of resources in vehicle driving mode switching, and achieves fast and instant driving mode switching. and resource conservation.

CN118708252APending Publication Date: 2024-09-27BEBEST (SHANGHAI) AUTOMOTIVE ELECTRONICS CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410720143.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

In the existing technology, vehicle driving mode switching requires the development of software for each driving mode separately, resulting in high research and development costs and a waste of system resources.

Method used

By establishing the mapping relationship between two sets of calibration parameters and the mapping relationship between proxy variable sets, the calibration file with the optimal value is generated and merged in the target file to realize the switching of the driving mode, and the allocation and release of memory blocks are used to optimize resource usage.

Benefits of technology

It achieves software coverage of multiple drive modes, reduces R&D costs, saves system resources, and achieves fast and instant drive mode switching during software startup and operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708252A
    Figure CN118708252A
Patent Text Reader

Abstract

The invention discloses a method and device for switching a vehicle driving mode, a medium, equipment and a vehicle. The method comprises the steps that a first mapping relation of two sets of calibration parameters and a second mapping relation of the first set of calibration parameters and a calibration agent variable set are established; adjusting the variables of the calibration agent variable set according to the second mapping relation to obtain a first calibration file comprising the optimal value of the corresponding calibration parameter in the first set of calibration parameters of the calibration agent variable agent; adjusting the calibration agent variables in the calibration agent variable set according to the calibration requirements of the second set of calibration parameters to obtain a second calibration file comprising the optimal value of the corresponding calibration parameter in the first set of calibration parameters agented by the calibration agent variables; modifying the calibration parameter name in the second calibration file into the calibration parameter name in the second set of calibration parameters according to the first mapping relation; combining the two calibration files into a target file; and accessing the calibration parameters corresponding to the configured driving mode through the target file to realize vehicle driving.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle technology, and in particular to a method, device, medium, equipment and vehicle for switching a vehicle driving mode. Background Art

[0002] The vehicle drive mode refers to the layout of the engine and the number and position of the drive wheels. The most basic classification standard is based on the number of drive wheels, which can be divided into two categories: two-wheel drive and four-wheel drive. Generally, vehicles have two rows of wheels, front and rear. The wheels that are directly driven by the engine to push (or pull) the vehicle forward are the drive wheels. The vehicle drive mode has an important impact on the performance, appearance and internal dimensions, weight, axle load distribution, manufacturing cost and maintenance of the vehicle. Scientifically and rationally selecting the drive mode is one of the primary tasks of the overall vehicle design.

[0003] In order to meet the needs of different users, vehicle manufacturers will develop a software for each driving mode in the same vehicle, so that users can choose the required driving mode according to their own needs, so that the system can call the corresponding software to execute and realize the driving mode. However, configuring a software for each driving mode not only has high R&D costs, but also wastes system resources. Summary of the invention

[0004] The present application provides a method, apparatus, medium, device and vehicle for switching vehicle driving modes, which can solve the problem of configuring a software for each driving mode separately, which not only has high research and development costs but also causes waste of system resources.

[0005] The specific technical solutions are as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for switching a vehicle driving mode, the method comprising:

[0007] Establishing a first mapping relationship between a first set of calibration parameters and a second set of calibration parameters, and establishing a second mapping relationship between the first set of calibration parameters and a calibration proxy variable set, wherein the first set of calibration parameters is a calibration parameter set corresponding to a first vehicle driving mode, the second set of calibration parameters is a calibration parameter set corresponding to a second vehicle driving mode, and the data structures of the second set of calibration parameters and the calibration proxy variable set are the same as those of the first set of calibration parameters;

[0008] According to the second mapping relationship, the calibration proxy variables in the calibration proxy variable set are adjusted to obtain the optimal value of the corresponding calibration parameter in the first set of calibration parameters for each calibration proxy variable proxy, and generate a first calibration file including the optimal value of each calibration parameter in the first set of calibration parameters;

[0009] According to the calibration requirements of the second set of calibration parameters, the calibration proxy variables in the calibration proxy variable set are adjusted to obtain the optimal value of the corresponding calibration parameter in the first set of calibration parameters represented by each calibration proxy variable, and a second calibration file including the optimal value of each calibration parameter in the first set of calibration parameters is generated;

[0010] According to the first mapping relationship, modify the calibration parameter name in the second calibration file to the parameter name of the corresponding calibration parameter in the second set of calibration parameters, to obtain the modified second calibration file;

[0011] Merging the first calibration file and the modified second calibration file into a target file, wherein the target file is a file that can be executed in a single-chip microcomputer;

[0012] The driving mode configured by the user is obtained, and the calibration parameters corresponding to the driving mode configured by the user are accessed through the target file to realize the function of the driving mode configured by the user. When the user modifies the driving mode, the calibration parameters corresponding to the modified driving mode are accessed through the target file to realize the switching of the driving mode.

[0013] In a possible implementation, before establishing a first mapping relationship between the first set of calibration parameters and the second set of calibration parameters, and establishing a second mapping relationship between the first set of calibration parameters and a set of calibration proxy variables, the method further includes:

[0014] sequentially allocating the first set of calibration parameters to a first memory block, allocating the second set of calibration parameters to a second memory block, and allocating the calibration proxy variable set to a third memory block, wherein the first memory block and the second memory block are of the same memory type, and the third memory block is of a different memory type from the first memory block and the second memory block;

[0015] After generating a second calibration file including an optimal value for each calibration parameter in the first set of calibration parameters, the method further comprises:

[0016] The calibration proxy variable set is deleted, and the third memory block is released.

[0017] In a possible implementation, sequentially allocating the first set of calibration parameters to a first memory block, allocating the second set of calibration parameters to a second memory block, and allocating the calibration proxy variable set to a third memory block includes:

[0018] Obtaining the first set of calibration parameters pre-stored in the target source code file, and allocating the first set of calibration parameters to the first memory block through a pre-compiled instruction;

[0019] Creating the second set of calibration parameters having the same numerical structure as the first set of calibration parameters in the target source code file, and allocating the second set of calibration parameters to the second memory block through a precompiled instruction;

[0020] The calibration proxy variable set having the same data structure as the first set of calibration parameters is created in the target source code file, and the calibration proxy variable set is allocated to the third memory block through a pre-compilation instruction.

[0021] In a possible implementation, according to the first mapping relationship, modifying the calibration parameter name in the second calibration file to the parameter name of the corresponding calibration parameter in the second set of calibration parameters, and obtaining the modified second calibration file includes:

[0022] Through script processing, according to the first mapping relationship, the calibration parameter names in the second calibration file are batch modified to the parameter names of the corresponding calibration parameters in the second set of calibration parameters, so as to obtain the modified second calibration file.

[0023] In a possible implementation, obtaining the driving mode configured by the user includes:

[0024] Get the drive mode configured by the user through the diagnostic tool.

[0025] In a second aspect, an embodiment of the present application provides a device for switching a vehicle driving mode, the device comprising:

[0026] a mapping establishment unit, configured to establish a first mapping relationship between a first set of calibration parameters and a second set of calibration parameters, and to establish a second mapping relationship between the first set of calibration parameters and a calibration proxy variable set, wherein the first set of calibration parameters is a calibration parameter set corresponding to a first vehicle driving mode, the second set of calibration parameters is a calibration parameter set corresponding to a second vehicle driving mode, and the data structures of the second set of calibration parameters and the calibration proxy variable set are the same as those of the first set of calibration parameters;

[0027] a first calibration unit, configured to adjust the calibration proxy variables in the calibration proxy variable set according to the second mapping relationship, obtain an optimal value of a corresponding calibration parameter in the first set of calibration parameters for each calibration proxy variable proxy, and generate a first calibration file including the optimal value of each calibration parameter in the first set of calibration parameters;

[0028] a second calibration unit, configured to adjust the calibration proxy variables in the calibration proxy variable set according to the calibration requirements of the second set of calibration parameters, obtain the optimal value of the corresponding calibration parameter in the first set of calibration parameters represented by each calibration proxy variable, and generate a second calibration file including the optimal value of each calibration parameter in the first set of calibration parameters;

[0029] A modification unit, configured to modify the calibration parameter names in the second calibration file to parameter names of corresponding calibration parameters in the second set of calibration parameters according to the first mapping relationship, so as to obtain a modified second calibration file;

[0030] A merging unit, used for merging the first calibration file and the modified second calibration file into a target file, wherein the target file is a file that can be executed in a single chip microcomputer;

[0031] An acquisition unit, used for acquiring a driving mode configured by a user;

[0032] The access unit is used to access the calibration parameters corresponding to the user-configured driving mode through the target file to realize the function of the user-configured driving mode, and when the user modifies the driving mode, the calibration parameters corresponding to the modified driving mode are accessed through the target file to realize the switching of the driving mode.

[0033] In a possible implementation, the device further includes:

[0034] a memory allocation unit, used for, before establishing a first mapping relationship between a first set of calibration parameters and a second set of calibration parameters and establishing a second mapping relationship between the first set of calibration parameters and a set of calibration proxy variables, sequentially allocating the first set of calibration parameters to a first memory block, allocating the second set of calibration parameters to a second memory block, and allocating the set of calibration proxy variables to a third memory block, wherein the first memory block and the second memory block are of the same memory type, and the third memory block is of a different memory type from the first memory block and the second memory block;

[0035] A deleting and releasing unit is used to delete the calibration proxy variable set and release the third memory block after generating a second calibration file including the optimal value of each calibration parameter in the first set of calibration parameters.

[0036] In a possible implementation, the memory allocation unit includes:

[0037] a first allocation module, configured to obtain the first set of calibration parameters pre-stored in a target source code file, and allocate the first set of calibration parameters to the first memory block through a pre-compiled instruction;

[0038] The first creation module is used to create the second set of calibration parameters in the target source code file with the same numerical structure as the first set of calibration parameters;

[0039] A second allocation module, configured to allocate the second set of calibration parameters to the second memory block through a precompiled instruction;

[0040] A second creation module, configured to create the calibration proxy variable set having the same data structure as the first set of calibration parameters in the target source code file;

[0041] The third allocation module is used to allocate the calibration proxy variable set to the third memory block through a pre-compiled instruction.

[0042] In a possible implementation, the modification unit is used to batch modify the calibration parameter names in the second calibration file to parameter names of corresponding calibration parameters in the second set of calibration parameters through script processing according to the first mapping relationship, so as to obtain the modified second calibration file.

[0043] In a possible implementation, the acquisition unit is used to acquire the driving mode configured by the user through a diagnostic instrument.

[0044] In a third aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any possible implementation manner of the first aspect.

[0045] In a fourth aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:

[0046] one or more processors;

[0047] The processor is coupled to a storage device, and the storage device is used to store one or more programs;

[0048] When one or more programs are executed by one or more processors, the electronic device implements the method described in any possible implementation manner of the first aspect.

[0049] In a fifth aspect, an embodiment of the present application provides a vehicle, the vehicle comprising a device as described in any possible implementation of the second aspect, or comprising an electronic device as described in the fourth aspect.

[0050] In a sixth aspect, an embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed on a computer or a processor, the computer or the processor executes the method described in any possible implementation of the first aspect.

[0051] It can be seen from the above scheme that the method, device, medium, equipment and vehicle for switching the vehicle driving mode provided in the embodiment of the present application can, after establishing a first mapping relationship between the first set of calibration parameters and the second set of calibration parameters, and establishing a second mapping relationship between the first set of calibration parameters and the calibration proxy variable set, first adjust the calibration proxy variables in the calibration proxy variable set according to the second mapping relationship, obtain the optimal value of the corresponding calibration parameter in the first set of calibration parameters of each calibration proxy variable proxy, and generate a first calibration file including the optimal value of each calibration parameter in the first set of calibration parameters, thereby realizing the calibration of the first set of calibration parameters, and then adjust the calibration proxy variables in the calibration proxy variable set according to the calibration requirements of the second set of calibration parameters, and obtain the first set of calibration parameters of each calibration proxy variable proxy. The optimal value of the calibration parameter corresponding to the parameter, and generate a second calibration file including the optimal value of each calibration parameter in the first set of calibration parameters, thereby realizing the calibration of the second set of calibration parameters in the name of calibrating the first set of calibration parameters, and then according to the first mapping relationship, the calibration parameter name in the second calibration file is modified to the parameter name of the corresponding calibration parameter in the second set of calibration parameters, and the modified second calibration file is obtained, and the first calibration file and the modified second calibration file are merged into the target file; the driving mode configured by the user is obtained, and the calibration parameters corresponding to the driving mode configured by the user are accessed through the target file to realize the function of the driving mode configured by the user, and when the user modifies the driving mode, the calibration parameters corresponding to the modified driving mode are accessed through the target file to realize the switching of the driving mode. It can be seen from this that the embodiment of the present application not only provides a solution for software to cover multiple driving modes, reduces the high R&D cost, and saves system resources, but also the solution provided by the embodiment of the present application can achieve the effect of switching the driving mode at any time during the software startup and program running process, and the switching speed is fast and takes effect immediately.

[0052] The inventive aspects of the embodiments of the present application at least include:

[0053] 1. The embodiment of the present application not only provides a solution for software to cover multiple drive modes, reduces the high R&D cost, and saves system resources, but also the solution provided by the embodiment of the present application can achieve the effect of switching the drive mode at any time during the software startup and program running process, and the switching speed is fast and effective immediately. In addition, combined with batch processing tools, it can support the calibration and integration of two (or more) sets of calibration parameter sets.

[0054] 2. The embodiment of the present application allocates the first set of calibration parameters and the second set of calibration parameters to different memory blocks of the same storage type, and allocates the calibration proxy variable set to a memory block of another storage type. The calibration proxy variable set is only needed in the calibration stage. Once the calibration is completed, the calibration proxy variable set can be deleted and the third memory block can be released. Therefore, after the calibration is completed, the software will only occupy one type of memory instead of two types of memory at the same time, thereby avoiding memory waste. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art description are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative work.

[0056] Figure 1 A schematic flow chart of a method for switching a vehicle driving mode provided in an embodiment of the present application;

[0057] Figure 2 An exemplary diagram of a method for switching a vehicle driving mode provided in an embodiment of the present application;

[0058] Figure 3 A block diagram of a device for switching a vehicle driving mode provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0060] It should be noted that, in the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The terms "including" and "having" in the embodiments of the present application and the accompanying drawings and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.

[0061] Figure 1The present invention is a flow chart of a method for switching a vehicle driving mode. The method can be applied to an electronic device or a computer device, and can be specifically applied to a vehicle. The method can include the following steps:

[0062] S110: establishing a first mapping relationship between the first set of calibration parameters and the second set of calibration parameters, and establishing a second mapping relationship between the first set of calibration parameters and the calibration proxy variable set.

[0063] The first set of calibration parameters is a calibration parameter set corresponding to the first vehicle driving mode, the second set of calibration parameters is a calibration parameter set corresponding to the second vehicle driving mode, and the data structures of the second set of calibration parameters and the calibration proxy variable set are the same as the first set of calibration parameters. The parameter names for the same parameter in the first set of calibration parameters, the second set of calibration parameters, and the calibration proxy variable set are different.

[0064] In practical applications, there are multiple driving modes for vehicles. For example, when the first vehicle driving mode is a four-wheel drive mode, the second vehicle driving mode may be a two-wheel drive mode. When the first vehicle driving mode is a two-wheel drive mode, the second vehicle driving mode may be a four-wheel drive mode.

[0065] After obtaining the first set of calibration parameters, the second set of calibration parameters and the calibration proxy variable set, a first mapping relationship between the first set of calibration parameters and the second set of calibration parameters can be established through the memory mapping mechanism provided by the chip, as well as a second mapping relationship between the first set of calibration parameters and the calibration proxy variable set, so as to achieve a one-to-one mapping between the calibration parameters in the first set of calibration parameters and the calibration parameters in the second set of calibration parameters, as well as a one-to-one mapping between the calibration parameters in the first set of calibration parameters and the calibration proxy variables in the calibration proxy variable set.

[0066] It should be added that when there are three or more driving modes, the second set of calibration parameters can generally refer to the calibration parameter set required for any other driving mode except the first driving mode. As long as the calibration parameter set required for any other driving mode is respectively mapped with the first set of calibration parameters, and a second mapping relationship is established between the first set of calibration parameters and the calibration proxy variable set, multiple driving modes can be switched at any time within the same software by executing subsequent steps.

[0067] S120: According to the second mapping relationship, adjust the calibration proxy variables in the calibration proxy variable set, obtain the optimal value of the corresponding calibration parameter in the first set of calibration parameters for each calibration proxy variable, and generate a first calibration file including the optimal value of each calibration parameter in the first set of calibration parameters.

[0068] Specifically, the calibration tool can be used to adjust the calibration proxy variables in the calibration proxy variable set. Since there is a mapping relationship between the first set of calibration parameters and the calibration proxy variable set, it is equivalent to adjusting the first set of calibration parameters of each calibration proxy variable agent, so that the optimal value of the corresponding calibration parameter in the first set of calibration parameters of each calibration proxy variable agent can be obtained, and a first calibration file including the optimal value of each calibration parameter in the first set of calibration parameters is generated. Among them, there can be multiple calibration tools that can be used, such as vector CANape. When the first vehicle drive mode is the four-wheel drive mode, the file name of the first calibration file can be set to parameter-4drive.par.

[0069] S130: According to the calibration requirements of the second set of calibration parameters, the calibration proxy variables in the calibration proxy variable set are adjusted to obtain the optimal value of the corresponding calibration parameter in the first set of calibration parameters represented by each calibration proxy variable, and a second calibration file including the optimal value of each calibration parameter in the first set of calibration parameters is generated.

[0070] After completing the calibration of the first set of calibration parameters, the calibration of the first set of calibration parameters is still maintained, but the calibration proxy variables are modified according to the calibration requirements of the second set of calibration parameters, so that the first set of calibration parameters are calibrated on the surface, but in fact the calibration operation of the second set of calibration parameters is realized. When modifying the calibration proxy variables according to the calibration requirements of the second set of calibration parameters, the calibration parameter name of the first set of calibration parameters corresponding to each calibration parameter name in the second set of calibration parameters can be first searched according to the first mapping relationship between the first set of calibration parameters and the second set of calibration parameters, and then the calibration proxy variable name in the calibration proxy variable set corresponding to the calibration parameter name of the first set of calibration parameters found can be determined according to the second mapping relationship between the first set of calibration parameters and the calibration proxy variable set, thereby determining which calibration parameter in the second set of calibration parameters is specifically referred to when adjusting each calibration proxy variable. When the second vehicle drive mode is the two-wheel drive mode, the file name of the first calibration file can be set to parameter-2drive.par.

[0071] S140: According to the first mapping relationship, modify the calibration parameter names in the second calibration file into parameter names of corresponding calibration parameters in the second set of calibration parameters, and obtain a modified second calibration file.

[0072] Since steps S120 and S130 are apparently calibration operations for the first set of calibration parameters, the calibration parameter names corresponding to the optimal values ​​in the first calibration file and the second calibration file are both the calibration parameter names in the first set of calibration parameters. In order to distinguish the two calibration files, script processing can be used to batch modify the calibration parameter names in the second calibration file to the parameter names of the corresponding calibration parameters in the second set of calibration parameters according to the first mapping relationship, so as to obtain the modified second calibration file.

[0073] S150: Merge the first calibration file and the modified second calibration file into a target file.

[0074] The target file is a file that can be executed in a single-chip microcomputer, for example, a .hex file.

[0075] When the vehicle is initialized, the target file stores the first set of calibration parameters and the second set of calibration parameters that have not been calibrated. After the calibration is completed and the first calibration file and the modified second calibration file are obtained, the first calibration file can replace the first set of calibration parameters in the target file, and the second calibration file can replace the second set of calibration parameters in the target file, so that the target file stores the optimal values ​​after calibration.

[0076] Specifically, the first calibration file and the modified second calibration file can be merged into the target file through the CANape vCDMstudio calibration tool. For example, the parameter-4drive.par and parameter-2drive.par are merged into the .hex file through the CANape vCDMstudio calibration tool to obtain the final .hex file.

[0077] S160: Obtain the driving mode configured by the user, access the calibration parameters corresponding to the driving mode configured by the user through the target file, implement the function of the driving mode configured by the user, and when the user modifies the driving mode, access the calibration parameters corresponding to the modified driving mode through the target file to implement the switching of the driving mode.

[0078] After obtaining the final target file, the user can configure the required driving mode in the human-computer interaction device such as the diagnostic instrument. After the vehicle obtains the driving mode configured by the user, the calibration parameters corresponding to the driving mode configured by the user are accessed through the target file to realize the function of the driving mode configured by the user. When the user wants to switch to other driving modes, the user can modify the configuration in the human-computer interaction device such as the diagnostic instrument. After the vehicle obtains the modified driving mode, the calibration parameters corresponding to the modified driving mode are accessed through the target file to realize the switching of the driving mode.

[0079] For example, when the configuration word is written as four-wheel drive through the diagnostic instrument, the software will switch to the four-wheel drive calibration parameters to realize the function of the four-wheel drive vehicle; when the configuration word is written as two-wheel drive through the diagnostic instrument, the software will switch to the two-wheel drive calibration parameters to realize the function of the two-wheel drive vehicle.

[0080] It should be added that Figure 2 As shown, when the vehicle is started and initialized, the controller reads the default driving mode and accesses the calibration parameters corresponding to the default driving mode through the target file to implement the default driving mode.

[0081] The method for switching the vehicle driving mode provided in the embodiment of the present application can, after establishing a first mapping relationship between the first set of calibration parameters and the second set of calibration parameters, and establishing a second mapping relationship between the first set of calibration parameters and the calibration proxy variable set, first adjust the calibration proxy variables in the calibration proxy variable set according to the second mapping relationship to obtain the optimal value of the corresponding calibration parameter in the first set of calibration parameters represented by each calibration proxy variable, and generate a first calibration file including the optimal value of each calibration parameter in the first set of calibration parameters, thereby realizing the calibration of the first set of calibration parameters, and then adjust the calibration proxy variables in the calibration proxy variable set according to the calibration requirements of the second set of calibration parameters to obtain the optimal value of the corresponding calibration parameter in the first set of calibration parameters represented by each calibration proxy variable. The optimal value is obtained, and a second calibration file including the optimal value of each calibration parameter in the first set of calibration parameters is generated, thereby realizing the calibration of the second set of calibration parameters in the name of calibrating the first set of calibration parameters, and then according to the first mapping relationship, the calibration parameter name in the second calibration file is modified to the parameter name of the corresponding calibration parameter in the second set of calibration parameters, and the modified second calibration file is obtained, and the first calibration file and the modified second calibration file are merged into the target file; the driving mode configured by the user is obtained, and the calibration parameters corresponding to the driving mode configured by the user are accessed through the target file to realize the function of the driving mode configured by the user, and when the user modifies the driving mode, the calibration parameters corresponding to the modified driving mode are accessed through the target file to realize the switching of the driving mode. It can be seen from this that the embodiment of the present application not only provides a solution for software to cover multiple driving modes, reduces the high R&D cost, and saves system resources, but also the solution provided by the embodiment of the present application can achieve the effect of switching the driving mode at any time during the software startup and program running process, and the switching speed is fast and takes effect immediately.

[0082] In a possible implementation, in order to save memory resources and avoid wasting memory resources, the embodiment of the present application can, before establishing a first mapping relationship between the first set of calibration parameters and the second set of calibration parameters, and establishing a second mapping relationship between the first set of calibration parameters and the calibration proxy variable set, sequentially allocate the first set of calibration parameters to the first memory block, allocate the second set of calibration parameters to the second memory block, and allocate the calibration proxy variable set to the third memory block, wherein the first memory block and the second memory block are located in the same memory type, and the third memory block is located in a different memory type from the first memory block and the second memory block. And after generating a second calibration file including the optimal value of each calibration parameter in the first set of calibration parameters, delete the calibration proxy variable set and release the third memory block.

[0083] The first memory block and the second memory block may be non-volatile memory blocks, such as flash memory blocks, and the third memory block may be a volatile memory block, such as a RAM (Random Access Memory) memory block. Figure 2 As shown, there can be multiple memory blocks in the flash memory, which store type A-four-wheel drive calibration parameters, type B-four-wheel drive calibration parameters, type C other configurations, etc. Only one calibration proxy memory block (i.e., a memory block for the calibration proxy variable set) is needed in the RAM memory. Users can dynamically switch different drive modes through the application layer.

[0084] The specific implementation of the step "sequentially assigning the first set of calibration parameters to the first memory block, assigning the second set of calibration parameters to the second memory block, and assigning the calibration proxy variable set to the third memory block" can be: obtaining the pre-stored first set of calibration parameters in the target source code file, and assigning the first set of calibration parameters to the first memory block through pre-compilation instructions; creating a second set of calibration parameters with the same data structure as the first set of calibration parameters in the target source code file, and assigning the second set of calibration parameters to the second memory block through pre-compilation instructions; creating a calibration proxy variable set with the same data structure as the first set of calibration parameters in the target source code file, and assigning the calibration proxy variable set to the third memory block through pre-compilation instructions. Among them, the target source code file has .c files and .h files.

[0085] For example, first, in the memory partition file (usually a file with the .ld suffix), allocate corresponding flash memory blocks (memory sections) for the two sets of calibration parameters. The size and structure of the two memory blocks should be equal and consistent, and it is best to be two continuous and complete blocks. In this example, the names of the four-wheel drive and two-wheel drive calibration parameter memory blocks are defined as ParSet_01_SectionGroup_CodeFlash_C and ParSet_02_SectionGroup_CodeFlash_D respectively; in order to implement calibration, allocate a peer memory block in RAM to store the calibration proxy variable set, named Cal_ram_VarSectionGroup.

[0086] In the .c or .h file that needs to distinguish the calibration parameters of four-wheel drive and two-wheel drive, find the first set of calibration parameters that are pre-stored, and assign them to the ParSet_01_SectionGroup_CodeFlash_C memory segment through pre-compiled instructions. Then, on the basis of retaining the first set of calibration parameters, create the second set of calibration parameters corresponding to the two-wheel drive mode in the same .c or .h file, and fix it in the ParSet_02_SectionGroup_CodeFlash_D memory segment through pre-compiled instructions. Note that the data type and structure of the newly created calibration parameters of the two-wheel drive mode must be exactly the same as those of the four-wheel drive mode, but the names must be different. Next, in the same .c or .h file, use the processing script to create the calibration proxy variables that will be used in the calibration process, and assign them to the Cal_ram_VarSectionGroup segment through pre-compiled instructions.

[0087] Based on the above method embodiment, another embodiment of the present application provides a device for switching a vehicle driving mode, such as Figure 3 As shown, the device comprises:

[0088] A mapping establishment unit 210, configured to establish a first mapping relationship between a first set of calibration parameters and a second set of calibration parameters, and to establish a second mapping relationship between the first set of calibration parameters and a calibration proxy variable set, wherein the first set of calibration parameters is a calibration parameter set corresponding to a first vehicle driving mode, the second set of calibration parameters is a calibration parameter set corresponding to a second vehicle driving mode, and the data structures of the second set of calibration parameters and the calibration proxy variable set are the same as those of the first set of calibration parameters;

[0089] A first calibration unit 220, configured to adjust the calibration proxy variables in the calibration proxy variable set according to the second mapping relationship, obtain an optimal value of a corresponding calibration parameter in the first set of calibration parameters for each calibration proxy variable proxy, and generate a first calibration file including the optimal value of each calibration parameter in the first set of calibration parameters;

[0090] A second calibration unit 230, configured to adjust the calibration proxy variables in the calibration proxy variable set according to the calibration requirements of the second set of calibration parameters, obtain the optimal value of the corresponding calibration parameter in the first set of calibration parameters represented by each calibration proxy variable, and generate a second calibration file including the optimal value of each calibration parameter in the first set of calibration parameters;

[0091] A modification unit 240, configured to modify the calibration parameter name in the second calibration file to the parameter name of the corresponding calibration parameter in the second set of calibration parameters according to the first mapping relationship, so as to obtain the modified second calibration file;

[0092] A merging unit 250, configured to merge the first calibration file and the modified second calibration file into a target file, wherein the target file is a file that can be executed in a single chip microcomputer;

[0093] An acquisition unit 260 is used to acquire a driving mode configured by a user;

[0094] The access unit 270 is used to access the calibration parameters corresponding to the user-configured driving mode through the target file to implement the function of the user-configured driving mode, and when the user modifies the driving mode, the calibration parameters corresponding to the modified driving mode are accessed through the target file to implement the switching of the driving mode.

[0095] In a possible implementation, the device further includes:

[0096] a memory allocation unit, used for, before establishing a first mapping relationship between a first set of calibration parameters and a second set of calibration parameters and establishing a second mapping relationship between the first set of calibration parameters and a set of calibration proxy variables, sequentially allocating the first set of calibration parameters to a first memory block, allocating the second set of calibration parameters to a second memory block, and allocating the set of calibration proxy variables to a third memory block, wherein the first memory block and the second memory block are of the same memory type, and the third memory block is of a different memory type from the first memory block and the second memory block;

[0097] A deleting and releasing unit is used to delete the calibration proxy variable set and release the third memory block after generating a second calibration file including the optimal value of each calibration parameter in the first set of calibration parameters.

[0098] In a possible implementation, the memory allocation unit includes:

[0099] a first allocation module, configured to obtain the first set of calibration parameters pre-stored in a target source code file, and allocate the first set of calibration parameters to the first memory block through a pre-compiled instruction;

[0100] The first creation module is used to create the second set of calibration parameters in the target source code file with the same numerical structure as the first set of calibration parameters;

[0101] A second allocation module, configured to allocate the second set of calibration parameters to the second memory block through a precompiled instruction;

[0102] A second creation module, configured to create the calibration proxy variable set having the same data structure as the first set of calibration parameters in the target source code file;

[0103] The third allocation module is used to allocate the calibration proxy variable set to the third memory block through a pre-compiled instruction.

[0104] In a possible implementation, the modification unit 240 is used to batch modify the calibration parameter names in the second calibration file to the parameter names of the corresponding calibration parameters in the second set of calibration parameters through script processing according to the first mapping relationship, so as to obtain the modified second calibration file.

[0105] In a possible implementation, the acquisition unit 260 is used to acquire the driving mode configured by the user through the diagnostic instrument.

[0106] The device for switching the vehicle driving mode provided in the embodiment of the present application can, after establishing a first mapping relationship between the first set of calibration parameters and the second set of calibration parameters, and establishing a second mapping relationship between the first set of calibration parameters and the calibration proxy variable set, first adjust the calibration proxy variables in the calibration proxy variable set according to the second mapping relationship to obtain the optimal value of the corresponding calibration parameter in the first set of calibration parameters represented by each calibration proxy variable, and generate a first calibration file including the optimal value of each calibration parameter in the first set of calibration parameters, thereby realizing the calibration of the first set of calibration parameters, and then adjust the calibration proxy variables in the calibration proxy variable set according to the calibration requirements of the second set of calibration parameters to obtain the optimal value of the corresponding calibration parameter in the first set of calibration parameters represented by each calibration proxy variable. The optimal value is obtained, and a second calibration file including the optimal value of each calibration parameter in the first set of calibration parameters is generated, thereby realizing the calibration of the second set of calibration parameters in the name of calibrating the first set of calibration parameters, and then according to the first mapping relationship, the calibration parameter name in the second calibration file is modified to the parameter name of the corresponding calibration parameter in the second set of calibration parameters, and the modified second calibration file is obtained, and the first calibration file and the modified second calibration file are merged into the target file; the driving mode configured by the user is obtained, and the calibration parameters corresponding to the driving mode configured by the user are accessed through the target file to realize the function of the driving mode configured by the user, and when the user modifies the driving mode, the calibration parameters corresponding to the modified driving mode are accessed through the target file to realize the switching of the driving mode. It can be seen from this that the embodiment of the present application not only provides a solution for software to cover multiple driving modes, reduces the high R&D cost, and saves system resources, but also the solution provided by the embodiment of the present application can achieve the effect of switching the driving mode at any time during the software startup and program running process, and the switching speed is fast and takes effect immediately.

[0107] Based on the above method embodiments, another embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method described in any of the above embodiments is implemented.

[0108] Based on the above method embodiment, another embodiment of the present application provides an electronic device or a computer device, including:

[0109] one or more processors;

[0110] The processor is coupled to a storage device, and the storage device is used to store one or more programs;

[0111] When the one or more programs are executed by the one or more processors, the electronic device or computer device implements the method described in any of the above embodiments.

[0112] Based on the above method embodiments, another embodiment of the present application provides a vehicle, which includes the device as described in any of the above embodiments, or includes the electronic device as described above.

[0113] Based on the above embodiments, another embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed on a computer or a processor, the computer or the processor executes the method described in any of the above embodiments.

[0114] The above device embodiment corresponds to the method embodiment and has the same technical effect as the method embodiment. For specific description, please refer to the method embodiment. The device embodiment is obtained based on the method embodiment. For specific description, please refer to the method embodiment part, which will not be repeated here. It can be understood by those skilled in the art that the accompanying drawings are only schematic diagrams of one embodiment, and the modules or processes in the accompanying drawings are not necessarily required to implement the present application.

[0115] Those skilled in the art can understand that the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description of the embodiment, or can be changed accordingly and located in one or more devices different from the embodiment. The modules in the above embodiment can be combined into one module, or can be further divided into multiple sub-modules.

[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for switching a vehicle driving mode, characterized in that: The method comprises: Establishing a first mapping relationship between a first set of calibration parameters and a second set of calibration parameters, and establishing a second mapping relationship between the first set of calibration parameters and a calibration proxy variable set, wherein the first set of calibration parameters is a calibration parameter set corresponding to a first vehicle driving mode, the second set of calibration parameters is a calibration parameter set corresponding to a second vehicle driving mode, and the data structures of the second set of calibration parameters and the calibration proxy variable set are the same as those of the first set of calibration parameters; According to the second mapping relationship, the calibration proxy variables in the calibration proxy variable set are adjusted to obtain the optimal value of the corresponding calibration parameter in the first set of calibration parameters for each calibration proxy variable proxy, and generate a first calibration file including the optimal value of each calibration parameter in the first set of calibration parameters; According to the calibration requirements of the second set of calibration parameters, the calibration proxy variables in the calibration proxy variable set are adjusted to obtain the optimal value of the corresponding calibration parameter in the first set of calibration parameters represented by each calibration proxy variable, and a second calibration file including the optimal value of each calibration parameter in the first set of calibration parameters is generated; According to the first mapping relationship, modify the calibration parameter name in the second calibration file to the parameter name of the corresponding calibration parameter in the second set of calibration parameters, to obtain the modified second calibration file; Merging the first calibration file and the modified second calibration file into a target file, wherein the target file is a file that can be executed in a single-chip microcomputer; The driving mode configured by the user is obtained, and the calibration parameters corresponding to the driving mode configured by the user are accessed through the target file to realize the function of the driving mode configured by the user. When the user modifies the driving mode, the calibration parameters corresponding to the modified driving mode are accessed through the target file to realize the switching of the driving mode.

2. The method according to claim 1, characterized in that Before establishing a first mapping relationship between the first set of calibration parameters and the second set of calibration parameters, and establishing a second mapping relationship between the first set of calibration parameters and a set of calibration proxy variables, the method further includes: sequentially allocating the first set of calibration parameters to a first memory block, allocating the second set of calibration parameters to a second memory block, and allocating the calibration proxy variable set to a third memory block, wherein the first memory block and the second memory block are of the same memory type, and the third memory block is of a different memory type from the first memory block and the second memory block; After generating a second calibration file including an optimal value for each calibration parameter in the first set of calibration parameters, the method further comprises: The calibration proxy variable set is deleted, and the third memory block is released.

3. The method according to claim 1, characterized in that Sequentially allocating the first set of calibration parameters to a first memory block, allocating the second set of calibration parameters to a second memory block, and allocating the calibration proxy variable set to a third memory block, including: Obtaining the first set of calibration parameters pre-stored in the target source code file, and allocating the first set of calibration parameters to the first memory block through a pre-compiled instruction; Creating the second set of calibration parameters having the same numerical structure as the first set of calibration parameters in the target source code file, and allocating the second set of calibration parameters to the second memory block through a precompiled instruction; The calibration proxy variable set having the same data structure as the first set of calibration parameters is created in the target source code file, and the calibration proxy variable set is allocated to the third memory block through a pre-compilation instruction.

4. The method according to claim 1, characterized in that: According to the first mapping relationship, the calibration parameter name in the second calibration file is modified to the parameter name of the corresponding calibration parameter in the second set of calibration parameters, and the modified second calibration file is obtained, including: Through script processing, according to the first mapping relationship, the calibration parameter names in the second calibration file are batch modified to the parameter names of the corresponding calibration parameters in the second set of calibration parameters, so as to obtain the modified second calibration file.

5. The method according to any one of claims 1 to 4, characterized in that Get the user-configured drive mode, including: Get the driving mode configured by the user through the diagnostic tool.

6. A device for switching a vehicle driving mode, characterized in that: The device comprises: a mapping establishment unit, configured to establish a first mapping relationship between a first set of calibration parameters and a second set of calibration parameters, and to establish a second mapping relationship between the first set of calibration parameters and a calibration proxy variable set, wherein the first set of calibration parameters is a calibration parameter set corresponding to a first vehicle driving mode, the second set of calibration parameters is a calibration parameter set corresponding to a second vehicle driving mode, and the data structures of the second set of calibration parameters and the calibration proxy variable set are the same as those of the first set of calibration parameters; a first calibration unit, configured to adjust the calibration proxy variables in the calibration proxy variable set according to the second mapping relationship, obtain an optimal value of a corresponding calibration parameter in the first set of calibration parameters for each calibration proxy variable proxy, and generate a first calibration file including the optimal value of each calibration parameter in the first set of calibration parameters; a second calibration unit, configured to adjust the calibration proxy variables in the calibration proxy variable set according to the calibration requirements of the second set of calibration parameters, obtain the optimal value of the corresponding calibration parameter in the first set of calibration parameters represented by each calibration proxy variable, and generate a second calibration file including the optimal value of each calibration parameter in the first set of calibration parameters; A modification unit, configured to modify the calibration parameter names in the second calibration file to parameter names of corresponding calibration parameters in the second set of calibration parameters according to the first mapping relationship, so as to obtain a modified second calibration file; A merging unit, used for merging the first calibration file and the modified second calibration file into a target file, wherein the target file is a file that can be executed in a single chip microcomputer; An acquisition unit, used for acquiring a driving mode configured by a user; The access unit is used to access the calibration parameters corresponding to the user-configured driving mode through the target file to realize the function of the user-configured driving mode, and when the user modifies the driving mode, the calibration parameters corresponding to the modified driving mode are accessed through the target file to realize the switching of the driving mode.

7. The device according to claim 6, characterized in that The device also includes: a memory allocation unit, used for, before establishing a first mapping relationship between a first set of calibration parameters and a second set of calibration parameters and establishing a second mapping relationship between the first set of calibration parameters and a set of calibration proxy variables, sequentially allocating the first set of calibration parameters to a first memory block, allocating the second set of calibration parameters to a second memory block, and allocating the set of calibration proxy variables to a third memory block, wherein the first memory block and the second memory block are of the same memory type, and the third memory block is of a different memory type from the first memory block and the second memory block; A deleting and releasing unit is used to delete the calibration proxy variable set and release the third memory block after generating a second calibration file including the optimal value of each calibration parameter in the first set of calibration parameters.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; The processor is coupled to a storage device, and the storage device is used to store one or more programs; When the one or more programs are executed by the one or more processors, the electronic device implements the method according to any one of claims 1 to 5.

10. A vehicle, characterized in that: The vehicle comprises the device according to any one of claims 6-7, or comprises the electronic device according to claim 9.

Citation Information

Cited By

  • Method and device for determining target calibration file of vehicle-mounted system and storage medium

    CN119806533A