Instrument automatic security code setting method and system, terminal and medium

By pre-setting the safety code storage location identification information before the instrument leaves the factory and communicating with the engine controller via the CAN bus, the safety code is automatically acquired and stored. This solves the problem that the instrument safety code relies on special inspection equipment in the existing technology, realizes the rapid deployment of the instrument and the self-service replacement by end users, and improves convenience and safety.

CN120979870APending Publication Date: 2025-11-18QI AUTOMOTIVE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511104411.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-07
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

In the existing technology, the security coding process of vehicle instrument clusters relies on high-cost specialized testing equipment, and the operation steps are cumbersome and require professional personnel to perform. This makes the installation and replacement of instrument products in end users and after-sales scenarios inconvenient and affects the efficiency of promotion.

Method used

Before the instrument panel leaves the factory, a safety code is preset to store the location identification information. It communicates with the engine controller via the CAN bus to automatically obtain and store the safety code. It is then verified and activated each time the power is turned on. The associated mapping table is used to dynamically adapt to different vehicle models. A multi-layer nested message structure is constructed to ensure communication stability and protocol compatibility.

Benefits of technology

Eliminating reliance on specialized testing equipment improves the versatility and mass production adaptability of instruments, enabling rapid deployment and self-service replacement by end users, thus enhancing the convenience and safety of instrument products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120979870A_ABST
    Figure CN120979870A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of instruments, and particularly discloses a method, a system, a terminal and a medium for automatically setting a safety code for an instrument, and the method comprises the steps: presetting safety code storage position identification information of an engine controller corresponding to a vehicle model matched with the instrument into the instrument; after the instrument is powered on for the first time, detecting whether a security code is stored in a local memory or not, and if not, sending a security code setting request message to an engine controller through a CAN bus to request to obtain the security code; after receiving the request message, the engine controller extracts or generates a security code bound with the engine controller, encapsulates the security code in a response message and sends the response message to the instrument; the instrument analyzes the response message and stores the security code; and in the subsequent power-on process of the instrument, safety code setting verification is carried out by using the stored safety codes and the engine controller. The method can be applied to an instrument control system, and has the characteristics of high structural universality, high security coding efficiency, good communication protocol compatibility and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of instrumentation technology, specifically relating to an automatic instrument security coding method, system, terminal, and medium. Background Technology

[0002] As a crucial component of a vehicle's electrical system, the in-vehicle instrument cluster displays vehicle operating status parameters, environmental information, and fault indications, and is widely used in automobiles, motorboats, and other vehicles. To ensure equipment safety and vehicle compatibility, existing instrument clusters generally require initial binding and authorization with the vehicle's engine controller (ECU) during installation.

[0003] Typically, the safety code for the vehicle's instrument cluster is stored in the manufacturer's memory when the vehicle leaves the factory. When the instrument cluster needs to be replaced, the safety code must be rewritten. In traditional technology, please refer to... Figure 2 As shown, the security codes for this type of instrument typically rely on specialized testing equipment (i.e., specialized inspection equipment). Maintenance personnel use this equipment to communicate with the engine controller via the CAN bus, extract the security codes, and then manually write them into the instrument cluster. This process has the following typical characteristics: The specialized inspection equipment communicates with the engine controller using specific CAN messages to obtain security codes; The security code is processed by specialized inspection equipment and then written into the instrument via a host computer. The instrument reads the locally stored security code each time it is powered on and sends it to the engine controller via the CAN bus for verification, thus completing the activation.

[0004] Although this method can bind the instrument to the vehicle, it has significant drawbacks: the coding process relies on high-cost specialized testing equipment, the operation steps are cumbersome, and the coding process must be performed by professionals, which is not conducive to the rapid installation and replacement of end users or in after-sales scenarios, and greatly restricts the convenience and promotion efficiency of the instrument product. Summary of the Invention

[0005] This invention addresses the problems in the prior art by providing an automatic security coding method, system, terminal, and medium for instruments. It solves the problems in the prior art where the coding process relies on high-cost specialized testing equipment, the operation steps are cumbersome, and the security coding process must be performed by professionals, which is not conducive to rapid installation and replacement by end users or in after-sales scenarios, and greatly restricts the convenience and promotion efficiency of instrument products.

