Vehicle configuration word writing method and device, electronic equipment and storage medium

During the vehicle configuration word writing process, the vehicle identification number and electronic control unit identification calculate the similarity of the configuration word to ensure the accurate writing of the configuration word, the problem of configuration word writing errors is solved and the safe operation of the vehicle is ensured.

CN119248340APending Publication Date: 2025-01-03LAUNCH TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411293909.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

During the vehicle production process, the configuration word writing device fails to determine whether the written configuration word matches the current electronic control unit, resulting in an error in the configuration word writing, which in turn affects the normal operation of the vehicle.

Method used

By obtaining the vehicle identification number of the target vehicle and the identification of the electronic control unit, the corresponding configuration word and verification code are determined, and the similarity of the configuration word is calculated. When the similarity is greater than or equal to the preset similarity, the configuration word is written. to ensure the accuracy of the configuration words.

Benefits of technology

It effectively avoids configuration word writing errors, ensures the safe operation of the vehicle, and improves the stability and reliability of the vehicle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248340A_ABST
    Figure CN119248340A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle configuration word writing method and apparatus, an electronic device and a storage medium. The method comprises the steps of obtaining a first vehicle identification number of a target vehicle; acquiring a first identifier corresponding to the target electronic control unit; determining a first configuration word based on the first vehicle identification number and the first identifier; determining a first check code based on the first vehicle identification number and the first configuration word; generating a corresponding target configuration word writing command according to the first configuration word and the first check code; acquiring a second vehicle identification number stored in the target electronic control unit; analyzing the target configuration word writing command through the target electronic control unit to obtain a second configuration word; determining a second check code based on the second vehicle identification number and a second configuration word; calculating a target similarity between the first check code and the second check code; and when the target similarity is greater than or equal to the preset similarity, writing the second configuration word into the target electronic control unit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle data security technology, and in particular to a vehicle configuration word writing method, device, electronic equipment and storage medium. Background Art

[0002] With the rapid advancement of electrification and intelligence in the automotive industry, there are more and more personalized requirements for cars, and customized models are becoming more and more popular in the automotive market. Customized models can more flexibly adapt to the personalized needs of different car users and meet the development needs of the intelligent automotive industry. Vehicle configuration characters are an important control factor in software development for different models.

[0003] As more and more vehicle models are configured, it is necessary to write configuration words into the electronic control unit during vehicle production. The configuration words represent the current vehicle hardware, software configuration and control operation parameters. Currently, when the configuration word writing device writes the configuration word into the electronic control unit, it does not determine whether the written configuration word matches the current electronic control unit, which will result in configuration word writing errors, causing abnormal vehicle operation. Summary of the invention

[0004] The technical problem to be solved by the embodiments of the present invention is to provide a method, device, electronic device and storage medium for writing vehicle configuration words, so as to avoid errors in the configuration words written into the electronic control unit and ensure the safe operation of the vehicle.

[0005] In a first aspect, an embodiment of the present invention provides a vehicle configuration word writing method, which is applied to a configuration word writing device, the configuration word writing device is connected to a target vehicle, and the method includes:

[0006] Obtaining a vehicle identification number stored in a vehicle database of the target vehicle to obtain a first vehicle identification number;

[0007] Obtaining a first identifier corresponding to a target electronic control unit in a target vehicle;

[0008] Determine a configuration word corresponding to a target electronic control unit based on the first vehicle identification number and the first identifier, and obtain a first configuration word;

[0009] determining a first check code based on the first vehicle identification number and the first configuration word;

[0010] Generate a corresponding configuration word write command according to the first configuration word and the first check code to obtain a target configuration word write command;

[0011] Obtaining a vehicle identification number stored in a target electronic control unit to obtain a second vehicle identification number;

[0012] The target electronic control unit parses the target configuration word write command to obtain a second configuration word;

[0013] determining a second verification code based on the second vehicle identification number and the second configuration word;

[0014] Calculate the similarity between the first check code and the second check code to obtain a target similarity;

[0015] When the target similarity is greater than or equal to the preset similarity, the second configuration word is written into the target electronic control unit.

[0016] In a second aspect, an embodiment of the present invention provides a vehicle configuration word writing device, comprising: an acquisition unit and a processing unit;

[0017] An acquisition unit, used to acquire a vehicle identification number of a target vehicle stored in a vehicle database to obtain a first vehicle identification number;

[0018] Obtaining a first identifier corresponding to a target electronic control unit in a target vehicle;

[0019] A processing unit, configured to determine a configuration word corresponding to a target electronic control unit based on the first vehicle identification number and the first identifier, and obtain a first configuration word;

[0020] determining a first check code based on the first vehicle identification number and the first configuration word;

[0021] Generate a corresponding configuration word write command according to the first configuration word and the first check code to obtain a target configuration word write command;

[0022] The acquisition unit is further used to acquire the vehicle identification number stored in the target electronic control unit to obtain a second vehicle identification number;

[0023] The processing unit is further used to parse the target configuration word write command through the target electronic control unit to obtain a second configuration word;

[0024] determining a second verification code based on the second vehicle identification number and the second configuration word;

[0025] Calculate the similarity between the first check code and the second check code to obtain a target similarity;

