Diagnosis log assembling method, device and equipment and medium

By adopting a two-level storage area recycling strategy in automotive diagnostic systems, the memory waste and bandwidth burden problems during diagnostic log storage and uploading are solved, and data collection and analysis efficiency is improved.

CN119987673AActive Publication Date: 2025-05-13LAUNCH TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510109504.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-05-13
Estimated Expiration
2045-01-22

AI Technical Summary

Technical Problem

The prior art causes waste of computer memory and excessive bandwidth when storing and uploading automotive ECU diagnostic logs, which affects the diagnostic process and data collection efficiency.

Method used

A two-level storage area (first storage area and second storage area) is adopted to recycle the log data until a diagnostic interrupt condition is triggered, and data sorting and uploading is performed through the third storage area.

Benefits of technology

It effectively reduces the storage of diagnostic data, avoids excessive consumption of computer memory and server bandwidth, and improves the efficiency of collection and analysis of diagnostic logs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119987673A_ABST
    Figure CN119987673A_ABST
Patent Text Reader

Abstract

The invention discloses a diagnosis log assembling method and device, equipment and a medium, and relates to the technical field of computers, and the method comprises the steps: diagnosing a to-be-diagnosed electronic control unit, and storing generated diagnosis data to a first storage region; if the diagnosis interruption condition is not triggered until the first storage area is filled up, storing subsequently generated diagnosis data to a second storage area; if the diagnosis interruption condition is still not triggered until the second storage area is full, the first storage area is cleared, the diagnosis data in the second storage area is transferred to the first storage area, and the second storage area is cleared; skipping to the step of storing the diagnosis data in the second storage area until the diagnosis interruption condition is triggered; and transferring the latest diagnosis data with the target size in the first storage area and the second storage area to a third storage area, and uploading the diagnosis data in the third storage area to a server as a diagnosis log. Diagnostic logs can be stored to improve storage efficiency and reduce bandwidth burden.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a diagnostic log assembly method, device, equipment and medium. Background Art

[0002] At present, with the continuous development of automotive electronics, the number of ECUs (Electronic Control Units) installed in automobiles is increasing and becoming more and more complex, which also brings great challenges to troubleshooting. Diagnostic software usually records the diagnostic data generated during the diagnostic process to form a log, and technicians use the log to locate the problem after the problem occurs. There are currently two common ways to record diagnostic communication logs: 1. Record the communication logs of each diagnostic process, and upload the logs generated by the diagnosis to the server when problems occur. The technicians retrieve the logs through the background to analyze the problems; 2. Set the log recording switch, and do not record logs during normal diagnosis. When problems occur, the user turns on the log switch, executes the diagnostic function again to reproduce the problem, and sends the reproduced logs to the technicians for analysis; Both of the above methods have their disadvantages: 1. Recording a log each time will waste a lot of computer memory, especially when executing ECU flashing, which has high timing requirements. Recording diagnostic data logs may not only affect the normal flashing process and cause the flashing to fail, but the huge amount of data will also cause a serious burden on the computer and server bandwidth; 2. Setting the log switch cannot collect first-hand diagnostic data in a timely manner. It often requires a second or Nth reproduction to record successfully. It is not smart enough, which affects the collection of communication logs and the troubleshooting of problems.

[0003] In summary, how to store diagnostic logs to improve storage efficiency and reduce bandwidth burden is a problem that needs to be solved at present. Summary of the invention

[0004] In view of this, the object of the present invention is to provide a diagnostic log assembly method, device, equipment and medium to store diagnostic logs to improve storage efficiency and reduce bandwidth burden. The specific scheme is as follows:

[0005] In a first aspect, the present application discloses a diagnostic log assembly method, which is applied to diagnostic software, comprising:

[0006] determining an electronic control unit to be diagnosed in the vehicle to be diagnosed based on the diagnostic test information, diagnosing the electronic control unit to be diagnosed and storing diagnostic data generated during the diagnosis process in a first storage area;

