Diagnostic file writing method and related apparatus

By determining the number of files and writing them to the diagnostic files according to priority sequence when the diagnostic application software starts, the problem of low writing efficiency of diagnostic files is solved, thereby improving the operating efficiency and security of diagnostic equipment.

CN123138199APending Publication Date: 2026-11-20LAUNCH TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611205148.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-10
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

The existing technology for writing vehicle diagnostic files to the storage area of ​​diagnostic application software is inefficient, which means that all diagnostic files need to be copied repeatedly every time the diagnostic application software is started, wasting resources and affecting diagnostic efficiency.

Method used

If the number of files in the diagnostic application software storage area is less than the number of files in the vehicle diagnostic device storage area, the diagnostic files from the vehicle diagnostic device are read and written to the application software storage area according to a priority sequence, taking into account historical call frequency and risk level values ​​to determine the writing order.

Benefits of technology

It improves the efficiency of writing diagnostic files, reduces redundant data transmission, shortens vehicle inspection waiting time, and enhances the operating efficiency and safety of diagnostic equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123138199A_ABST
    Figure CN123138199A_ABST
Patent Text Reader

Abstract

The application discloses a diagnostic file writing method and related device, the method comprises the following steps: applied to an automobile diagnostic device, the automobile diagnostic device comprises a first storage device and a second storage device, the first storage device is a diagnostic file storage area of the automobile diagnostic device, and the second storage device is a diagnostic file storage area of diagnostic application software; firstly, in response to a starting instruction for the diagnostic application software, it is judged whether the number of diagnostic files in the second storage device is less than the number of diagnostic files in the first storage device; if yes, n groups of diagnostic files stored in the first storage device are read; then, a target writing sequence corresponding to the n groups of diagnostic files is determined; and finally, the n groups of diagnostic files are sequentially written into the second storage device based on the target writing sequence. By adopting the embodiment of the application, the efficiency of writing vehicle model diagnostic files into the diagnostic application software storage area is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle diagnostic technology, and in particular to a diagnostic file writing method and related apparatus. Background Technology

[0002] As the variety of vehicles continues to increase, each model is equipped with its own diagnostic files, which are read by automotive diagnostic equipment to complete vehicle fault detection and matching operations. Diagnostic application software needs to rely on complete vehicle diagnostic files to perform vehicle diagnostic work normally.

[0003] During routine use of the device, users often clear the diagnostic application software data. This operation simultaneously deletes all diagnostic files stored in the software's storage area. When the user restarts the diagnostic application software, the device needs to reload all vehicle model diagnostic files to the software storage area. However, the current efficiency of writing vehicle model diagnostic files to the diagnostic application software's storage area is low. Improving the efficiency of writing vehicle model diagnostic files to the diagnostic application software's storage area is an urgent problem to be solved. Summary of the Invention

[0004] This application provides a diagnostic file writing method and related apparatus, which improves the efficiency of writing vehicle model diagnostic files into the storage area of ​​diagnostic application software.

[0005] In a first aspect, embodiments of this application provide a diagnostic file writing method applied to an automotive diagnostic device. The automotive diagnostic device includes a first storage device and a second storage device. The first storage device is a diagnostic file storage area for the automotive diagnostic device, and the second storage device is a diagnostic file storage area for diagnostic application software. The method includes: In response to a startup command for the diagnostic application software, it is determined whether the number of diagnostic files in the second storage device is less than the number of diagnostic files in the first storage device; If so, then read the n sets of diagnostic files stored in the first storage device; n is a positive integer, each set of diagnostic files corresponds to a vehicle model, and each set of diagnostic files includes the fault diagnosis parameters of the corresponding vehicle model. Determine the target write sequence corresponding to the n groups of diagnostic files; The n sets of diagnostic files are sequentially written into the second storage device based on the target write sequence.

[0006] Secondly, this application provides a diagnostic file writing device for use in automotive diagnostic equipment. The automotive diagnostic equipment includes a first storage device and a second storage device. The first storage device is a diagnostic file storage area for the automotive diagnostic equipment, and the second storage device is a diagnostic file storage area for diagnostic application software. The diagnostic file writing device includes a judgment unit and a processing unit. The judgment unit is used to determine, in response to a startup command for the diagnostic application software, whether the number of diagnostic files in the second storage device is less than the number of diagnostic files in the first storage device. The processing unit is configured to read n sets of diagnostic files stored in the first storage device if the condition is met; n is a positive integer, each set of diagnostic files corresponds to a vehicle model, and each set of diagnostic files includes fault diagnosis parameters for the corresponding vehicle model. Determine the target write sequence corresponding to the n groups of diagnostic files; The n sets of diagnostic files are sequentially written into the second storage device based on the target write sequence.

[0007] Thirdly, embodiments of the present invention provide an electronic device, including: a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor to cause the electronic device to perform the method as described in the first aspect.

[0008] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that is executed by a processor to implement the method as described in the first aspect.

[0009] Fifthly, embodiments of the present invention provide a computer program product including a non-transitory computer-readable storage medium storing a computer program, such that a computer performs the method as described in the first aspect.

[0010] Implementing the embodiments of the present invention has the following beneficial effects: As can be seen, the diagnostic file writing method described in this embodiment of the invention is applied to an automotive diagnostic device. The automotive diagnostic device includes a first storage device and a second storage device. The first storage device is the diagnostic file storage area of ​​the automotive diagnostic device, and the second storage device is the diagnostic file storage area of ​​the diagnostic application software. First, in response to the start command for the diagnostic application software, it is determined whether the number of diagnostic files in the second storage device is less than the number of diagnostic files in the first storage device. If so, n sets of diagnostic files stored in the first storage device are read. Then, the target writing sequence corresponding to the n sets of diagnostic files is determined, and the n sets of diagnostic files are sequentially written into the second storage device based on the target writing sequence, thereby effectively improving the efficiency of writing vehicle diagnostic files into the diagnostic application software storage area. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application or the background art, the accompanying drawings used in the embodiments of this application or the background art will be described below.

[0012] Figure 1 This is an application scenario diagram of an automotive diagnostic device provided in the embodiments of this application; Figure 2 This is a flowchart of a diagnostic file writing method provided in an embodiment of this application; Figure 3 This is a flowchart illustrating how to determine a target writing sequence according to an embodiment of this application; Figure 4 This is a flowchart provided in an embodiment of the present application for determining the priority writing level value corresponding to the first group of diagnostic files; Figure 5 This is a flowchart provided by an embodiment of the present application for determining a first risk level value corresponding to a first group of diagnostic documents; Figure 6 This is a flowchart of a method for diagnosing a target vehicle provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a diagnostic file writing device provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0013] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present application.

[0014] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0015] In this document, the term "implementation" means that a specific feature, structure, or characteristic described in connection with an implementation may be included in at least one implementation of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same implementation, nor is it a separate or alternative implementation mutually exclusive with other implementations. It will be explicitly and implicitly understood by those skilled in the art that the implementations described herein can be combined with other implementations.

[0016] Please see Figure 1 , Figure 1 This is an application scenario diagram of an automotive diagnostic device provided in the embodiments of this application.