[0006] The technical solution adopted in this invention is as follows: Firstly, this application provides a method for automatically setting security codes for instruments, the method comprising the following steps: 1. A method for automatically setting a safety code for an instrument, characterized by comprising the following steps: Step S1: Before the instrument leaves the factory, the security code storage location identification information of the engine controller corresponding to the vehicle model it is compatible with is preset into the instrument's local memory. Step S2: After the instrument is powered on for the first time, it checks whether the security code has been stored in the local memory. If it has not been stored, it jumps to step S3; otherwise, it jumps to step S6. Step S3: The instrument sends a security code request message to the corresponding engine controller via the CAN bus according to the preset security code storage location identifier information, requesting to obtain the security code; Step S4: After receiving the safety code request message, the engine controller sends a response message containing the safety code via the CAN bus. Step S5: The instrument parses the response message, extracts the security code, and stores it in the local memory; Step S6: Each time the instrument is powered on, it reads the security code from the local memory and sends it to the engine controller via the CAN bus for verification, thereby activating the instrument.

[0007] Furthermore, in step S1, the security code storage location identification information includes the security code address offset, CAN node logical number, CAN message ID, frame type identifier, data read instruction, target frame priority, and matching vehicle model code. The information is written through the factory calibration station during the instrument burning stage and stored in the instrument's local memory.

[0008] Furthermore, when the instrument panel is pre-programmed with the safety code storage location identification information before leaving the factory, it also includes establishing an association mapping table based on the vehicle model year code. The association mapping table is burned into the instrument panel's local memory in one go at the instrument panel configuration station through the toolchain.

[0009] Furthermore, in step S3, when the instrument sends a security code request message after its first power-on, it sequentially sends all request messages through the associated mapping table.

[0010] Furthermore, in step S4, after receiving the safety code request message sent by the instrument, the engine controller extracts the preset safety code field from its internal non-volatile storage area, encapsulates it into a response message and returns it. The safety code is uniquely written to and bound to the engine controller when it leaves the factory.

[0011] Furthermore, in step S5, after receiving the response message, the instrument extracts the security code field from the specified location according to the message frame structure, performs data integrity verification on the extracted content, and writes the security code into the local non-volatile storage area inside the instrument after the verification is passed.

[0012] Secondly, this application provides an automatic instrument safety coding system for implementing the automatic instrument safety coding method described in the first aspect. The system includes: The instrument unit is equipped with non-volatile memory, CAN communication interface and processor. The non-volatile memory stores security code storage location identification information. The engine controller is equipped with a security code storage area and an interface for connecting to the CAN communication bus. The CAN bus is used to transmit security-coded request and response messages between the instrumentation unit and the engine controller. The instrumentation is configured to send a message containing a safety coding request command to the engine controller via the CAN bus after initial power-on. The engine controller is configured to, upon receiving a security code request message, package the security code in its internal security code storage area into a response message and send it to the instrumentation device via the CAN bus; The instrument is configured to extract the security code from the received response message and save it in its local non-volatile memory.

[0013] Thirdly, this application provides a terminal, including: The memory is used to store the instrument's automatic safety coding program. A processor is used to execute the steps of the instrument automatic security coding method described in the first aspect when the instrument automatic security coding system is implemented.

[0014] Fourthly, this application provides a computer-readable storage medium that stores computer instructions. When a computer reads the computer instructions in the storage medium, the computer executes the instrument automatic security coding method as described in the first aspect.

[0015] As can be seen from the above technical solutions, the advantages of the present invention are: By pre-setting the safety coding storage location information compatible with the vehicle model during the instrument panel's manufacturing stage, the pre-configuration of safety coding parameters is achieved. This information includes key fields such as the safety coding data address, CAN node logical number, CAN message ID, communication commands, and frame structure, and is uniformly written into the instrument panel's read-only area. This avoids parameter loss or communication failures during later safety coding settings, enhancing the communication determinism and stability during system startup.

[0016] By utilizing an association mapping table mechanism, an instruction mapping table is built and written at the instrument panel's factory configuration station, associating it with multiple key parameters such as vehicle model year, controller model, and communication protocol. This enables the instrument panel to dynamically adapt to different vehicle models and design safety coding logic. The introduction of this mapping table solves the technical limitation of the traditional solution's fixed "single device - single vehicle model" mapping, significantly improving the instrument panel's versatility and mass production adaptation efficiency.

[0017] During the initial power-on phase, the instrument generates a device security coding request message based on the CAN standard protocol. The constructed message incorporates a multi-layered nested structure, including a message header, request instruction field, device identification area, protocol version flag bit, and frame check field. This ensures both information integrity and protocol compatibility during transmission, significantly improving the success rate and anti-interference capability of device security coding communication.

[0018] During the process of the engine controller responding to the safety code request message, the controller retrieves the safety code from its internal preset non-volatile storage area and returns it according to the protocol. The safety code is information written and bound to the controller at the factory, ensuring the consistency and immutability of the safety code identity and meeting the vehicle safety level requirements.

