Vehicle configuration information writing method and device, electronic equipment and storage medium
By comparing fingerprint fields before writing vehicle configuration information, the problem of low security in writing configuration information in existing technologies is solved, achieving higher security and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, the security of writing vehicle configuration information is low, and there is no effective protection when the key is easily leaked, which leads to security risks when writing or modifying configuration information.
The system obtains a vehicle service request for key authentication. After successful authentication, the target fingerprint field parameters are extracted and compared with the preset fingerprint field parameters. Based on the comparison result, the configuration information is written to ensure the security of the configuration information.
This improves the security of writing configuration information and avoids the problem of illegal writing or modification of configuration information due to key leakage, which could affect the normal operation of the vehicle.
Smart Images

Figure CN121645227A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of vehicles, in particular to a configuration information writing method and device of a vehicle, an electronic device and a storage medium. BACKGROUND
[0002] With the development of the Internet, the functional services of vehicles are also constantly iterating and increasing. In the process of modifying and updating the functional services of vehicles, configuration information needs to be written to a certain controller of the vehicle. The existing configuration information writing is usually performed by a diagnostic instrument or an electrical inspection device. In the writing process, only service authentication of the controller is required to write or modify the configuration information.
[0003] In the related art, the service authentication mode in the process of writing or modifying configuration information is mainly Cipher-based Message Authentication Code (CMAC), which plays a key verification role. However, in the case of key leakage, the configuration information writing or modification cannot be protected, that is, there is a problem of low security of vehicle configuration information writing. SUMMARY
[0004] In order to solve the technical problem of low security of vehicle configuration information writing in the related art, the present application provides a configuration information writing method and device of a vehicle, an electronic device and a storage medium.
[0005] In a first aspect, the present application provides a configuration information writing method of a vehicle, comprising:
[0006] Obtaining a service request corresponding to a vehicle;
[0007] Performing key authentication according to the service request to obtain a verification result;
[0008] When the verification result is a verification pass result, extracting a target fingerprint field parameter from the write configuration information corresponding to the vehicle;
[0010] Comparing the target fingerprint field parameter with a preset fingerprint field parameter corresponding to the vehicle to obtain a fingerprint field comparison result;
[0011] Based on the fingerprint field comparison result, performing a writing operation in combination with the write configuration information to obtain a configuration writing result corresponding to the vehicle.
[0012] Optionally, the step of extracting a target fingerprint field parameter from the write configuration information corresponding to the vehicle comprises:
[0013] Obtaining the write configuration information corresponding to the vehicle;
[0013] determining controller information to be written into the write configuration information;
[0014] extracting a target fingerprint field parameter from the write configuration information according to a configuration information format corresponding to the controller information.
[0015] Optionally, the comparing the target fingerprint field parameter with the preset fingerprint field parameter corresponding to the vehicle to obtain a fingerprint field comparison result comprises:
[0016] obtaining preset configuration information corresponding to the controller information;
[0017] extracting the preset fingerprint field parameter from the preset configuration information;
[0018] comparing the preset fingerprint field parameter with the target fingerprint field parameter to obtain a fingerprint field comparison result.
[0019] Optionally, the target fingerprint field parameter comprises at least one target field parameter, and the preset fingerprint field parameter comprises at least one preset field parameter, and the comparing the target fingerprint field parameter with the preset fingerprint field parameter corresponding to the vehicle to obtain a fingerprint field comparison result comprises:
[0020] determining a target field position corresponding to each target field parameter;
[0021] determining a preset field position corresponding to each preset field parameter;
[0022] in a case where the target field position and the preset field position are the same, comparing a target field parameter corresponding to the target field position with a preset field parameter corresponding to the preset field position to obtain a field parameter comparison result;
[0023] generating the fingerprint field comparison result based on the field parameter comparison result.
[0024] Optionally, the performing a write operation based on the fingerprint field comparison result and the write configuration information to obtain a configuration write result corresponding to the vehicle comprises:
[0025] in a case where the fingerprint field comparison result is the fingerprint matching result, extracting a configuration parameter from the write configuration information;
[0026] determining whether a preset conflict relationship parameter exists in the configuration parameter;
[0027] in a case where the preset conflict relationship parameter does not exist in the configuration parameter, performing a write operation based on the write configuration information to obtain the configuration write result.
[0028] Optionally, the determining whether the preset conflict relationship parameter exists in the configuration parameter comprises:
[0029] determining a configuration item set according to the configuration parameter;
[0030] determining whether a conflict configuration item combination of the preset conflict relationship exists in the configuration item set;
[0031] if the conflict configuration item combination exists in the configuration item set, determining that the conflict relationship parameter exists in the configuration parameter;
[0032] if the conflict configuration item combination does not exist in the configuration item set, determining that the conflict relationship parameter does not exist in the configuration parameter.
[0033] Optionally, the key authentication according to the service request comprises:
[0034] determining seed information corresponding to the vehicle according to the service request;
[0035] sending the seed information to a server, wherein the server is configured to perform key calculation according to the seed information to obtain the key value;
[0036] receiving the key value sent by the server;
[0037] performing the key authentication on the key value to obtain the verification result.
[0038] In a second aspect, the application provides a configuration information writing device of a vehicle, comprising:
[0039] an acquisition module configured to acquire a service request corresponding to a vehicle;
[0040] a key authentication module configured to perform key authentication according to the service request to obtain a verification result;
[0041] an extraction module configured to extract a target fingerprint field parameter from writing configuration information corresponding to the vehicle when the verification result is a verification pass result;
[0042] a comparison module configured to compare the target fingerprint field parameter with a preset fingerprint field parameter corresponding to the vehicle to obtain a fingerprint field comparison result;
[0043] a writing module configured to perform a writing operation based on the fingerprint field comparison result and in combination with the writing configuration information to obtain a configuration writing result corresponding to the vehicle.
[0044] In a third aspect, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus.
[0045] The memory is configured to store a computer program.
[0046] The processor is configured to execute the program stored in the memory, and implement the configuration information writing method of the vehicle according to any one of the first aspect.
[0047] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the configuration information writing method of the vehicle according to any one of the first aspect.
[0048] The embodiments of the present application obtain the service request corresponding to the vehicle, perform key authentication according to the service request, obtain a verification result, and when the verification result is a verification pass result, extract a target fingerprint field parameter from the write configuration information corresponding to the vehicle, compare the target fingerprint field parameter with a preset fingerprint field parameter corresponding to the vehicle, obtain a fingerprint field comparison result, and then perform a write operation based on the fingerprint field comparison result and in combination with the write configuration information, to obtain a configuration write result corresponding to the vehicle. Therefore, the fingerprint field comparison can be implemented before the configuration information write operation, the problem of low vehicle configuration information write security in the prior art is solved, and the security of the configuration information write can be effectively improved. BRIEF DESCRIPTION OF DRAWINGS
[0049] The accompanying drawings, which are incorporated herein and constitute part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without creative labor.
[0051] Figure 1 A flowchart of a configuration information writing method of a vehicle provided by the embodiments of the present application;
[0052] Figure 2 An application scenario diagram of a configuration information writing method of a vehicle provided by the embodiments of the present application;
[0053] Figure 3 A structure diagram of a configuration information writing device of a vehicle provided by the embodiments of the present application;
[0054] Figure 4 A structural schematic diagram of an electronic device is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0055] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0056] When the configuration information needs to be changed due to hardware and software factors after the vehicle is put on the market, it can only be solved through the On-Board Diagnostics-II (OBD-II) interface on the spot after sale, which consumes time and personnel effort, and the configuration information that needs to be changed is mainly the configuration word of the controller. The configuration word of the controller is data used by the controller software to distinguish different vehicle configurations, for example, it can distinguish which model the battery pack of the vehicle is through the configuration word, so that the software uses the corresponding battery efficiency to calculate the endurance.
[0057] The configuration word of a general controller only has various configuration items, such as powertrain configuration item, seat configuration item, rearview mirror configuration item, motor model configuration item, etc. In the process of writing or modifying the above configuration word, the controller can be changed by the configuration word after the key authentication of the 27 service, and the configuration word can be changed by the Data Identifier (DID) of the configuration word. Since only key authentication is required in this process, it is impossible to protect the writing or modification of the configuration information in the case of easy leakage of the key, and if the written configuration word is illegal, writing through key authentication will affect the normal operation of the vehicle, that is, the existing related technology has the problem of low security of vehicle configuration information writing.
[0058] To address the low security issues in vehicle configuration information writing in existing technologies, this application provides a method, apparatus, electronic device, and storage medium for writing vehicle configuration information. The method involves obtaining a service request corresponding to the vehicle, performing key authentication based on the service request, obtaining a verification result, and, if the verification result is successful, extracting a target fingerprint field parameter from the vehicle's configuration information. This target fingerprint field parameter is then compared with a preset fingerprint field parameter corresponding to the vehicle to obtain a fingerprint field comparison result. Subsequently, based on the fingerprint field comparison result and the configuration information, a writing operation is performed to obtain the vehicle's configuration writing result. This allows for fingerprint field comparison before the configuration information writing operation, solving the low security issues in existing related technologies and effectively improving the security of configuration information writing.
[0059] Figure 1 This is a flowchart illustrating a method for determining a verification method provided in an embodiment of this application. This method can be applied to one or more electronic devices, such as vehicles, in-vehicle systems, clients, and servers. Furthermore, the execution entity of this method can be hardware or software. When the execution entity is hardware, it can be one or more of the aforementioned electronic devices. For example, a single electronic device can execute this method, or multiple electronic devices can cooperate with each other to execute this method. When the execution entity is software, this method can be implemented as multiple software programs or software modules, or as a single software program or software module. No specific limitations are imposed here.
[0060] like Figure 1 As shown in the illustration, this application discloses an embodiment of a method for writing vehicle configuration information, which may specifically include the following steps:
[0061] Step S110: Obtain the service request corresponding to the vehicle.
[0062] The service request corresponding to the vehicle can refer to a service request received by the vehicle from an external device, such as a service request sent to the vehicle by a cloud platform, or a service request sent to the vehicle by a server. This application does not impose any specific restrictions on this.
[0063] Step S120: Perform key authentication based on the service request and obtain the verification result.
[0064] Specifically, in this embodiment, after obtaining the service request corresponding to the vehicle, key authentication can be performed based on the service request to obtain the verification result. Key authentication can be a process of authenticating whether the service request is legitimate. Different key authentications can be performed for different service requests. The verification result can indicate whether the key authentication is successful or not. That is, the verification result can be a successful verification result or a failed verification result.
[0065] Step S130: When the verification result is a successful verification result, extract the target fingerprint field parameter from the written configuration information corresponding to the vehicle.
[0066] Specifically, after obtaining the verification result, this embodiment can determine whether the verification result is a successful verification result. If the verification result is a successful verification result, the write configuration information corresponding to the vehicle can be obtained, and the target fingerprint field parameter can be extracted from the write configuration information corresponding to the vehicle, so that the fingerprint field can be compared based on the target fingerprint field parameter in the future, that is, step 140 is executed.
[0067] The write configuration information corresponding to the vehicle can refer to the configuration information that needs to be written to the vehicle controller by an external device. That is, the write configuration information can be the configuration words used to write to the vehicle controller. The external device is the same device that sent the service request in the previous embodiment. For example, after the external device sends the service request, if the key verification result of the service request is a successful verification result, it means that the external device is a legitimate device. Then the write configuration information sent by the external device can be obtained, and the target fingerprint field parameter can be extracted from the write configuration information.
[0068] Furthermore, the target fingerprint field parameter can refer to the field parameter used for fingerprint recognition in the configuration information, or the parameter distributed within a specified field in the configuration information. The configuration information is written as the configuration word for the vehicle controller, so it can contain configuration items used by the vehicle controller software to distinguish a certain vehicle configuration. That is, in this embodiment, the configuration information can contain configuration items and the target fingerprint field parameter. Different vehicle controllers may have different configuration item lengths and different positions in the configuration information depending on the actual software function configuration requirements. In this case, the target fingerprint field parameter can be divided into multiple fields according to the field distribution position of the configuration item, and the length and position of each sub-field are different. It can be seen that in this embodiment, the configuration information written for different vehicle controllers can have configuration items with different byte positions and lengths, and target fingerprint field parameters with different byte positions and lengths.
[0069] Step S140: Compare the target fingerprint field parameters with the preset fingerprint field parameters corresponding to the vehicle to obtain the fingerprint field comparison result.
[0070] Specifically, after extracting the target fingerprint field parameter from the configuration information, the target fingerprint field parameter can be compared with the preset fingerprint field parameter corresponding to the vehicle to obtain the fingerprint field comparison result. The preset fingerprint field parameter corresponding to the vehicle can be the fingerprint field parameter in the preset configuration information in the vehicle controller, and the vehicle controller is the vehicle controller that needs to be written to the configuration information. The process of comparing the target fingerprint field parameter with the preset fingerprint field parameter can be to compare whether the two are consistent. The specific comparison method can be parameter content comparison and fingerprint field position comparison, etc., so that the fingerprint field comparison result can be a fingerprint matching result or a fingerprint mismatch result.
[0071] Step S150: Based on the fingerprint field comparison result, combined with the write configuration information, perform the write operation to obtain the configuration write result corresponding to the vehicle.
[0072] After obtaining the fingerprint field comparison result, a write operation can be performed based on the fingerprint field comparison result and the write configuration information to obtain the configuration write result corresponding to the vehicle. Specifically, it can be determined whether the fingerprint field comparison result is a fingerprint matching result. If the fingerprint field comparison result is a fingerprint matching result, a write operation is performed on the write configuration information to obtain a configuration write result of successful or unsuccessful write.
[0073] As can be seen, this embodiment of the application obtains the service request corresponding to the vehicle, performs key authentication based on the service request, obtains the verification result, and when the verification result is a successful verification result, extracts the target fingerprint field parameter from the write configuration information corresponding to the vehicle, compares the target fingerprint field parameter with the preset fingerprint field parameter corresponding to the vehicle, obtains the fingerprint field comparison result, and then performs the write operation based on the fingerprint field comparison result and the write configuration information to obtain the configuration write result corresponding to the vehicle. Thus, fingerprint field comparison can be performed before writing the write configuration information, and the relevant write operation can be performed based on the fingerprint field comparison result. This avoids the problem that when relying solely on key authentication for writing configuration information, it is impossible to protect the writing or modification of configuration information when the key is easily leaked, and the problem that if the written configuration word is invalid, writing through key authentication will affect the normal operation of the vehicle. In other words, it solves the problem of low security of vehicle configuration information writing in existing related technologies and can effectively improve the security of configuration information writing.
[0074] In an optional embodiment of this application, step S130 extracts the target fingerprint field parameter from the write configuration information corresponding to the vehicle, which may specifically include the following sub-steps: obtaining the write configuration information corresponding to the vehicle; determining the controller information to be written to the write configuration information; and extracting the target fingerprint field parameter from the write configuration information according to the configuration information format corresponding to the controller information.
[0075] In this embodiment, when the verification result is a successful verification, the write configuration information corresponding to the vehicle can be obtained. The vehicle may contain multiple vehicle controllers. At this time, the controller information to be written to the write configuration information can be determined. The controller information represents the information of the controller to be written to the write configuration information. The specific determination method can be to extract the write controller identifier from the write configuration information and generate controller information based on the controller marked by the controller identifier. Of course, other determination methods are also possible, and this embodiment does not specifically limit them. Next, the configuration information format corresponding to the controller information can be obtained, and the target fingerprint field parameter can be extracted from the write configuration information based on the configuration information format. The configuration information format represents the format of the configuration information corresponding to the vehicle controller, such as the field distribution, fingerprint field parameters, etc. That is, the extraction field position can be determined based on the configuration information format, and the parameter can be extracted from the extraction field position of the write configuration information to obtain the target fingerprint field parameter.
[0076] In one example, such as Figure 2 As shown, the configuration information of a vehicle controller typically occupies 32 bytes. To ensure sufficient accuracy of fingerprint verification, 28 bytes can be allocated as configuration item fields and 4 bytes as fingerprint fields. Different vehicle controllers can have configuration items with different byte positions and lengths, as well as target fingerprint field parameters with different byte positions and lengths. In other words, the position and length of the fingerprint field for a given vehicle controller are pre-configured. Therefore, the configuration information format corresponding to the controller information can be used, such as... Figure 2 As shown, in the controller information A of vehicle controller A, the positions of bits 1, 2, and 3 in the 0th bit and bits 1, 2, and 3 in the 1st bit are used to store fingerprint field parameters. Thus, the field parameters can be extracted from the positions of bits 1, 2, and 3 in the 0th bit and bits 1, 2, and 3 in the 1st bit of the configuration information according to the configuration information format to obtain the target fingerprint field parameters. Of course, the above is only an example for illustration purposes. In specific implementation, it can be adapted according to the scenario and requirements. This embodiment does not make specific limitations on this.
[0077] In an optional embodiment of this application, step S140 compares the target fingerprint field parameter with the preset fingerprint field parameter corresponding to the vehicle to obtain a fingerprint field comparison result. Specifically, it may include the following sub-steps: obtaining preset configuration information corresponding to the controller information; extracting preset fingerprint field parameters from the preset configuration information; and comparing the preset fingerprint field parameter with the target fingerprint field parameter to obtain a fingerprint field comparison result.
[0078] In this embodiment, during the fingerprint field comparison process, the preset configuration information corresponding to the vehicle controller represented by the controller information can be obtained, that is, the preset configuration information is the configuration information pre-configured in the vehicle controller; the preset fingerprint field parameters can be extracted from the preset configuration information, the preset fingerprint field parameters represent the parameters stored in the fingerprint field in the preset configuration information, and thus the preset fingerprint field parameters can be compared with the target fingerprint field parameters to determine whether the two are consistent, thereby obtaining the fingerprint field comparison result, that is, the fingerprint field comparison result can be used to indicate whether the preset fingerprint field parameters in the preset configuration information are consistent with the target fingerprint field parameters written in the configuration information.
[0079] In one example, for instance, the preset configuration information stored in controller A is configuration information X, and the written configuration information is configuration information Y. Based on the configuration information format corresponding to controller A, the positions of bits 1, 2, and 3 in the 0th byte and bits 1, 2, and 3 in the 1st byte are determined to be used to store fingerprint field parameters. At this time, the field parameters at the positions of bits 1, 2, and 3 in the 0th byte and bits 1, 2, and bits 1 in the 1st byte of configuration information X can be extracted to obtain the preset fingerprint field parameters. Similarly, the field parameters at the positions of bits 1, 2, and 3 in the 0th byte and bits 1, 2, and bits 1 in the 1st byte of configuration information Y can be extracted to obtain the target fingerprint field parameters. Then, the preset fingerprint field parameters are compared with the target fingerprint field parameters to obtain the fingerprint field comparison result. Of course, the above is only an illustrative example. In specific implementation, it can be adapted according to the scenario and requirements. This embodiment does not impose specific limitations on this.
[0080] In an optional embodiment of this application, the target fingerprint field parameters include at least one target field parameter, and the preset fingerprint field parameters include at least one preset field parameter. Step S140 compares the target fingerprint field parameters with the preset fingerprint field parameters corresponding to the vehicle to obtain a fingerprint field comparison result. Specifically, it may include the following sub-steps: determining the target field position corresponding to each target field parameter; determining the preset field position corresponding to each preset field parameter; when the target field position and the preset field position are the same, comparing the target field parameter corresponding to the target field position with the preset field parameter corresponding to the preset field position to obtain a field parameter comparison result; and generating a fingerprint field comparison result based on the field parameter comparison result.
[0081] In this embodiment, during the fingerprint field comparison process, the target field position corresponding to each target field parameter in the target fingerprint field parameters and the preset field position corresponding to each preset field parameter in the preset fingerprint field parameters can be determined. Then, the positions of each target field and the preset field positions are compared to see if they are the same. If there is no preset field position that is the same as the target field position, the fingerprint mismatch result can be used as the fingerprint field comparison result, and no further steps are required. If the target field position and the preset field position are the same, the target field parameter corresponding to the target field position can be compared with the preset field parameter corresponding to the preset field position to determine if the two parameters are the same, thus obtaining the field parameter comparison result. Based on the field parameter comparison result, a fingerprint field comparison result is generated. Specifically, if the field parameter comparison result indicates that the target field parameter corresponding to the target field position is the same as the preset field parameter corresponding to the preset field position, the fingerprint matching result is used as the fingerprint field comparison result. If the field parameter comparison result indicates that the target field parameter corresponding to the target field position is different from the preset field parameter corresponding to the preset field position, the fingerprint mismatch result is used as the fingerprint field comparison result.
[0082] It should be noted that in this embodiment, the target field parameters and preset field parameters can be generated based on inherent vehicle attribute parameters such as the Vehicle Identification Number (VIN) and VIN number. Since the VIN is a unique combination of letters and numbers used to identify a specific motor vehicle, and is typically 17 digits long, a 128-digit hexadecimal number (64 bytes) can be obtained by looking up the last four digits of the VIN. This 128-digit hexadecimal number can be used as the field parameters filled into the corresponding configuration information of each controller, i.e., as the target field parameters and preset field parameters. Specifically, the 128 digits can be divided into 16 groups of 8 digits each, and each group can be filled into the fingerprint field of each controller to form the target fingerprint field parameters and preset fingerprint field parameters for each controller in the vehicle. Since the controllers corresponding to each group are not fixed, 16 or more sequences can be pre-set, and the corresponding sequence numbers can be stored in the cloud platform and the vehicle. Designing multiple sequences is to prevent attackers from cracking a vehicle's VIN with the last four digits being identical, which would also threaten other vehicles and increase the difficulty of cracking. The 128-bit hexadecimal number can be generated randomly or according to certain derivation rules. After generation, it is stored in a table in a database for lookup when filling in configuration words. Of course, the length of the fingerprint field can be appropriately extended according to the number of controllers; other identification numbers and other division methods can also be used to form the target fingerprint field parameters and preset fingerprint field parameters for each controller. This embodiment does not specifically limit this.
[0083] In one example, the target field positions corresponding to each target field parameter are determined to be target field position A, target field position B, and target field position C. The preset field positions corresponding to each preset field parameter are determined to be preset field position X, preset field position Y, and preset field position Z. If target field position A and preset field position X both represent the 1st bit position in the 1st byte, target field position B and preset field position Y both represent the 2nd bit position in the 1st byte, and target field position C and preset field position Z both represent the 3rd bit position in the 1st byte, then it can be determined that target field position A and preset field position X are the same, and the target... Field position B is the same as preset field position Y, and target field position C is the same as preset field position Z. Therefore, the target field parameter corresponding to the target field position can be compared with the preset field parameter corresponding to the preset field position to obtain the field parameter comparison result. That is, three comparisons are performed: target field position A and preset field position X, target field position B and preset field position Y, and target field position C and preset field position Z, to obtain the field parameter comparison result. Then, based on the field parameter comparison result, a fingerprint field comparison result is generated. Of course, the above is only an illustrative example; in specific implementations, adjustments can be made according to the scenario and requirements. This embodiment does not impose specific limitations on this.
[0084] In an optional embodiment of this application, step S150 performs a write operation based on the fingerprint field comparison result and the write configuration information to obtain the configuration write result corresponding to the vehicle. Specifically, it may include the following sub-steps: if the fingerprint field comparison result is a fingerprint matching result, extract the configuration parameters from the write configuration information; determine whether there are preset conflict relationship parameters in the configuration parameters; if there are no preset conflict relationship parameters in the configuration parameters, perform a write operation based on the write configuration information to obtain the configuration write result.
[0085] In this embodiment, after obtaining the fingerprint field comparison result, it can be determined whether the fingerprint field comparison result is a fingerprint matching result. A fingerprint matching result indicates that the preset fingerprint field parameters are the same as the target fingerprint field parameters. At this time, configuration parameters can be extracted from the written configuration information. The configuration parameters represent a set of configuration items used to configure the vehicle controller, that is, the configuration parameters can contain one or more configuration items. Next, it can be determined whether there are preset conflict relationship parameters in the configuration parameters. The conflict relationship parameters can be relationship parameters pre-configured based on configuration items with conflict relationships, that is, conflict relationship parameters can represent parameters with conflict relationships. Thus, it can be determined whether there are conflict relationship parameters in the configuration parameters through the conflict relationship parameters. That is, the conflict relationship parameters can contain at least two parameters. For example, if the configuration parameters simultaneously contain {rear drive, arranged on the front axle, pure electric}, then the configuration parameters can be determined. If the configuration parameters are incorrect, the generator will fail to start. In this case, the parameters {rear drive, front axle, pure electric} can be identified as conflicting parameters. To determine if a preset conflicting parameter exists in the configuration parameters, we need to check if each parameter in {rear drive, front axle, pure electric} is present. If it exists, it indicates a preset conflicting parameter exists; otherwise, it indicates no preset conflicting parameter exists. Therefore, if a preset conflicting parameter exists, it can be determined that the current configuration cannot be configured correctly, and a configuration error message can be output without further steps. If no preset conflicting parameter exists, it can be determined that the current configuration can be configured correctly, and a write operation can be performed based on the configuration information to obtain the configuration write result.
[0086] In an optional embodiment of this application, determining whether there are preset conflict relationship parameters in the configuration parameters may specifically include the following sub-steps: determining a set of configuration items based on the configuration parameters; determining whether there are combinations of conflicting configuration items with preset conflict relationships in the set of configuration items; if there are combinations of conflicting configuration items in the set of configuration items, determining that there are conflict relationship parameters in the configuration parameters; if there are no combinations of conflicting configuration items in the set of configuration items, determining that there are no conflict relationship parameters in the configuration parameters.
[0087] In this embodiment, during the process of determining whether there are preset conflict relationship parameters in the configuration parameters, a configuration item set can be determined based on the configuration parameters. The configuration item set represents a set containing one or more configuration items, thereby determining whether there are conflict configuration item combinations with preset conflict relationships in the configuration item set. A conflict configuration item combination represents a combination of configuration items with conflict relationships. The conflict configuration item combination can be pre-configured adaptively according to the application scenario and application requirements. Since different scenarios can have different conflict configuration items, that is, the conflict configuration item combination can contain at least two configuration items with conflict relationships. For example, the default conflict configuration item combination is {A, B}, then the configuration item set is {A, B, C} or {A, B, D}, etc. As long as it contains the conflict configuration item combination {A, B}, it is determined that there is a conflict configuration item combination in the configuration item set. If there is a conflict configuration item combination in the configuration item set, it can be determined that there are conflict relationship parameters in the configuration parameters. If there is no conflict configuration item combination in the configuration item set, it can be determined that there are no conflict relationship parameters in the configuration parameters.
[0088] In one example, when the vehicle controller has three configuration options: configuration option A (drive type, four-wheel drive, front-wheel drive, or rear-wheel drive), configuration option B (range extender placement, no range extender, placed on the front axle, placed on the rear axle), and configuration option C (energy form, pure electric, range extender, plug-in hybrid), the configuration parameters extracted from the written configuration information will contain a set {A, B, C} of the three configuration options. Due to the operating logic of the vehicle controller or the vehicle application scenario, there may be conflicts between the three configuration options. For example, {configuration option A is rear-wheel drive, configuration option B is placed on the front axle, and configuration option C is pure electric} will cause the generator to fail to start. In this case, the conflict relationship parameters can be predetermined as {configuration option A is rear-wheel drive, configuration option B is placed on the front axle, and configuration option C is pure electric}. It can be understood that {configuration option A is rear-wheel drive, configuration option B is placed on the front axle, and configuration option C is pure electric}. For configuration items C (pure electric) to be placed on the front axle, the following is a conflicting configuration item combination: When the configuration parameters {A,B,C} are obtained, it can be determined whether {A is rear-wheel drive, B is placed on the front axle, and C is pure electric} exists. If no preset conflicting parameters exist in the configuration parameters, the subsequent writing steps can be executed. Of course, the above only applies to distance; preset conflicting parameters can be pre-set according to the scenario and requirements. For example, in a configuration with seat massage, there must be ambient lighting. This includes two configuration items: configuration item D (seat massage, no, yes) and configuration item E (ambient lighting, no, yes). The configuration parameters are {D, E}, and the conflicting parameters are {seat massage is no, ambient lighting is yes}. Other setting methods can also be used, but this embodiment does not specifically limit them.
[0089] In an optional embodiment of this application, step S110 performs key authentication based on the service request to obtain a verification result, which may specifically include the following sub-steps: determining the seed information corresponding to the vehicle based on the service request; sending the seed information to the server, which uses the seed information to perform key calculation to obtain a key value; receiving the key value sent by the server; and performing key authentication on the key value to obtain a verification result.
[0090] In this embodiment, during the key authentication process, the server request is a request sent by an external device to the vehicle to request a seed. At this time, the seed information corresponding to the vehicle can be determined based on the service request. The seed information is a seed stored in the vehicle's controller. This seed can be a set of initialization data or an identifier in the vehicle controller, used to start the process or algorithm in the vehicle controller, and to identify a specific communication session between the cloud platform and the vehicle, thereby ensuring the security of data transmission. Then, the seed information can be sent to the server. The server uses the seed information to calculate the key value, obtains the key value, and feeds the key value back to the vehicle. After receiving the key value sent by the server, the vehicle can perform key authentication. The key authentication process can be to determine whether the key value is consistent with the target key value preset by the vehicle controller, thereby obtaining the verification result.
[0091] In one example, when the service request is for obtaining a seed, the cloud platform can send the service request to the vehicle to request the seed. After receiving the service request, the vehicle's infotainment system can forward the relevant instructions to the corresponding controller based on the diagnostic identifier (ID). Upon receiving the controller, the controller returns the seed to the infotainment system. After receiving the seed, the infotainment system sends the seed back to the cloud platform. The cloud platform calculates the key value corresponding to the seed based on a preset key and key algorithm, and sends the key value back to the vehicle. The vehicle's infotainment system forwards the key value to the corresponding controller. The controller verifies whether the key value is correct and obtains the verification result. Of course, the above is only an illustrative example. In specific implementation, it can be adapted according to the scenario and requirements. This embodiment does not impose specific limitations on this.
[0092] like Figure 3 As shown, this application also discloses an embodiment providing a vehicle configuration information writing device, including:
[0093] Module 310 is used to obtain the service request corresponding to the vehicle;
[0094] The key authentication module 320 is used to perform key authentication based on the service request and obtain the verification result;
[0095] Extraction module 330 is used to extract target fingerprint field parameters from the write configuration information corresponding to the vehicle when the verification result is a verification pass result;
[0096] The comparison module 340 is used to compare the target fingerprint field parameters with the preset fingerprint field parameters corresponding to the vehicle to obtain a fingerprint field comparison result;
[0097] The writing module 350 is used to perform a writing operation based on the fingerprint field comparison result and the writing configuration information to obtain the configuration writing result corresponding to the vehicle.
[0098] In an optional embodiment of this application, the extraction module 330 may include:
[0099] The first acquisition unit is used to acquire the written configuration information corresponding to the vehicle;
[0100] The first determining unit is used to determine the controller information to be written into the write configuration information;
[0101] The first extraction unit is used to extract the target fingerprint field parameter from the written configuration information according to the configuration information format corresponding to the controller information.
[0102] In an optional embodiment of this application, the comparison module 340 may include:
[0103] The second acquisition unit is used to acquire preset configuration information corresponding to the controller information;
[0104] The second extraction unit is used to extract the preset fingerprint field parameters from the preset configuration information;
[0105] The first comparison unit is used to compare the preset fingerprint field parameters with the target fingerprint field parameters to obtain a fingerprint field comparison result.
[0106] In an optional embodiment of this application, the target fingerprint field parameters include at least one target field parameter, and the preset fingerprint field parameters include at least one preset field parameter. The comparison module 340 may include:
[0107] The second determining unit is used to determine the target field position corresponding to each target field parameter;
[0108] The third determining unit is used to determine the position of the preset field corresponding to each preset field parameter;
[0109] The second comparison unit is used to compare the target field parameter corresponding to the target field position with the preset field parameter corresponding to the preset field position when the target field position and the preset field position are the same, so as to obtain the field parameter comparison result.
[0110] The generation unit is used to generate the fingerprint field comparison result based on the comparison result of the field parameters.
[0111] In an optional embodiment of this application, the writing module 350 may include:
[0112] The third extraction unit is used to extract configuration parameters from the written configuration information when the fingerprint field comparison result is the fingerprint matching result;
[0113] The fourth determining unit is used to determine whether there are preset conflict relationship parameters in the configuration parameters;
[0114] The writing unit is used to perform a writing operation based on the writing configuration information when there are no preset conflict relationship parameters in the configuration parameters, and obtain the configuration writing result.
[0115] In an optional embodiment of this application, the fourth determining unit may include:
[0116] The first determining subunit is used to determine the set of configuration items based on the configuration parameters;
[0117] The second determining subunit is used to determine whether there is a combination of conflicting configuration items with a preset conflict relationship in the configuration item set;
[0118] The third determining subunit is used to determine if the conflicting configuration item combination exists in the configuration item set, and to determine if the conflicting relationship parameter exists in the configuration parameter;
[0119] The fourth determining subunit is used to determine that the conflict relationship parameter does not exist in the configuration parameters if the conflicting configuration item combination does not exist in the configuration item set.
[0120] In an optional embodiment of this application, the acquisition module 310 may include:
[0121] The fifth determining unit is used to determine the seed information corresponding to the vehicle based on the service request; the sending unit is used to send the seed information to the server, and the server is used to perform key calculation based on the seed information to obtain the key value;
[0122] A receiving unit is configured to receive the key value sent by the server.
[0123] A key authentication unit is used to perform key authentication on the key value to obtain the verification result.
[0124] The specific implementation process of the functions and roles of each module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0125] like Figure 4 As shown, this application embodiment provides an electronic device, including a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440.
[0126] Memory 430 is used to store computer programs;
[0127] In one embodiment of this application, when the processor 410 executes the program stored in the memory 430, it implements the vehicle configuration information writing method provided in any of the aforementioned method embodiments. This method involves obtaining a service request corresponding to the vehicle, performing key authentication based on the service request, obtaining a verification result, and when the verification result is successful, extracting a target fingerprint field parameter from the vehicle's corresponding configuration information. The target fingerprint field parameter is then compared with a preset fingerprint field parameter corresponding to the vehicle to obtain a fingerprint field comparison result. Subsequently, based on the fingerprint field comparison result, a writing operation is performed in conjunction with the configuration information to obtain the vehicle's configuration writing result. This allows for fingerprint field comparison before writing the configuration information and execution of related writing operations based on the fingerprint field comparison result. This avoids the problem that relying solely on key authentication for configuration information writing can lead to a lack of protection against key leakage when writing or modifying configuration information, and the issue that writing invalid configuration characters through key authentication can affect the normal operation of the vehicle. In other words, it solves the problem of low security in vehicle configuration information writing in existing related technologies and effectively improves the security of configuration information writing.
[0128] This application also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the vehicle configuration information writing method provided in any of the foregoing method embodiments. The method involves obtaining a service request corresponding to the vehicle, performing key authentication based on the service request, obtaining a verification result, and, if the verification result is successful, extracting a target fingerprint field parameter from the vehicle's corresponding configuration information. This target fingerprint field parameter is then compared with a preset fingerprint field parameter corresponding to the vehicle to obtain a fingerprint field comparison result. Subsequently, based on the fingerprint field comparison result and the configuration information, a writing operation is performed to obtain the vehicle's configuration writing result. This allows for fingerprint field comparison before writing the configuration information and execution of related writing operations based on the fingerprint field comparison result. This avoids the problem that relying solely on key authentication for configuration information writing can lead to insufficient protection against key leakage when writing or modifying configuration information, and that writing invalid configuration characters through key authentication can affect the normal operation of the vehicle. In other words, it solves the problem of low security in vehicle configuration information writing in existing related technologies and effectively improves the security of configuration information writing.
[0129] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0130] The foregoing has described specific embodiments of the embodiments described in this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0131] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A configuration information writing method of a vehicle, characterized by, The method comprises the following steps: obtaining a service request corresponding to a vehicle; performing key authentication according to the service request to obtain a verification result; when the verification result is a verification pass result, extracting a target fingerprint field parameter from the write configuration information corresponding to the vehicle; comparing the target fingerprint field parameter with a preset fingerprint field parameter corresponding to the vehicle to obtain a fingerprint field comparison result; based on the fingerprint field comparison result, performing a write operation in combination with the write configuration information to obtain a configuration write result corresponding to the vehicle.
2. The configuration information writing method of a vehicle according to claim 1, characterized by, The method comprises the following steps: obtaining the write configuration information corresponding to the vehicle; determining controller information to be written into the write configuration information; extracting a target fingerprint field parameter from the write configuration information according to the configuration information format corresponding to the controller information.
3. The configuration information writing method of a vehicle according to claim 2, characterized by, The method comprises the following steps: obtaining preset configuration information corresponding to the controller information; extracting the preset fingerprint field parameter from the preset configuration information; comparing the preset fingerprint field parameter with the target fingerprint field parameter to obtain a fingerprint field comparison result.
4. The configuration information writing method of a vehicle according to claim 1, characterized by, The target fingerprint field parameter comprises at least one target field parameter, and the preset fingerprint field parameter comprises at least one preset field parameter. The method comprises the following steps: determining a target field position corresponding to each target field parameter; determining a preset field position corresponding to each preset field parameter; when the target field position and the preset field position are the same, comparing the target field parameter corresponding to the target field position with the preset field parameter corresponding to the preset field position to obtain a field parameter comparison result; based on the field parameter comparison result, generating the fingerprint field comparison result.
5. The configuration information writing method of a vehicle according to claim 1, characterized by, The method comprises the following steps: when the fingerprint field comparison result is a fingerprint match result, extracting a configuration parameter from the write configuration information; determining whether there is a preset conflict relationship parameter in the configuration parameter; when there is no preset conflict relationship parameter in the configuration parameter, performing a write operation based on the write configuration information to obtain the configuration write result.
6. The configuration information writing method of a vehicle according to claim 5, characterized by, The method comprises the following steps: determining a configuration item set according to the configuration parameter; determining whether there is a conflict configuration item combination of a preset conflict relationship in the configuration item set; if there is the conflict configuration item combination in the configuration item set, it is determined that there is the conflict relationship parameter in the configuration parameter; if there is no conflict configuration item combination in the configuration item set, it is determined that there is no conflict relationship parameter in the configuration parameter.
7. The configuration information writing method of a vehicle according to claim 1, characterized by, The key authentication according to the service request obtains a verification result, and the verification result comprises: According to the service request, the seed information corresponding to the vehicle is determined; The seed information is sent to the server, and the server is used for key calculation according to the seed information to obtain the key value; The key value sent by the server is received; The key value is subjected to the key authentication, and the verification result is obtained.
8. A configuration information writing apparatus of a vehicle, characterized by comprising: Comprise: The acquisition module is used for acquiring the service request corresponding to the vehicle; The key authentication module is used for key authentication according to the service request, and a verification result is obtained; The extraction module is used for extracting the target fingerprint field parameter from the write configuration information corresponding to the vehicle when the verification result is a verification pass result; The comparison module is used for comparing the target fingerprint field parameter with the preset fingerprint field parameter corresponding to the vehicle to obtain a fingerprint field comparison result; The write module is used for writing operation based on the fingerprint field comparison result and combining the write configuration information to obtain the configuration write result corresponding to the vehicle.
9. An electronic device, comprising: The communication interface, the memory and the communication bus are completed by the communication bus. The memory is used for storing computer programs; The processor is used for executing the programs stored on the memory, and the configuration information writing method of the vehicle in any one of claims 1-7 is realized.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the configuration information writing method of the vehicle in any one of claims 1-7.