[0026] When the target similarity is greater than or equal to the preset similarity, the second configuration word is written into the target electronic control unit.

[0027] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor so that the electronic device executes the method of the first aspect.

[0028] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method of the first aspect.

[0029] In a fifth aspect, an embodiment of the present invention provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, so that a computer executes the method of the first aspect.

[0030] The implementation of the present invention has the following beneficial effects:

[0031] Obtain a vehicle identification number stored in a vehicle database of a target vehicle to obtain a first vehicle identification number, obtain a first identifier corresponding to a target electronic control unit in the target vehicle, determine a configuration word corresponding to the target electronic control unit based on the first vehicle identification number and the first identifier to obtain a first configuration word, determine a first check code based on the first vehicle identification number and the first configuration word, generate a corresponding configuration word write command according to the first configuration word and the first check code to obtain a target configuration word write command, obtain the vehicle identification number stored in the target electronic control unit to obtain a second vehicle identification number, parse the target configuration word write command through the target electronic control unit to obtain a second configuration word, determine a second check code based on the second vehicle identification number and the second configuration word, calculate the similarity between the first check code and the second check code to obtain a target similarity, and when the target similarity is greater than or equal to a preset similarity, write the second configuration word into the target electronic control unit to avoid errors in the configuration word written into the electronic control unit, thereby ensuring safe operation of the vehicle. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.

[0033] Figure 1 is a schematic diagram of a vehicle configuration word writing system provided by an embodiment of the present invention;

[0034] Figure 2 is a flow chart of a vehicle configuration word writing method provided by an embodiment of the present invention;

[0035] Figure 3 is a schematic diagram of a target configuration table provided in an embodiment of the present invention;

[0036] Figure 4 It is a structural schematic diagram of a vehicle configuration word writing device provided by an embodiment of the present invention;

[0037] Figure 5It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

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

[0039] The terms "first", "second", "third" and "fourth" in the specification, claims and drawings of the present application are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, target vehicle, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

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

[0041] The following is an explanation of some professional terms involved in this application:

[0042] Electronic Control Unit: (ECU) is a microcomputer composed of large-scale integrated circuits, which is used to control and monitor the target vehicle. It can receive input signals from various sensors, such as temperature, pressure, speed, etc., and process and analyze these signals according to pre-set programs and algorithms, and then output control instructions to drive the actuator to work, so as to achieve precise control and optimized operation of the target vehicle.

[0043] Vehicle Identification Number (VIN) is a unique code consisting of 17 alphanumeric digits, used to accurately identify various vehicles such as cars, motorcycles, trucks, etc. It contains important information such as the vehicle's manufacturer, model, production year, assembly plant, production serial number, etc. It is like the vehicle's ID card and plays an extremely important role in vehicle registration, insurance claims, repair and maintenance, recall management, and anti-theft tracking.

[0044] Configuration Word: (Configuration Word, CW) is a set of specific numbers or codes used to set or describe the specific configuration and parameters of a system, device or component. In the electronic control unit, the configuration word can determine key parameters such as injection timing and ignition advance angle.

[0045] See also Figure 1 , Figure 1 1 is a schematic diagram of a vehicle configuration word writing system provided by an embodiment of the present invention. The vehicle configuration word writing system 10 comprises a target vehicle 101 and a configuration word writing device 102 .

[0046] In this embodiment, the configuration word writing device 102 obtains the vehicle identification number stored in the vehicle database of the target vehicle 101 to obtain the first vehicle identification number, and also obtains the first identifier corresponding to the target electronic control unit in the target vehicle 101, and then determines the configuration word corresponding to the target electronic control unit based on the first vehicle identification number and the first identifier to obtain the first configuration word, and then determines the first check code based on the first vehicle identification number and the first configuration word, generates a corresponding configuration command according to the first configuration word and the first check code, and obtains the target configuration command, and then obtains the vehicle identification number stored in the target electronic control unit to obtain the second vehicle identification number, and then parses the target configuration command through the target electronic control unit to obtain the second configuration word, and then determines the second check code based on the second vehicle identification number and the second configuration word, calculates the similarity between the first check code and the second check code, and obtains the target similarity, and finally when the target similarity is greater than or equal to the preset similarity, the second configuration word is written into the target electronic control unit. It can be seen that by comparing the similarity between the first check code and the second check code, errors in the configuration word written into the electronic control unit are avoided, and the safe operation of the vehicle is guaranteed.

[0047] See also Figure 2 , Figure 2 is a flow chart of a vehicle configuration word writing method provided by an embodiment of the present invention. The method is applied to Figure 1 The configuration word shown is written into the device, including but not limited to the following steps:

[0048] S201: Obtain a vehicle identification number of a target vehicle stored in a vehicle database to obtain a first vehicle identification number.

[0049] In this embodiment, the target user sends a configuration command to the configuration word writing device. After receiving the configuration command, the configuration word writing device can establish a connection with the server where the vehicle database is located through the network, use a specific network protocol and authorization authentication mechanism, and send a request to the server to obtain the vehicle identification number of the specified target vehicle. The vehicle identification number can also be obtained by executing a specific database query statement, or the vehicle identification number of the relevant vehicle can be synchronized to the local cache or storage area where the configuration word writing device is located periodically or in real time. The configuration word writing device obtains the vehicle identification number of the target vehicle from the local storage.