[0007] If the diagnostic interrupt condition is not triggered until the first storage area is filled, storing the diagnostic data generated in the subsequent diagnostic process in the second storage area;

[0008] If the diagnostic interrupt condition is not triggered until the second storage area is filled, clearing the first storage area, transferring the diagnostic data in the second storage area to the first storage area, and clearing the second storage area;

[0009] Jumping to the step of storing the diagnostic data generated in the subsequent diagnostic process in the second storage area, and stopping the diagnosis when the diagnostic interruption condition is triggered;

[0010] The latest diagnostic data of the target size in the first storage area and the second storage area is transferred to the third storage area, and the diagnostic data in the third storage area is uploaded to the server as a diagnostic log.

[0011] Optionally, the sizes of the first storage area and the second storage area are the target sizes.

[0012] Optionally, transferring the latest diagnostic data of the target size in the first storage area and the second storage area to the third storage area includes:

[0013] If the second storage area is empty, transferring the diagnostic data of the target size in the first storage area to the third storage area;

[0014] If the second storage area is not empty, determining a first current size of the diagnostic data in the second storage area, and determining a first temporary size of the diagnostic data in the first storage area in chronological order; the first temporary size is the difference between the target size and the first current size;

[0015] The determined diagnostic data of the first current size in the second storage area and the diagnostic data of the first temporary size in the first storage area are transferred to the third storage area.

[0016] Optionally, if the diagnostic interrupt condition is not triggered until the first storage area is filled, before storing the diagnostic data generated in the subsequent diagnostic process into the second storage area, the method further includes:

[0017] If the diagnosis interruption condition is triggered when the first storage area is not filled, the diagnosis process is interrupted, and the diagnosis data in the first storage area is transferred to the third storage area, and all the diagnosis data in the third storage area is uploaded to the server as a diagnosis log.

[0018] Optionally, if the diagnostic interrupt condition is not triggered until the second storage area is filled, before clearing the first storage area, the method further includes:

[0019] If the diagnostic interruption condition is triggered when the second storage area is not filled, the diagnostic process is interrupted, and the second current size of the diagnostic data in the second storage area is determined, and the diagnostic data of the second temporary size in the first storage area is determined in a time-based order; the second temporary size is the difference between the target size and the second current size;

[0020] The determined diagnostic data of the second current size in the second storage area and the diagnostic data of the second temporary size in the first storage area are transferred to the third storage area.

[0021] Optionally, the diagnostic log assembly method further includes:

[0022] storing the diagnostic test information in a fourth storage area;

[0023] Correspondingly, transferring the latest diagnostic data of the target size in the first storage area and the second storage area to the third storage area, and uploading the diagnostic data in the third storage area as a diagnostic log to the server includes:

[0024] The latest diagnostic data of the target size in the first storage area and the second storage area and the diagnostic test information in the fourth storage area are transferred to the third storage area, and the diagnostic data and the diagnostic test information in the third storage area are uploaded to the server as diagnostic logs.

[0025] Optionally, before diagnosing the electronic control unit to be diagnosed and storing the diagnostic data generated during the diagnosis process in the first storage area, the method further includes:

[0026] A preset maximum log storage size is obtained, and the first storage area, the second storage area, the third storage area and the fourth storage area are set based on the maximum log storage size; the maximum log storage size is the sum of the target size and the size of the fourth storage area.

[0027] In a second aspect, the present application discloses a diagnostic log assembly device, which is applied to diagnostic software, comprising:

[0028] A first storage module, configured to determine an electronic control unit to be diagnosed in a vehicle to be diagnosed based on the diagnostic test information, diagnose the electronic control unit to be diagnosed and store diagnostic data generated during the diagnostic process in a first storage area;

[0029] A second storage module, configured to store the diagnostic data generated in the subsequent diagnostic process into the second storage area if the diagnostic interrupt condition is not triggered until the first storage area is filled;

