Vehicle component identification method, device storage medium and vehicle
By generating the component's serial number, model number code and project code fields, and hash data compression processing, the problem of lack of uniqueness and easy counterfeiting of ECU identifiers is solved, and the vehicle safety is improved.
Patent Information
- Application Number
- CN202411073595.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-08-07
AI Technical Summary
The existing ECU identifier generation scheme lacks uniqueness, is prone to counterfeiting, has poor flexibility, resulting in poor vehicle safety.
By obtaining the manufacturing information and project information of vehicle components, determining the serial number field, model number encoding field and project encoding field, hash data compression processing, generating verification code fields, combining these fields to generate target identifiers to ensure the identifier's Uniqueness and difficulty in counterfeiting.
It realizes the generation of unique and difficult to counterfeit identifiers for target components, improves the flexibility of identifier generation, enhances vehicle safety, and solves the problem of lack of uniqueness and easy counterfeit identifiers.
Smart Images

Figure CN118585970B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle technology, and in particular to a vehicle component identification method, a device storage medium and a vehicle. Background Art
[0002] With the rapid development of automotive electronic technology, the application scope of Electronic Control Unit (ECU) in vehicles is becoming more and more extensive. In the application scenario, each ECU usually needs an identifier to realize identity recognition, so as to accurately manage the ECU in the process of vehicle fault diagnosis, software development and upgrading. Common ECU identifier generation schemes in related technologies mostly rely on hardware serial numbers or simple coding rules. However, the identifiers generated by the above schemes in related technologies often lack uniqueness, the identifiers are easy to be counterfeited, and the ECU identifier generation schemes are inflexible. Therefore, how to generate a unique and difficult-to-counterfeit ECU identifier has become one of the important technical issues in the field of related technologies.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a vehicle component identification method, a device storage medium and a vehicle, so as to at least solve the technical problem that the identifier obtained by the component identifier generation scheme provided in the related art lacks uniqueness, is easy to be counterfeited and has poor flexibility, resulting in poor vehicle safety.
[0005] According to one aspect of an embodiment of the present invention, a vehicle component identification method is provided, comprising: obtaining component manufacturing information and project information corresponding to a target component in a vehicle; determining a serial number field and a model code field based on the component manufacturing information, wherein the serial number field is used to represent a bit-wise unique serial number of the target component, and the model code field is used to represent the model information of a basic model part in the target component; encoding the project information to obtain a project code field; performing hash data compression processing on the serial number field, the model code field, and the project code field to obtain a check code field; and generating a target identifier using the serial number field, the model code field, the project code field, and the check code field, wherein the target identifier is used to represent the identity information of the target component.
[0006] Optionally, based on the component manufacturing information, determining the serial number field includes: parsing the component manufacturing information to obtain a bit-wise unique serial number, wherein the bit-wise unique serial number is a decimal sequence number; encoding the bit-wise unique serial number into a first number of binary bytes to obtain the serial number field.
[0007] Optionally, based on the component manufacturing information, determining the model coding field includes: parsing the part number of the basic model part from the component manufacturing information, wherein the part number is an unsigned hexadecimal serial number; based on a preset valid number of bits, encoding the part number into a second number of binary bytes to obtain the model coding field.
[0008] Optionally, encoding the project information to obtain the project encoding field includes: obtaining a project string to be encoded from the project information, wherein the project string includes multiple characters in a hexadecimal character encoding format; encoding the project string into a third number of binary bytes to obtain the project encoding field.
[0009] Optionally, hash data compression processing is performed on the serial number field, model code field and project code field to obtain a check code field, including: using a predefined target hash algorithm to perform random mixed calculations on the serial number field, model code field and project code field to obtain a calculation result; performing data compression on the calculation result to create a hash value, wherein the hash value is a character string of a preset length, and the character string is used to represent summary information of the serial number field, the model code field and the project code field; extracting some characters at a target position from the hash value; encoding some characters into a fourth number of binary bytes to obtain a check code field.
[0010] Optionally, generating a target identifier using a serial number field, a model code field, a project code field and a check code field includes: arranging and merging the serial number field, the model code field, the project code field and the check code field in a preset order to obtain a target identifier, wherein the preset order is from first to last: serial number field, model code field, project code field, check code field.
[0011] Optionally, the target component is an electronic control unit; the vehicle component identification method also includes: generating an identity identification message corresponding to the electronic control unit based on the target identifier; sending the identity identification information to the target controller of the vehicle to support the target controller to perform vehicle fault diagnosis related to the electronic control unit.
[0012] According to another aspect of an embodiment of the present invention, a vehicle component identification device is also provided, including: an acquisition module, used to acquire component manufacturing information and project information corresponding to a target component in a vehicle; a determination module, used to determine a serial number field and a model code field based on the component manufacturing information, wherein the serial number field is used to represent a bit-wise unique serial number of the target component, and the model code field is used to represent the model information of the basic model parts in the target component; an encoding module, used to encode the project information to obtain a project code field; a processing module, used to perform hash data compression processing on the serial number field, the model code field and the project code field to obtain a check code field; and a generation module, used to generate a target identifier using the serial number field, the model code field, the project code field and the check code field, wherein the target identifier is used to represent the identity information of the target component.
[0013] Optionally, the above-mentioned determination module is also used to: parse the component manufacturing information to obtain a bit-by-bit unique serial number, wherein the bit-by-bit unique serial number is a decimal serial number; encode the bit-by-bit unique serial number into a first number of binary bytes to obtain a serial number field.
[0014] Optionally, the above-mentioned determination module is also used to: parse the part number of the basic model part from the component manufacturing information, wherein the part number is an unsigned hexadecimal serial number; based on a preset valid digit, encode the part number into a second number of binary bytes to obtain a model code field.
[0015] Optionally, the encoding module is further used to: obtain a project string to be encoded from the project information, wherein the project string includes multiple characters in a hexadecimal character encoding format; encode the project string into a third number of binary bytes to obtain a project encoding field.
[0016] Optionally, the above-mentioned processing module is also used to: use a predefined target hash algorithm to perform random mixed calculations on the serial number field, the model code field and the project code field to obtain a calculation result; perform data compression on the calculation result to create a hash value, wherein the hash value is a character string of a preset length, and the character string is used to represent the summary information of the serial number field, the model code field and the project code field; extract some characters at the target position from the hash value; encode some characters into a fourth number of binary bytes to obtain a check code field.
[0017] Optionally, the above-mentioned generation module is also used to: arrange and merge the serial number field, model code field, project code field and check code field in a preset order to obtain a target identifier, wherein the preset order is from first to last: serial number field, model code field, project code field, check code field.
[0018] Optionally, the above-mentioned vehicle component identification device also includes: a sending module, used to: generate an identity identification message corresponding to the electronic control unit based on the target identifier; and send the identity identification information to the target controller of the vehicle to support the target controller to perform vehicle fault diagnosis related to the electronic control unit.
[0019] According to another aspect of an embodiment of the present invention, a storage medium is further provided, the storage medium including a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute any one of the above-mentioned vehicle component identification methods.
[0020] According to another aspect of an embodiment of the present invention, a vehicle is provided, including an on-board memory and an on-board processor, wherein a computer program is stored in the on-board memory, and the on-board processor is configured to run the computer program to execute any one of the above-mentioned vehicle component identification methods.
[0021] In an embodiment of the present invention, the component manufacturing information and project information corresponding to the target component in the vehicle are obtained; based on the component manufacturing information, the serial number field and the model code field are determined, wherein the serial number field is used to represent the bit-by-bit unique serial number of the target component, and the model code field is used to represent the model information of the basic model parts in the target component; the project information is encoded to obtain the project code field; the serial number field, the model code field and the project code field are subjected to hash data compression processing to obtain the check code field; the target identifier is generated by using the serial number field, the model code field, the project code field and the check code field, wherein the target identifier is used to represent the identity information of the target component. Thus, the embodiment of the present invention can achieve the purpose of generating the check code field in combination with the component manufacturing information and the project information of the target component and then generating the target identifier, thereby achieving the technical effect of generating a unique and difficult-to-counterfeit identifier for the target component, improving the flexibility of identifier generation, and enhancing the safety of the vehicle, thereby solving the technical problem that the identifier obtained by the component identifier generation scheme provided in the related art lacks uniqueness, is easy to be counterfeited and has poor flexibility, resulting in poor vehicle safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0023] Figure 1 is a hardware structure block diagram of a vehicle terminal for a vehicle component identification method according to an optional embodiment of the present invention;
[0024] Figure 2 is a flow chart of a vehicle component identification method according to an embodiment of the present invention;
[0025] Figure 3 is a schematic diagram of an optional identifier field structure of a vehicle component according to an embodiment of the present invention;
[0026] Figure 4 4 is a structural block diagram of a vehicle component identification device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] According to an embodiment of the present invention, an embodiment of a vehicle component identification method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0030] Figure 1 is a hardware structure block diagram of a vehicle terminal for a vehicle component identification method according to an embodiment of the present invention, such as Figure 1As shown, the vehicle terminal (or a mobile device that has a communication association with the vehicle) may include one or more processors 102 (the processor 102 may include but is not limited to a processing device such as a microcontroller unit (MCU) or a programmable logic device (Field Programmable Gate Array, FPGA)), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display device 110, an input and output device 108, a Universal Serial Bus (USB) port (which may be included as one of the ports of a computer bus, not shown in the figure), a network interface (not shown in the figure), a power supply (not shown in the figure) and / or a camera (not shown in the figure). It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the vehicle terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0031] It should be noted that the one or more processors 102 and / or other data processing circuits may be embodied in whole or in part as software, hardware, firmware or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be fully or partially integrated into any one of the other components in the vehicle terminal (or mobile device).
[0032] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the vehicle component identification method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the above-mentioned vehicle component identification method is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the vehicle terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0033] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the vehicle terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0034] Under the above operating environment, the embodiment of the present invention provides the following Figure 2 The vehicle component identification method shown, Figure 2 is a flow chart of a vehicle component identification method according to an embodiment of the present invention. Figure 2 As shown, the method includes the following implementation steps:
[0035] Step S201, obtaining component manufacturing information and project information corresponding to a target component in a vehicle;
[0036] Step S202, based on the component manufacturing information, determining a serial number field and a model code field, wherein the serial number field is used to represent a bit-by-bit unique serial number of the target component, and the model code field is used to represent model information of a basic model part in the target component;
[0037] Step S203, encode the project information to obtain a project code field;
[0038] Step S204, performing hash data compression processing on the serial number field, the model code field and the project code field to obtain a check code field;
[0039] Step S205, using the serial number field, the model code field, the project code field and the check code field, a target identifier is generated, wherein the target identifier is used to represent the identity information of the target component.
[0040] The above-mentioned component manufacturing information may be the manufacturing information recorded by the above-mentioned target component during the manufacturing stage. According to the component manufacturing information, the bitwise unique serial number of the target component and the model information of the basic model parts can be determined. Through the above-mentioned bitwise unique serial number, it can be ensured that the target component is configured with unique serial identification information. It should be noted that the above-mentioned bitwise unique serial number is not the same as the device serial number. The above-mentioned basic model parts may be parts of the basic model or standard model used in the design and manufacture of the target component. According to the above-mentioned component manufacturing information, the model information of at least one basic model part in the target component is determined.
[0041] The above-mentioned project information may be information of a task project corresponding to the target component. For example, when the above-mentioned target component is an electronic control unit (ECU) of a vehicle, the above-mentioned project information may be ECU project information, and the ECU project includes design tasks and development tasks of the vehicle electronic control system, and the ECU project is used to monitor and control various functions of the vehicle (such as engine control function, brake function, steering function and air conditioning function, etc.). The project code field can be encoded according to the project information.
[0042] Furthermore, the serial number field, the model code field and the project code field are subjected to hash data compression processing to obtain a check code field, which may be a data summary of the serial number field, the model code field and the project code field. The authenticity and integrity of the identity information related to the target component (i.e., the serial number field, the model code field and the project code field) can be determined through the check code field.
[0043] Combined with the above-mentioned serial number field, model code field, project code field and check code field, the generated target identifier can represent the multi-level identity information corresponding to the target component, thereby ensuring the uniqueness of the target identifier, enhancing the flexibility of the target component identifier generation scheme, further improving the accuracy of target component identity recognition, and ensuring the safety and intelligence level of the vehicle.
[0044] In an embodiment of the present invention, the component manufacturing information and project information corresponding to the target component in the vehicle are obtained; based on the component manufacturing information, the serial number field and the model code field are determined, wherein the serial number field is used to represent the bit-by-bit unique serial number of the target component, and the model code field is used to represent the model information of the basic model parts in the target component; the project information is encoded to obtain the project code field; the serial number field, the model code field and the project code field are subjected to hash data compression processing to obtain the check code field; the target identifier is generated by using the serial number field, the model code field, the project code field and the check code field, wherein the target identifier is used to represent the identity information of the target component. Thus, the embodiment of the present invention can achieve the purpose of generating the check code field in combination with the component manufacturing information and the project information of the target component and then generating the target identifier, thereby achieving the technical effect of generating a unique and difficult-to-counterfeit identifier for the target component, improving the flexibility of identifier generation, and enhancing the safety of the vehicle, thereby solving the technical problem that the identifier obtained by the component identifier generation scheme provided in the related art lacks uniqueness, is easy to be counterfeited and has poor flexibility, resulting in poor vehicle safety.
[0045] The above method of the embodiment of the present invention is further introduced below.
[0046] In an application scenario, according to the above method steps provided by an embodiment of the present invention, a vehicle component is configured as follows: Figure 3 The identifier field shown constitutes the generated target identifier. Specifically, Figure 3 As shown, the target identifier includes 16 bytes, recorded as Byte0 to Byte15, and the 16 bytes include a serial number field, a model code field, a project code field and a check code field.
[0047] Optionally, in the above step S202, determining the serial number field based on the component manufacturing information may further include the following execution steps:
[0048] Step S221, parsing the component manufacturing information to obtain a bitwise unique serial number, wherein the bitwise unique serial number is a decimal serial number;
[0049] Step S222: Encode the bit-wise unique serial number into a first number of binary bytes to obtain a serial number field.
[0050] The bit-by-bit unique decimal serial number is parsed from the component manufacturing information to obtain the bit-by-bit unique serial number. A bit-by-bit unique serial number means that each bit in each serial number is unique, and there are no repeated numbers or letters. The use of a bit-by-bit unique serial number to identify and recognize vehicle components can ensure the uniqueness and traceability of the vehicle component. In addition, the design of a bit-by-bit unique serial number can prevent fraudulent incidents of counterfeiting serial numbers and improve the safety of vehicles.
[0051] Furthermore, the above-mentioned first number is used to determine a field length preset for the sequence number field according to scenario requirements, that is, the sequence number field contains a first number of bytes.
[0052] Still like Figure 3 As shown, in the 16 bytes of the target identifier, the first byte (byte 0) to the fifth byte (byte 4) are used to record the serial number field. Each byte includes an eight-bit binary number. Based on this, for example, when the decimal bitwise unique serial number is 6147, Byte0 takes the value of 00000000, Byte1 takes the value of 00000000, Byte2 takes the value of 00000000, Byte3 takes the value of 00011000, and Byte4 takes the value of 00000011. For another example, when the decimal bitwise unique serial number is 8348602, Byte0 takes the value of 00000000, Byte1 takes the value of 00000000, Byte2 takes the value of 01111111, Byte3 takes the value of 10100011, and Byte4 takes the value of 10111010.
[0053] According to the above execution steps of the embodiment of the present invention, the bit-by-bit unique serial number of the target component is recorded in the target identifier, and the target component is identified by the target identifier, so that the bit-by-bit unique serial number of the target component can be tracked and identified.
[0054] Optionally, in the above step S202, based on the component manufacturing information, determining the model code field may further include the following execution steps:
[0055] Step S223, parsing the component manufacturing information to obtain the part number of the basic model part, wherein the part number is an unsigned hexadecimal serial number;
[0056] Step S224: based on a preset effective digit, encode the part number into a second number of binary bytes to obtain a model code field.
[0057] The Basic Model Part Number (BMPN) is parsed from the component manufacturing information. The second number is the length of the model code field determined according to the application scenario requirements, for example, Figure 3 As shown in the figure, the model code field contains 4 bytes, namely the 6th byte (byte 5) and the 9th byte (byte 8). Based on this, the BMPN of the target component is encoded as an unsigned hexadecimal sequence number, which is stored in the memory, and the least significant bit of the BMPN is stored starting from Byte 8 and stored in order to Byte 5, and is filled with 0 until Byte 5 to Byte 8 are fully filled according to the application scenario requirements.
[0058] For example, when the decimal serial number of BMPN is 12608547, in the encoded model code field, Byte5 has a value of 00000000, and the corresponding hexadecimal serial number is 0×00; Byte6 has a value of 11000000, and the corresponding hexadecimal serial number is 0×C0; Byte7 has a value of 10100100, and the corresponding hexadecimal serial number is 0×A4; Byte8 has a value of 00100011, and the corresponding hexadecimal serial number is 0×23.
[0059] According to the above-mentioned execution steps of the embodiment of the present invention, the part number of the basic model part in the target component is recorded in the target identifier, and the target component is identified by the target identifier, so that the basic model part in the target component can be tracked and identified.
[0060] Optionally, in the above step S203, encoding the project information to obtain the project code field may further include the following execution steps:
[0061] Step S231, obtaining a project character string to be encoded from the project information, wherein the project character string includes a plurality of characters in a hexadecimal character encoding format;
[0062] Step S232, encode the project character string into a third number of binary bytes to obtain a project encoding field.
[0063] The project string is obtained from the project information. The format of each character in the project string can be hexadecimal-encoded ASCII (i.e., standard information interchange code format) uppercase letters or numbers. The third number is the length of the project code field determined according to the application scenario requirements, for example, Figure 3 As shown, the item code field contains 4 bytes, namely the 10th byte (ie Byte9) and the 13th byte (ie Byte12).
[0064] For example, when the project string obtained in the project information is "HF01", in the encoded project code field, Byte9 has a value of 01001000, and the corresponding hexadecimal sequence number is 0×48; Byte10 has a value of 01000110, and the corresponding hexadecimal sequence number is 0×46; Byte11 has a value of 00110000, and the corresponding hexadecimal sequence number is 0×30; Byte12 has a value of 00110001, and the corresponding hexadecimal sequence number is 0×31.
[0065] According to the above-mentioned execution steps of the embodiment of the present invention, the component project information corresponding to the target component is recorded in the target identifier, and the target component is identified by the target identifier, so that the component project information corresponding to the target component can be tracked and identified.
[0066] Optionally, in the above step S204, the serial number field, the model code field and the project code field are subjected to hash data compression processing to obtain a check code field, and the following execution steps may also be included:
[0067] Step S241, using a predefined target hash algorithm to perform random mixed calculations on the serial number field, the model code field, and the project code field to obtain a calculation result;
[0068] Step S242, compressing the calculation result to create a hash value, wherein the hash value is a character string of a preset length, and the character string is used to represent summary information of the serial number field, the model code field, and the project code field;
[0069] Step S243, extracting the partial characters at the target position from the hash value;
[0070] Step S244: encode some characters into a fourth number of binary bytes to obtain a check code field.
[0071] The above-mentioned predefined target hash algorithm can be a hash function SHA256, which is an algorithm for creating a smaller "digital fingerprint" (also called a data summary) based on a certain data. The hash function compresses the input data into a data summary, thereby reducing the amount of data and fixing the data format. The hash function SHA256 is used to randomly shuffle and mix the serial number field, the model code field, and the project code field, and the mixed data is compressed to obtain a data fingerprint (also called a hash value or hash value). The above-mentioned data fingerprint is usually represented by a shorter string of random letters and numbers. In the application scenario, the hash function SHA256 is used to calculate a data message of any length, and a 256-bit hash value will be generated.
[0072] The fourth number is the length of the check code field determined according to the application scenario requirements, for example, Figure 3 As shown, the project encoding field includes 3 bytes, namely the 14th byte (ie, Byte 13) and the 16th byte (ie, Byte 15). In the application scenario, the above 256-bit hash value is encoded into the above 3 bytes.
[0073] For example, in the encoded project code field, Byte14 has a value of 00100000, and the corresponding hexadecimal sequence number is 0×20; Byte15 has a value of 00100000, and the corresponding hexadecimal sequence number is 0×20; Byte16 has a value of 00100000, and the corresponding hexadecimal sequence number is 0×20.
[0074] Still like Figure 3 As shown, Byte13 to Byte15 in the target identifier are truncated checksums. The contents of Byte0 to Byte12 are calculated using the hash function SHA256 to obtain the corresponding data summary, which is a 256-bit string. The last 3 bytes of the string are retained and filled into Byte13 to Byte15 of the target identifier. Based on this, according to the checksum field (that is, Byte13 to Byte15) in the target identifier, it is possible to determine whether the contents of Byte0 to Byte12 have been tampered with, thereby determining the integrity and correctness of the target identifier.
[0075] According to the above-mentioned execution steps of the embodiment of the present invention, a verification code field corresponding to the target component is newly added in the target identifier, and the target component is identified by using the target identifier, so that the integrity and authenticity of the identity information corresponding to the target component (including the serial number field, model code word and project code field) can be achieved, so that when the integrity and authenticity of the above-mentioned identity information do not meet the requirements (for example, it has been maliciously tampered with), the corresponding identifier adjustment instruction can be triggered to run, thereby reducing the security risk in the identity identification process of the target component.
[0076] Optionally, in the above step S205, the target identifier is generated by using the serial number field, the model code field, the project code field and the check code field, and the following execution steps may also be included:
[0077] Step S251, arrange and merge the serial number field, model code field, project code field and check code field in a preset order to obtain a target identifier, wherein the preset order is from first to last: serial number field, model code field, project code field, check code field.
[0078] Still like Figure 3 As shown, in the target identifier, the serial number field, model code field, project code field and check code field are arranged in sequence to obtain the above target identifier. That is to say, in the application scenario, the target component is identified using the above 16-byte target identifier, and the multi-level information such as the above serial number field, model code field, project code field and check code field is comprehensively considered to improve the uniqueness and accuracy of the target identifier, and reduce the component identification security risk caused by the component identifier of the target component being easily counterfeited.
[0079] Optionally, the target component is an electronic control unit; the above vehicle component identification method may further include the following method steps:
[0080] Step S261, generating an identity message corresponding to the electronic control unit based on the target identifier;
[0081] Step S262, sending the identity information to a target controller of the vehicle to support the target controller in performing vehicle fault diagnosis related to the electronic control unit.
[0082] The target component is the ECU of the vehicle. The identity message may be a vehicle communication message used to indicate the identity of the ECU. For example, the identity message may be sent to the vehicle controller of the vehicle via the vehicle's communication bus. Further, the vehicle controller may implement a vehicle fault diagnosis function for the ECU based on the identity message.
[0083] In summary, the embodiment of the present invention provides a generation scheme for an ECU identifier (referred to as ECU_ID) based on multi-layer coding rules. Specifically, the above generation scheme combines and considers multi-level information such as a bit-unique decimal serial number, a basic model part number (BMPN) and a project code, and generates an ECU_ID of a specified length (such as 16 bytes) for each ECU, and the ECU_ID serves as the unique identity of the corresponding ECU. The above identifier generation scheme provided by the present invention can improve the accuracy and security of ECU identity identification, and also help to enhance the vehicle's management performance of ECUs, and improve the safety and intelligence level of vehicles.
[0084] In this embodiment, a vehicle component identification device is also provided, which is used to implement the above-mentioned embodiments and preferred implementations, and the descriptions that have been made will not be repeated. As used below, a "module" is a combination of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0085] Figure 4 is a structural block diagram of a vehicle component identification device according to an embodiment of the present invention. Figure 4 As shown, the device comprises:
[0086] An acquisition module 401 is used to acquire component manufacturing information and project information corresponding to a target component in a vehicle;
[0087] A determination module 402 is used to determine a serial number field and a model code field based on the component manufacturing information, wherein the serial number field is used to represent a bit-wise unique serial number of the target component, and the model code field is used to represent model information of a basic model part in the target component;
[0088] The encoding module 403 is used to encode the project information to obtain a project code field;
[0089] The processing module 404 is used to perform hash data compression processing on the serial number field, the model code field and the project code field to obtain a check code field;
[0090] The generation module 405 is used to generate a target identifier using the serial number field, the model code field, the project code field and the check code field, wherein the target identifier is used to represent the identity information of the target component.
[0091] Optionally, the determination module 402 is further used to: parse the component manufacturing information to obtain a bitwise unique serial number, wherein the bitwise unique serial number is a decimal serial number; encode the bitwise unique serial number into a first number of binary bytes to obtain a serial number field.
[0092] Optionally, the determination module 402 is further used to: parse the component manufacturing information to obtain the part number of the basic model part, wherein the part number is an unsigned hexadecimal serial number; based on a preset valid number of bits, encode the part number into a second number of binary bytes to obtain a model code field.
[0093] Optionally, the encoding module 403 is further used to: obtain a project string to be encoded from the project information, wherein the project string includes multiple characters in a hexadecimal character encoding format; encode the project string into a third number of binary bytes to obtain a project encoding field.
[0094] Optionally, the processing module 404 is also used to: use a predefined target hash algorithm to perform random mixed calculations on the serial number field, the model code field and the project code field to obtain a calculation result; perform data compression on the calculation result to create a hash value, wherein the hash value is a character string of a preset length, and the character string is used to represent summary information of the serial number field, the model code field and the project code field; extract some characters at the target position from the hash value; encode some characters into a fourth number of binary bytes to obtain a check code field.
[0095] Optionally, the above-mentioned generation module 405 is also used to: arrange and merge the serial number field, model code field, project code field and check code field in a preset order to obtain a target identifier, wherein the preset order is from first to last: serial number field, model code field, project code field, check code field.
[0096] Optionally, in addition to all the above modules, the above-mentioned vehicle component identification device also includes a sending module 406 (not shown in the figure), which is used to: generate an identity identification message corresponding to the electronic control unit based on the target identifier; and send the identity identification information to the target controller of the vehicle to support the target controller to perform vehicle fault diagnosis related to the electronic control unit.
[0097] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0098] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, the storage medium including a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute any one of the aforementioned vehicle component identification methods.
[0099] Optionally, in this embodiment, the above-mentioned storage medium can be configured to store a computer program for performing the following steps: obtaining component manufacturing information and project information corresponding to a target component in a vehicle; determining a serial number field and a model code field based on the component manufacturing information, wherein the serial number field is used to represent a bit-wise unique serial number of the target component, and the model code field is used to represent the model information of a basic model part in the target component; encoding the project information to obtain a project code field; performing hash data compression processing on the serial number field, the model code field, and the project code field to obtain a check code field; and generating a target identifier using the serial number field, the model code field, the project code field, and the check code field, wherein the target identifier is used to represent the identity information of the target component.
[0100] Optionally, the above-mentioned storage medium can also be configured to store a computer program for performing the following steps: parsing a bit-wise unique serial number from component manufacturing information, wherein the bit-wise unique serial number is a decimal serial number; encoding the bit-wise unique serial number into a first number of binary bytes to obtain a serial number field.
[0101] Optionally, the above-mentioned storage medium can also be configured to store a computer program for performing the following steps: parsing the part number of the basic model part from the component manufacturing information, wherein the part number is an unsigned hexadecimal serial number; based on a preset valid number of bits, encoding the part number into a second number of binary bytes to obtain a model code field.
[0102] Optionally, the above-mentioned storage medium can also be configured to store a computer program for performing the following steps: obtaining a project string to be encoded from the project information, wherein the project string includes multiple characters in a hexadecimal character encoding format; encoding the project string into a third number of binary bytes to obtain a project encoding field.
[0103] Optionally, the storage medium can also be configured to store a computer program for executing the following steps: using a predefined target hash algorithm to perform random mixed calculations on the serial number field, the model code field and the project code field to obtain a calculation result; performing data compression on the calculation result to create a hash value, wherein the hash value is a character string of a preset length, and the character string is used to represent summary information of the serial number field, the model code field and the project code field; extracting some characters at the target position from the hash value; encoding some characters into a fourth number of binary bytes to obtain a check code field.
[0104] Optionally, the above-mentioned storage medium can also be configured to store a computer program for performing the following steps: arranging and merging the serial number field, model code field, project code field and check code field in a preset order to obtain a target identifier, wherein the preset order is from first to last: serial number field, model code field, project code field, check code field.
[0105] Optionally, the above-mentioned storage medium can also be configured to store a computer program for performing the following steps: generating an identity identification message corresponding to the electronic control unit based on the target identifier; sending the identity identification information to the target controller of the vehicle to support the target controller to perform vehicle fault diagnosis related to the electronic control unit.
[0106] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0107] According to another aspect of an embodiment of the present invention, a vehicle is provided, comprising an on-board memory and an on-board processor, wherein a computer program is stored in the on-board memory, and the on-board processor is configured to run the computer program to execute any one of the aforementioned vehicle component identification methods.
[0108] Optionally, in this embodiment, the above-mentioned on-board processor can be configured to perform the following steps through a computer program: obtain component manufacturing information and project information corresponding to the target component in the vehicle; determine the serial number field and the model code field based on the component manufacturing information, wherein the serial number field is used to represent the bit-wise unique serial number of the target component, and the model code field is used to represent the model information of the basic model parts in the target component; encode the project information to obtain the project code field; perform hash data compression processing on the serial number field, the model code field and the project code field to obtain the check code field; use the serial number field, the model code field, the project code field and the check code field to generate a target identifier, wherein the target identifier is used to represent the identity information of the target component.
[0109] Optionally, in this embodiment, the above-mentioned on-board processor can be configured to perform the following steps through a computer program: parse the bit-by-bit unique serial number from the component manufacturing information, wherein the bit-by-bit unique serial number is a decimal sequence number; encode the bit-by-bit unique serial number into a first number of binary bytes to obtain a serial number field.
[0110] Optionally, in this embodiment, the above-mentioned on-board processor can be configured to perform the following steps through a computer program: parse the part number of the basic model part from the component manufacturing information, wherein the part number is an unsigned hexadecimal serial number; based on a preset valid number of bits, encode the part number into a second number of binary bytes to obtain a model code field.
[0111] Optionally, in this embodiment, the above-mentioned on-board processor can be configured to perform the following steps through a computer program: obtain a project string to be encoded from the project information, wherein the project string includes multiple characters in a hexadecimal character encoding format; encode the project string into a third number of binary bytes to obtain a project encoding field.
[0112] Optionally, in this embodiment, the above-mentioned on-board processor can be configured to perform the following steps through a computer program: use a predefined target hash algorithm to perform random mixed calculations on the serial number field, the model code field and the project code field to obtain a calculation result; perform data compression on the calculation result to create a hash value, wherein the hash value is a character string of a preset length, and the character string is used to represent the summary information of the serial number field, the model code field and the project code field; extract some characters at the target position from the hash value; encode some characters into a fourth number of binary bytes to obtain a check code field.
[0113] Optionally, in this embodiment, the above-mentioned on-board processor can be configured to perform the following steps through a computer program: arrange and merge the serial number field, model code field, project code field and check code field in a preset order to obtain a target identifier, wherein the preset order is from first to last: serial number field, model code field, project code field, check code field.
[0114] Optionally, in this embodiment, the above-mentioned on-board processor can be configured to perform the following steps through a computer program: generate an identity identification message corresponding to the electronic control unit based on the target identifier; send the identity identification information to the target controller of the vehicle to support the target controller to perform vehicle fault diagnosis related to the electronic control unit.
[0115] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiment and its optional implementation manners, which will not be described in detail here.
[0116] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0117] In the above embodiments of the present invention, 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.
[0118] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, 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 units or modules, which can be electrical or other forms.
[0119] 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 units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0120] In addition, each functional unit in each embodiment of the present invention 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-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0121] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, 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. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, ROM, RAM, mobile hard disk, disk or optical disk, etc., which can store program code.
[0122] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A vehicle component identification method, characterized in that: include: Acquire component manufacturing information and project information corresponding to a target component in a vehicle, wherein the project information is information of a task project corresponding to the target component; Based on the component manufacturing information, determine a serial number field and a model code field, wherein the serial number field is used to represent a bit-by-bit unique serial number of the target component, and the model code field is used to represent model information of a basic model part in the target component; Acquire a project character string to be encoded from the project information, wherein the project character string includes a plurality of characters in a hexadecimal character encoding format; Encoding the item character string into a third number of binary bytes to obtain an item code field; Using a predefined target hash algorithm to perform random mixed calculations on the serial number field, the model code field, and the project code field to obtain a calculation result; Performing data compression on the calculation result to create a hash value, wherein the hash value is a character string of a preset length; Extracting a portion of characters at a target position from the hash value; Encoding the partial characters into a fourth number of binary bytes to obtain a check code field; A target identifier is generated using the serial number field, the model code field, the project code field and the check code field, wherein the target identifier is used to represent the identity information of the target component.
2. The vehicle component identification method according to claim 1, characterized in that: Based on the component manufacturing information, determining the serial number field includes: Parsing the component manufacturing information to obtain the bitwise unique serial number, wherein the bitwise unique serial number is a decimal serial number; The bit-wise unique serial number is encoded into a first number of binary bytes to obtain the serial number field.
3. The vehicle component identification method according to claim 1, characterized in that: Based on the component manufacturing information, determining the model code field includes: Parsing the component manufacturing information to obtain the part number of the basic model part, wherein the part number is an unsigned hexadecimal serial number; Based on a preset number of significant digits, the part number is encoded into a second number of binary bytes to obtain the model code field.
4. The vehicle component identification method according to claim 1, characterized in that: Generating the target identifier using the serial number field, the model code field, the project code field, and the check code field includes: The serial number field, the model code field, the project code field and the check code field are arranged and merged in a preset order to obtain the target identifier, wherein the preset order is from first to last: the serial number field, the model code field, the project code field, and the check code field.
5. The vehicle component identification method according to any one of claims 1 to 4, characterized in that: The target component is an electronic control unit; the vehicle component identification method further includes: generating an identity message corresponding to the electronic control unit based on the target identifier; The identification information is sent to a target controller of the vehicle to support the target controller in performing vehicle fault diagnosis related to the electronic control unit.
6. A vehicle component identification device, characterized in that: include: An acquisition module, used to acquire component manufacturing information and project information corresponding to a target component in a vehicle, wherein the project information is information of a task project corresponding to the target component; A determination module, configured to determine a serial number field and a model code field based on the component manufacturing information, wherein the serial number field is used to represent a bit-wise unique serial number of the target component, and the model code field is used to represent model information of a basic model part in the target component; an encoding module, configured to obtain a project character string to be encoded from the project information, and encode the project character string into a third number of binary bytes to obtain a project encoding field, wherein the project character string includes a plurality of characters in a hexadecimal character encoding format; a processing module, configured to perform random mixed calculation on the serial number field, the model code field and the project code field using a predefined target hash algorithm to obtain a calculation result, perform data compression on the calculation result to create a hash value, extract part of the characters at a target position from the hash value, and encode the part of the characters into a fourth number of binary bytes to obtain a check code field, wherein the hash value is a character string of a preset length; A generation module is used to generate a target identifier using the serial number field, the model code field, the project code field and the check code field, wherein the target identifier is used to represent the identity information of the target component.
7. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the vehicle component identification method according to any one of claims 1 to 5.
8. A vehicle, characterized in that: The vehicle component identification method comprises an on-board memory and an on-board processor, wherein the on-board memory stores a computer program, and the on-board processor is configured to run the computer program to execute the vehicle component identification method according to any one of claims 1 to 5.