[0017] In this embodiment, when the automotive diagnostic equipment is started to diagnose a target vehicle, the diagnostic application software is first started. Then, in response to the start command for the diagnostic application software, it is determined whether the number of diagnostic files in the second storage device is less than the number of diagnostic files in the first storage device. If the number of diagnostic files in the second storage device is less than the number of diagnostic files in the first storage device, or if no diagnostic files are stored in the second storage device, it is determined that the data in the diagnostic application software has been cleared. Therefore, all n sets of diagnostic files stored in the first storage device need to be written to the second storage device. The first storage device is the diagnostic file storage area of ​​the automotive diagnostic equipment, and the second storage device is the diagnostic file storage area of ​​the diagnostic application software. Further, the n sets of diagnostic files stored in the first storage device are read, where each set of diagnostic files corresponds to a vehicle model, and each set of diagnostic files includes fault diagnosis parameters for the corresponding vehicle model. Then, the target write sequence corresponding to the n sets of diagnostic files is determined, and finally, based on the target write sequence, the n sets of diagnostic files are sequentially written to the second storage device. Furthermore, after the n sets of diagnostic files are sequentially written into the second storage device, the diagnostic application software in the vehicle diagnostic equipment can be used to perform fault diagnosis on the target vehicle. After the fault diagnosis operation on the target vehicle is completed, since all n sets of diagnostic files have been written into the second storage device, there is no need to repeat the diagnostic file writing process. When the operator switches to the vehicle to be diagnosed, the application software can directly read the corresponding vehicle model diagnostic data and continuously perform fault diagnosis operations on various different vehicle models other than the target vehicle, greatly improving the smoothness of multi-model batch testing. Only when the user actively performs the operation of clearing the diagnostic application software data will all diagnostic files in the second storage device be cleared, and the above file migration, sorting and writing process will be re-executed when the software is started next time.

[0018] Please see Figure 2 , Figure 2 This is a flowchart of a diagnostic file writing method provided in an embodiment of this application. The diagnostic file writing method is applied to an automotive diagnostic device, which includes a first storage device and a second storage device. The first storage device is a diagnostic file storage area for the automotive diagnostic device, and the second storage device is a diagnostic file storage area for diagnostic application software. The method includes, but is not limited to, the following steps: S201: In response to a startup command for the diagnostic application software, determine whether the number of diagnostic files in the second storage device is less than the number of diagnostic files in the first storage device.

[0019] In this embodiment, the first storage device is a dedicated diagnostic file storage area built into the vehicle diagnostic equipment itself. It has a larger storage space and is used to store diagnostic files corresponding to all vehicle models in a long-term and complete manner. It is not affected by the data cleaning operation of the diagnostic application software. Regardless of whether the user clears the software data or restarts the application software, the n sets of diagnostic files stored in the storage area corresponding to the first storage device will be completely retained and can be used as a data source after the files of the second storage device are lost.

[0020] The second storage device is a storage partition exclusively used by the diagnostic application software. It is specifically used to retrieve and read diagnostic files during software operation. The storage area corresponding to the second storage device is bound to the diagnostic application software data. Once the user performs the operation of clearing the diagnostic application software data, all the diagnostic files stored in the storage area corresponding to the second storage device will be cleared at once. When the software restarts, it will be unable to perform vehicle detection due to the missing vehicle model diagnostic data. Therefore, it is necessary to rewrite the diagnostic files stored in the first storage device into the second storage device.

[0021] Diagnostic application software is a functional program that runs on automotive diagnostic equipment and is directly designed for operators to perform vehicle fault detection. When running, the diagnostic application software must rely on the vehicle model diagnostic files stored in the second storage device to retrieve the corresponding fault diagnosis parameters to complete the vehicle detection. The diagnostic application software itself does not have the ability to persistently store the complete set of diagnostic files. The diagnostic application files need to be stored in the second storage device. When it starts up, it will check whether there are complete diagnostic files in the second storage device. When it detects that the diagnostic files are missing, it needs to synchronize the complete diagnostic files from the first storage device to the second storage device before it can complete the vehicle fault diagnosis operation.

[0022] In this embodiment, the startup command for the diagnostic application software can be an operation signal triggered by the operator on the vehicle diagnostic equipment to wake up the diagnostic application software. The startup command for the diagnostic application software can be generated by the operator clicking the software icon on the device desktop, or by the vehicle diagnostic equipment automatically waking up the diagnostic application software when it is turned on.

[0023] After the automotive diagnostic equipment receives the start command corresponding to the diagnostic application software, it counts the number of diagnostic file groups stored in the first storage device and the second storage device, and determines whether the number of diagnostic files stored in the second storage device is less than the number of diagnostic files stored in the first storage device. The second storage device is a dedicated storage area for the diagnostic application software. If the operator performs an operation to clear the diagnostic application software data, all diagnostic files stored in the second storage device will be deleted. At this time, the total number of diagnostic files in the second storage device will be significantly less than the number of diagnostic files stored in the first storage device, which contains diagnostic files for all vehicle models. Determining whether the number of diagnostic files in the second storage device is less than the number of diagnostic files in the first storage device can quickly determine whether there are any missing local diagnostic files in the diagnostic application software, avoiding the repeated copying of all diagnostic files every time the diagnostic application software starts, and reducing the occupation of automotive diagnostic equipment operating resources by invalid data transmission.

[0024] S202: If so, read the n sets of diagnostic files stored in the first storage device.

[0025] In this embodiment, n is a positive integer, each set of diagnostic files corresponds to a vehicle model, and each set of diagnostic files includes the fault diagnosis parameters of the corresponding vehicle model.

[0026] When the automotive diagnostic equipment determines that the number of diagnostic files stored in the second storage device is less than the number of diagnostic files stored in the first storage device, it indicates that the second storage device has no diagnostic files or only retains a portion of the diagnostic files. In this case, it is necessary to read the n sets of diagnostic files stored in the first storage device. The n sets of diagnostic files stored in the first storage device are a complete set of vehicle model diagnostic data that the automotive diagnostic equipment has been storing for a long time. Each set of diagnostic files is independent of each other, and each set of diagnostic files corresponds to a vehicle model. Each set of diagnostic files includes the vehicle's fault diagnosis parameters for the corresponding vehicle model. Among them, the fault diagnosis parameters can be adapted to the vehicle inspection standards, fault judgment basis, vehicle matching data, etc. of the corresponding vehicle model, which can support the diagnostic application software to complete all the information required to complete vehicle fault diagnosis. Since the first storage device is unaffected by the diagnostic application software's cleanup operations, the n sets of diagnostic files inside are always completely preserved, and there will be no file loss or incompleteness. When the second storage device is in a state of missing diagnostic files or only partially containing diagnostic files, the automotive diagnostic equipment will completely read the n sets of diagnostic files as the data source, uniformly calculate the write priority based on all diagnostic files, generate the target write sequence, and finally synchronize all n sets of diagnostic files to the second storage device in an orderly manner. This ensures that the diagnostic application software can retrieve the diagnostic parameters corresponding to any vehicle model without being affected by missing diagnostic files.

[0027] It should be explained that, in this embodiment, if it is determined that no diagnostic files are stored in the second storage device, it means that the diagnostic application software data has been completely erased. The vehicle diagnostic equipment directly reads all n sets of diagnostic files in the first storage device, generates a target write sequence, and then writes all diagnostic files to the second storage device in sequence according to the target write sequence. If it is determined that some diagnostic files are stored in the second storage device and only some vehicle models are missing, the vehicle diagnostic equipment also reads all n sets of diagnostic files in the first storage device and generates a target write sequence, and performs a full write operation. The partial diagnostic files stored in the second storage device are overwritten by all n sets of diagnostic files, thereby ensuring that the diagnostic application software can retrieve fault diagnosis parameters corresponding to any vehicle model at any time without considering the diagnostic files already existing in the second storage device.