[0019] After the instrument parses the response message, it uses a series of verification, identification and consistency comparison mechanisms to confirm the validity of the security code, ensuring that the security code information written to the local storage area is reliable and accurate, and providing a guarantee for rapid identification and verification in subsequent power-on cycles.

[0020] In summary, the present invention eliminates reliance on specialized testing equipment and, through an integrated mechanism including preset parameters, dynamic communication, protocol adaptation, and data verification, constructs a widely deployable, highly automated, and highly applicable instrument authorization system, providing strong support for rapid deployment of combined instruments, self-service replacement by end users, and efficient after-sales service. Attached Figure Description

[0021] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a flowchart illustrating the automatic security coding method for instruments in an embodiment of the present invention; Figure 2 A schematic diagram illustrating the safety coding system used when specialized inspection equipment is involved in existing technologies. Figure 3 This is a schematic diagram of the automatic security coding system for instruments in an embodiment of the present invention. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] Please see Figure 1 As shown, the present invention provides an automatic safety coding method for instruments, comprising the following steps: Step S1: Before the instrument leaves the factory, the security code storage location identification information of the engine controller corresponding to the vehicle model it is compatible with is preset into the instrument. In some embodiments, the instrument may be an LCD instrument for motorboats. During the production line manufacturing process, the instrument completes the initialization and writing operation through the factory calibration station. The security code reading parameters matching the vehicle model, including CAN bus node number, data frame type, reading instruction format, etc., are loaded into the read-only storage area inside the instrument through a dedicated programming tool to enable subsequent automatic communication and security code processing.

[0025] Step S2: After the instrument is powered on for the first time, it checks whether the security code has been stored in the local memory. If it has not been stored, it jumps to step S3; otherwise, it jumps to step S6. In some embodiments, during the initial power-on determination process, the instrument accesses the non-volatile local storage area through its embedded processor, verifies the integrity of its contents using a verification field, and determines whether it is in the initial startup state by combining the status of the security code data flag bit, ensuring that the security code request process is triggered only when there is no security code information or the information is invalid.

[0026] Step S3: The instrument sends a security code request message to the corresponding engine controller via the CAN bus according to the preset security code storage location identifier information, requesting to obtain the security code; In some embodiments, the CAN bus of the motorboat adopts a multi-node structure. To ensure reliable communication, the instrument first parses the configuration table content based on the vehicle identification code to obtain information such as the frame ID, communication cycle, message structure, and verification rules of the target node, and constructs a standard data frame to send to the engine controller node. The message structure conforms to the OEM protocol specification and includes multiple fields such as request header, command type, data segment length, and check bit.

[0027] Step S4: After receiving the safety code request message, the engine controller sends a response message containing the safety code via the CAN bus. In some embodiments, the engine controller is an electronic injection control unit mounted on the motorboat, internally containing a unique security code. This security code is programmed by the OEM using a proprietary tool at the factory and cannot be changed online. Upon receiving a matching request message, the controller parses and verifies the message content, extracts the corresponding security code field from its non-volatile storage area, encapsulates it into a response frame according to the protocol format, and sends it back to the instrument node. The response frame includes a frame header, a security code data area, a response code, a data verification field, and a frame end marker.

[0028] Step S5: The instrument parses the response message, extracts the security code, and stores it in the local memory; In some embodiments, after receiving the response message, the instrument locates the data start position and length of the security code in the message according to the motorboat communication protocol standard by using the field boundary information in the configuration table, and completes the field extraction. Subsequently, the system performs CRC verification, protocol version verification, security code encryption identification judgment and content validity judgment in sequence. After passing the judgment, it is written into the instrument's internal local FLASH area in hexadecimal form and marked with a security code status to avoid repeated writing or incorrect identification.

[0029] Step S6: Each time the instrument is powered on, it reads the security code from the local memory and sends it to the engine controller via the CAN bus for verification, thereby activating the instrument.

[0030] In some embodiments, the motorboat is frequently in complex states such as power outages and low voltage. Each time the instrument is powered on, it will first access the local security code field and load it into a temporary buffer. At the same time, it will construct a security code verification message based on the CAN communication protocol and send it to the engine controller. After the controller verifies the received security code, it will return an acknowledgment. Only if the verification is successful can the instrument enter the normal operating state; otherwise, it will enter the restricted mode or prompt an abnormal security code state.

[0031] In some embodiments, in step S1, the security code storage location identification information includes the security code address offset, CAN node logical number, CAN message ID, frame type identifier, data read instruction, target frame priority, and matching vehicle model code. The information is written through the factory calibration station during the instrument burning stage and stored in the instrument's local memory.

