Log data processing method and device, equipment and computer medium

By obtaining and analyzing log traffic statistics, the detection and management of the ECU's stored memory log volume is solved, and the problem of low storage resource utilization is improved due to excessive log printing volume, and the storage resource utilization rate of the ECU is improved.

CN119938369APending Publication Date: 2025-05-06NEUSOFT REACH AUTOMOBILE TECH (SHENYANG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411745356.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

During the mass production stage of vehicle, the utilization rate of storage resources in the ECU is low, mainly due to the excessive log printing volume, resulting in insufficient storage memory space.

Method used

By obtaining log statistics information in the log traffic statistics file, when the total amount of logs currently stored in the storage memory is not less than the preset threshold, the log is uploaded to the target device, and the logs applied to the ECU are stopped printing and deleting stored logs.

Benefits of technology

Effectively detect and manage the total log volume in the ECU's storage memory, avoid exceeding the log print volume and improving the utilization rate of storage resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938369A_ABST
    Figure CN119938369A_ABST
Patent Text Reader

Abstract

The invention discloses a log data processing method, device and equipment and a computer medium, and the method comprises the steps: obtaining log statistical information in a log traffic statistical file, the log statistical information being obtained by the log traffic statistical file from a running memory of an ECU; and when the log statistical information indicates that the total log quantity currently stored in the storage memory of the ECU is not less than a first preset threshold value, uploading the logs currently stored in the storage memory to target equipment, the log flow statistical file is stored in the storage memory, log printing of at least one first vehicle application installed in the ECU is stopped, and / or logs stored in the storage memory are deleted, and the log flow statistical file is stored in the storage memory. The effect of improving the utilization rate of storage resources in the ECU can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of resource utilization, and in particular, relates to a log data processing method, device, equipment and computer medium. Background Art

[0002] AUTOSAR AP (Adaptive Platform) middleware is widely used in vehicle-mounted ECU devices. The LT (Log and trace) module of AUTOSAR AP is used to print log information during program operation. Therefore, the LT module is widely used in AUTOSAR AP applications.

[0003] During the vehicle mass production stage, the log level of the target application is usually set to the ERROR level. However, in order to locate the problem when it occurs, the relevant personnel usually set the recorded log level below the ERROR log level, which results in the printing of some non-error logs. This will cause the log printing volume to deviate from the expected plan, and there is a risk of exceeding the mass production log printing volume, which can easily lead to insufficient storage memory space and low storage resource utilization. Summary of the invention

[0004] The embodiment of the present application provides an implementation scheme different from the prior art to solve the technical problem of low utilization rate of storage resources in ECU in the related art.

[0005] In a first aspect, the present application provides a log data processing method applicable to an electronic control unit ECU, comprising: obtaining log statistical information in a log flow statistics file, wherein the log statistical information is obtained from the running memory of the ECU by the log flow statistics file; when the log statistical information indicates that the total amount of logs currently stored in the storage memory of the ECU is not less than a first preset threshold, uploading the logs currently stored in the storage memory to a target device, and stopping log printing for at least one first vehicle application installed on the ECU and / or deleting the logs stored in the storage memory, wherein the log flow statistics file is stored in the storage memory.

[0006] In the second aspect, the present application provides a log data processing device, which is applicable to an electronic control unit ECU, comprising: an acquisition unit, used to obtain log statistical information in a log flow statistics file, wherein the log statistical information is obtained from the running memory of the ECU by the log flow statistics file; a processing unit, used to upload the logs currently stored in the storage memory to a target device when the log statistical information indicates that the total amount of logs currently stored in the storage memory of the ECU is not less than a first preset threshold, and stop printing logs for at least one first vehicle application installed on the ECU and / or delete the logs stored in the storage memory, wherein the log flow statistics file is stored in the storage memory.

[0007] In a third aspect, the present application provides an electronic device, including:

[0008] Processor; and

[0009] A memory, configured to store executable instructions of the processor;

[0010] The processor is configured to execute any method in the first aspect or any possible implementation manner of the first aspect by executing the executable instructions.

[0011] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program implements any method in the first aspect or any possible implementation manner of the first aspect.

[0012] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method described in the first aspect or any possible implementation manner of the first aspect.

[0013] The present application provides a method for obtaining log statistical information in a log flow statistics file, wherein the log statistical information is obtained from the running memory of the ECU by the log flow statistics file; when the log statistical information indicates that the total log volume currently stored in the storage memory of the ECU is not less than a first preset threshold value, the log currently stored in the storage memory is uploaded to the target device, and the log printing of at least one first vehicle application installed on the ECU and / or the log stored in the storage memory is stopped. The scheme in which the log flow statistics file is stored in the storage memory can detect the total log volume in the storage memory of the ECU and make corresponding processing, which can improve the utilization rate of the storage resources in the ECU. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0015] Figure 1a A flow chart of a log data processing method provided in one embodiment of the present application;