[0028] S203: Determine the target write sequence corresponding to the n groups of diagnostic files.

[0029] In this embodiment, firstly, feature parameters including historical call frequency and risk level values ​​are obtained for each group of diagnostic files in the n groups of diagnostic files, resulting in n groups of feature parameters. Then, based on the n groups of feature parameters, priority write level values ​​are determined for each group of diagnostic files in the n groups of diagnostic files, resulting in n priority write level values. Finally, based on the n priority write level values, n write priorities are determined for the n groups of diagnostic files, thereby allowing the target write sequence to be determined based on the n write priorities.

[0030] S204: Write the n sets of diagnostic files sequentially into the second storage device based on the target write sequence.

[0031] In this embodiment, starting with the diagnostic file that is first in the target write sequence and has the highest write priority, the corresponding vehicle fault diagnosis parameters contained in this group of diagnostic files are read first. The group of diagnostic files is then completely transmitted and stored in the second storage device. After the current group of diagnostic files is completely written and verified to be stored correctly, the next diagnostic file in the target write sequence is extracted and the transmission, storage and verification operations are repeated. All n groups of diagnostic files are processed one by one according to the order of the target write sequence from beginning to end, until all diagnostic files corresponding to all vehicle models in the target write sequence are completely stored in the second storage device. This ensures that high-priority diagnostic files are stored first, allowing the diagnostic application software to load the diagnostic files corresponding to frequently used and high-diagnostic-risk vehicle models in advance. Diagnostic files for frequently used and high-risk vehicle models are stored first, allowing operators to perform fault diagnosis on commonly used models and models with high potential inspection risks without waiting for all diagnostic files to be written before the diagnostic application software has finished synchronizing. This significantly reduces the pre-inspection waiting time for vehicle inspection. At the same time, prioritizing the storage of diagnostic files for high-risk models can prevent operators from delaying repairs or performing non-standard inspection operations due to the lack of corresponding diagnostic files when they urgently need to handle such vehicle faults. Overall, this improves the diagnostic efficiency of automotive diagnostic equipment and the safety of vehicle fault diagnosis.

[0032] After the automotive diagnostic equipment reads all vehicle model diagnostic files from the first storage device and generates a target write sequence, it can initiate single-file transfer commands sequentially according to the order of the target write sequence. Only one set of diagnostic files is selected at a time. After reading the complete data corresponding to the set of diagnostic files, it is copied completely to the designated storage partition of the second storage device through the local transfer channel. After verifying that the current file is free of missing or damaged data, the reading, transfer, and writing operations of the next set of diagnostic files are executed. This process is repeated until all diagnostic files in the target write sequence have been written. When writing diagnostic files, a serial writing method for single diagnostic files can be used. The writing operation for the next diagnostic file is executed only after the previous diagnostic file has been written and verified. When the automotive diagnostic equipment retrieves a set of diagnostic files to be written, it first reads all the complete binary data, including the vehicle model calibration parameters, fault judgment logic, and communication protocol data, from the storage block corresponding to the first storage device. It does not delete or filter any file content. The data is transferred through the local high-speed transmission channel inside the automotive diagnostic equipment's motherboard. This local transmission channel is a direct hardware connection within the device, which does not rely on an external network. The transmission is stable and there is no risk of data loss. Then, the completely received file data is written to the pre-defined dedicated storage partition of the second storage device.

[0033] By writing diagnostic files sequentially according to the target write sequence, the system prioritizes storing diagnostic files for vehicles with complex electronic controls, high maintenance risks, and frequent daily use in the second storage device. This allows for direct retrieval of these files during subsequent vehicle maintenance without waiting for file transfer. Ordered writing also avoids storage conflicts, data corruption, and write delays caused by simultaneous writing of multiple files, ensuring the integrity and undamaged nature of each diagnostic file. Furthermore, storing all diagnostic files in the second storage device eliminates the need to retrieve files from the first storage device for each vehicle diagnostic operation, significantly reducing data transmission overhead and accelerating diagnostic startup. The second storage device can also operate independently with the diagnostic software; even if the first storage device is disconnected, it can still retrieve diagnostic files for various vehicle models to conduct vehicle testing, continuously and stably outputting accurate diagnostic data.

[0034] As can be seen, after the diagnostic application software starts, it first compares the number of diagnostic files in the first storage device and the second storage device. After identifying the missing state of files in the second storage device (cleared or incomplete), it reads all vehicle model diagnostic files from the first storage device and generates a target write sequence. Then, it writes the files to the second storage device in an orderly manner according to the sequence. This can accurately identify the missing diagnostic files caused by the diagnostic application software clearing data. When the diagnostic files are incomplete, it starts full synchronization, avoiding the need to repeatedly copy files every time the software starts. This saves the data transmission costs of the automotive diagnostic equipment. At the same time, it can take into account the operating efficiency of the automotive diagnostic equipment, the response speed of diagnostic operations, and the safety of repair operations. It ensures that the diagnostic application software has complete fault diagnosis parameters for all vehicle models and can continuously complete vehicle fault diagnosis work for multiple vehicle models.

[0035] Please see Figure 3 , Figure 3 This is a flowchart of a method for determining a target write sequence according to an embodiment of this application, including but not limited to the following steps: S301: Obtain the feature parameters corresponding to each of the n sets of diagnostic files to obtain n sets of feature parameters.

[0036] In this embodiment, the feature parameters include historical call frequency and risk level value, wherein the risk level value is used to characterize the risk level of the vehicle corresponding to the diagnostic file when performing fault diagnosis.

[0037] The automotive diagnostic equipment extracts parameters from each of the n sets of diagnostic files that have been read. For each set of diagnostic files, it collects the number of times the diagnostic application software has accessed and used the file in the past as the historical call frequency. At the same time, it retrieves the risk level value calculated in advance based on the vehicle configuration. The historical call frequency and risk level value corresponding to the same diagnostic file are integrated into a set of feature parameters. After traversing all n sets of diagnostic files, n sets of feature parameters are obtained.

[0038] In this embodiment, the frequency of historical calls can reflect the frequency of use of the corresponding vehicle model in daily maintenance scenarios. The risk level value is calculated based on the number of electronic control components installed in the vehicle model and the overall vehicle safety-related configuration level. It can reflect the level of potential risks such as operational errors and detection deviations when using this set of diagnostic files to carry out vehicle fault diagnosis work.

[0039] In this embodiment, the writing priority of diagnostic files is mainly determined by two characteristic parameters: historical call frequency and risk level. In practical applications, other characteristic parameters such as vehicle repair urgency level, number of vehicle electronic control components, diagnostic file data volume, vehicle safety configuration level, short-term repair records, high-incidence types of vehicle faults, software compatibility, and vehicle emission standards can also be considered to determine the writing priority of diagnostic files. This can further optimize the diagnostic file writing sorting logic and improve the fault diagnosis efficiency of automotive diagnostic equipment.

[0040] S302: Determine the n priority write values ​​corresponding to the n sets of diagnostic files based on the n sets of feature parameters.