[0050] It should be noted that the vehicle database is a digital system that centrally stores and manages vehicle-related information. It contains a variety of detailed data about the vehicle, including basic vehicle information: vehicle identification number, vehicle model, manufacturer, year of production, etc., which is used to clarify the identity and production background of the vehicle; vehicle configuration information: interior materials, seat types, audio systems, navigation equipment, etc., which describes the comfort and convenience facilities of the vehicle; vehicle usage history records: repair and maintenance records, accident records, mileage, etc., which help to understand the vehicle's usage and maintenance status, etc.

[0051] S202: Obtain a first identifier corresponding to a target electronic control unit in a target vehicle.

[0052] In this embodiment, the identification of the electronic control unit is a specific digital code. First, ensure that the configuration word writing device is effectively physically connected to the target vehicle, then use the configuration word writing device to parse the target electronic control unit of the target vehicle from the configuration command, and then obtain the first identification corresponding to the target electronic control unit.

[0053] It should be noted that before executing the step of obtaining the first identifier corresponding to the target electronic control unit in the target vehicle, it is first necessary to confirm whether a communication connection is established between the target electronic control unit and the configuration word writing device. After confirming that a communication connection is established between the target electronic control unit and the configuration word writing device, it is necessary to perform security authentication on the configuration word writing device. If the security authentication fails, an alarm message is generated to prompt the target user that the configuration word writing device does not have writing permission. If the security authentication succeeds, the step of obtaining the first identifier corresponding to the target electronic control unit in the target vehicle is executed.

[0054] It can be seen that security authentication of the configuration word writing device can effectively prevent unauthorized devices from connecting to the target electronic control unit and performing writing operations, which helps to protect key data and configuration information in the electronic control unit and prevent malicious tampering or theft. Security authentication can ensure that only users with the correct permissions and knowledge can perform configuration word writing operations, which helps to reduce errors caused by misoperation or unfamiliarity with the target vehicle and improve the reliability of writing operations.

[0055] S203: Determine a configuration word corresponding to the target electronic control unit based on the first vehicle identification number and the first identifier to obtain a first configuration word.

[0056] In this embodiment, illustratively, a target configuration table corresponding to the target vehicle is determined based on the first vehicle identification number to obtain a target configuration table, wherein the target configuration table is used to characterize the correspondence between the configuration codes and configuration words of different electronic control units. Specifically, a target configuration table containing a large number of vehicle configuration information is first established, and the target configuration table records in detail the correspondence between the configuration codes and configuration words of different electronic control units. Figure 3 , Figure 3 is a schematic diagram of a target configuration table provided by an embodiment of the present invention. Figure 3 As shown, the target configuration table 30 is a structured data set, in which each row represents the configuration information of an electronic control unit, and the columns list the configuration codes and configuration words corresponding to different electronic control units. Among them, the configuration code of the engine electronic control unit is ECU1234V2.0, the configuration word is 0101101001110011, and the configuration code of the automation electronic control unit is PLC5000M3.5, and the configuration word is 1001011100001111.

[0057] Exemplarily, the configuration code corresponding to the target electronic control unit is determined based on the first identifier to obtain the target configuration code. Specifically, according to the first identifier obtained previously, a search is performed in a pre-established target configuration table to determine the configuration code corresponding to the target electronic control unit to obtain the target configuration code.

[0058] Exemplarily, the first configuration word corresponding to the target configuration code in the target configuration table is determined. Specifically, after obtaining the target configuration code, a search is performed in the target configuration table to determine the configuration word corresponding to the target configuration code, and the first configuration word is obtained.

[0059] It can be seen that by determining the target configuration table corresponding to the target vehicle based on the first vehicle identification number and obtaining the target configuration table, the precise configuration information of the specific vehicle can be quickly obtained, thereby accurately diagnosing faults, selecting suitable maintenance tools and parts, improving maintenance efficiency and quality, and reducing maintenance errors caused by configuration mismatch; by determining the configuration code corresponding to the target electronic control unit based on the first identifier and obtaining the target configuration code, the required configuration code can be quickly and accurately determined, ensuring that the configuration code obtained is a complete match with the target electronic control unit, reducing the risk of operational errors caused by selecting the wrong configuration code; by determining the first configuration word corresponding to the target configuration code in the target configuration table, an accurate configuration word can be obtained for the target electronic control unit, thereby achieving precise functional configuration and performance optimization, and ensuring that the target vehicle operates in the best state.

[0060] S204: Determine a first verification code based on the first vehicle identification number and the first configuration word.

[0061] In this embodiment, illustratively, the first vehicle identification number and the first configuration word are concatenated to obtain a first character string. Specifically, the first vehicle identification number and the first configuration word are first connected in order to form a continuous character sequence, i.e., the first character string. Exemplarily, the first character string is calculated based on a preset hash algorithm to obtain a first check code. Specifically, common preset hash algorithms include MD5, SHA-1, SHA-256 and other algorithms. First, the first character string is passed as input data to the calculation function or program module of the hash algorithm. Then, the hash algorithm performs a series of complex bit operations and logical operations on the input first character string. These operations usually include encoding and processing each character in the first character string, obfuscating, replacing and compressing the data according to algorithm-specific rules, and finally generating an output value of a fixed length through multiple rounds of calculation and conversion. This output value is the desired first check code.