[0016] Figure 1b A flow chart of a log data processing method provided in one embodiment of the present application;

[0017] Figure 1c A flow chart of a log data processing method provided in one embodiment of the present application;

[0018] Figure 2 A schematic diagram of the structure of a log data processing device provided in one embodiment of the present application;

[0019] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, but cannot be understood as limiting the present application.

[0021] The terms "first" and "second" etc. in the specification, claims and drawings of the embodiments of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0022] First, some terms in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.

[0023] AUTOSAR AP, which stands for Adaptive Platform of Automotive Open System Architecture Application Programming Interface, is a new software platform launched by the AUTOSAR (Automotive Open System Architecture) organization, which aims to cope with the development trend of electric, intelligent and networked vehicles. With the continuous advancement of automotive technology, the electronic and electrical architecture of the whole vehicle is developing from the traditional distributed architecture to the domain / central integrated architecture. This change makes the application and update iteration of automotive software more complex and frequent, and also puts higher requirements on the security and sustainable update of automotive software. In order to meet these challenges, the AUTOSAR organization launched the AUTOSAR AP platform.

[0024] AUTOSAR AP middleware is an important part of the Adaptive Platform in the Automotive Open System Architecture. It is an automotive software platform for high performance and high flexibility. It aims to separate the application layer from the underlying system (operating system and hardware) to achieve the decoupling of software and hardware, while providing standardized APIs and standard services to reduce the coupling between applications and platforms. The main functions include: Service communication: AUTOSAR AP middleware supports service discovery, dynamic data publishing / subscription mechanism, and communication based on protocols such as SOME / IP, so that the application layer can easily realize the interaction between services. Basic functions: Provide basic functions such as diagnosis (such as UDS and DOIP), network management, and data persistence to provide a stable operating environment for upper-level applications. Advanced functions: Support advanced functions such as execution control, platform health management, and state management, which helps to improve the reliability and stability of the system.

[0025] The on-board ECU (Electronic Control Unit) device, that is, the automotive electronic control unit, is a key component in modern cars. ECU is the core control component of the automotive electronic system. It receives signals from various sensors, processes and analyzes them through the internal microprocessor, and accurately controls various systems of the car through actuators. The main functions of ECU include but are not limited to: Engine management: adjust the engine speed, torque and fuel supply to improve fuel efficiency and reduce emissions. Transmission system management: control the working mode of the transmission to adapt to different driving conditions and performance requirements. Brake system management: adjust the braking force according to the driver's intention and vehicle status to ensure driving safety. Body control system: control the vehicle's stability, steering assistance, air conditioning system, etc. to improve driving comfort and safety. In addition, ECU is also responsible for diagnosis and fault detection, monitoring the vehicle's operating status, detecting abnormal conditions and issuing alarms in time.

[0026] The LT (Log and Trace) module of AUTOSAR AP is an important functional cluster in the AUTOSAR adaptive platform. It is responsible for managing and recording the logs of the AP platform, which can be applied to both the development process and the mass production process. The LT module provides an interface for adaptive applications to forward log information to the communication bus, console, file system or ARTI-trace, and provides a separate method for each log level. It supports logging of different severities and destinations, including errors, warnings, informational messages, and debug-level messages. These log information plays a vital role in analyzing system activities, diagnosing problems, and performing event backtracing and forensics.