[0041] In this embodiment, each diagnostic file corresponds to a priority write value, which is used to characterize the priority of writing the diagnostic file.

[0042] The first priority write priority value and the second priority write priority value can be determined by first determining the historical call frequency and risk level value corresponding to the diagnostic file, and then performing a weighted calculation based on the first priority write priority value and the second priority write priority value to determine the final priority write priority value corresponding to the diagnostic file. Each group of diagnostic files corresponds to one priority write priority value, so that n priority write priority values ​​corresponding to the n groups of diagnostic files can be determined based on the n groups of feature parameters.

[0043] S303: Determine the n write priorities corresponding to the n groups of diagnostic files based on the n priority write level values.

[0044] In this embodiment, each diagnostic file corresponds to a write priority. The n priority write values ​​corresponding to all n groups of diagnostic files are sorted numerically, and then arranged in descending order of priority. Different levels of write priorities are then assigned according to the sorted order; the higher the priority write value, the higher the assigned write priority. Each group of diagnostic files corresponds to a unique and non-repeating write priority. Based on the n priority write values, the n write priorities corresponding to the n groups of diagnostic files can be determined.

[0045] S304: Determine the target write sequence based on the n write priorities.

[0046] In this embodiment, the write priority of each of the n groups of diagnostic files is used as the sorting basis. All diagnostic files are arranged in descending order of write priority. The fixed arrangement order of the sorted diagnostic files is used as the target write sequence. The target write sequence clearly defines the order in which all diagnostic files are transferred and stored to the second storage device. Diagnostic files with higher write priority will be arranged at the beginning of the sequence and can be stored in the second storage device earlier, so that the diagnostic application software can retrieve the corresponding diagnostic parameters in advance to carry out vehicle fault diagnosis.

[0047] As can be seen, by determining the priority writing value of each diagnostic file through the characteristic parameters of the historical call frequency and risk level value corresponding to the diagnostic file, and then determining the writing priority based on the priority writing value, and finally determining the writing sequence based on the writing priority, the diagnostic files corresponding to vehicles with high frequency of repair and higher diagnostic risk can be placed at the front of the writing sequence and stored in the second storage device first. The diagnostic application software does not need to wait for all files to be synchronized to call the core vehicle diagnostic parameters in advance to carry out repairs, which greatly shortens the pre-determination waiting time for vehicle fault diagnosis and reduces the safety hazards caused by operators blindly testing due to the lack of corresponding files. Thus, it can effectively improve the efficiency of diagnostic file synchronization and vehicle fault diagnosis after the diagnostic application software starts.

[0048] Please see Figure 4 , Figure 4 This application provides a flowchart for determining the priority write value corresponding to the first group of diagnostic files, including but not limited to the following steps: S401: Determine the first historical call frequency and the first risk level value corresponding to the first set of diagnostic files based on the n sets of feature parameters.

[0049] In this embodiment, the first set of diagnostic files is any one of the n sets of diagnostic files.

[0050] Since the first set of diagnostic files is any one of the n sets of diagnostic files, the method for determining the n priority write level values ​​corresponding to the n sets of diagnostic files is the same as the method for determining the priority write level values ​​corresponding to the first set of diagnostic files. Therefore, the n priority write level values ​​corresponding to the n sets of diagnostic files can be determined according to the method for determining the priority write level values ​​corresponding to the first set of diagnostic files.

[0051] In this embodiment, the priority writing value of the diagnostic file is mainly determined by two parameters: the historical call frequency and the risk level value corresponding to the diagnostic file. Therefore, the first historical call frequency and the first risk level value corresponding to the first group of diagnostic files are determined first.

[0052] S402: Determine the first priority write level value corresponding to the first historical call frequency and the second priority write level value corresponding to the first risk level value.

[0053] In this embodiment, it can be a first mapping relationship between a preset historical call frequency and a priority write value. Based on this first mapping relationship, the first priority write value corresponding to the first historical call frequency can be determined.

[0054] It can be a second mapping relationship between a preset risk level value and a priority write level value, and based on this second mapping relationship, the second priority write level value corresponding to the first risk level value can be determined.

[0055] S403: Determine the priority write level value corresponding to the first group of diagnostic files based on the first priority write level value and the second priority write level value.

[0056] In this embodiment, a first weight corresponding to the first priority write level value and a second weight corresponding to the second priority write level value can be determined first. Then, a reference priority write level value can be determined based on the first weight, the second weight, the first priority write level value, and the second priority write level value. Next, the file data volume corresponding to the first group of diagnostic files can be obtained, and then an optimization factor corresponding to the file data volume can be determined. Finally, the reference priority write level value can be optimized based on the optimization factor to obtain the priority write level value corresponding to the first group of diagnostic files.

[0057] For example, a first weight corresponding to the first priority write level value and a second weight corresponding to the second priority write level value are determined. Specifically, the sum of the first weight and the second weight is 1. The first weight corresponding to the historical call frequency and the second weight corresponding to the risk level value can be pre-configured or dynamically adjusted according to the actual business needs of the maintenance scenario. When focusing on the efficiency of daily high-frequency maintenance, the first weight can be increased and the second weight can be decreased accordingly. When dealing with more vehicles with complex electronic control configurations and high diagnostic operation risks, the second weight can be increased and the first weight can be decreased accordingly. Alternatively, a fixed ratio of the first weight and the second weight can be preset to adapt to general maintenance scenarios.

[0058] For example, a reference priority write value is determined based on the first weight, the second weight, the first priority write value, and the second priority write value. Specifically, the reference priority write value can be calculated as follows: Reference write priority value = first write priority value × first weight + second write priority value × second weight; The reference priority write value can be determined based on the first weight, the second weight, the first priority write value, and the second priority write value in the above manner.

[0059] For example, the file data volume corresponding to the first group of diagnostic files is obtained. Specifically, the file data volume corresponding to the first group of diagnostic files will affect the final priority write value of the group of diagnostic files. The larger the file data volume, the longer the time consumed in transferring and storing it to the second storage device. If the same basic reference priority write value is used as the small-volume diagnostic file under the same conditions, there will be high-demand vehicle models but the file volume is too large and the writing time is long, which will slow down the speed at which the diagnostic application software obtains key diagnostic parameters. Therefore, the file data volume is introduced to correct the priority write value. The larger the file data volume, the lower the final priority write value of the group of diagnostic files can be, and the smaller the file data volume, the higher the final priority write value of the group of diagnostic files can be. Therefore, it is necessary to obtain the file data volume corresponding to the first group of diagnostic files first.

[0060] For example, an optimization factor corresponding to the file data volume is determined. Specifically, it can be a preset mapping relationship between the file data volume and the optimization factor. Based on this mapping relationship, the optimization factor corresponding to the file data volume can be determined.

[0061] For example, the reference priority write value is optimized based on the optimization factor to obtain the priority write value corresponding to the first group of diagnostic files. Specifically, the priority write value corresponding to the first group of diagnostic files can be calculated as follows: The priority write value corresponding to the first group of diagnostic files = reference priority write value × (1 + optimization factor). The reference priority write level value can be optimized based on the optimization factor in the above manner to obtain the priority write level value corresponding to the first group of diagnostic files.