[0030] a third storage module, configured to clear the first storage area, transfer the diagnostic data in the second storage area to the first storage area, and clear the second storage area if the diagnostic interrupt condition is not triggered until the second storage area is filled;

[0031] A jump module, used for jumping to the step of storing the diagnostic data generated in the subsequent diagnostic process in the second storage area, and stopping the diagnosis when the diagnostic interruption condition is triggered;

[0032] The log uploading module is used to transfer the latest diagnostic data of the target size in the first storage area and the second storage area to the third storage area, and upload the diagnostic data in the third storage area to the server as a diagnostic log.

[0033] In a third aspect, the present application discloses an electronic device, comprising:

[0034] Memory, used to store computer programs;

[0035] The processor is used to execute the computer program to implement the diagnostic log assembly method disclosed above.

[0036] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed diagnostic log assembly method is implemented.

[0037] It can be seen that the present application determines the electronic control unit to be diagnosed in the vehicle to be diagnosed based on the diagnostic test information, diagnoses the electronic control unit to be diagnosed and stores the diagnostic data generated in the diagnostic process in the first storage area; if the diagnostic interruption condition is not triggered until the first storage area is filled, the diagnostic data generated in the subsequent diagnostic process is stored in the second storage area; if the diagnostic interruption condition is not triggered until the second storage area is filled, the first storage area is cleared, the diagnostic data in the second storage area is transferred to the first storage area, and the second storage area is cleared; jump to the step of storing the diagnostic data generated in the subsequent diagnostic process in the second storage area until the diagnostic interruption condition is triggered and stops the diagnosis; transfer the latest target size diagnostic data in the first storage area and the second storage area to the third storage area, and upload the diagnostic data in the third storage area as a diagnostic log to the server. It can be seen that the present application uses the first storage area and the second storage area to store diagnostic data, and because the use of the two areas can delete part of the diagnostic data, avoid too much diagnostic data, avoid affecting the normal flashing process and causing flashing failure, and avoid causing a serious burden on the computer and server bandwidth; in addition, there is no need for a second pass to collect diagnostic data, which reduces the waste of time and resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present invention 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, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0039] Figure 1 A flow chart of a diagnostic log assembly method disclosed in this application;

[0040] Figure 2 A schematic diagram of a diagnostic log assembly method disclosed in this application;

[0041] Figure 3 A schematic diagram of log size and diagnostic terminal condition settings disclosed in this application;

[0042] Figure 4 A schematic diagram of memory data disclosed in this application;

[0043] Figure 5 A schematic diagram of assembling a diagnostic log disclosed in this application;

[0044] Figure 6 This is a schematic diagram of another diagnostic log assembly method disclosed in this application;

[0045] Figure 7 This is another schematic diagram of the diagnostic log group leader process disclosed in this application;

[0046] Figure 8 This is a schematic diagram of the structure of a diagnostic log assembly device disclosed in this application;

[0047] Fig. 9 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

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

[0049] At present, with the continuous development of automotive electronics, the number of ECUs installed in automobiles is increasing and becoming more and more complex, which also brings great challenges to troubleshooting. Diagnostic software usually records the diagnostic data generated during the diagnostic process to form a log, and technicians use the log to locate the problem after the problem occurs. There are currently two common ways to record diagnostic communication logs: 1. Record the communication logs of each diagnostic process, and upload the logs generated by the diagnosis to the server when problems occur. The technicians retrieve the logs through the background to analyze the problems; 2. Set the log recording switch, and do not record logs during normal diagnosis. When problems occur, the user turns on the log switch, executes the diagnostic function again to reproduce the problem, and sends the reproduced logs to the technicians for analysis; Both of the above methods have their disadvantages: 1. Recording a log each time will waste a lot of computer memory, especially when executing ECU flashing, which has high timing requirements. Recording diagnostic data logs may not only affect the normal flashing process and cause the flashing to fail, but the huge amount of data will also cause a serious burden on the computer and server bandwidth; 2. Setting the log switch cannot collect first-hand diagnostic data in a timely manner. It often requires a second or Nth reproduction to record successfully. It is not smart enough, which affects the collection of communication logs and the troubleshooting of problems.