[0027] In the LT (Log and Trace) module of AUTOSAR AP, log level is an important concept, which is used to indicate the severity or importance of log messages. Log level is the standard for classifying and filtering log messages, which is divided according to the severity or importance of log messages. Different log levels can help developers locate and analyze problems more quickly, and also help with troubleshooting and after-sales service during mass production. In the LT module of AUTOSARAP, common log levels include the following (but not limited to):

[0028] Off: Turns off logging. At this level, no log messages are recorded.

[0029] Fatal: A fatal error. This means that the system has encountered an error that cannot be recovered, usually causing the system to crash or stop running.

[0030] Error: Indicates that the system has encountered a problem that affects functionality or performance, but the system can still continue to operate.

[0031] Warn: Warning. Indicates that the system may have encountered potential problems or abnormal conditions, but these problems will not affect the normal operation of the system.

[0032] Info: Information. Provides general information about the system's operating status, usually used to record normal operations or events.

[0033] Debug: Provides detailed debugging information, usually used for problem diagnosis and debugging during the development process.

[0034] Verbose: Provides more detailed log information than the debug level, usually used for in-depth analysis of system behavior or performance.

[0035] The DLT (Diagnostic Log and Trace) module is an important component of AUTOSAR (Automotive Open System Architecture). The DLT module is a software module used for logging and tracing in vehicle electronic systems. It complies with the AUTOSAR standard and aims to provide a unified, efficient and reliable way to record and transmit diagnostic information and events during vehicle operation. Through the DLT module, developers and engineers can monitor the status of the vehicle in real time, quickly locate and solve problems, and improve the reliability and maintainability of the vehicle.

[0036] The main functions of the DLT module include:

[0037] Log Recording: Records various diagnostic information during vehicle operation, such as error codes, time and conditions of fault occurrence, etc. This information helps maintenance personnel quickly and accurately determine the cause of the fault and shorten maintenance time.

[0038] Event tracing: Track key events during vehicle operation, such as system startup, task execution, data exchange, etc. This tracing information helps developers analyze the execution path and state changes of the system to optimize system performance.

[0039] Configuration and filtering: Allow developers to configure log levels and filtering rules according to actual needs to control the generation and transmission of log information. This helps reduce unnecessary log information and reduce system burden.

[0040] The DLT module receives and processes log and trace information from other modules in AUTOSAR (such as DET, DEM, RTE, etc.) by interacting with these modules. It then records this information in a standardized format into the log buffer and transmits the information to an external diagnostic tool or server according to the configuration.

[0041] Specifically, the DLT module works as follows:

[0042] Receiving information: The DLT module receives error information and event information from modules such as DET and DEM through the interface. At the same time, it also receives tracking information from software components (SWC) through the RTE interface.

[0043] Processing information: The DLT module processes the received information, including format conversion, timestamp addition, log level determination, etc. Depending on the configuration, it can also filter the information to reduce unnecessary log information.

[0044] Recording information: The processed information is recorded in the log buffer of the DLT module. This buffer is circular, and when the buffer is full, the earliest information will be overwritten.

[0045] Transmit information: Depending on the configuration, the DLT module transmits log information to an external diagnostic tool or server via a communication bus (such as CAN, Ethernet, etc.). This allows developers and engineers to monitor and analyze the status of the system in real time during vehicle operation.

[0046] eMMC (Embedded Multi Media Card) is a storage solution built into electronic devices that integrates NAND Flash memory and controller in one package to form a compact module. eMMC is mainly used in mobile devices, tablets, digital cameras, car navigation systems, and other embedded systems that require high performance and high reliability.

[0047] RAM: RAM refers to the memory used by a device when running programs, also known as RAM (Random Access Memory). It is used to temporarily store computing data and exchange data with external storage such as hard disks.

[0048] Storage memory (ROM): Storage memory refers to the memory used by the device to store data, also known as ROM (Read-Only Memory, but it is a general term here. In fact, the ROM in the device is readable and writable). It is used to store user data such as system, application, photos, videos, etc. The aforementioned eMMC is the storage memory on the ECU.