[0062] As can be seen, determining the priority writing value based on the historical call frequency and risk level value corresponding to each group of diagnostic files can not only give higher priority to vehicle files that are frequently used and have a large daily maintenance volume, but also improve the priority of vehicle files that are complex in electronic control and prone to safety issues in diagnosis. This can maximize the alignment with real vehicle repair needs, speed up the acquisition of key vehicle diagnostic parameters by diagnostic application software, and improve the vehicle diagnosis rate.

[0063] Before obtaining the feature parameters corresponding to each of the n sets of diagnostic files, it is also necessary to determine the risk level value corresponding to each of the n sets of diagnostic files. Since the first set of diagnostic files is any one of the n sets of diagnostic files, the method for determining the first risk level value corresponding to the first set of diagnostic files is the same as the method for determining the risk level value corresponding to each of the n sets of diagnostic files. This embodiment mainly explains the method for determining the first risk level value corresponding to the first set of diagnostic files. Please refer to [link to documentation]. Figure 5 , Figure 5 This application provides a flowchart for determining a first risk level value corresponding to a first group of diagnostic documents, including but not limited to the following steps: S501: Determine the first vehicle model corresponding to the first set of diagnostic files.

[0064] In this embodiment, the vehicle types mainly include gasoline passenger cars, new energy passenger cars, commercial trucks, light buses, and special engineering vehicles. The diagnostic files for different vehicle types are significantly different. Gasoline passenger cars include family sedans, SUVs, and multi-purpose vehicles. Their diagnostic files mainly store common fault codes, data streams, and matching calibration parameters for the engine, transmission, and anti-lock braking system. New energy passenger cars include pure electric sedans and plug-in hybrid SUVs. Their diagnostic files focus on adding judgment parameters related to the battery management system, motor controller, and high-voltage safety detection. The fault detection logic is more biased towards high-voltage circuit safety protection. Commercial trucks and light buses include light trucks, medium and heavy-duty trucks, and passenger buses. Their diagnostic files are additionally equipped with special maintenance data for exhaust gas treatment devices, load sensors, and the vehicle's air pressure braking system. Special engineering vehicles include special equipment such as excavators and sanitation vehicles. Their diagnostic files include dedicated calibration programs for hydraulic control systems and operating mechanism sensors.

[0065] Each vehicle type corresponds to a unique set of diagnostic files. The fault judgment standards, testing procedures, and matching parameters within these files are all compiled separately according to the vehicle's electronic control structure. Diagnostic files for different vehicle types are not interchangeable, ensuring that the repair parameters for each vehicle type are not confused. When repair personnel retrieve the corresponding vehicle type file, they will only load the fault judgment standards and testing procedures that are compatible with the electronic control structure of that vehicle type, thus avoiding problems such as parameter confusion and inaccurate test judgments.

[0066] S502: Obtain the number of core electronic control units and the safety configuration level corresponding to the first vehicle model.

[0067] In this embodiment, the number of core electronic control units corresponding to the first vehicle model refers to the total number of electronic control components responsible for core functions such as power, braking, and body control in the first vehicle model. Small family fuel vehicles have fewer electronic control units, which are mostly concentrated in the engine, transmission, and body control modules. New energy vehicles will have additional battery, motor, and high-voltage management electronic control units, significantly increasing the number. Commercial vehicles will also have additional exhaust gas treatment and load control electronic control components. The more electronic control units there are, the more core electronic control units need to be read and matched during vehicle fault diagnosis, making the detection steps more complicated and increasing the probability of misjudgment and operational errors, resulting in a higher risk level.

[0068] The safety configuration level of the first model is divided according to the completeness of the active and passive safety devices equipped in the vehicle. The basic level is only equipped with seat belts and basic braking protection. The medium level adds vehicle stability and tire pressure monitoring devices. The high-level model is equipped with a full set of safety components such as active braking, lane keeping, and high-voltage safety protection. The higher the safety configuration level, the more closely the vehicle fault diagnosis operation is related to driving safety, and the greater the corresponding risk level value.

[0069] S503: Determine the first reference risk level value corresponding to the number of core electronic control units and the second reference risk level value corresponding to the security configuration level.

[0070] It can be a third mapping relationship between the preset number of core electronic control units and the reference risk level value. Based on this third mapping relationship, the first reference risk level value corresponding to the number of core electronic control units can be determined.

[0071] It can be a fourth mapping relationship between a preset security configuration level and a reference risk level value. Based on this fourth mapping relationship, a second reference risk level value corresponding to the security configuration level can be determined.

[0072] It should be explained that, in this embodiment, the safety configuration level can be divided into three levels according to the completeness of the passive safety devices, active safety devices and high-voltage safety protection devices installed on the vehicle. These are the basic safety configuration level, the standard safety configuration level and the advanced safety configuration level. Different safety configurations can be assigned different reference risk level values.

[0073] The basic safety configuration level is the lowest level. The vehicle is only equipped with basic passive safety devices and no active safety intervention devices. New energy vehicles also lack independent high-voltage safety monitoring and protection components. Passive safety devices only include seat belts and driver's side airbags, lacking auxiliary protective components such as side airbags and head curtain airbags. The vehicle does not have an electronically controlled safety system that can actively intervene in the driving state, and it lacks functions such as brake assist, vehicle stability, and tire pressure monitoring. If it is a fuel vehicle, it lacks an electronic module for linked safety control. If it is a new energy vehicle, it only has basic high-voltage power failure protection and lacks real-time insulation detection and high-voltage interlock warning devices. When diagnosing faults in this type of vehicle, incorrect adjustment parameters will only slightly affect the ride comfort and will almost never cause major safety accidents such as brake failure or high-voltage leakage. The lowest risk level value is assigned accordingly.

[0074] The standard safety configuration level expands upon basic passive safety devices and also includes conventional active safety devices. New energy vehicles are equipped with basic high-voltage monitoring components. Passive safety devices include multi-position airbags throughout the vehicle and front and rear seat belt pretensioners. Active safety devices include a brake assist system, a vehicle stability control system, and a real-time tire pressure monitoring system. These systems can automatically intervene and correct when the vehicle experiences slippage or abnormal tire pressure. New energy models are additionally equipped with a simple high-voltage insulation test and a charging interlock protection module, which can identify basic high-voltage anomalies in real time. When repairing vehicles of this level, if the diagnostic parameters are mismatched, moderate risks such as decreased vehicle braking performance, reduced vehicle stability, and minor leakage in high-voltage lines may occur. These risks will not directly lead to major safety accidents, hence the intermediate risk level is assigned.

[0075] Advanced safety configurations cover a full suite of passive safety features, comprehensive advanced active safety features, and complete high-voltage safety protection devices. These are primarily used in high-end passenger vehicles and new energy vehicles. Passive safety features include multiple airbags, side curtain airbags, collision pretensioning seat belts, and collision active fuel cut-off devices. Advanced active safety features include intelligent intervention systems such as active braking, lane departure warning, lane centering assist, and blind spot monitoring. Numerous safety-related electronic control units work in tandem throughout the vehicle. New energy vehicles are equipped with a full suite of high-voltage protection modules, including all-weather high-precision high-voltage insulation monitoring, multiple interlocks in the high-voltage circuit, active power-off in case of high-voltage faults, and battery thermal runaway warning. The safety electronic control system of these vehicles is complex. If there are deviations in parameter calibration or module matching during the diagnostic process, it can easily lead to serious safety accidents such as active braking failure, lane assist failure, high-voltage leakage and fire, and battery overheating. The repair risk is the highest, therefore, the highest risk level value is matched.