[0032] In specific applications, such as the digital instrument of a certain model of motorboat, after completing electrical testing and parameter configuration on the production line, the safety code location parameters required for different engine models are written into the read-only partition of the instrument's EEPROM or FLASH by connecting to the diagnostic equipment at a dedicated development station, so that subsequent automatic request message generation has precise addressing capabilities.

[0033] In some embodiments, when the instrument pre-sets the security code storage location identification information before leaving the factory, it also includes establishing an association mapping table based on six parameters: vehicle model year code, engine controller model, communication protocol version, security code format type, target data frame identifier, and host manufacturer code. The association mapping table is burned into the instrument's local memory in one go at the instrument configuration station through the toolchain.

[0034] On the motorboat platform, the mapping table supports adaptation schemes for multiple ECU models. The instrument panel configuration tool automatically generates the mapping table content based on the vehicle model number and loads it into the internal NV area of ​​the instrument panel in batches through writing instructions during the configuration process. This ensures that different vehicle models can accurately match the corresponding communication parameters during on-site installation, thereby improving the adaptation coverage.

[0035] In some embodiments, in step S3, when the instrument sends a security code request message after power-on for the first time, it first performs a self-test based on the preset vehicle identification information, and then forms a complete message based on the standard data frame constructed according to the CAN protocol by calling the associated frame ID, communication period, padding field, source node address, destination node address and frame verification parameters through the configuration table.

[0036] The vehicle identification information includes, but is not limited to, the vehicle identification number (VIN) of the motorboat, the vehicle type code, and the manufacturer's identifier. This information is compared and self-checked during the system power-on initialization process to verify the applicability of the safety coding request process and to avoid false requests to mismatched ECU nodes. The construction of the CAN frame strictly follows the OEM's customized communication specifications.

[0037] In some embodiments, the constructed security coding request message content adopts a multi-field nested structure, including a message header identifier area, a request command area, a vehicle type identifier field, an engine controller identification field, a security coding format flag bit, and a message tail integrity check segment. The security coding format flag bit is dynamically matched according to the configured security coding protocol version, and the message transmission adopts a static priority method to control the CAN frame transmission order.

[0038] For example, in a motorboat system, to ensure the smooth transmission of critical device security coding request messages under high load on the main bus communication, the instrumentation configures the priority of such frames to a static high level, avoiding delays in the device security coding process due to bus occupancy. Simultaneously, by dynamically selecting the device security coding format flag bit within the message nesting structure, consistency with the target controller protocol version is ensured.

[0039] In some embodiments, in step S4, after receiving the security code request message sent by the instrument, the engine controller extracts the preset security code field from its internal non-volatile storage area and encapsulates it into a response message and returns it. The response message is constructed based on a matching communication protocol structure and includes a frame identifier field, a security code data segment, a source node address, a data check bit, a message length field, and a response identifier field. The security code is uniquely written to and bound to the engine controller when it leaves the factory.

[0040] Taking the engine ECU of a motorboat as an example, the controller writes a unique security code into a specific address segment of the EEPROM after the hardware is manufactured using the OEM's internal programming tools. This security code cannot be read or overwritten by conventional diagnostic methods. It only responds and transmits after receiving an instrument message request with a completely matching structure, thus enhancing the security of the vehicle's security coding mechanism.

[0041] In some embodiments, in step S5, after the instrument receives the response message, it extracts the security code field from the specified location according to the message frame structure, and performs data integrity verification, protocol version verification, encryption format identification, data length verification, field boundary decoding and field consistency comparison on the extracted content. After the verification is passed, the security code is written into the local non-volatile storage area inside the instrument.

[0042] For example, in the motorboat electronic control system, the instrument uses an embedded multi-tasking operating system. In the task of setting a security code response, there is an independent protocol verification thread. The integrity of the data frame is verified by the CRC algorithm, and the fields are unpacked and compared according to the protocol configuration. After successful verification, the security code is written to a specific address of FLASH and the write flag is locked to prevent repeated setting of security codes or accidental writing of illegal data.

[0043] Please see Figure 3 As shown, in some embodiments, this application provides an automatic instrument safety coding system, the system comprising: The instrument unit is equipped with non-volatile memory, CAN communication interface and processor. The non-volatile memory stores security code storage location identification information. The engine controller is equipped with a security code storage area and an interface for connecting to the CAN communication bus. The CAN bus is used to transmit security-coded request and response messages between the instrumentation unit and the engine controller. The instrumentation is configured to send a message containing a safety coding request command to the engine controller via the CAN bus after initial power-on. The engine controller is configured to, upon receiving a security code request message, package the security code in its internal security code storage area into a response message and send it to the instrumentation device via the CAN bus; The instrument is configured to extract the security code from the received response message and save it in its local non-volatile memory.