[0050] To this end, an embodiment of the present application proposes a diagnostic log assembly solution that can store diagnostic logs to improve storage efficiency and reduce bandwidth burden.

[0051] The present application embodiment discloses a diagnostic log assembly method, see Figure 1 As shown, the method includes:

[0052] Step S11: determining an electronic control unit to be diagnosed in the vehicle to be diagnosed based on the diagnostic test information, diagnosing the electronic control unit to be diagnosed and storing diagnostic data generated during the diagnostic process in a first storage area.

[0053] In this embodiment, see Figure 2 As shown, it is a schematic diagram of a diagnostic log assembly method; in the figure, the diagnostic software first requests the maximum length of the diagnostic log and the diagnostic interruption condition that triggers the upload log from the server, and then the server sends the maximum length of the diagnostic log and the diagnostic interruption condition that triggers the upload log to the diagnostic software, and the diagnostic log records the diagnostic log according to the maximum length of the diagnostic log to the diagnostic software, and uploads the diagnostic log to the server when the diagnostic interruption condition that triggers the upload log is triggered, so that the user can view the log and analyze the problem. The specific process of recording the diagnostic log is described in the subsequent content.

[0054] In this embodiment, ECU (electronic control unit) is also called driving computer, on-board computer, etc. Like ordinary computers, ECU is composed of microprocessor, memory, input and output interface, analog-to-digital converter, and large-scale integrated circuits such as shaping and driving.

[0055] It should be pointed out that the diagnostic log DiagnosticLog is divided into two parts: 1-diagnostic test information (including vehicle name, VIN, test system, test function, test time, etc.), 2-diagnostic data.

[0056] In this embodiment, before diagnosing the electronic control unit to be diagnosed and storing the diagnostic data generated during the diagnosis process in the first storage area, it also includes: obtaining a preset maximum log storage size, and setting the first storage area, the second storage area, the third storage area and the fourth storage area based on the maximum log storage size; the maximum log storage size is the sum of the target size and the size of the fourth storage area.

[0057] It should be noted that the OEM technicians can set the maximum size of a single diagnostic log (DiagnoseLogMaxSize) and the diagnostic interruption conditions for uploading diagnostic logs (such as the diagnostic software does not receive a response from the ECU or the ECU responds with a 7F negative response) through the background. For details, see Figure 3 The following is a diagram showing the log size and diagnostic terminal condition settings; see Figure 4 As shown, it is a schematic diagram of memory data; after the diagnostic software is started, it accesses the log setting interface of the background through the network, obtains the size DiagnoseLogMaxSize and the diagnostic interrupt condition Conditions, and applies for 4 arrays in the system memory, ArrayTotalLog (the third storage area) (the size is DiagnoseLogMaxSize to record the final uploaded diagnostic log content), ArrayDiagnosticInfo (the fourth storage area) 0 (the initialization size is M, M is less than DiagnoseLogMaxSize, used to dynamically store diagnostic test information), ArrayDiagnosticData (the first storage area) (the initialization size is N, M+N=DiagnoseLogMaxSize, used to record communication data), ArrayDiagnosticData_Backup (the second storage area) (the initialization size is N, used to store subsequent diagnostic data (communication data) when the data recorded in ArrayDiagnosticData exceeds N).

[0058] In this embodiment, before determining the electronic control unit to be diagnosed in the vehicle to be diagnosed based on the diagnostic test information, it also includes: storing the diagnostic test information in the fourth storage area for subsequent storage in the diagnostic log. It should be noted that after the diagnostic software reads the vehicle information and enters the specific ECU function, the diagnostic test information is recorded in ArrayDiagnosticInfo (the fourth storage area). At this time, the diagnostic software will determine whether it is necessary to interrupt the recording and upload the diagnostic log according to the Conditions sent by the server.