[0076] S504: Determine the first risk level value corresponding to the first group of diagnostic documents based on the first reference risk level value and the second reference risk level value.

[0077] In this embodiment, the third weight corresponding to the first reference risk level value and the fourth weight corresponding to the second reference risk level value can be determined first, wherein the sum of the third weight and the fourth weight is 1. The third weight corresponding to the first reference risk level value and the fourth weight corresponding to the second reference risk level value can be determined according to the business composition and repair focus of the vehicle models that the automotive diagnostic equipment usually undertakes. If the daily repairs are mostly for ordinary family cars with basic safety configurations, the third weight representing the safety configuration level dimension can be increased and the fourth weight representing the number of electronic control units can be decreased. If the main repairs are for new energy vehicles, heavy commercial vehicles, and other vehicles with high electronic control units, and the vehicle faults are mostly caused by abnormal linkage of various electronic control units, then the fourth weight corresponding to the number of electronic control units can be increased and the third weight can be decreased. The third and fourth weights can also be dynamically adjusted according to the repair specifications and the statistical data of past accidents involving vehicle faults, so as to adapt to vehicle fault repair in different scenarios.

[0078] After determining the third weight corresponding to the first reference risk level value and the fourth weight corresponding to the second reference risk level value, the first risk level value corresponding to the first group of diagnostic documents can be determined based on the third weight, the fourth weight, the first reference risk level value, and the second reference risk level value.

[0079] Specifically, the first risk level value corresponding to the first group of diagnostic documents can be calculated as follows: The first risk level value corresponding to the first group of diagnostic documents = first reference risk level value × third weight + second reference risk level value × fourth weight; The first risk level value corresponding to the first group of diagnostic documents can be determined based on the third weight, the fourth weight, the first reference risk level value, and the second reference risk level value in the manner described above.

[0080] It can be seen that the number of core electronic control units corresponding to a vehicle model reflects the complexity of the vehicle's electronic control system. The more electronic control components there are, the longer the operation process required for fault diagnosis, and the higher the risk level value corresponding to that vehicle model. The safety configuration level corresponding to a vehicle model reflects the degree of safety hazards in vehicle fault diagnosis. The higher the safety configuration level, the greater the possibility of danger caused by maintenance operation errors, and the higher the risk level value corresponding to that vehicle model. First, identify the vehicle model corresponding to each diagnostic document, then retrieve the number of electronic control units and the safety configuration level of that vehicle, calculate the corresponding reference risk scores separately, and finally combine the reference risk scores to obtain a complete risk level value. This approach can simultaneously assess risk from both the complexity of the vehicle's electronic control system and the safety hazards of maintenance. It allows for the priority storage of documents for difficult-to-repair, high-risk vehicle models, enabling more timely retrieval during repairs and reducing safety issues caused by maintenance errors.

[0081] Please see Figure 6 , Figure 6 This application provides a flowchart for diagnosing a target vehicle, including but not limited to the following steps: S601: Determine n diagnostic file indices based on the n sets of diagnostic files and the n vehicle models corresponding to the n sets of diagnostic files.

[0082] In this embodiment, each diagnostic file index corresponds to a set of diagnostic files and a vehicle model.

[0083] After writing the n sets of diagnostic files sequentially into the second storage device based on the target writing sequence, when it is necessary to diagnose the target vehicle, firstly, n diagnostic file indexes are determined based on the n sets of diagnostic files and the n vehicle models corresponding to the n sets of diagnostic files. Specifically, each set of diagnostic files is bound and paired with its matching vehicle model one by one, using the vehicle model identifier as the search keyword, and binding the storage path, file number, and other information of the corresponding diagnostic file. Each pairing information is organized separately to generate an independent record. After all pairings are completed, they are summarized to form multiple records, each of which is a diagnostic file index, and finally, n diagnostic file indexes are obtained, which are consistent with the number of diagnostic files.

[0084] S602: In response to a diagnostic operation for the target vehicle, determine the target vehicle model corresponding to the target vehicle.

[0085] In this embodiment, when the vehicle diagnostic equipment receives a vehicle diagnostic operation command initiated by the maintenance personnel, it can read the vehicle identification code uploaded by the on-board electronic control system of the target vehicle, match the vehicle identification code with the model information stored in the database, and quickly locate the vehicle to be inspected, which is the target model corresponding to the target vehicle.

[0086] S603: Determine the target diagnostic file corresponding to the target vehicle model based on the n diagnostic file indices.

[0087] In this embodiment, the determined target vehicle model can be used as the search keyword. All n diagnostic file indexes are traversed, the vehicle model information bound in each index is compared, the index with the vehicle model identifier that is completely matched is selected, and the corresponding target diagnostic file stored in the second storage device is quickly located and retrieved through the storage location information recorded in the index.

[0088] S604: Perform diagnostic operations on the target vehicle based on the target diagnostic file to obtain the target diagnostic result.

[0089] In this embodiment, after retrieving the matched target diagnostic file, the automotive diagnostic equipment can establish communication and interaction with the on-board electronic control unit of the target vehicle based on the fault codes, data stream reading rules, electronic control calibration parameters and testing procedures stored in the target diagnostic file. It can collect various operating data of the target vehicle in real time and perform verification and comparison with the standard thresholds and fault judgment logic in the file. It can automatically identify the abnormal fault locations, fault types and fault causes of the vehicle. Then, by integrating all the test information, a complete target diagnostic result can be obtained.

[0090] It should be explained that, in this embodiment, the automotive diagnostic equipment has a display screen. The display screen can intuitively display the relevant content of the diagnostic results in sections. Specifically, the upper area of ​​the display screen can display the basic vehicle model information and the test time, the middle area can list the identified fault codes, the location of the fault, and the cause of the fault one by one, along with the comparison curve of normal data stream and abnormal data, and the lower area can provide corresponding repair and handling suggestions. If there is a high safety risk fault, it will be marked in a conspicuous red font to remind the operator. The entire content is clearly and easily understood, making it convenient for the operator to quickly read the fault information and carry out repair work.

[0091] As can be seen, after all diagnostic files are stored in the second storage device according to the target writing sequence, each group of diagnostic files is pre-bound to the corresponding vehicle model to generate an independent index. When repairing a vehicle, the target vehicle model is first identified, and then the corresponding target diagnostic file is quickly retrieved and matched through the index. The vehicle diagnosis is completed and the diagnostic results are output based on the exclusive diagnostic parameters and testing procedures in the diagnostic file. This not only significantly shortens the file retrieval time and improves the vehicle diagnostic startup speed, but also accurately retrieves the repair parameters that are compatible with the target vehicle model, avoiding the use of diagnostic files from other models that may cause deviations in the diagnostic operation, and ensuring the accuracy of the vehicle diagnostic results.