[0062] It can be seen that determining the first verification code based on the first vehicle identification number and the first configuration word facilitates subsequent operations according to the first verification code, facilitates and quickly compares data, and can also improve data security.

[0063] S205: Generate a corresponding configuration word write command according to the first configuration word and the first check code to obtain a target configuration word write command.

[0064] In this embodiment, by inserting the first configuration word and the first check code into the preset command architecture in sequence according to the preset format, a configuration word write command including the first configuration word and the first check code, ie, a target configuration word write command, can be obtained.

[0065] S206: Acquire the vehicle identification number stored in the target electronic control unit to obtain a second vehicle identification number.

[0066] In this embodiment, the vehicle identification number of the target vehicle is stored in each electronic control unit. However, during the vehicle production, configuration or maintenance process, if an error occurs when writing data to the electronic control unit, or if interference occurs during data transmission, resulting in partial data loss or change, the vehicle identification number in the electronic control unit may be inconsistent with that in the vehicle database. During the vehicle production process or subsequent software update process, if an error occurs in data transmission, the vehicle identification number stored in the electronic control unit may be incorrectly written or overwritten. Therefore, by obtaining the vehicle identification number stored in the target electronic control unit at this time, the accurate vehicle identification number in the target electronic control unit, i.e., the second vehicle identification number, can be obtained.

[0067] S207: The target electronic control unit parses the target configuration word write command to obtain a second configuration word.

[0068] In this embodiment, if there is interference, disconnection or data loss during the communication between the configuration word writing device and the target electronic control unit, the configuration word writing command may be incompletely transmitted or erroneously transmitted, thereby parsing out an abnormal second configuration word. When a hardware failure or software error occurs inside the target electronic control unit, the configuration word writing command may not be correctly parsed, resulting in an abnormal second configuration word. In these cases, the parsed second configuration word may be different from the first configuration word in the previous configuration word writing command. After the second configuration word is parsed, different check codes may be determined based on the first configuration word and the second configuration word to verify whether the currently parsed configuration word can be written into the target electronic control unit.

[0069] S208: Determine a second verification code based on the second vehicle identification number and the second configuration word.

[0070] In this embodiment, the method of determining the second check code based on the second vehicle identification number and the second configuration word is the same as the method of determining the first check code based on the first vehicle identification number and the first configuration word. Specifically, the first vehicle identification number and the first configuration word are first concatenated to obtain the first character string, and the second vehicle identification number and the second configuration word can be connected in order to form a continuous character sequence, that is, the second character string. Then, the second character string is calculated based on a preset hash algorithm to obtain a second check code. Specifically, common preset hash algorithms include MD5, SHA-1, SHA-256 and other algorithms. First, the second character string is passed as input data to the calculation function or program module of the hash algorithm, and then the hash algorithm performs a series of complex bit operations and logical operations on the input second character string. These operations usually include encoding and processing each character in the second character string, obfuscating, replacing and compressing the data according to algorithm-specific rules, and finally generating an output value of a fixed length through multiple rounds of calculation and conversion. This output value is the desired second check code.

[0071] S209: Calculate the similarity between the first check code and the second check code to obtain a target similarity.

[0072] In this embodiment, exemplarily, the first check code and the second check code are numerically converted according to a preset conversion method to obtain the first numerical value and the second numerical value. Specifically, the preset conversion method includes base conversion, code mapping, hash function conversion, mathematical operation conversion and other conversion methods. In this embodiment, the hash function conversion method can be selected to convert the first check code and the second check code to obtain the first numerical value and the second numerical value.

[0073] Exemplarily, the smaller value of the first value and the second value is divided by the larger value to obtain a ratio value, and then the ratio value is converted into a percentage to obtain the first similarity.

[0074] Exemplarily, the number of characters in the same position and the same characters in the first check code and the second check code is determined to obtain the first character number, the total number of characters in the first check code or the second check code is determined to obtain the second character number, and a ratio calculation is performed based on the first character number and the second character number to obtain the second similarity. Specifically, the characters in the same position in the first check code and the second check code are checked one by one, and whenever the characters in the same position of the two check codes are found to be the same, the count is increased, and finally the number of characters in the same position and the same characters in the first check code and the second check code can be obtained, that is, the first character number. In this embodiment, the total number of characters in the first check code is the same as the total number of characters in the second check code, so the second character number can be obtained by determining the total number of characters in the first check code or the second check code. Divide the smaller number of characters in the first character number by the larger number of characters in the second character number to obtain a ratio value, that is, the second similarity.

[0075] Exemplarily, after obtaining the first similarity and the second similarity, weight calculation is performed on the first similarity and the second similarity to obtain the target similarity. Specifically, a first reference weight corresponding to the first similarity and a second reference weight corresponding to the second similarity are first obtained. A mapping relationship between preset similarities and reference weights may be pre-stored, and a first reference weight corresponding to the first similarity and a second reference weight corresponding to the second similarity are determined based on the mapping relationship.