[0049] During the vehicle mass production stage, the log level of the target application is usually set to the ERROR level. However, in order to locate the problem when it occurs, the relevant personnel usually set the recorded log level below the ERROR log level, which results in the printing of some non-error logs. This will cause the log printing volume to deviate from the expected plan, and there is a risk of exceeding the mass production log printing volume, which can easily lead to insufficient storage memory space and low storage resource utilization.

[0050] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0051] Figure 1a A flow chart of a log data processing method provided by an exemplary embodiment of the present application is provided. The execution subject of the method may be an ECU in a vehicle. The method at least includes the following steps S101-S102:

[0052] S101, obtaining log statistical information in a log flow statistical file, wherein the log statistical information is obtained from the running memory of the ECU by the log flow statistical file;

[0053] Optionally, the aforementioned log statistical information includes statistical information obtained by counting logs of at least one first vehicle application installed on the ECU.

[0054] In some optional embodiments of the present application, the aforementioned log statistical information includes at least one of the following information: the statistical time of the log traffic statistical information, the file creation time of the log traffic statistical file, the file update time of the log traffic statistical file, the total number of log entries of the at least one first vehicle application, the total number of log bytes of the at least one first vehicle application, the number of log entries of each first vehicle application, and the number of log bytes of each first vehicle application.

[0055] Optionally, the aforementioned at least one first vehicle application is all applications installed in the ECU.

[0056] Optionally, an icon of each first vehicle application is displayed on a display screen of the ECU.

[0057] S102. When the log statistics information indicates that the total amount of logs currently stored in the storage memory of the ECU is not less than a first preset threshold, the logs currently stored in the storage memory are uploaded to the target device, and log printing for at least one first vehicle application installed on the ECU is stopped and / or the logs stored in the storage memory are deleted, wherein the log flow statistics file is stored in the storage memory.

[0058] Optionally, the aforementioned target device may refer to a server.

[0059] Optionally, the purpose of stopping log printing for at least one first vehicle application installed on the ECU can be achieved by disabling the log printing interface of the DLT module.

[0060] The log stored in the aforementioned storage memory refers to a log of at least one first vehicle application stored in the storage memory.

[0061] In some optional embodiments of the present application, the aforementioned total log volume may be the total log byte number of the at least one first vehicle application.

[0062] In some optional embodiments of the present application, an AUTOSAR AP is arranged in the ECU. Before obtaining the log statistical information in the log traffic statistics file, the method further includes: when it is detected that the daemon process in the DLT module in the AUTOSAR AP obtains the application log sent by the second vehicle application, updating the log statistical information stored in the running memory based on the application log.

[0063] Optionally, the aforementioned second vehicle application is any one or more applications among the aforementioned at least one first vehicle application.

[0064] Optionally, updating the log statistical information stored in the running memory based on the application log means: updating the data related to the application to which the application log belongs in the log statistical information stored in the running memory based on the application log, for example, updating the number of log bytes and the number of log entries of the application in the log statistical information stored in the running memory.

[0065] Optionally, the log of each first vehicle application is stored in a storage memory.

[0066] In some optional embodiments of the present application, before updating the log statistical information stored in the running memory based on the application log, the method also includes: when it is detected that the daemon process in the DLT module is started, detecting whether the log traffic statistics file exists, and if so, storing the data in the log traffic statistics file to the running memory.

[0067] The reason for storing the data in the log traffic statistics file in the running memory is to prevent the original data in the running memory from being deleted due to the power on and off of the ECU.

[0068] Optionally, when storing the data in the log traffic statistics file into the running memory, all the data in the log traffic statistics file may be stored into the running memory.

[0069] Optionally, when storing the data in the log traffic statistics file in the running memory, the data in the log traffic statistics file except the statistical time for statistics of the log traffic statistics information, the file creation time of the log traffic statistics file, and the file update time of the log traffic statistics file can be stored in the running memory.

[0070] In some optional embodiments of the present application, the method further includes the following steps S11-S12:

[0071] S11, obtaining the current time;