[0092] In summary, implementing the embodiments of the present invention has the following beneficial effects: As can be seen, the diagnostic file writing method described in this embodiment of the invention is applied to an automotive diagnostic device. The automotive diagnostic device includes a first storage device and a second storage device. The first storage device is the diagnostic file storage area of ​​the automotive diagnostic device, and the second storage device is the diagnostic file storage area of ​​the diagnostic application software. First, in response to the start command for the diagnostic application software, it is determined whether the number of diagnostic files in the second storage device is less than the number of diagnostic files in the first storage device. If so, n sets of diagnostic files stored in the first storage device are read. Then, the target writing sequence corresponding to the n sets of diagnostic files is determined, and the n sets of diagnostic files are sequentially written into the second storage device based on the target writing sequence, thereby effectively improving the efficiency of writing vehicle diagnostic files into the diagnostic application software storage area.

[0093] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a diagnostic file writing device provided in an embodiment of this application. The diagnostic file writing device 700 is applied to an automotive diagnostic device. The automotive diagnostic device includes a first storage device and a second storage device. The first storage device is the diagnostic file storage area of ​​the automotive diagnostic device, and the second storage device is the diagnostic file storage area of ​​the diagnostic application software. The diagnostic file writing device 700 includes: a judgment unit 701 and a processing unit 702. The judgment unit 701 is used to determine, in response to a startup command for the diagnostic application software, whether the number of diagnostic files in the second storage device is less than the number of diagnostic files in the first storage device. The processing unit 702 is used to read n sets of diagnostic files stored in the first storage device if the condition is met; n is a positive integer, each set of diagnostic files corresponds to a vehicle model, and each set of diagnostic files includes the fault diagnosis parameters of the corresponding vehicle model. Determine the target write sequence corresponding to the n groups of diagnostic files; The n sets of diagnostic files are sequentially written into the second storage device based on the target write sequence.

[0094] In some possible implementations, the processing unit 702 is specifically configured to: determine the target write sequence corresponding to the n sets of diagnostic files. Obtain the feature parameters corresponding to each of the n sets of diagnostic files to obtain n sets of feature parameters; the feature parameters include historical call frequency and risk level value, the risk level value is used to characterize the risk level of the vehicle corresponding to the diagnostic file when performing fault diagnosis; Based on the n sets of feature parameters, n priority write values ​​are determined for the n sets of diagnostic files; each diagnostic file corresponds to a priority write value, which is used to characterize the priority write degree of the diagnostic file. Based on the n priority write values, n write priorities are determined for the n groups of diagnostic files; each diagnostic file corresponds to one write priority. The target write sequence is determined based on the n write priorities.

[0095] In some possible implementations, in determining the n priority write values ​​corresponding to the n sets of diagnostic files based on the n sets of feature parameters, the processing unit 702 is specifically used for: Based on the n sets of feature parameters, the first historical call frequency and the first risk level value corresponding to the first set of diagnostic files are determined; the first set of diagnostic files is any one of the n sets of diagnostic files. Determine the first priority write level value corresponding to the first historical call frequency and the second priority write level value corresponding to the first risk level value; The priority write level value corresponding to the first group of diagnostic files is determined based on the first priority write level value and the second priority write level value.

[0096] In some possible implementations, in determining the priority write level value corresponding to the first group of diagnostic files based on the first priority write level value and the second priority write level value, the processing unit 702 is specifically used for: Determine a first weight corresponding to the first priority write level value and a second weight corresponding to the second priority write level value; the sum of the first weight and the second weight is 1; A reference priority write value is determined based on the first weight, the second weight, the first priority write value, and the second priority write value; Obtain the file data volume corresponding to the first group of diagnostic files; Determine the optimization factor corresponding to the file data volume; The reference priority write value is optimized based on the optimization factor to obtain the priority write value corresponding to the first group of diagnostic files.

[0097] In some possible implementations, before obtaining the feature parameters corresponding to each of the n sets of diagnostic files and thus obtaining the n sets of feature parameters, the processing unit 702 is specifically used for: Determine the first vehicle model corresponding to the first set of diagnostic files; Obtain the number of core electronic control units and the safety configuration level corresponding to the first vehicle model; Determine the first reference risk level value corresponding to the number of core electronic control units and the second reference risk level value corresponding to the security configuration level; The first risk level value corresponding to the first group of diagnostic documents is determined based on the first reference risk level value and the second reference risk level value.

[0098] In some possible implementations, after the n sets of diagnostic files are sequentially written into the second storage device based on the target write sequence, the processing unit 702 is specifically used for: Based on the n sets of diagnostic files and the n vehicle models corresponding to the n sets of diagnostic files, n diagnostic file indices are determined; each diagnostic file index corresponds to a set of diagnostic files and a vehicle model. In response to a diagnostic operation targeting a target vehicle, the target vehicle model corresponding to the target vehicle is determined; Based on the n diagnostic file indexes, determine the target diagnostic file corresponding to the target vehicle model; Based on the target diagnostic file, a diagnostic operation is performed on the target vehicle to obtain the target diagnostic result.

[0099] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 800 is applied to an automotive diagnostic device, which includes a first storage device and a second storage device. The first storage device is a diagnostic file storage area for the automotive diagnostic device, and the second storage device is a diagnostic file storage area for diagnostic application software. Figure 8 As shown, the electronic device 800 includes a transceiver 801, a processor 802, and a memory 803. These are connected via a bus 804. The memory 803 stores computer programs and data, and the transceiver 801 can transmit data stored in the memory 803 to the processor 802. The program includes instructions for performing the following steps: In response to a startup command for the diagnostic application software, it is determined whether the number of diagnostic files in the second storage device is less than the number of diagnostic files in the first storage device; If so, then read the n sets of diagnostic files stored in the first storage device; n is a positive integer, each set of diagnostic files corresponds to a vehicle model, and each set of diagnostic files includes the fault diagnosis parameters of the corresponding vehicle model. Determine the target write sequence corresponding to the n groups of diagnostic files; The n sets of diagnostic files are sequentially written into the second storage device based on the target write sequence.

[0100] In some possible implementations, the above procedure includes instructions for performing the following steps in determining the target write sequence corresponding to the n sets of diagnostic files: Obtain the feature parameters corresponding to each of the n sets of diagnostic files to obtain n sets of feature parameters; the feature parameters include historical call frequency and risk level value, the risk level value is used to characterize the risk level of the vehicle corresponding to the diagnostic file when performing fault diagnosis; Based on the n sets of feature parameters, n priority write values ​​are determined for the n sets of diagnostic files; each diagnostic file corresponds to a priority write value, which is used to characterize the priority write degree of the diagnostic file. Based on the n priority write values, n write priorities are determined for the n groups of diagnostic files; each diagnostic file corresponds to one write priority. The target write sequence is determined based on the n write priorities.

[0101] In some possible implementations, the above procedure includes instructions for performing the following steps in determining the n priority write values ​​corresponding to the n sets of diagnostic files based on the n sets of feature parameters: Based on the n sets of feature parameters, the first historical call frequency and the first risk level value corresponding to the first set of diagnostic files are determined; the first set of diagnostic files is any one of the n sets of diagnostic files. Determine the first priority write level value corresponding to the first historical call frequency and the second priority write level value corresponding to the first risk level value; The priority write level value corresponding to the first group of diagnostic files is determined based on the first priority write level value and the second priority write level value.

[0102] In some possible implementations, the above procedure includes instructions for performing the following steps in determining the priority write level value corresponding to the first set of diagnostic files based on the first priority write level value and the second priority write level value: Determine a first weight corresponding to the first priority write level value and a second weight corresponding to the second priority write level value; the sum of the first weight and the second weight is 1; A reference priority write value is determined based on the first weight, the second weight, the first priority write value, and the second priority write value; Obtain the file data volume corresponding to the first group of diagnostic files; Determine the optimization factor corresponding to the file data volume; The reference priority write value is optimized based on the optimization factor to obtain the priority write value corresponding to the first group of diagnostic files.