[0059] Step S12: If the diagnosis interruption condition is not triggered until the first storage area is filled up, the diagnosis data generated in the subsequent diagnosis process is stored in the second storage area.

[0060] In this embodiment, if the diagnostic interrupt condition is not triggered until the first storage area is full, the diagnostic data generated in the subsequent diagnostic process is stored in the second storage area, and it also includes: if the diagnostic interrupt condition is triggered when the first storage area is not full, the diagnostic process is interrupted, and the diagnostic data in the first storage area is transferred to the third storage area, and all diagnostic data in the third storage area is uploaded to the server as a diagnostic log.

[0061] Step S13: If the diagnostic interrupt condition is not triggered until the second storage area is filled, the first storage area is cleared, the diagnostic data in the second storage area is transferred to the first storage area, and the second storage area is cleared.

[0062] In this embodiment, if the diagnostic interrupt condition is not triggered until the second storage area is full, before clearing the first storage area, it also includes: if the diagnostic interrupt condition is triggered when the second storage area is not full, the diagnostic process is interrupted, and the second current size of the diagnostic data in the second storage area is determined, and the diagnostic data of the second temporary size in the first storage area is determined in chronological order from back to front; the second temporary size is the difference between the target size and the second current size; the determined diagnostic data of the second current size in the second storage area and the diagnostic data of the second temporary size in the first storage area are transferred to the third storage area.

[0063] Step S14: Jump to the step of storing the diagnostic data generated in the subsequent diagnostic process in the second storage area, and stop the diagnosis when the diagnostic interruption condition is triggered.

[0064] Step S15: transferring the latest diagnostic data of the target size in the first storage area and the second storage area to the third storage area, and uploading the diagnostic data in the third storage area to the server as a diagnostic log.

[0065] In this embodiment, the sizes of the first storage area and the second storage area are the target sizes.

[0066] In this embodiment, the latest diagnostic data of the target size in the first storage area and the second storage area is transferred to the third storage area, including: if the second storage area is empty, the diagnostic data of the target size in the first storage area is transferred to the third storage area; if the second storage area is not empty, the first current size of the diagnostic data in the second storage area is determined, and the diagnostic data of the first temporary size in the first storage area is determined in chronological order from back to front; the first temporary size is the difference between the target size and the first current size; the determined diagnostic data of the first current size in the second storage area and the diagnostic data of the first temporary size in the first storage area are transferred to the third storage area.

[0067] In this embodiment, the aforementioned content stores the diagnostic test information in the fourth storage area; the aforementioned content transfers the latest diagnostic data of the target size in the first storage area and the second storage area to the third storage area, and uploads the diagnostic data in the third storage area as a diagnostic log to the server, including: transferring the latest diagnostic data of the target size in the first storage area and the second storage area and the diagnostic test information in the fourth storage area to the third storage area, and uploading the diagnostic data in the third storage area and the diagnostic test information as a diagnostic log to the server.