[0072] S12. When the duration between the current moment and the most recently recorded statistical moment of the log traffic statistical information in the running memory is greater than a preset duration, the log traffic statistical information in the running memory is counted to obtain new log traffic statistical information; and the new log traffic statistical information is stored in the log traffic statistical file.

[0073] Optionally, in the present application, the statistical moment for performing statistics on the log traffic statistical information in the running memory may refer to the moment when the log traffic statistical information in the running memory is stored in a log traffic statistical file after the statistics are performed on the log traffic statistical information in the running memory.

[0074] Optionally, when the data in the log flow statistics file is previously stored in the running memory, the data in the log flow statistics file except the statistical time for counting the log flow statistics information, the file creation time of the log flow statistics file, and the file update time of the log flow statistics file are stored in the running memory. Then, when the log flow statistics information in the running memory is counted, it is necessary to modify the statistical time for counting the log flow statistics information and the file update time of the log flow statistics file to the current time when the new log flow statistics information obtained by counting is stored in the log flow statistics file.

[0075] Optionally, when the data in the log traffic statistics file is previously stored in the running memory, when all the data in the log traffic statistics file is stored in the running memory, when the log traffic statistics information in the running memory is counted, the statistical time for counting the log traffic statistics information and the file update time of the log traffic statistics file also need to be modified to the current time.

[0076] Optionally, when storing the new log traffic statistical information in the log traffic statistical file, if there is data in the log traffic statistical file, the data in the log traffic statistical file that overlaps with the new log traffic statistical information is overwritten.

[0077] In some optional embodiments of the present application, the method further includes: when it is detected that the daemon process in the DLT module is started, creating the storage path of the log traffic statistics file and the preset duration.

[0078] The storage path of the log flow statistics file and the preset duration can be set by relevant personnel. The storage path of the log flow statistics file refers to the storage path of the log flow statistics file in the storage memory. The preset duration can be 2 minutes.

[0079] In some optional embodiments of the present application, before updating the log statistical information stored in the running memory based on the application log, the method further includes:

[0080] When it is detected that the daemon process in the DLT module is started, it is detected whether the log traffic statistics file exists. If not, at least one of the following information in the running memory is initialized, and the initialization result is stored in the running memory:

[0081] The statistical time for statistics of log traffic statistical information, the file creation time of the log traffic statistical file, the file update time of the log traffic statistical file, the total number of log items of the at least one first vehicle application, the total number of log bytes of the at least one first vehicle application, the number of log items of each first vehicle application, and the number of log bytes of each first vehicle application.

[0082] Initializing the information in the running memory refers to: setting the value of the information in the running memory to a preset value. Optionally, the preset value may be 0.

[0083] In some optional embodiments of the present application, the method further includes: when the log statistical information indicates that the total amount of logs currently stored in the storage memory is less than a first preset threshold and greater than a second preset threshold, a prompt message is sent to the target device to indicate that the storage memory is about to be overloaded.

[0084] In some optional embodiments of the present application, the ratio of the second preset threshold to the first preset threshold is a preset ratio. Optionally, the ratio may be 0.8.

[0085] In some optional embodiments of the present application, the method further includes: when the log statistical information indicates that the total amount of logs currently stored is not greater than a second preset threshold, no processing is performed.

[0086] It should be noted that, when the log flow statistics file does not exist before the current time is obtained, the most recently recorded statistical time of the log flow statistics information in the running memory is 0. At this time, before storing the new log flow statistics information in the log flow statistics file, a log flow statistics file needs to be created. And the file creation time of the log flow statistics file is set to the actual creation time.

[0087] Optionally, the aforementioned steps S11-S12 may be performed once every certain fixed time period, and the fixed time period may be one minute, and specifically, may be determined by a timer.

[0088] Optionally, the aforementioned functions related to traffic statistics can be specifically implemented by the traffic statistics module in the DLT module.

[0089] Further, the solution of this application can also be found in Figure 1b and Figure 1c As shown, no further description is given here.

