Data flashing method and device, equipment, medium and product
By analyzing the user-side flashing instructions in the diagnostic device, using the communication protocol to flash the ECU data, and adjusting the baud rate value according to the transmission efficiency, the problem of excessive flashing time caused by large ECU files is solved, and data flashing efficiency and user experience are improved.
Patent Information
- Application Number
- CN202411909439.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-18
AI Technical Summary
During vehicle maintenance, large ECU files lead to a long time to write data, affecting the user experience.
By receiving the flashing instructions sent by the user, the communication protocol is obtained by parsing the instructions, and data flashing on the ECU is performed through this protocol. At the same time, the transmission efficiency of the communication protocol is detected and the baud rate value is adjusted according to the efficiency to improve the data brushing efficiency.
It realizes more efficient data flushing, solves the problem of excessively long flushing time caused by large ECU files, and improves user experience.
Smart Images

Figure CN119854329A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automobile technology, and in particular to a data flashing method, device, equipment, medium and product. Background Art
[0002] With the vigorous development of the vehicle industry, the number of vehicle models has increased a lot. During the use of vehicles, faults will inevitably occur. In this case, the use of diagnostic equipment or diagnostic boxes to analyze the vehicle fault can quickly obtain vehicle fault information, and handing it over to the corresponding maintenance personnel for repair can achieve a quick solution to the vehicle fault.
[0003] However, with the continuous increase in the number of vehicle models, the problem of long waiting time often occurs during the use of the product, especially when the maintenance environment is not very good. For example, due to the limitations of hardware version and environmental influences, the uncertainty of configuration will cause the diagnostic box to flash the ECU data. Often, the flashing time is relatively long because the ECU file is relatively large, resulting in a poor actual user experience.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a data flashing method, device, equipment, medium and product, aiming to solve the technical problem that when flashing data to ECU, the flashing time is relatively long because the ECU file is large.
[0006] To achieve the above object, the present application proposes a data flashing method, which is applied to a diagnostic device and includes:
[0007] Receive the flashing instruction sent by the user end;
[0008] Parsing the flashing instruction to obtain a communication protocol, and flashing data to the ECU through the communication protocol;
[0009] Detect the transmission efficiency of the communication protocol, adjust the baud rate value of the communication protocol according to the transmission efficiency to obtain an adjustment result, and flash data to the ECU based on the adjustment result to obtain a data flash result, and send the data flash result to the user end.
[0010] In one embodiment, before the step of receiving the flash instruction sent by the user terminal, the method further includes:
[0011] Receiving a fault detection instruction sent by the user terminal;
[0012] Performing fault detection on the ECU based on the fault detection instruction to obtain a fault code;
[0013] Parsing the fault code to obtain a fault code and fault description information, and generating fault information of the ECU according to the fault code and the fault description information;
[0014] The fault information is sent to the user terminal.
[0015] In one embodiment, the step of parsing the flashing instruction to obtain the communication protocol includes:
[0016] Parsing the flashing instruction to obtain a vehicle model, performing information query based on the vehicle model to obtain a communication rate and a transmission rate;
[0017] Determine the flashing target, the flashing data amount and the flashing risk information according to the fault information;
[0018] The communication protocol is obtained by analyzing the flashing target, the amount of flashing data, the flashing risk information, the communication rate and the transmission rate.
[0019] In one embodiment, the communication protocol includes a K line protocol and a CAN line protocol, and the step of flashing data to the ECU through the communication protocol includes:
[0020] In the case where the communication protocol is a K-line protocol, a transmission test is performed based on a preset K-line protocol baud rate value interval to obtain a test result, and a first baud rate value is determined according to the test result to flash data to the ECU;
[0021] In the case where the communication protocol is a CAN line protocol, the second baud rate value is continuously updated through a self-increment mode to obtain an updated second baud rate value, and data is flashed to the ECU through the updated second baud rate value.
[0022] In one embodiment, the step of detecting the transmission efficiency of the communication protocol, adjusting the baud rate value of the communication protocol according to the transmission efficiency, and obtaining the adjustment result includes:
[0023] Performing efficiency detection on the transmission baud rate value of the communication protocol to obtain a detection result;
[0024] If the detection result is that the transmission efficiency is unstable, the transmission baud rate value is adjusted until an adjustment result is obtained when the transmission efficiency is stable;
[0025] If the detection result is that the transmission efficiency is stable, the transmission baud rate value is adjusted through the probing mode to obtain an adjustment result.
[0026] In addition, to achieve the above purpose, the present application also proposes a data flashing method, which is applied to a user end and includes:
[0027] Sending a flashing instruction to a diagnostic device according to pre-acquired ECU fault information, the diagnostic device parsing the flashing instruction to obtain a communication protocol, flashing data to the ECU through the communication protocol, detecting the transmission efficiency of the communication protocol, adjusting the baud rate value of the communication protocol according to the transmission efficiency to obtain an adjustment result, and flashing data to the ECU based on the adjustment result to obtain a data flashing result;
[0028] Receive the data flashing result sent by the diagnostic device.
[0029] In addition, to achieve the above-mentioned purpose, the present application also proposes a data flashing device, which is applied to a diagnostic device, and the device comprises:
[0030] A receiving module, used for receiving a flashing instruction sent by a user terminal;
[0031] A parsing module, used for parsing the flashing instruction to obtain a communication protocol, and flashing data to the ECU through the communication protocol;
[0032] The adjustment module is used to detect the transmission efficiency of the communication protocol, adjust the baud rate value of the communication protocol according to the transmission efficiency to obtain an adjustment result, and flash the data of the ECU based on the adjustment result to obtain a data flash result, and send the data flash result to the user end.
[0033] In addition, to achieve the above-mentioned purpose, the present application also proposes a data flashing device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of a data flashing method as described above.
[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the data flashing method described above are implemented.
[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the data flashing method described above are implemented.
[0036] One or more technical solutions proposed in this application have at least the following technical effects:
[0037] The embodiment of the present application proposes a data flashing method, device, equipment, storage medium and computer program product, which receives the flashing instruction sent by the user end; parses the flashing instruction to obtain the communication protocol, and flashes the data of the ECU through the communication protocol; detects the transmission efficiency of the communication protocol, adjusts the baud rate value of the communication protocol according to the transmission efficiency, obtains the adjustment result, and flashes the data of the ECU based on the adjustment result to obtain the data flashing result, and sends the data flashing result to the user end. Thus, after parsing the flashing instruction sent by the user end, the data of the ECU is flashed through the obtained communication protocol, and the transmission efficiency of the communication protocol is detected at the same time, and the baud rate value of the communication protocol is adjusted according to the transmission efficiency, so as to achieve more efficient data flashing, solve the problem that when the data of the ECU is flashed, the flashing time is relatively long due to the large ECU file, and improve the efficiency of data flashing. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0040] Figure 1 A flowchart of the first embodiment of the data flashing method of the present application is provided;
[0041] Figure 2 A flow chart of the second embodiment of the data flashing method of the present application;
[0042] Figure 3 A brief flowchart of the data flashing method provided in the second embodiment of the present application;
[0043] Figure 4 This is a schematic diagram of the module structure of the data flash writing device according to an embodiment of the present application;
[0044] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the data flashing method in the embodiment of the present application.
[0045] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0046] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0047] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0048] The main solution of the embodiment of the present application is: receiving the fault detection instruction sent by the user end; performing fault detection on the ECU based on the fault detection instruction to obtain a fault code; parsing the fault code to obtain a fault code and fault description information, generating the fault information of the ECU according to the fault code and fault description information; sending the fault information to the user end. Parsing the flashing instruction to obtain the vehicle model, performing information query based on the vehicle model to obtain the communication rate and transmission rate; determining the flashing target, the amount of flashing data and the flashing risk information according to the fault information; analyzing the flashing target, the amount of flashing data, the flashing risk information, the communication rate and the transmission rate to obtain the communication protocol. In the case where the communication protocol is the K-line protocol, a transmission test is performed based on the preset K-line protocol baud rate value interval to obtain the test result, and the first baud rate value is determined according to the test result to perform data flashing on the ECU; in the case where the communication protocol is the CAN line protocol, the second baud rate value is continuously updated through the self-increment mode to obtain the updated second baud rate value, and the ECU is flashed with the updated second baud rate value. The transmission baud rate value of the communication protocol is tested for efficiency to obtain a test result; if the test result shows that the transmission efficiency is unstable, the transmission baud rate value is adjusted until the transmission efficiency is stable to obtain an adjustment result; if the test result shows that the transmission efficiency is stable, the transmission baud rate value is adjusted through the probing mode to obtain an adjustment result. A flashing instruction is sent to the diagnostic device according to the pre-acquired ECU fault information, and the diagnostic device parses the flashing instruction to obtain the communication protocol, and the ECU is flashed with data through the communication protocol, and the transmission efficiency of the communication protocol is tested, and the baud rate value of the communication protocol is adjusted according to the transmission efficiency to obtain an adjustment result, and the ECU is flashed based on the adjustment result to obtain a data flashing result; the data flashing result sent by the diagnostic device is received. This solves the problem that when flashing data to the ECU, the flashing time is relatively long due to the large ECU file, and the data flashing is realized, which improves the efficiency of data flashing. Based on the scheme of the present invention, a data flashing method is designed based on the problem of long waiting time that often occurs during the use of diagnostic products in the actual automotive industry, especially in a bad maintenance environment, which leads to a bad user experience. The effectiveness of the data flashing method of the present invention is verified when the data is flashed, and finally the accuracy of data flashing performed by the method of the present invention is significantly improved.
[0049] In this embodiment, for the convenience of description, the following description is made with the data flashing device as the execution subject.
[0050] As the number of vehicle models continues to increase in the prior art, the problem of long waiting time often occurs during product use, especially when the maintenance environment is not very good. For example, due to limitations on hardware versions and environmental influences, configuration uncertainty will cause the diagnostic box to write data to the ECU. Often, the writing time is long because the ECU file is large, resulting in a poor actual user experience.
[0051] The present application provides a solution. In a diagnostic device, after receiving a flash command from the user end, the command is parsed to obtain a communication protocol for data flashing. At the same time, the transmission efficiency of the communication protocol is detected and adjusted to provide users with better services.
[0052] It can be seen from the above embodiments that the present application receives the flashing instruction sent by the user end; parses the flashing instruction to obtain the communication protocol, and flashes the data of the ECU through the communication protocol; detects the transmission efficiency of the communication protocol, adjusts the baud rate value of the communication protocol according to the transmission efficiency, obtains the adjustment result, and flashes the data of the ECU based on the adjustment result to obtain the data flashing result, and sends the data flashing result to the user end. Thus, after parsing the flashing instruction sent by the user end, the data of the ECU is flashed through the obtained communication protocol, and the transmission efficiency of the communication protocol is detected at the same time, and the baud rate value of the communication protocol is adjusted according to the transmission efficiency, so as to achieve more efficient data flashing, solve the problem that when flashing the data of the ECU, the flashing time is relatively long due to the large ECU file, and improve the efficiency of data flashing.
[0053] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a data flashing device, etc. The following takes a data flashing device as an example to illustrate this embodiment and the following embodiments.
[0054] Based on this, the present application embodiment provides a data flashing method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the data flashing method of the present application.
[0055] In this embodiment, the data flashing method is applied to a diagnostic device, and the method includes steps S05 to S07:
[0056] Step S05, receiving a flashing instruction sent by the user terminal;
[0057] The scheme of this embodiment is mainly used for diagnostic equipment. It should be clear that with the vigorous development of the vehicle industry, the number of vehicle models has also increased a lot. During the use of the vehicle, fault problems will inevitably occur. In this case, the use of diagnostic equipment or diagnostic boxes to analyze the vehicle fault can quickly obtain vehicle fault information, and handing it over to the corresponding maintenance personnel for repair can achieve a quick solution to the vehicle fault.
[0058] However, with the continuous increase in the number of vehicle models, the problem of long waiting time often occurs during the use of the product, especially when the maintenance environment is not very good. For example, due to the limitations of hardware version and environmental influences, the uncertainty of configuration will cause the diagnostic box to flash the ECU data. Often, the flashing time is relatively long because the ECU file is relatively large, resulting in a poor actual user experience.
[0059] Therefore, in this embodiment, a diagnostic device is used to receive the flashing instruction sent by the user end. The diagnostic device in this embodiment is a vehicle diagnostic device, which is a tool for detecting and analyzing automobile faults, performance problems and maintenance needs. They help automobile maintenance technicians accurately diagnose and repair faults by reading data and fault codes (DTC) of the vehicle electronic system. With the development of automobile electronics and intelligence, modern automobile diagnostic equipment has become more efficient and accurate, and the flashing instruction is to write certain data or programs (such as firmware, control software, etc.) into the memory of the device. This process usually occurs in the maintenance, upgrade and recovery of automobile diagnostic equipment or other electronic equipment.
[0060] Step S06, parsing the flashing instruction to obtain a communication protocol, and flashing data to the ECU through the communication protocol;
[0061] After receiving the flashing instruction, the diagnostic device parses it, mainly to understand the ECU object that needs to be flashed and the communication protocol used, and then flashes the ECU data through the obtained communication protocol. The ECU objects here are various electronic control units (Electronic Control Unit, ECU) on the car. These ECUs are responsible for controlling different car systems and subsystems. Each ECU has its own independent firmware and control program. The flashing process is to write new programs, configurations or data into the memory of these ECUs to achieve function updates, fault repairs or accessory activation. The communication protocol is used for data exchange between various electronic control units (ECUs) of the vehicle. The electronic control system of the vehicle is usually composed of multiple ECUs, each ECU is responsible for controlling different subsystems (such as engine, gearbox, airbag, ABS, etc.). These ECUs need to work together through communication protocols to realize various functions of the vehicle. The K line protocol and CAN line protocol are mainly used in this embodiment.
[0062] Step S07, detecting the transmission efficiency of the communication protocol, adjusting the baud rate value of the communication protocol according to the transmission efficiency to obtain an adjustment result, and flashing data to the ECU based on the adjustment result to obtain a data flashing result, and sending the data flashing result to the user end.
[0063] When using the communication protocol to flash the ECU, the ECU file may be too large and the transmission efficiency may not be high enough. Therefore, the diagnostic equipment monitors the transmission efficiency corresponding to the communication protocol, and adjusts the baud rate value of the communication protocol based on the monitored transmission efficiency. Then, the adjusted baud rate value is used to flash the ECU data to obtain the final data flash result. Among them, the baud rate (Baud Rate) refers to the number of signal changes per second in data transmission. It is usually used to measure the transmission speed of the communication link. The higher the baud rate, the faster the data transmission speed. In automotive electronic systems, the baud rate is used to describe the data transmission rate of different communication protocols.
[0064] Specifically, before the step S05 of receiving the flashing instruction sent by the user terminal, the method further includes:
[0065] Step S01, receiving a fault detection instruction sent by the user terminal;
[0066] Step S02, performing fault detection on the ECU based on the fault detection instruction to obtain a fault code;
[0067] Step S03, parsing the fault code to obtain a fault code and fault description information, and generating fault information of the ECU according to the fault code and fault description information;
[0068] Step S04: sending the fault information to the user terminal.
[0069] Before performing the corresponding data flashing, the user side needs to be aware of the current vehicle fault problem and decide whether to flash the ECU data. The user side is generally used by maintenance technicians. After the maintenance technician receives the customer's vehicle, he sends a fault detection instruction to the diagnostic equipment.
[0070] The diagnostic equipment then performs fault detection on the ECU based on the fault detection instruction and obtains the corresponding fault code. Fault codes are important tools used to diagnose and report faults in automotive electronic systems. By reading fault codes, maintenance personnel can quickly locate vehicle problems. Common fault code standards include OBD-II (On-Board Diagnostics Ⅱ) standards and fault codes customized by automobile manufacturers. Therefore, after obtaining the fault code, the fault code is parsed to obtain the fault code and fault description information. Among them, the fault code is generally composed of five characters, such as P0100, P0420, B0010, C0035, U1000, where the letters represent the fault type, such as P: Powertrain, C: Chassis, B: Body, and U: Network. The following numbers are used to further classify and explain the specific location of the fault. Therefore, each character corresponds to a fault code, and the fault code corresponds to the fault description information. This description will help maintenance personnel understand the nature of the problem. Specifically, the scanner will display the following: The fault code is P0420, and the corresponding description information is "Catalytic Converter Efficiency Below Threshold).
[0071] Finally, the fault code and fault description information can be integrated to generate ECU fault information, and the fault information is sent to the user end so that the user end can understand the current vehicle fault and decide whether to perform repairs.
[0072] More specifically, the above step S06, the step of parsing the flashing instruction to obtain the communication protocol includes:
[0073] Step S061, parsing the flashing instruction to obtain a vehicle model, performing information query based on the vehicle model to obtain a communication rate and a transmission rate;
[0074] Step S062, determining a flashing target, a flashing data volume, and flashing risk information according to the fault information;
[0075] Step S063, analyzing the flashing target, the flashing data volume, the flashing risk information, the communication rate and the transmission rate to obtain a communication protocol.
[0076] In the above-mentioned fault information acquisition process, although the vehicle information may have been acquired, it is still necessary to verify again before the data is flashed. Therefore, in this embodiment, the flashing instruction (usually sent through OBD-II or CAN bus) may include a command to request basic vehicle information. These instructions may return multiple parameters, one of the key items being the "vehicle model" information. This information usually includes the vehicle's production year, brand, model, and other related information. Common commands or PIDs (Parameter IDs) are used to read vehicle information, such as: PID 0x01 (vehicle information), which requests basic vehicle information (such as VIN code, vehicle model, engine type, etc.) and PID 0x02 (display fault code), which can be used to obtain fault codes stored in the vehicle computer system. Although it has nothing to do with vehicle model information, it is part of the flashing instruction;
[0077] According to the vehicle model and VIN code, find the communication protocols supported by the vehicle. Common protocols are:
[0078] (1) CAN (Controller Area Network) protocol: CAN is the most commonly used communication protocol in modern vehicles. It is usually used for data transmission between ECUs. The common rate is 500Kbps or 1Mbps.
[0079] (2) K-Line protocol: K-Line is an older communication protocol, commonly used in early vehicles, with a lower communication rate, usually 10.4Kbps or 104Kbps;
[0080] (3) LIN (Local Interconnect Network) protocol: LIN is a low-speed communication protocol commonly used in non-critical systems in vehicles, such as windows and electric seats. LIN usually supports rates between 20 Kbps and 100 Kbps.
[0081] (4) FlexRay: FlexRay is a high-speed bus protocol that is commonly used in advanced vehicle systems such as dynamic driver assistance systems (ADAS). Its communication rate is usually 10 Mbps.
[0082] (5) Ethernet protocol: Ethernet protocol is increasingly used in modern vehicles, especially in advanced driver assistance systems and infotainment systems, with communication rates typically at 100Mbps or 1Gbps.
[0083] Once the vehicle's communication protocol is known, the typical communication rate for that protocol can be determined:
[0084] (1) CAN protocol rate: If the vehicle uses the CAN protocol, the typical communication rate is 500Kbps or 1Mbps. For example, the ECU system of modern vehicles usually adopts this protocol, especially when communicating between modules such as engine control, ABS, and transmission system;
[0085] (2) K-Line protocol rate: For older models, vehicles using the K-Line protocol usually have a lower rate of about 10.4 Kbps or 104 Kbps. The K-Line protocol is usually used in the vehicle's diagnostic port (OBD-II), such as vehicle fault code reading and simple data exchange;
[0086] (3) LIN protocol rate: The rate of the LIN bus is usually between 10Kbps and 100Kbps, which is suitable for non-core functions in the vehicle;
[0087] (4) FlexRay protocol rate: FlexRay typically supports rates up to 10 Mbps and is suitable for systems with high real-time and bandwidth requirements (such as lane keeping, autonomous driving, etc.).
[0088] (5) Ethernet protocol rate: If the vehicle uses Ethernet (especially advanced vehicles), the supported rate may be as high as 100Mbps or 1Gbps. Ethernet is mainly used for in-vehicle entertainment systems and advanced driver assistance systems.
[0089] After obtaining the communication rate and transmission efficiency, it is necessary to determine the specific information of the flashing again, such as obtaining the flashing target, the amount of flashing data, and the flashing risk information:
[0090] ① The flashing target is usually determined based on the fault information obtained during diagnosis. The flashing target can be ECU modules (such as engine control module (ECM), transmission control module (TCM), body control module (BCM), etc.), software or firmware updates (if the fault information indicates that the firmware version of a module is too old or defective, the latest version may need to be flashed) and parameter adjustments (for example, adjustments to engine parameters, fuel control strategy, emission control, etc.);
[0091] ② The amount of data to be written depends on the type of the target and the content involved. Common estimates of the amount of data to be written include the engine control module (ECM), whose firmware update is usually about 5MB to 100MB, the transmission control module (TCM), whose firmware update is usually about 1MB to 10MB, the body control module (BCM), whose firmware update is usually about 1MB to 5MB, and diagnostic data, whose fault code clearing or log reset usually requires only a small amount of data (a few KB);
[0092] ③ There are corresponding risks in the flashing process, so the determined risk information should include: incompatible software version (using an inappropriate firmware version, for example, a version that is not compatible with the current hardware or does not meet the vehicle model requirements may cause the vehicle system to fail or cause new faults), flashing failure (power outages, communication interruptions or other problems may occur during the flashing process, resulting in flashing failures, which may cause the vehicle ECU to fail to start normally or enter "failure mode", requiring additional recovery steps), data loss or damage (the flashing process may cause the loss of existing data, especially if it is a firmware upgrade or setting parameter adjustment, for example, the vehicle's personalized settings such as seat memory, air conditioning settings, etc. may be reset), hardware damage (if communication errors, equipment failures or improper operations occur during the flashing process, the hardware of the ECU or other control units may be damaged and require replacement or repair), loss of warranty or certification (some vehicle manufacturers or repairers have strict regulations on unofficial flashing operations. Unauthorized flashing may cause the vehicle to lose warranty eligibility or affect the vehicle's certification status) and safety issues (incorrect flashing operations may cause the vehicle's safety functions to fail. For example, failure to update the firmware of safety systems such as autonomous driving, lane keeping, and automatic parking may cause the system to not work properly).
[0093] Finally, by analyzing the obtained flashing target, flashing data volume, flashing risk information, communication rate and transmission rate, the communication protocol for data flashing can be obtained.
[0094] Furthermore, in the above step S06, the step of flashing data to the ECU through the communication protocol includes:
[0095] Step S064, when the communication protocol is the K-line protocol, a transmission test is performed based on a preset K-line protocol baud rate value interval to obtain a test result, and a first baud rate value is determined according to the test result to flash data to the ECU;
[0096] Step S065, when the communication protocol is the CAN line protocol, the second baud rate value is continuously updated through the self-increment mode to obtain an updated second baud rate value, and the ECU is flashed with data through the updated second baud rate value.
[0097] The main communication protocols used in this embodiment are the K-line protocol and the CAN line protocol. The K-line is a common serial communication protocol in automobile diagnosis and ECU (electronic control unit) communication, and is mainly used for data exchange between automobile electronic control units (ECU) and diagnostic equipment. The K-line protocol is usually part of the ISO 9141 and ISO 14230 (KWP2000) standards and is widely used in vehicle fault diagnosis and repair processes. It is one of the core communication protocols of the automobile diagnostic system, especially in older models and some basic models. It is still widely used. The CAN line protocol (Controller Area Network) is a multi-host, efficient and reliable serial communication protocol used in embedded systems, automobiles, industrial equipment and other fields. It is widely used in automobiles, automation equipment, industrial control and robots, especially in automotive electronics.
[0098] During use, if the K-line protocol is used, the transmission test is performed based on the preset K-line protocol baud rate value range. The baud rate value range here includes 2kbps, 4kbps, 6kbps, 8kbps, 10kbps, 12kbps, etc. Because the baud rate of the K-line protocol is affected by the environment, the baud rate will be relatively low (generally around 10kbps). At this time, 2kbps, 4kbps, 6kbps, 8kbps, 10kbps and 12kbps are used in turn for trial. If the efficiency is relatively stable when the current environment baud rate is 8kbps, then we use 8kbps for communication;
[0099] If the CAN line protocol is adopted, in CAN line mode, it is updated once per second through the self-increment mode, and the baud rate value is 100kbps, 200kbps, 300kbps, 400kbps, 410kbps, 420kbps, 430kbps, 440kbps, 450kbps, 460kbps, 470kbps, 480kbps, 490kbps, 500kbps, 510kbps, 520kbps, 530kbps, 540kbps, 550kbps, etc.
[0100] Furthermore, in the above step S07, the step of detecting the transmission efficiency of the communication protocol and adjusting the baud rate value of the communication protocol according to the transmission efficiency, and obtaining the adjustment result includes:
[0101] Step S071, performing efficiency detection on the transmission baud rate value of the communication protocol to obtain a detection result;
[0102] Step S072, if the detection result is that the transmission efficiency is unstable, the transmission baud rate value is adjusted until an adjustment result is obtained when the transmission efficiency is stable;
[0103] Step S073: If the detection result shows that the transmission efficiency is stable, the transmission baud rate value is adjusted through the probing mode to obtain an adjustment result.
[0104] After the corresponding communication protocol is used to flash the ECU, the transmission efficiency of the communication protocol is monitored synchronously to obtain the monitoring results. The transmission efficiency index in this embodiment is mainly:
[0105] (1) Baud rate and throughput: The higher the baud rate, the greater the amount of data that can be transmitted per second in theory. However, the actual throughput is affected by many factors, including channel noise, signal interference, and protocol overhead.
[0106] (2) Bit Error Rate (BER): In high-speed transmission, the bit error rate usually increases, especially in environments with poor signal quality or large interference. A high bit error rate will reduce the transmission efficiency of the protocol because the erroneous bits need to be retransmitted, increasing redundant data and delay. The bit error rate is usually analyzed using the signal-to-noise ratio (SNR) and bit error rate curve.
[0107] (3) Protocol overhead: Any communication protocol will include additional overhead in data transmission. For example, in the CAN protocol, each data frame includes header information (identifier, control bit, check code, etc.), which will occupy a certain amount of bandwidth resources, thereby reducing the effective data transmission rate. By analyzing the data frame structure and overhead of the protocol, the actual effective data transmission rate can be calculated.
[0108] Whether it is the K-line protocol or the CAN line protocol, corresponding adjustments can be made when the transmission efficiency is detected to be unstable or stable. For example, when the transmission efficiency is unstable, the transmission baud rate value can be adjusted until the adjustment result is output when the transmission efficiency is stable. If the transmission efficiency is stable, in order to obtain the flashing result more efficiently, the transmission baud rate value can also be adjusted through the probing mode to obtain the adjustment result;
[0109] For example, taking the K-line protocol as an example, if it takes a long time, we can monitor the transmission efficiency at this time. If the transmission is unstable, try to reduce the baud rate again and adjust it to 6kbps. If the transmission process is stable within a certain period of time, then use the probing mode to increase the baud rate value. For example, if it has been stable for 20 seconds at 8kbps, then we try to increase the bit rate to 10kbps. The probing mode can also be called the sniffing mode (Sniffing Mode), which usually refers to the operation of capturing and analyzing network data packets through special network monitoring tools or equipment in the network. Through the sniffing mode, network administrators or security experts can view the contents of all data packets transmitted on the network, and then analyze the performance of the network, monitor data flows, and check for potential security risks.
[0110] This embodiment adopts the above scheme, specifically by receiving the flashing instruction sent by the user end; parsing the flashing instruction to obtain the communication protocol, and flashing the ECU with data through the communication protocol; detecting the transmission efficiency of the communication protocol, adjusting the baud rate value of the communication protocol according to the transmission efficiency, obtaining the adjustment result, and flashing the ECU with data based on the adjustment result to obtain the data flashing result, and sending the data flashing result to the user end. Thus, after parsing the flashing instruction sent by the user end, the ECU is flashed with data through the obtained communication protocol, and the transmission efficiency of the communication protocol is detected at the same time, and the baud rate value of the communication protocol is adjusted according to the transmission efficiency, so as to achieve more efficient data flashing, solve the problem that when flashing the ECU with data, the flashing time is relatively long due to the large ECU file, and improve the efficiency of data flashing.
[0111] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 The present application also proposes a data flashing method, which is applied to a user terminal and includes steps S08 to S09:
[0112] Step S08, sending a flashing instruction to the diagnostic device according to the pre-acquired ECU fault information, the diagnostic device parsing the flashing instruction to obtain a communication protocol, flashing the ECU with data through the communication protocol, detecting the transmission efficiency of the communication protocol, adjusting the baud rate value of the communication protocol according to the transmission efficiency to obtain an adjustment result, and flashing the ECU with data based on the adjustment result to obtain a data flashing result;
[0113] Step S09, receiving the data flashing result sent by the diagnostic device.
[0114] It should be clear that in the scheme of the present application, in addition to the need for the diagnostic device to perform corresponding operations, the user end also needs to cooperate accordingly. Through the above-mentioned embodiments, it can be known that the EUC fault information in the present application is obtained after analysis by the diagnostic device. Therefore, the user end can send a flash instruction to the diagnostic device according to the pre-acquired ECU fault information, and then the diagnostic device performs the corresponding communication protocol analysis, data flashing, and transmission efficiency detection, etc. Finally, after obtaining the data flashing result, the diagnostic device sends the data flashing result to the user end.
[0115] After obtaining the data flashing result, the user can also initiate a re-calibration of the ECU to check whether the fault has been repaired.
[0116] This embodiment uses the above scheme, specifically by sending a flashing instruction to the diagnostic device according to the pre-acquired ECU fault information, the diagnostic device parses the flashing instruction to obtain the communication protocol, flashes the ECU data through the communication protocol, detects the transmission efficiency of the communication protocol, adjusts the baud rate value of the communication protocol according to the transmission efficiency, obtains the adjustment result, flashes the ECU data based on the adjustment result, and obtains the data flashing result; receives the data flashing result sent by the diagnostic device. Therefore, after parsing the flashing instruction sent by the user end, the ECU data is flashed through the obtained communication protocol, the transmission efficiency of the communication protocol is detected, and the baud rate value of the communication protocol is adjusted according to the transmission efficiency, so as to achieve more efficient data flashing, solve the problem that when flashing the ECU data, the flashing time is relatively long due to the large ECU file, and improve the efficiency of data flashing.
[0117] For example, in order to help understand the implementation process of the data flashing method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 3 , Figure 3 A brief flow chart of a data flashing method is provided, specifically:
[0118] First, after receiving the flashing instruction sent by the user end, the diagnostic device parses it to obtain the communication protocol for data flashing;
[0119] Then, the data of the ECU is flashed through the communication protocol, and the efficiency of the data flashing is tested simultaneously;
[0120] Then, the baud rate value of the communication protocol is adjusted based on the obtained detection result, and data flashing is continued after the adjustment;
[0121] Finally, the flashing result is obtained and sent to the user end.
[0122] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the data flashing method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0123] This application also provides a data flashing device, please refer to Figure 4 , the device is applied to a diagnostic device, the device comprising:
[0124] The receiving module 10 is used to receive the flashing instruction sent by the user end;
[0125] The parsing module 20 is used to parse the flashing instruction to obtain a communication protocol, and flash the data to the ECU through the communication protocol;
[0126] The adjustment module 30 is used to detect the transmission efficiency of the communication protocol, adjust the baud rate value of the communication protocol according to the transmission efficiency to obtain an adjustment result, and flash the data of the ECU based on the adjustment result to obtain a data flash result, and send the data flash result to the user end.
[0127] The data flashing device provided by the present application adopts the data flashing method in the above embodiment, which can solve the technical problem that when flashing data to the ECU, the flashing time is relatively long due to the large ECU file. Compared with the prior art, the beneficial effects of the data flashing device provided by the present application are the same as the beneficial effects of the data flashing method provided by the above embodiment, and the other technical features in the data flashing device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0128] The present application provides a data flushing device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data flushing method in the above-mentioned embodiment one.
[0129] Reference below Figure 5 , which shows a schematic diagram of the structure of a data flashing device suitable for implementing the embodiment of the present application. The data flashing device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The data flashing device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0130] like Figure 5 As shown, the data flashing device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the data flashing device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the data flashing device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a data flashing device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0131] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0132] The data flashing device provided by the present application adopts the data flashing method in the above embodiment, which can solve the technical problem that when flashing data to the ECU, the flashing time is relatively long due to the large ECU file. Compared with the prior art, the beneficial effects of the data flashing device provided by the present application are the same as the beneficial effects of the data flashing method provided by the above embodiment, and the other technical features in the data flashing device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0133] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0134] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0135] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the data flashing method in the above-mentioned embodiment.
[0136] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0137] The computer-readable storage medium may be included in the data flashing device; or may exist independently without being assembled into the data flashing device.
[0138] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the data flashing device, the data flashing device: receives the flashing instruction sent by the user end; parses the flashing instruction to obtain the communication protocol, and flashes the data of the ECU through the communication protocol; detects the transmission efficiency of the communication protocol, adjusts the baud rate value of the communication protocol according to the transmission efficiency, obtains the adjustment result, and flashes the data of the ECU based on the adjustment result to obtain the data flashing result, and sends the data flashing result to the user end.
[0139] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0140] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0141] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0142] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned data flashing method, and can solve the technical problem that when flashing data to the ECU, the flashing time is relatively long due to the large ECU file. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the data flashing method provided in the above-mentioned embodiment, and will not be repeated here.
[0143] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned data flashing method when executed by a processor.
[0144] The computer program product provided by the present application can solve the technical problem that when flashing data to an ECU, the flashing time is relatively long due to the large ECU file. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the data flashing method provided by the above embodiment, and will not be repeated here.
[0145] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A data flashing method, characterized in that: The method is applied to a diagnostic device, and the method comprises: Receive the flashing instruction sent by the user end; Parsing the flashing instruction to obtain a communication protocol, and flashing data to the ECU through the communication protocol; Detect the transmission efficiency of the communication protocol, adjust the baud rate value of the communication protocol according to the transmission efficiency to obtain an adjustment result, and flash data to the ECU based on the adjustment result to obtain a data flash result, and send the data flash result to the user end.
2. The method according to claim 1, characterized in that Before the step of receiving the flashing instruction sent by the user terminal, the method further includes: Receiving a fault detection instruction sent by the user terminal; Performing fault detection on the ECU based on the fault detection instruction to obtain a fault code; Parsing the fault code to obtain a fault code and fault description information, and generating fault information of the ECU according to the fault code and the fault description information; The fault information is sent to the user terminal.
3. The method according to claim 2, characterized in that The step of parsing the flashing instruction to obtain the communication protocol comprises: Parsing the flashing instruction to obtain a vehicle model, performing information query based on the vehicle model to obtain a communication rate and a transmission rate; Determine the flashing target, the flashing data amount and the flashing risk information according to the fault information; The communication protocol is obtained by analyzing the flashing target, the amount of flashing data, the flashing risk information, the communication rate and the transmission rate.
4. The method according to claim 1, characterized in that The communication protocol includes a K line protocol and a CAN line protocol, and the step of flashing data to the ECU through the communication protocol includes: In the case where the communication protocol is a K-line protocol, a transmission test is performed based on a preset K-line protocol baud rate value interval to obtain a test result, and a first baud rate value is determined according to the test result to flash data to the ECU; In the case where the communication protocol is a CAN line protocol, the second baud rate value is continuously updated through a self-increment mode to obtain an updated second baud rate value, and data is flashed to the ECU through the updated second baud rate value.
5. The method according to claim 1, characterized in that The step of detecting the transmission efficiency of the communication protocol, adjusting the baud rate value of the communication protocol according to the transmission efficiency, and obtaining the adjustment result comprises: Performing efficiency detection on the transmission baud rate value of the communication protocol to obtain a detection result; If the detection result is that the transmission efficiency is unstable, the transmission baud rate value is adjusted until an adjustment result is obtained when the transmission efficiency is stable; If the detection result is that the transmission efficiency is stable, the transmission baud rate value is adjusted through the probing mode to obtain an adjustment result.
6. A data flashing method, characterized in that: The method is applied to a user terminal, and the method comprises: Sending a flashing instruction to a diagnostic device according to pre-acquired ECU fault information, the diagnostic device parsing the flashing instruction to obtain a communication protocol, flashing data to the ECU through the communication protocol, detecting the transmission efficiency of the communication protocol, adjusting the baud rate value of the communication protocol according to the transmission efficiency to obtain an adjustment result, and flashing data to the ECU based on the adjustment result to obtain a data flashing result; Receive the data flashing result sent by the diagnostic device.
7. A data flashing device, characterized in that: The device is applied to diagnostic equipment, and comprises: A receiving module, used for receiving a flashing instruction sent by a user terminal; A parsing module, used for parsing the flashing instruction to obtain a communication protocol, and flashing data to the ECU through the communication protocol; The adjustment module is used to detect the transmission efficiency of the communication protocol, adjust the baud rate value of the communication protocol according to the transmission efficiency to obtain an adjustment result, and flash the data of the ECU based on the adjustment result to obtain a data flash result, and send the data flash result to the user end.
8. A data flashing device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data flashing method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data flashing method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the data flashing method according to any one of claims 1 to 6 are implemented.