[0068] It should be pointed out that the diagnostic data generated during the diagnostic process is first saved in ArrayDiagnosticData until the size of the record exceeds N, at which time the new diagnostic communication data is recorded in ArrayDiagnosticData_Backup. If the ArrayDiagnosticData_Backup array is also full, the data saved in ArrayDiagnosticData_Backup is copied to ArrayDiagnosticData for replacement, ArrayDiagnosticData_Backup is cleared, and subsequent diagnostic data is re-recorded in ArrayDiagnosticData_Backup, and the cycle is repeated until the diagnostic interrupt condition is triggered. When the diagnostic software triggers the diagnostic interrupt condition, it means that the log needs to be uploaded. The diagnostic software first determines whether the amount of data in ArrayDiagnosticData is less than N. If it is less than N, it means that the diagnostic communication logs are all recorded in this array. At this time, the two arrays ArrayDiagnosticInfo and ArrayDiagnosticData are used to fill ArrayTotalLog and upload it to the background server. For details, see. Figure 5 As shown in the figure, it is a schematic diagram of diagnostic log assembly; if it is equal to N, it means that the recorded diagnostic data has exceeded the maximum value sent by the server and needs to be sorted and uploaded. The diagnostic software obtains the communication data size K saved in ArrayDiagnosticData_Backup, clears the first K lengths of the content in ArrayDiagnosticData, and then moves the content of NK to the front of the array, and then copies the communication content in ArrayDiagnosticData_Backup from the position of NK into the array ArrayDiagnosticData. In this way, the diagnostic communication data will be saved in the ArrayDiagnosticData array from the old to the new, and then the ArrayDiagnosticInfo and ArrayDiagnosticData arrays are used to fill ArrayTotalLog and upload it to the background server. For details, see Figure 6 and Figure 7 As shown, another schematic diagram of assembling a diagnostic log is formed; Figure 6 This is a schematic diagram of another diagnostic log assembly method, which describes the diagnostic log assembly method in detail. Figure 7 This is another diagnostic log leader process diagram, which is for Figure 5 ; if the entire diagnostic process is not interrupted, the four arrays will be destroyed and the memory will be released when exiting the diagnosis.

[0069] In summary, through this application, trigger conditions can be dynamically preset to obtain accurate synchronous diagnostic logs, which is convenient for technicians to troubleshoot and locate problems without burdening the user's computer system and server network. Since the operation is performed on the memory, there will be no frequent file read and write operations, which will not affect the normal diagnostic function, greatly improving the execution efficiency and security of the diagnostic software, reducing complex manual operations, and reducing after-sales costs.

[0070] It can be seen that the present application determines the electronic control unit to be diagnosed in the vehicle to be diagnosed based on the diagnostic test information, diagnoses the electronic control unit to be diagnosed and stores the diagnostic data generated in the diagnostic process in the first storage area; if the diagnostic interruption condition is not triggered until the first storage area is filled, the diagnostic data generated in the subsequent diagnostic process is stored in the second storage area; if the diagnostic interruption condition is not triggered until the second storage area is filled, the first storage area is cleared, the diagnostic data in the second storage area is transferred to the first storage area, and the second storage area is cleared; jump to the step of storing the diagnostic data generated in the subsequent diagnostic process in the second storage area until the diagnostic interruption condition is triggered and stops the diagnosis; transfer the latest target size diagnostic data in the first storage area and the second storage area to the third storage area, and upload the diagnostic data in the third storage area as a diagnostic log to the server. It can be seen that the present application uses the first storage area and the second storage area to store diagnostic data, and because the use of the two areas can delete part of the diagnostic data, avoid too much diagnostic data, avoid affecting the normal flashing process and causing flashing failure, and avoid causing a serious burden on the computer and server bandwidth; in addition, there is no need for a second pass to collect diagnostic data, which reduces the waste of time and resources.

[0071] Correspondingly, the present application embodiment also discloses a diagnostic log assembly device, see Figure 8 As shown, the device comprises:

[0072] A first storage module 11 is used to determine an electronic control unit to be diagnosed in a vehicle to be diagnosed based on the diagnostic test information, diagnose the electronic control unit to be diagnosed and store the diagnostic data generated during the diagnosis process in a first storage area;

[0073] A second storage module 12, configured to store the diagnostic data generated in the subsequent diagnostic process into the second storage area if the diagnostic interruption condition is not triggered until the first storage area is filled;

[0074] A third storage module 13, configured to clear the first storage area, transfer the diagnostic data in the second storage area to the first storage area, and clear the second storage area if the diagnostic interrupt condition is not triggered until the second storage area is filled;

[0075] A jump module 14, used for jumping to the step of storing the diagnostic data generated in the subsequent diagnostic process in the second storage area, and stopping the diagnosis when the diagnostic interruption condition is triggered;