[0090] The present application provides a method for obtaining log statistical information in a log flow statistics file, wherein the log statistical information is obtained from the running memory of the ECU by the log flow statistics file; when the log statistical information indicates that the total log volume currently stored in the storage memory of the ECU is not less than a first preset threshold value, the log currently stored in the storage memory is uploaded to the target device, and the log printing of at least one first vehicle application installed on the ECU and / or the log stored in the storage memory is stopped. The scheme in which the log flow statistics file is stored in the storage memory can detect the total log volume in the storage memory of the ECU and make corresponding processing, which can improve the utilization rate of the storage resources in the ECU.

[0091] Figure 2 A structural schematic diagram of a log data processing device provided for an exemplary embodiment of the present application; wherein the device is applicable to an electronic control unit ECU, comprising:

[0092] An acquisition unit 21 is used to acquire log statistical information in a log flow statistical file, where the log statistical information is acquired from the log flow statistical file from the running memory of the ECU;

[0093] The processing unit 22 is used to upload the logs currently stored in the storage memory to the target device, and stop printing logs for at least one first vehicle application installed on the ECU and / or delete the logs stored in the storage memory when the log statistical information indicates that the total amount of logs currently stored in the storage memory of the ECU is not less than a first preset threshold value, wherein the log flow statistics file is stored in the storage memory.

[0094] In some optional embodiments of the present application, an automotive open system architecture adaptive platform AUTOSAR AP is arranged in the ECU, and before obtaining the log statistical information in the log traffic statistical file, the device is also used to:

[0095] When it is detected that the diagnostic log in the AUTOSAR AP and the daemon process in the tracking DLT module obtain the application log sent by the second vehicle application, the log statistical information stored in the running memory is updated based on the application log.

[0096] In some optional embodiments of the present application, before updating the log statistical information stored in the running memory based on the application log, the device is further used to:

[0097] When it is detected that the daemon process in the DLT module is started, it is detected whether the log traffic statistics file exists. If it exists, the data in the log traffic statistics file is stored in the running memory.

[0098] In some optional embodiments of the present application, the device is also used for:

[0099] Get the current time;

[0100] When the duration between the current moment and the most recently recorded statistical moment of the log traffic statistical information in the running memory is greater than the preset duration, the log traffic statistical information in the running memory is counted to obtain new log traffic statistical information; and the new log traffic statistical information is stored in the log traffic statistical file.

[0101] In some optional embodiments of the present application, the device is also used for:

[0102] When it is detected that the daemon process in the DLT module is started, the storage path of the log traffic statistics file and the preset duration are created.

[0103] In some optional embodiments of the present application, before the aforementioned apparatus is used to update the log statistical information stored in the running memory based on the application log, the apparatus is further used to:

[0104] In some optional embodiments of the present application, before updating the log statistical information stored in the running memory based on the application log, the device is further used to:

[0105] When it is detected that the daemon process in the DLT module is started, it is detected whether the log traffic statistics file exists. If not, at least one of the following information in the running memory is initialized, and the initialization result is stored in the running memory:

[0106] The statistical time for statistics of log traffic statistical information, the file creation time of the log traffic statistical file, the file update time of the log traffic statistical file, the total number of log items of the at least one first vehicle application, the total number of log bytes of the at least one first vehicle application, the number of log items of each first vehicle application, and the number of log bytes of each first vehicle application.

[0107] In some optional embodiments of the present application, the device is also used for:

[0108] When the log statistics information indicates that the total amount of logs currently stored in the storage memory is less than a first preset threshold and greater than a second preset threshold, a prompt message for prompting that the storage memory is about to be overloaded is sent to the target device.

[0109] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, no further description is given here. Specifically, the device may perform the above method embodiment, and the above and other operations and / or functions of each module in the device are the corresponding processes in each method in the above method embodiment, respectively, and no further description is given here for the sake of brevity.

[0110] The above describes the device of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.

[0111] Figure 3 is a schematic block diagram of an electronic device provided in an embodiment of the present application, and the electronic device may include:

[0112] The memory 301 and the processor 302, the memory 301 is used to store the computer program and transmit the program code to the processor 302. In other words, the processor 302 can call and run the computer program from the memory 301 to implement the method in the embodiment of the present application.

[0113] For example, the processor 302 may be configured to execute the above method embodiments according to instructions in the computer program.