[0076] Exemplarily, the execution code running time corresponding to the preset conversion mode is obtained to obtain the target execution code running time, the optimization factor corresponding to the target execution code running time is determined to obtain the first optimization factor, and the first reference weight is optimized based on the first optimization factor to obtain the first target weight. Specifically, a mapping relationship between the preset execution code running time and the optimization factor may be pre-stored, and the first optimization factor corresponding to the target execution code running time is determined based on the mapping relationship, and then the first reference weight is optimized according to the first optimization factor. The specific calculation formula is as follows:

[0077] First target weight = first reference weight × (1 + first optimization factor);

[0078] According to the above formula, the first target weight can be obtained.

[0079] Exemplarily, an optimization factor corresponding to the second number of characters is determined to obtain a second optimization factor, and the second reference weight is optimized based on the second optimization factor to obtain a second target weight. Specifically, a mapping relationship between a preset number of characters and the optimization factor may be pre-stored, and a second optimization factor corresponding to the second number of characters is determined based on the mapping relationship. Then, the second reference weight is optimized according to the second optimization factor. The specific calculation formula is as follows:

[0080] Second target weight = second reference weight × (1 + second optimization factor);

[0081] The second target weight can be obtained according to the above formula.

[0082] Exemplarily, the target similarity is obtained by performing calculation based on the first similarity, the second similarity, the first target weight, and the second target weight. Specifically, the target similarity is the product of the first similarity and the first target weight plus the product of the second similarity and the second target weight. The target similarity is calculated specifically according to the following formula:

[0083] F=T×a+σ×b

[0084] Among them, F is the target similarity, T is the first similarity, σ is the second similarity, a is the first target weight, and b is the second target weight.

[0085] It can be seen that by calculating the similarity in two different ways, namely the ratio calculation after numerical conversion and the ratio calculation of the number of characters, the similarity between the first check code and the second check code is evaluated from different angles, and the two similarities are weighted to obtain the final target similarity, which can comprehensively consider the similarities in different aspects and make a more comprehensive and accurate judgment. By introducing an optimization factor to adjust the first reference weight and the second reference weight, the weight is no longer fixed, but can be dynamically adjusted according to different situations. If the execution code of the preset conversion method takes a long time to run, it means that this conversion method may be more complicated or time-consuming. At this time, the weight corresponding to the first similarity can be appropriately reduced to avoid affecting the accuracy of the overall similarity due to the complexity of the conversion method. By dynamically adjusting the weight, the excessive impact of changes in a single factor on the overall similarity calculation result can be reduced, so that the obtained target similarity is closest to the actual situation.

[0086] S2010: When the target similarity is greater than or equal to the preset similarity, writing the second configuration word into the target electronic control unit.

[0087] In this embodiment, when the target similarity is greater than or equal to the preset similarity, it means that the second vehicle identification number stored in the target electronic control unit is correct, the target electronic control unit parses the target configuration word write command, and the obtained second configuration word is also correct, and the second configuration word can be written into the target electronic control unit.

[0088] Exemplarily, the second configuration word is written into the target electronic control unit. Specifically, based on the content of the second configuration word, the corresponding storage address in the target electronic control unit is determined, and then the second configuration word is stored in the corresponding storage address in the target electronic control unit. After receiving the second configuration word, the target electronic control unit will send a prompt of successful writing to the configuration word writing device.

[0089] It should be noted that when the target similarity is less than the preset similarity, it means that the second vehicle identification number stored in the target electronic control unit or the second configuration word parsed by the target electronic control unit is incorrect, and the configuration word will not be written into the target control unit at this time, and the configuration word writing device will generate a configuration word writing failure prompt message, prompting the target user that the second configuration word does not match the target electronic control unit and cannot be written. It should be explained that the configuration word writing failure prompt message can be displayed through the display interface of the configuration word writing device, and can also be prompted through the broadcasting system.

[0090] It can be seen that the target electronic control unit is confirmed to have correctly parsed the second configuration word obtained by the target configuration word write command before writing, which ensures that the written data is correct, which can avoid the malfunction of the electronic control unit due to configuration word errors and improve the stability and reliability of the target vehicle. Correct configuration word writing can make the electronic control unit work better and improve the compatibility and overall performance of the target vehicle. If an incompatible configuration word is written, it may cause conflict or performance degradation of the target vehicle.

[0091] In summary, the implementation of the present invention has the following beneficial effects:

[0092] Obtain a vehicle identification number stored in a vehicle database of a target vehicle to obtain a first vehicle identification number, obtain a first identifier corresponding to a target electronic control unit in the target vehicle, determine a configuration word corresponding to the target electronic control unit based on the first vehicle identification number and the first identifier to obtain a first configuration word, determine a first check code based on the first vehicle identification number and the first configuration word, generate a corresponding configuration word write command according to the first configuration word and the first check code to obtain a target configuration word write command, obtain the vehicle identification number stored in the target electronic control unit to obtain a second vehicle identification number, parse the target configuration word write command through the target electronic control unit to obtain a second configuration word, determine a second check code based on the second vehicle identification number and the second configuration word, calculate the similarity between the first check code and the second check code to obtain a target similarity, and when the target similarity is greater than or equal to a preset similarity, write the second configuration word into the target electronic control unit to avoid errors in the configuration word written into the electronic control unit, thereby ensuring safe operation of the vehicle.