[0044] In some embodiments, this application provides a terminal, including: The memory is used to store the instrument's automatic safety coding program. A processor is used to execute the steps of the instrument automatic security coding method when the instrument automatic security coding system is implemented.

[0045] In some embodiments, this application provides a computer-readable storage medium that stores computer instructions. When a computer reads the computer instructions in the storage medium, the computer executes the instrument automatic security coding method.

[0046] It is understood that the systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can be a personal computer, a laptop computer, a personal digital assistant, a tablet computer, a wearable device, or any combination of these devices.

[0047] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0048] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0049] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined in this embodiment, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0050] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0051] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0052] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0053] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this embodiment refers to and includes any or all possible combinations of one or more associated listed items.

[0054] It should be understood that although the terms first, second, third, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of one or more embodiments of this specification, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "in response to a determination," or "when," or "in the event of a determination."

[0055] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit the scope of one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this specification should be included within the protection scope of one or more embodiments of this specification.

Claims

1. A method for automatically setting safety codes for instruments, characterized in that, Includes the following steps: Step S1: Before the instrument leaves the factory, the security code storage location identification information of the engine controller corresponding to the vehicle model it is compatible with is preset into the instrument's local memory. Step S2: After the instrument is powered on for the first time, it checks whether the security code has been stored in the local memory. If it has not been stored, it jumps to step S3. Otherwise, proceed to step S6; Step S3: The instrument sends a security code request message to the corresponding engine controller via the CAN bus according to the preset security code storage location identifier information, requesting to obtain the security code; Step S4: After receiving the safety code request message, the engine controller sends a response message containing the safety code via the CAN bus. Step S5: The instrument parses the response message, extracts the security code, and stores it in the local memory; Step S6: Each time the instrument is powered on, it reads the security code from the local memory and sends it to the engine controller via the CAN bus for verification, thereby activating the instrument.

2. The instrument automatic security coding method according to claim 1, characterized in that, In step S1, the security code storage location identification information includes the security code address offset, CAN node logical number, CAN message ID, frame type identifier, data read instruction, target frame priority, and matching vehicle model code. The information is written by the factory calibration station during the instrument burning stage and stored in the instrument's local memory.

3. The instrument automatic security coding method according to claim 1, characterized in that, When the instrument panel is pre-programmed with a safety code to store location identification information before leaving the factory, it also includes establishing an association mapping table based on the vehicle model year code. The association mapping table is burned into the instrument panel's local memory in one go at the instrument panel configuration station through the toolchain.

4. The instrument automatic security coding method according to claim 3, characterized in that, In step S3, when the instrument sends a security code request message after its first power-on, it sequentially sends all request messages through the associated mapping table.

5. The instrument automatic safety coding method according to claim 1, characterized in that, In step S4, after receiving the security code request message sent by the instrument, the engine controller extracts the preset security code field from its internal non-volatile storage area and encapsulates it into a response message and returns it. The security code is uniquely written to and bound to the engine controller when it leaves the factory.

6. The instrument automatic security coding method according to claim 1, characterized in that, In step S5, after receiving the response message, the instrument extracts the security code field from the specified location according to the message frame structure, performs data integrity verification on the extracted content, and writes the security code into the local non-volatile storage area inside the instrument after the verification is successful.

7. An automatic instrument safety coding system, used to implement the automatic instrument safety coding method as described in claim 1, characterized in that, The system includes: The instrument unit is equipped with non-volatile memory, CAN communication interface and processor. The non-volatile memory stores security code storage location identification information. The engine controller is equipped with a security code storage area and an interface for connecting to the CAN communication bus. The CAN bus is used to transmit security-coded request and response messages between the instrumentation unit and the engine controller. The instrumentation is configured to send a message containing a safety coding request command to the engine controller via the CAN bus after initial power-on. The engine controller is configured to, upon receiving a security code request message, package the security code in its internal security code storage area into a response message and send it to the instrumentation device via the CAN bus; The instrument is configured to extract the security code from the received response message and save it in its local non-volatile memory.

8. A terminal, characterized in that, include: The memory is used to store the instrument's automatic safety coding program. A processor is used to execute the steps of the instrument automatic security coding method as described in claim 1 when the instrument automatic security coding system is implemented.

9. A computer-readable storage medium, characterized in that, The storage medium stores computer instructions. When the computer reads the computer instructions from the storage medium, the computer executes the instrument automatic security coding method as described in claim 1.