[0076] The log uploading module 15 is used to transfer the latest diagnostic data of the target size in the first storage area and the second storage area to the third storage area, and upload the diagnostic data in the third storage area to the server as a diagnostic log.

[0077] Among them, the more specific working process of each of the above modules can refer to the corresponding content disclosed in the above embodiments, which will not be repeated here.

[0078] It can be seen that the present application determines the electronic control unit to be diagnosed in the vehicle to be diagnosed based on the diagnostic test information, diagnoses the electronic control unit to be diagnosed and stores the diagnostic data generated in the diagnostic process in the first storage area; if the diagnostic interruption condition is not triggered until the first storage area is filled, the diagnostic data generated in the subsequent diagnostic process is stored in the second storage area; if the diagnostic interruption condition is not triggered until the second storage area is filled, the first storage area is cleared, the diagnostic data in the second storage area is transferred to the first storage area, and the second storage area is cleared; jump to the step of storing the diagnostic data generated in the subsequent diagnostic process in the second storage area until the diagnostic interruption condition is triggered and stops the diagnosis; transfer the latest target size diagnostic data in the first storage area and the second storage area to the third storage area, and upload the diagnostic data in the third storage area as a diagnostic log to the server. It can be seen that the present application uses the first storage area and the second storage area to store diagnostic data, and because the use of the two areas can delete part of the diagnostic data, avoid too much diagnostic data, avoid affecting the normal flashing process and causing flashing failure, and avoid causing a serious burden on the computer and server bandwidth; in addition, there is no need for a second pass to collect diagnostic data, which reduces the waste of time and resources.

[0079] Furthermore, an embodiment of the present application also provides an electronic device. Fig. 9 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.

[0080] Fig. 9A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the diagnostic log assembly method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0081] In this embodiment, the power supply 26 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 24 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0082] In addition, the memory 22, as a carrier for storing resources, may be a read-only memory, a random access memory, a disk or an optical disk, etc., and the resources stored thereon may include a computer program 221, and the storage method may be temporary storage or permanent storage. In addition to including a computer program that can be used to complete the diagnostic log assembly method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 221 may further include a computer program that can be used to complete other specific tasks.

[0083] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed diagnostic log assembly method is implemented.

[0084] The specific steps of the method can refer to the corresponding contents disclosed in the above embodiments, which will not be repeated here.

[0085] The various embodiments in this application are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0086] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0087] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0088] Finally, it should be noted that, in this article, relational terms such as first and first are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprises a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0089] The above is a detailed introduction to a diagnostic log assembly method, device, equipment, and storage medium provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A diagnostic log assembly method, characterized in that: Applications in diagnostic software, including: determining an electronic control unit to be diagnosed in the vehicle to be diagnosed based on the diagnostic test information, diagnosing the electronic control unit to be diagnosed and storing diagnostic data generated during the diagnosis process in a first storage area; If the diagnostic interrupt condition is not triggered until the first storage area is filled, storing the diagnostic data generated in the subsequent diagnostic process in the second storage area; If the diagnostic interrupt condition is not triggered until the second storage area is filled, clearing the first storage area, transferring the diagnostic data in the second storage area to the first storage area, and clearing the second storage area; Jumping to the step of storing the diagnostic data generated in the subsequent diagnostic process in the second storage area, and stopping the diagnosis when the diagnostic interruption condition is triggered; The latest diagnostic data of the target size in the first storage area and the second storage area is transferred to the third storage area, and the diagnostic data in the third storage area is uploaded to the server as a diagnostic log.

2. The diagnostic log assembly method according to claim 1, characterized in that: The sizes of the first storage area and the second storage area are the target sizes.