[0093] See also Figure 4 , Figure 4 It is a structural diagram of a vehicle configuration word writing device provided by an embodiment of the present invention, which is applied to a configuration word writing device. The vehicle configuration word writing device 400 includes: an acquisition unit 401 and a processing unit 402;

[0094] The acquisition unit 401 is used to acquire the vehicle identification number of the target vehicle stored in the vehicle database to obtain a first vehicle identification number;

[0095] Obtaining a first identifier corresponding to a target electronic control unit in a target vehicle;

[0096] The processing unit 402 is configured to determine a configuration word corresponding to a target electronic control unit based on the first vehicle identification number and the first identifier, and obtain a first configuration word;

[0097] determining a first check code based on the first vehicle identification number and the first configuration word;

[0098] Generate a corresponding configuration word write command according to the first configuration word and the first check code to obtain a target configuration word write command;

[0099] The acquisition unit 401 is further used to acquire the vehicle identification number stored in the target electronic control unit to obtain a second vehicle identification number;

[0100] The processing unit 402 is further used to parse the target configuration word write command through the target electronic control unit to obtain a second configuration word;

[0101] determining a second verification code based on the second vehicle identification number and the second configuration word;

[0102] Calculate the similarity between the first check code and the second check code to obtain a target similarity;

[0103] When the target similarity is greater than or equal to the preset similarity, the second configuration word is written into the target electronic control unit.

[0104] In some possible implementations, in determining the configuration word corresponding to the target electronic control unit based on the first vehicle identification number and the first identifier to obtain the first configuration word, the processing unit 402 is specifically configured to:

[0105] Determine a target configuration table corresponding to the target vehicle based on the first vehicle identification number to obtain the target configuration table; the target configuration table is used to characterize the correspondence between configuration codes and configuration words of different electronic control units;

[0106] Determine a configuration code corresponding to a target electronic control unit based on the first identifier, and obtain a target configuration code;

[0107] Determine the first configuration word corresponding to the target configuration code in the target configuration table.

[0108] In some possible implementations, in calculating the similarity between the first check code and the second check code to obtain the target similarity, the processing unit 402 is specifically configured to:

[0109] Performing numerical conversion on the first check code and the second check code according to a preset conversion method to obtain a first numerical value and a second numerical value;

[0110] Performing a ratio calculation based on the first value and the second value to obtain a first similarity;

[0111] Determine the number of characters in the first check code and the second check code that have the same position and characters, and obtain the first character number;

[0112] Determine the total number of characters of the first check code or the second check code to obtain the second number of characters; the total number of characters of the first check code is the same as the total number of characters of the second check code;

[0113] A second similarity is obtained by calculating a ratio based on the number of the first characters and the number of the second characters;

[0114] The first similarity and the second similarity are weighted to obtain the target similarity.

[0115] In some possible implementations, in terms of performing weight calculation on the first similarity and the second similarity to obtain the target similarity, the processing unit 402 is specifically configured to:

[0116] Obtaining a first reference weight corresponding to the first similarity and a second reference weight corresponding to the second similarity;

[0117] Obtain the execution code running time corresponding to the preset conversion method, and obtain the target execution code running time;

[0118] Determine an optimization factor corresponding to the target execution code running time to obtain a first optimization factor;

[0119] Optimizing the first reference weight based on the first optimization factor to obtain a first target weight;

[0120] Determine an optimization factor corresponding to the second number of characters to obtain a second optimization factor;

[0121] Optimizing the second reference weight based on the second optimization factor to obtain a second target weight;

[0122] An operation is performed based on the first similarity, the second similarity, the first target weight, and the second target weight to obtain the target similarity.

[0123] In some possible implementations, the processing unit 402 is further specifically configured to:

[0124] When the target similarity is less than the preset similarity, a configuration word writing failure prompt message is generated.

[0125] In some possible implementations, in determining the first verification code based on the first vehicle identification number and the first configuration word, the processing unit 402 is specifically configured to:

[0126] Concatenate the first vehicle identification number and the first configuration word to obtain a first character string;

[0127] The first character string is calculated based on a preset hash algorithm to obtain a first verification code.

[0128] In some possible implementations, the processing unit 402 is further specifically configured to:

[0129] After establishing a communication connection between the target electronic control unit and the configuration word writing device, performing security authentication on the configuration word writing device;

[0130] If the security authentication fails, an alarm message is generated; the alarm message is used to remind the target user that the configuration word writing device does not have the write permission;

[0131] If the security authentication is successful, the step of acquiring a first identifier corresponding to a target electronic control unit in the target vehicle is performed.

[0132] See also Figure 5 , Figure 5 Schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 5 As shown, the electronic device 500 includes a transceiver 501, a processor 502 and a memory 503. They are connected via a bus 504. The memory 503 is used to store computer programs and data, and the transceiver 501 can transmit the data stored in the memory 503 to the processor 502. The above program includes instructions for executing the following steps:

[0133] Obtaining a vehicle identification number stored in a vehicle database of the target vehicle to obtain a first vehicle identification number;