[0114] In some embodiments of the present application, the processor 302 may include but is not limited to:

[0115] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.

[0116] In some embodiments of the present application, the memory 301 includes but is not limited to:

[0117] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0118] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 301 and executed by the processor 302 to complete the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.

[0119] like Figure 3 As shown, the electronic device may also include:

[0120] The transceiver 303 may be connected to the processor 302 or the memory 301 .

[0121] The processor 302 may control the transceiver 303 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 303 may include a transmitter and a receiver. The transceiver 303 may further include an antenna, and the number of antennas may be one or more.

[0122] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.

[0123] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer can perform the method of the above method embodiment. In other words, the present application embodiment also provides a computer program product containing instructions, and when the instructions are executed by a computer, the computer can perform the method of the above method embodiment.

[0124] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.

[0125] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can 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.

[0126] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0127] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0128] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A log data processing method, characterized in that: Applicable to electronic control units ECU, including: Obtaining log statistical information in a log flow statistical file, wherein the log statistical information is obtained from the running memory of the ECU by the log flow statistical file; When the log statistics information indicates that the total amount of logs currently stored in the storage memory of the ECU is not less than a first preset threshold, the logs currently stored in the storage memory are uploaded to the target device, and log printing for at least one first vehicle application installed on the ECU is stopped and / or the logs stored in the storage memory are deleted, wherein the log flow statistics file is stored in the storage memory.

2. The method according to claim 1, characterized in that: The ECU is provided with an automotive open system architecture adaptive platform AUTOSAR AP. Before obtaining log statistical information in the log traffic statistical file, the method further includes: When it is detected that the diagnostic log in the AUTOSAR AP and the daemon process in the tracking DLT module obtain the application log sent by the second vehicle application, the log statistical information stored in the running memory is updated based on the application log.

3. The method according to claim 2, characterized in that Before updating the log statistical information stored in the running memory based on the application log, the method further includes: When it is detected that the daemon process in the DLT module is started, it is detected whether the log traffic statistics file exists. If it exists, the data in the log traffic statistics file is stored in the running memory.

4. The method according to claim 2, characterized in that Before updating the log statistical information stored in the running memory based on the application log, the method further includes: When it is detected that the daemon process in the DLT module is started, it is detected whether the log traffic statistics file exists. If not, at least one of the following information in the running memory is initialized, and the initialization result is stored in the running memory: The statistical time for statistics of log traffic statistical information, the file creation time of the log traffic statistical file, the file update time of the log traffic statistical file, the total number of log items of the at least one first vehicle application, the total number of log bytes of the at least one first vehicle application, the number of log items of each first vehicle application, and the number of log bytes of each first vehicle application.

5. The method according to claim 2, characterized in that: The method further comprises: Get the current time; When the duration between the current moment and the most recently recorded statistical moment of the log traffic statistical information in the running memory is greater than the preset duration, the log traffic statistical information in the running memory is counted to obtain new log traffic statistical information; and the new log traffic statistical information is stored in the log traffic statistical file.

6. The method according to claim 5, characterized in that The method further comprises: When it is detected that the daemon process in the DLT module is started, the storage path of the log traffic statistics file and the preset duration are created.

7. The method according to claim 1, characterized in that The method further includes: when the log statistics information indicates that the total amount of logs currently stored in the storage memory is less than a first preset threshold and greater than a second preset threshold, sending a prompt message to the target device to prompt that the storage memory is about to be overloaded.

8. A log data processing device, characterized in that: Applicable to electronic control units ECU, including: An acquisition unit, used for acquiring log statistical information in a log flow statistical file, wherein the log statistical information is acquired from the log flow statistical file from a running memory of the ECU; A processing unit, configured to upload the logs currently stored in the storage memory to a target device, and stop printing logs for at least one first vehicle application installed on the ECU and / or delete the logs stored in the storage memory when the log statistics information indicates that the total amount of logs currently stored in the storage memory of the ECU is not less than a first preset threshold, wherein the log flow statistics file is stored in the storage memory.

9. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 7 by executing the executable instructions.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.