3. The diagnostic log assembly method according to claim 2, characterized in that: The transferring the latest diagnostic data of the target size in the first storage area and the second storage area to the third storage area includes: If the second storage area is empty, transferring the diagnostic data of the target size in the first storage area to the third storage area; If the second storage area is not empty, determining a first current size of the diagnostic data in the second storage area, and determining a first temporary size of the diagnostic data in the first storage area in chronological order; the first temporary size is the difference between the target size and the first current size; The determined diagnostic data of the first current size in the second storage area and the diagnostic data of the first temporary size in the first storage area are transferred to the third storage area.

4. The diagnostic log assembly method according to claim 1, characterized in that: If the diagnostic interrupt condition is not triggered until the first storage area is filled, before storing the diagnostic data generated in the subsequent diagnostic process in the second storage area, the method further includes: If the diagnosis interruption condition is triggered when the first storage area is not filled, the diagnosis process is interrupted, the diagnosis data in the first storage area is transferred to the third storage area, and all the diagnosis data in the third storage area is uploaded to the server as a diagnosis log.

5. The diagnostic log assembly method according to claim 1, characterized in that: If the diagnostic interrupt condition is not triggered until the second storage area is filled, before clearing the first storage area, the method further includes: If the diagnostic interruption condition is triggered when the second storage area is not filled, the diagnostic process is interrupted, and the second current size of the diagnostic data in the second storage area is determined, and the diagnostic data of the second temporary size in the first storage area is determined in a time-based order; the second temporary size is the difference between the target size and the second current size; The determined diagnostic data of the second current size in the second storage area and the diagnostic data of the second temporary size in the first storage area are transferred to the third storage area.

6. The diagnostic log assembly method according to any one of claims 1 to 5, characterized in that: Also includes: storing the diagnostic test information in a fourth storage area; Accordingly, transferring the latest diagnostic data of the target size in the first storage area and the second storage area to the third storage area, and uploading the diagnostic data in the third storage area as a diagnostic log to the server includes: The latest diagnostic data of the target size in the first storage area and the second storage area and the diagnostic test information in the fourth storage area are transferred to the third storage area, and the diagnostic data and the diagnostic test information in the third storage area are uploaded to the server as diagnostic logs.

7. The diagnostic log assembly method according to claim 6, characterized in that: Before diagnosing the electronic control unit to be diagnosed and storing the diagnostic data generated during the diagnosis process in the first storage area, the method further includes: A preset maximum log storage size is obtained, and the first storage area, the second storage area, the third storage area and the fourth storage area are set based on the maximum log storage size; the maximum log storage size is the sum of the target size and the size of the fourth storage area.

8. A diagnostic log assembly device, characterized in that: Applications in diagnostic software, including: A first storage module, configured to determine an electronic control unit to be diagnosed in a vehicle to be diagnosed based on the diagnostic test information, diagnose the electronic control unit to be diagnosed and store diagnostic data generated during the diagnostic process in a first storage area; A second storage module, configured to store the diagnostic data generated in the subsequent diagnostic process into the second storage area if the diagnostic interrupt condition is not triggered until the first storage area is filled; a third storage module, configured to clear the first storage area, transfer the diagnostic data in the second storage area to the first storage area, and clear the second storage area if the diagnostic interrupt condition is not triggered until the second storage area is filled; A jump module, used for jumping to the step of storing the diagnostic data generated in the subsequent diagnostic process in the second storage area, and stopping the diagnosis when the diagnostic interruption condition is triggered; The log uploading module is used to transfer the latest diagnostic data of the target size in the first storage area and the second storage area to the third storage area, and upload the diagnostic data in the third storage area to the server as a diagnostic log.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the diagnostic log assembly method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program; wherein, when the computer program is executed by a processor, the diagnostic log assembly method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Node log storage method and system, electronic equipment and storage medium

    CN110716695A

  • Storage equipment fault log collection method and device, equipment and medium

    CN115237652A

  • Method and device for reading log data, computer equipment and storage medium

    CN118747165A

  • Method and device for collecting diagnostic data

    JP2005041273A

  • Log recording method and apparatus, and electronic device

    US20240264918A1