[0134] Obtaining a first identifier corresponding to a target electronic control unit in a target vehicle;

[0135] Determine a configuration word corresponding to a target electronic control unit based on the first vehicle identification number and the first identifier, and obtain a first configuration word;

[0136] determining a first check code based on the first vehicle identification number and the first configuration word;

[0137] Generate a corresponding configuration word write command according to the first configuration word and the first check code to obtain a target configuration word write command;

[0138] Obtaining a vehicle identification number stored in a target electronic control unit to obtain a second vehicle identification number;

[0139] The target electronic control unit parses the target configuration word write command to obtain a second configuration word;

[0140] determining a second verification code based on the second vehicle identification number and the second configuration word;

[0141] Calculate the similarity between the first check code and the second check code to obtain a target similarity;

[0142] When the target similarity is greater than or equal to the preset similarity, the second configuration word is written into the target electronic control unit.

[0143] In some possible implementations, in terms of determining the configuration word corresponding to the target electronic control unit based on the first vehicle identification number and the first identifier to obtain the first configuration word, the above program includes instructions for performing the following steps:

[0144] Determine a target configuration table corresponding to the target vehicle based on the first vehicle identification number to obtain the target configuration table; the target configuration table is used to characterize the correspondence between configuration codes and configuration words of different electronic control units;

[0145] Determine a configuration code corresponding to a target electronic control unit based on the first identifier, and obtain a target configuration code;

[0146] Determine the first configuration word corresponding to the target configuration code in the target configuration table.

[0147] In some possible implementations, in terms of calculating the similarity between the first verification code and the second verification code to obtain the target similarity, the program includes instructions for performing the following steps:

[0148] Performing numerical conversion on the first check code and the second check code according to a preset conversion method to obtain a first numerical value and a second numerical value;

[0149] Performing a ratio calculation based on the first value and the second value to obtain a first similarity;

[0150] Determine the number of characters in the first check code and the second check code that have the same position and characters, and obtain the first character number;

[0151] Determine the total number of characters of the first check code or the second check code to obtain the second number of characters; the total number of characters of the first check code is the same as the total number of characters of the second check code;

[0152] A second similarity is obtained by calculating a ratio based on the number of the first characters and the number of the second characters;

[0153] The first similarity and the second similarity are weighted to obtain the target similarity.

[0154] In some possible implementations, in terms of performing weight calculation on the first similarity and the second similarity to obtain the target similarity, the program includes instructions for executing the following steps:

[0155] Obtaining a first reference weight corresponding to the first similarity and a second reference weight corresponding to the second similarity;

[0156] Obtain the execution code running time corresponding to the preset conversion method, and obtain the target execution code running time;

[0157] Determine an optimization factor corresponding to the target execution code running time to obtain a first optimization factor;

[0158] Optimizing the first reference weight based on the first optimization factor to obtain a first target weight;

[0159] Determine an optimization factor corresponding to the second number of characters to obtain a second optimization factor;

[0160] Optimizing the second reference weight based on the second optimization factor to obtain a second target weight;

[0161] An operation is performed based on the first similarity, the second similarity, the first target weight, and the second target weight to obtain the target similarity.

[0162] In some possible implementations, the above program includes instructions for performing the following steps:

[0163] When the target similarity is less than the preset similarity, a configuration word writing failure prompt message is generated.

[0164] In some possible implementations, in determining the first verification code based on the first vehicle identification number and the first configuration word, the program includes instructions for performing the following steps:

[0165] Concatenate the first vehicle identification number and the first configuration word to obtain a first character string;

[0166] The first character string is calculated based on a preset hash algorithm to obtain a first verification code.

[0167] In some possible implementations, the above program includes instructions for performing the following steps:

[0168] After establishing a communication connection between the target electronic control unit and the configuration word writing device, performing security authentication on the configuration word writing device;

[0169] If the security authentication fails, an alarm message is generated; the alarm message is used to remind the target user that the configuration word writing device does not have the write permission;

[0170] If the security authentication is successful, the step of acquiring a first identifier corresponding to a target electronic control unit in the target vehicle is performed.

[0171] It should be understood that the electronic devices in this application may include smart phones (such as Android phones, iOS phones, Windows Phone phones, etc.), tablet computers, PDAs, laptops, mobile Internet devices MID (Mobile Internet Devices, MID for short) or wearable devices or servers, edge computing nodes, etc. The above electronic devices are only examples, not exhaustive, and include but are not limited to the above electronic devices. In practical applications, the above electronic devices may also include: smart vehicle terminals, computer equipment, etc.

[0172] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which is executed by a processor to implement part or all of the steps of any vehicle configuration word writing method recorded in the above method embodiment.

[0173] An embodiment of the present invention also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any vehicle configuration word writing method recorded in the above method embodiment.

[0174] It should be noted that, for the above-mentioned various method implementations, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the implementations described in the specification are all optional implementations, and the actions and modules involved are not necessarily required by this application.

[0175] In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0176] In the several embodiments provided in this application, it should be understood that the disclosed device can be implemented in other ways. For example, the device implementation described above is only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another ERP hardware detection device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical or other forms.

[0177] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0178] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software program module.

[0179] If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of each implementation method of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0180] A person skilled in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.