[0103] In some possible implementations, before obtaining the feature parameters corresponding to each of the n sets of diagnostic files and thus obtaining the n sets of feature parameters, the above procedure includes instructions for performing the following steps: Determine the first vehicle model corresponding to the first set of diagnostic files; Obtain the number of core electronic control units and the safety configuration level corresponding to the first vehicle model; Determine the first reference risk level value corresponding to the number of core electronic control units and the second reference risk level value corresponding to the security configuration level; The first risk level value corresponding to the first group of diagnostic documents is determined based on the first reference risk level value and the second reference risk level value.

[0104] In some possible implementations, after the n sets of diagnostic files are sequentially written into the second storage device based on the target write sequence, the above procedure includes instructions for performing the following steps: Based on the n sets of diagnostic files and the n vehicle models corresponding to the n sets of diagnostic files, n diagnostic file indices are determined; each diagnostic file index corresponds to a set of diagnostic files and a vehicle model. In response to a diagnostic operation targeting a target vehicle, the target vehicle model corresponding to the target vehicle is determined; Based on the n diagnostic file indexes, determine the target diagnostic file corresponding to the target vehicle model; Based on the target diagnostic file, a diagnostic operation is performed on the target vehicle to obtain the target diagnostic result.

[0105] It should be understood that the electronic devices mentioned in this application may include smartphones (such as Android phones, iOS phones, Windows Phones, etc.), tablets, PDAs, laptops, mobile internet devices (MIDs) or wearable devices, servers, edge computing nodes, etc. The above-mentioned electronic devices are merely examples and not exhaustive, and include, but are not limited to, the electronic devices described above.

[0106] This application also provides a computer-readable storage medium storing a computer program that is executed by a processor to implement some or all of the steps of any of the methods described in the above method embodiments.

[0107] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments.

[0108] It should be noted that, for the sake of simplicity, the aforementioned methods are described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are optional, and the actions and modules involved are not necessarily essential to this application.

[0109] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0110] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.

[0111] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0112] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software program module.

[0113] If the integrated unit is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0114] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage device, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0115] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The above description of the embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for writing diagnostic files, characterized in that, The method is applied to automotive diagnostic equipment, which includes a first storage device and a second storage device. The first storage device is a diagnostic file storage area for the automotive diagnostic equipment, and the second storage device is a diagnostic file storage area for diagnostic application software. In response to a startup command for the diagnostic application software, it is determined whether the number of diagnostic files in the second storage device is less than the number of diagnostic files in the first storage device; If so, then read the n sets of diagnostic files stored in the first storage device; n is a positive integer, each set of diagnostic files corresponds to a vehicle model, and each set of diagnostic files includes the fault diagnosis parameters of the corresponding vehicle model. Determine the target write sequence corresponding to the n groups of diagnostic files; The n sets of diagnostic files are sequentially written into the second storage device based on the target write sequence.

2. The method as described in claim 1, characterized in that, Determining the target write sequence corresponding to the n groups of diagnostic files includes: Obtain the feature parameters corresponding to each of the n sets of diagnostic files to obtain n sets of feature parameters; the feature parameters include historical call frequency and risk level value, the risk level value is used to characterize the risk level of the vehicle corresponding to the diagnostic file when performing fault diagnosis; Based on the n sets of feature parameters, n priority write values ​​are determined for the n sets of diagnostic files; each diagnostic file corresponds to a priority write value, which is used to characterize the priority write degree of the diagnostic file. Based on the n priority write values, n write priorities are determined for the n groups of diagnostic files; each diagnostic file corresponds to one write priority. The target write sequence is determined based on the n write priorities.

3. The method as described in claim 2, characterized in that, The process of determining the n priority write values ​​corresponding to the n sets of diagnostic files based on the n sets of feature parameters includes: Based on the n sets of feature parameters, the first historical call frequency and the first risk level value corresponding to the first set of diagnostic files are determined; the first set of diagnostic files is any one of the n sets of diagnostic files. Determine the first priority write level value corresponding to the first historical call frequency and the second priority write level value corresponding to the first risk level value; The priority write level value corresponding to the first group of diagnostic files is determined based on the first priority write level value and the second priority write level value.

4. The method as described in claim 3, characterized in that, The step of determining the priority write value corresponding to the first group of diagnostic files based on the first priority write value and the second priority write value includes: Determine a first weight corresponding to the first priority write level value and a second weight corresponding to the second priority write level value; the sum of the first weight and the second weight is 1; A reference priority write value is determined based on the first weight, the second weight, the first priority write value, and the second priority write value; Obtain the file data volume corresponding to the first group of diagnostic files; Determine the optimization factor corresponding to the file data volume; The reference priority write value is optimized based on the optimization factor to obtain the priority write value corresponding to the first group of diagnostic files.

5. The method as described in claim 4, characterized in that, Before obtaining the feature parameters corresponding to each of the n sets of diagnostic files and thus obtaining the n sets of feature parameters, the method further includes: Determine the first vehicle model corresponding to the first set of diagnostic files; Obtain the number of core electronic control units and the safety configuration level corresponding to the first vehicle model; Determine the first reference risk level value corresponding to the number of core electronic control units and the second reference risk level value corresponding to the security configuration level; The first risk level value corresponding to the first group of diagnostic documents is determined based on the first reference risk level value and the second reference risk level value.

6. The method according to any one of claims 1-5, characterized in that, After writing the n sets of diagnostic files sequentially into the second storage device based on the target write sequence, the method further includes: Based on the n sets of diagnostic files and the n vehicle models corresponding to the n sets of diagnostic files, n diagnostic file indices are determined; each diagnostic file index corresponds to a set of diagnostic files and a vehicle model. In response to a diagnostic operation targeting a target vehicle, the target vehicle model corresponding to the target vehicle is determined; Based on the n diagnostic file indexes, determine the target diagnostic file corresponding to the target vehicle model; Based on the target diagnostic file, a diagnostic operation is performed on the target vehicle to obtain the target diagnostic result.

7. A diagnostic file writing device, characterized in that, The device is applied to automotive diagnostic equipment, which includes a first storage device and a second storage device. The first storage device is a diagnostic file storage area for the automotive diagnostic equipment, and the second storage device is a diagnostic file storage area for diagnostic application software. The diagnostic file writing device includes a judgment unit and a processing unit. The judgment unit is used to determine, in response to a startup command for the diagnostic application software, whether the number of diagnostic files in the second storage device is less than the number of diagnostic files in the first storage device. The processing unit is configured to read n sets of diagnostic files stored in the first storage device if the condition is met; n is a positive integer, each set of diagnostic files corresponds to a vehicle model, and each set of diagnostic files includes fault diagnosis parameters for the corresponding vehicle model. Determine the target write sequence corresponding to the n groups of diagnostic files; The n sets of diagnostic files are sequentially written into the second storage device based on the target write sequence.

8. An electronic device, characterized in that, The method includes a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the one or more programs include instructions for performing the steps of the method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is executed by a processor to implement the method as described in any one of claims 1-6.

10. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the method as described in any one of claims 1-6.