[0181] The above is a detailed introduction to the implementation mode of the present invention. Specific examples are used in this article to illustrate the principles and implementation modes of the present application. The description of the above implementation modes is only used to help understand the method and core idea of ​​the present application. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for writing vehicle configuration words, characterized in that: Applied to a configuration word writing device, the configuration word writing device is connected to a target vehicle, and the method includes: Obtaining a vehicle identification number stored in a vehicle database of the target vehicle to obtain a first vehicle identification number; Obtaining a first identifier corresponding to a target electronic control unit in the target vehicle; Determine a configuration word corresponding to the target electronic control unit based on the first vehicle identification number and the first identifier, and obtain a first configuration word; determining a first verification code based on the first vehicle identification number and the first configuration word; Generate a corresponding configuration word write command according to the first configuration word and the first check code to obtain a target configuration word write command; Obtaining a vehicle identification number stored in the target electronic control unit to obtain a second vehicle identification number; Parsing the target configuration word write command by the target electronic control unit to obtain a second configuration word; determining a second verification code based on the second vehicle identification number and the second configuration word; Calculating the similarity between the first verification code and the second verification code to obtain a target similarity; When the target similarity is greater than or equal to a preset similarity, the second configuration word is written into the target electronic control unit.

2. The method according to claim 1, characterized in that The step of determining the configuration word corresponding to the target electronic control unit based on the first vehicle identification number and the first identifier to obtain the first configuration word includes: Determine a target configuration table corresponding to the target vehicle based on the first vehicle identification number to obtain a target configuration table; the target configuration table is used to characterize the correspondence between configuration codes and configuration words of different electronic control units; Determine the configuration code corresponding to the target electronic control unit based on the first identifier, and obtain the target configuration code; Determine the first configuration word corresponding to the target configuration code in the target configuration table.

3. The method according to claim 1, characterized in that The calculating the similarity between the first check code and the second check code to obtain a target similarity includes: Performing numerical conversion on the first check code and the second check code according to a preset conversion method to obtain a first numerical value and a second numerical value; Performing a ratio calculation based on the first value and the second value to obtain a first similarity; Determine the number of characters in the first check code and the second check code that have the same position and characters, and obtain a first number of characters; Determine the total number of characters of the first check code or the second check code to obtain a second number of characters; the total number of characters of the first check code is the same as the total number of characters of the second check code; Calculating a ratio based on the first number of characters and the second number of characters to obtain a second similarity; A weight calculation is performed on the first similarity and the second similarity to obtain the target similarity.

4. The method according to claim 3, characterized in that The performing weight calculation on the first similarity and the second similarity to obtain the target similarity includes: Obtaining a first reference weight corresponding to the first similarity and a second reference weight corresponding to the second similarity; Obtain the execution code running time corresponding to the preset conversion method to obtain the target execution code running time; Determine an optimization factor corresponding to the running time of the target execution code to obtain a first optimization factor; Optimizing the first reference weight based on the first optimization factor to obtain a first target weight; Determine an optimization factor corresponding to the second number of characters to obtain a second optimization factor; Optimizing the second reference weight based on the second optimization factor to obtain a second target weight; The target similarity is obtained by performing calculation based on the first similarity, the second similarity, the first target weight, and the second target weight.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: When the target similarity is less than the preset similarity, a configuration word writing failure prompt message is generated.

6. The method according to any one of claims 1 to 4, characterized in that: The determining a first verification code based on the first vehicle identification number and the first configuration word includes: Concatenate the first vehicle identification number and the first configuration word to obtain a first character string; The first character string is calculated based on a preset hash algorithm to obtain the first verification code.

7. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: After establishing a communication connection between the target electronic control unit and the configuration word writing device, performing security authentication on the configuration word writing device; If the security authentication fails, an alarm message is generated; the alarm message is used to prompt the target user that the configuration word writing device does not have the writing permission; If the security authentication is successful, the step of obtaining the first identifier corresponding to the target electronic control unit in the target vehicle is performed.

8. A vehicle configuration word writing device, characterized in that: The device comprises: an acquisition unit and a processing unit; The acquisition unit is used to acquire the vehicle identification number stored in the vehicle database of the target vehicle to obtain a first vehicle identification number; Obtaining a first identifier corresponding to a target electronic control unit in the target vehicle; The processing unit is configured to determine a configuration word corresponding to the target electronic control unit based on the first vehicle identification number and the first identifier to obtain a first configuration word; determining a first verification code based on the first vehicle identification number and the first configuration word; Generate a corresponding configuration word write command according to the first configuration word and the first check code to obtain a target configuration word write command; The acquisition unit is further used to acquire the vehicle identification number stored in the target electronic control unit to obtain a second vehicle identification number; The processing unit is further used to parse the target configuration word write command through the target electronic control unit to obtain a second configuration word; determining a second verification code based on the second vehicle identification number and the second configuration word; Calculating the similarity between the first verification code and the second verification code to obtain a target similarity; When the target similarity is greater than or equal to a preset similarity, the second configuration word is written into the target electronic control unit.

9. An electronic device, characterized in that: The method comprises a processor, a memory, a communication interface and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the one or more programs include instructions for executing the steps in the method described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 7.