Log data processing method and device, equipment and computer medium
By collecting and processing log information in the system memory in the ECU system in the vehicle and processing it according to the processing type in the configuration file, the problem of low data reliability when collecting and uploading log data is solved, and higher data reliability and more flexible data processing methods are achieved.
Patent Information
- Application Number
- CN202411942792.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-06-20
AI Technical Summary
During the process of collecting log data and uploading it, the data is low, especially due to the automatic deletion of log files caused by system restart.
Provides a log data processing method, including collecting log information in system memory and processing these log information according to the log data processing type (log collection type or log upload type) in the configuration file. This method ensures that the data in the system memory will not be lost due to the ECU switch-off, improving the reliability of the data.
By collecting and processing log information in the ECU system memory, the loss of log data during ECU restart is avoided, the data reliability during log data collection and uploading is improved, and the pressure on the ECU used to upload log information is reduced.
Smart Images

Figure CN120179440A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of vehicle data processing, and in particular relates to a method, device, equipment, and computer medium for processing log data. Background Art
[0002] The system logs on the in-vehicle ECU are important in-vehicle system information and are crucial for analyzing the in-vehicle system status, the operation of the system, and investigating problems when the system has issues. Since the system logs belong to the logs printed by the kernel and are all in the / dev directory of the ECU system, specifically in the systemXXX.log file, the common data collection method is for the ECU to directly read the systemXXX.log file in / dev to obtain the log data and transmit the log data to the cloud for analysis. If the ECU system restarts, the system logs in the systemXXX.log file will be automatically deleted by the system, resulting in the loss of system logs, making the reliability of the data low during the process of the ECU collecting and uploading log data. Summary of the Invention
[0003] The embodiments of this application provide an implementation solution different from the prior art to solve the technical problem in the related art that the reliability of data is low during the process of the ECU collecting and uploading log data.
[0004] In a first aspect, this application provides a method for processing log data, which is applicable to a first ECU in a vehicle and includes: collecting first log information in the system memory; obtaining its own log data processing type from a configuration file, where the log data processing type includes a log collection type or a log upload type; and processing the first log information based on the log data processing type.
[0005] In a second aspect, this application provides a device for processing log data, which is applicable to a first ECU in a vehicle and includes: a collection unit for collecting first log information in the system memory; an obtaining unit for obtaining its own log data processing type from a configuration file, where the log data processing type includes a log collection type or a log upload type; and a processing unit for processing the first log information based on the log data processing type.
[0006] In a third aspect, this application provides an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein, 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.
[0007] Fourthly, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, any method in the first aspect or any possible implementation manner of the first aspect is implemented.
[0008] Fifthly, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, any of the methods described in the first aspect or any possible implementation manner of the first aspect is implemented.
[0009] The solution applicable to the first ECU in a vehicle provided by the present application includes: collecting first log information in the system memory; obtaining its own log data processing type from a configuration file, where the log data processing type includes a log collection type or a log upload type; processing the first log information based on the log data processing type. The ECU can directly obtain log information from the system log and can determine a processing solution for the log information based on its own log data processing type. The data in the system memory will not be deleted with the power on and off of the ECU, which can improve the reliability of data during the process of the ECU collecting and uploading log data. Moreover, in the solution of the present application, the ECUs are classified according to their log data processing types, and different ECUs have different processing methods for log data. Thus, when all the log information of the ECUs in the vehicle is fixedly uploaded by the same ECU, the problem that the ECU for uploading log information has too much pressure can be avoided, and the flexibility of the ECU to process data is also improved. Description of the Drawings
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings. In the drawings:
[0011] Figure 1 It is a schematic structural diagram of a log data processing system provided by an embodiment of the present application;
[0012] Figure 2 It is a schematic flowchart of a log data processing method provided by an embodiment of the present application;
[0013] Figure 3 It is a schematic structural diagram of a log data processing device provided by an embodiment of the present application;
[0014] Figure 4 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed Embodiments
[0015] Embodiments of the present application will be described in detail below. 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 explain the present application, and should not be construed as a limitation to the present application.
[0016] Terms such as "first" and "second" in the specification, claims and drawings of the embodiments of the present application are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances, so that the embodiments of the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0017] First, some terms in the embodiments of the present application will be explained below to facilitate understanding by those skilled in the art.
[0018] ECU (Electronic Control Unit) is short for Electronic Control Unit, also known as "vehicle computer", "on-board computer", etc. In terms of its use, it is a special microcomputer controller for automobiles, also called a special single-chip microcomputer for automobiles. Like ordinary single-chip microcomputers, it consists of a microprocessor (CPU), a memory (ROM, RAM), an input / output interface (I / O), an analog-to-digital converter (A / D), and large-scale integrated circuits such as shaping and driving.
[0019] The system log on the ECU (Electronic Control Unit) is an important tool for recording various events, state changes, error messages and performance data during the operation of the ECU. These logs are of great significance for fault troubleshooting, performance analysis, security auditing, and data mining.
[0020] Log Levels is a way to classify log information. By assigning different levels to log information, developers can more finely control the generation and output of logs, so as to obtain the most valuable information in different scenarios. Common log levels include:
[0021] DEBUG (debug level):
[0022] Used to output detailed debug information, such as variable values, function call chains, intermediate results, etc.
[0023] Mainly used in the development and testing phases to help developers locate problems.
[0024] INFO (Information level):
[0025] Used to output general information indicating that the system is running normally.
[0026] For example, application startup, stop, service status change, completion of major business processes, etc.
[0027] WARN (Warning level) or WARNING:
[0028] Used to output potential problems or non-error conditions that may affect the normal operation of the system but do not immediately cause the system to crash.
[0029] For example, resources not being released, performance bottlenecks, unreasonable configurations, etc.
[0030] ERROR (Error level):
[0031] Used to output serious error messages indicating that an unexpected but not completely crashing exception has occurred.
[0032] For example, unexpected errors, function execution failures, etc.
[0033] FATAL (Fatal error level) or CRITICAL (Severe error level):
[0034] Indicates that the application has encountered a serious error that cannot be recovered, usually causing the program to terminate immediately. For example, the crash of a critical system component, hardware failure, etc.
[0035] The system log on the in-vehicle ECU is important in-vehicle system information and is crucial for analyzing the in-vehicle system status, system operation, and investigating problems when the system has issues. Since the system log belongs to the kernel print log and is located in the / dev directory of the ECU system, specifically in the systemXXX.log file. The common data collection method is for the ECU to directly read the systemXXX.log file in / dev to obtain the log data and transfer the log data to the cloud for analysis. If the ECU system restarts, the system log in the systemXXX.log file will be automatically deleted by the system, resulting in the loss of the system log and making the reliability of the data low during the process of the ECU collecting and uploading the log data.
[0036] In addition, there are generally two ways to collect log data: one is that one ECU collects the log data of other remaining ECUs and uploads it to the cloud, which causes a relatively large pressure on the current ECU used for uploading to the cloud; the other is that each ECU collects its own log data and uploads it to the cloud, which increases the communication link between the whole vehicle and the cloud for uploading and wastes communication resources relatively much.
[0037] The following uses specific embodiments to elaborate in detail on the technical solution of this application and how the technical solution of this application solves the above technical problems. These several specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0038] Figure 1 FIG. is a schematic structural diagram of a log data processing system provided in an exemplary embodiment of this application. This system can be located in a vehicle and can include multiple ECUs and a target device. Optionally, the log data processing types of some of the multiple ECUs are log collection types, and the log data processing types of the other part of the ECUs are log upload types. Among them, the number of ECUs with the log data processing type of log collection type and the number of ECUs with the log data processing type of log upload type can both be 1 or multiple.
[0039] Optionally, the foregoing log data processing system further includes a configuration device, and the configuration device can send a configuration file corresponding to the ECU to each ECU among the multiple ECUs in the vehicle.
[0040] For each ECU, the log data processing type of the ECU can be flexibly configured or modified through the configuration file.
[0041] The ECU with the log data processing type of log upload type has the following functions:
[0042] Collect the log information in its own system memory, receive the log information sent by the ECU with the log data processing type of log collection type, and upload the log information from its own system memory and the log information sent by the ECU with the log data processing type of log collection type to the target device.
[0043] The ECU with the log data processing type of log collection type has the following functions:
[0044] Collect the log information in its own system memory and send the log information in its own system memory to the ECU with the log data processing type of log upload type.
[0045] Among them, for each ECU, the configuration file obtained from the configuration device includes the log collection configuration of the ECU, the log data processing type of the ECU, and the log processing configuration information corresponding to the log data processing type of the ECU.
[0046] Optionally, the aforementioned log collection configuration includes: the initial collection period of log information, a first preset threshold and a second preset threshold related to the amount of logs in the system file, where the first preset threshold and the second preset threshold are used to adjust the collection period of log information.
[0047] Optionally, when the log data processing type of the ECU is the log collection type, the first log processing configuration information corresponding to the log data processing type of the ECU includes: the IP addresses of the ECUs whose log data processing type is the log upload type, the log receiving ports of the ECUs whose log data processing type is the log upload type, and the log levels of the logs received by the ECUs whose log data processing type is the log upload type. Optionally, the IP addresses, log receiving ports, and log levels of the logs received by the ECUs of the same log data processing type being the log upload type can belong to the same set of configuration data. When the number of ECUs whose log data processing type is the log upload type is multiple when the log data processing type of the ECU is the log collection type, the first log processing configuration information corresponding to the log data processing type of the ECU includes multiple sets of configuration data, and each set of configuration data corresponds to an ECU whose log data processing type is the log upload type.
[0048] Optionally, when the log data processing type of the ECU is the log upload type, the second log processing configuration information corresponding to the log data processing type of the ECU includes: the IP address of the target device and the communication port of the target device.
[0049] Optionally, when the log data processing type of the ECU is the log upload type, the second log processing configuration information corresponding to the log data processing type of the ECU may further include other configurations for communicating with the target device, which is not limited in this application.
[0050] The target device can be a device such as a terminal or a server. The terminal can be a tablet computer or a laptop computer. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.
[0051] For the constituent units in the embodiments of this system, such as the execution principles and interaction processes between the ECU and the target device, please refer to the descriptions of the following method embodiments.
[0052] Figure 2 FIG. 4 is a schematic flowchart of a method for processing log data provided by an exemplary embodiment of this application. The execution subject of this method can be the first ECU in a vehicle. Among them, there can be multiple ECUs in the vehicle, and the first ECU can be any one of the multiple ECUs. This method at least includes the following steps S201 - S203:
[0053] S201. Collect the first log information in the system memory;
[0054] ECU (Electronic Control Unit), that is, the electronic control unit, is an essential core component of modern automobiles. The system memory of the ECU mainly refers to its internal memory, which is used to store key data and programs to ensure that the ECU can respond quickly and operate smoothly.
[0055] Optionally, the first log information refers to the system log stored in the system memory of the ECU (electronic control unit).
[0056] S202. Obtain its own log data processing type from the configuration file, and the log data processing type includes a log collection type or a log upload type;
[0057] Optionally, the configuration file can be obtained from a configuration device. Correspondingly, the method further includes: obtaining a configuration instruction sent by the configuration device; determining the configuration file based on the configuration instruction.
[0058] Among them, the configuration instruction includes the configuration file.
[0059] The ECU with the log data processing type of log upload type has the following functions:
[0060] Collect the log information in its own system memory, receive the log information sent by the ECU with the log data processing type of log collection type, and upload the log information from its own system memory and the log information sent by the ECU with the log data processing type of log collection type to the target device.
[0061] The ECU with the log data processing type of log collection type has the following functions:
[0062] Collect the log information in its own system memory, and send the log information in its own system memory to the ECU with the log data processing type of log upload type.
[0063] S203. Process the first log information based on the log data processing type.
[0064] When the log data processing types of the first ECU are different, its processing methods for log information are different.
[0065] In some alternative embodiments of the present application, in the foregoing S203, processing the first log information based on the log data processing type includes the following steps S2031 - S2033:
[0066] S2031. When the log data processing type is the log collection type, obtain the first log processing configuration information corresponding to the log collection type from the configuration file;
[0067] S2032. Determine the second ECU whose type is the log upload type from the first log processing configuration information;
[0068] S2033. Send the first log information to the second ECU.
[0069] Optionally, when the log data processing type of the first ECU is the log collection type, the first log processing configuration information corresponding to the log data processing type of the first ECU includes: the IP addresses of the second ECUs whose log data processing types are the log upload type, the log receiving ports of the second ECUs whose log data processing types are the log upload type, and the log levels of the logs received by the second ECUs whose log data processing types are the log upload type. Optionally, the IP addresses, log receiving ports, and log levels of the logs received by the second ECUs with the same log data processing type being the log upload type can belong to the same set of configuration data. When the number of second ECUs whose log data processing types are the log upload type is multiple when the log data processing type of the first ECU is the log collection type, the first log processing configuration information corresponding to the log data processing type of the first ECU includes multiple sets of configuration data, and each set of configuration data corresponds to a second ECU whose log data processing type is the log upload type.
[0070] In some alternative embodiments of the present application, in the foregoing S203, processing the first log information based on the log data processing type includes the following steps S301 - S304:
[0071] S301. When the log data processing type is the log upload type, obtain the second log information received from the third ECU whose type is the log collection type;
[0072] S302. Obtain the second log processing configuration information corresponding to the log upload type from the configuration file;
[0073] S303. Determine the address information of the target device from the second log processing configuration information;
[0074] S304. Upload the first log information and the second log information to the target device according to the address information.
[0075] Optionally, when the log data processing type of the first ECU is the log upload type, the second log processing configuration information corresponding to the log data processing type of the first ECU includes: the IP address of the target device and the communication port of the target device.
[0076] Optionally, the address information of the target device may include the IP address and the communication port of the target device.
[0077] In some alternative embodiments of the present application, before uploading the first log information and the second log information to the target device according to the address information, in S203, processing the first log information based on the log data processing type further includes the following S01 - S02:
[0078] S01. Obtain the remaining storage space of the target device;
[0079] S02. When the remaining storage space is less than the first preset space threshold, store the first log information and the second log information locally.
[0080] Further, when it is detected that the remaining storage space of the target device is greater than the second preset space threshold, upload the first log information and the second log information stored locally to the target device. Wherein, the second preset space threshold is greater than the first preset space threshold.
[0081] By this method, when the pressure on the target device side is relatively high, the log information can be temporarily not uploaded to the target device, which can prevent congestion on the target device side.
[0082] In some alternative embodiments of the present application, during the process of collecting the first log information in the system memory, the method further includes the following steps S21 - S22:
[0083] S21. Obtain the current log volume in the system memory;
[0084] S22. If the log volume is greater than the first preset threshold, shorten the collection period for collecting data from the system memory; if the log volume is less than the second preset threshold, extend the collection period for collecting data from the system memory, and the second preset threshold is less than the first preset threshold.
[0085] Optionally, the second preset threshold may be half of the first preset threshold.
[0086] Through this solution, when there is a large amount of current logs in the system memory, the collection speed can be increased, thereby avoiding the system memory from being full.
[0087] Among them, the aforementioned log volume can be the byte volume of the logs.
[0088] It should be noted that each ECU in the vehicle has a log collection function.
[0089] Each ECU needs to collect log information according to the log collection configuration stored in itself. Among them, the log collection configuration can include the current log collection period, the first preset threshold, and the second preset threshold.
[0090] Among them, the current log collection period can refer to the collection period when the log information was collected last time.
[0091] If the current ECU has not collected logs yet, the current log collection period is the initially set log collection period, that is, the aforementioned initial collection period.
[0092] Among them, the aforementioned log collection configuration can be received from a configuration device.
[0093] The configuration device in this application refers to the upper computer.
[0094] In some alternative embodiments of the present application, the method further includes: obtaining the first log level corresponding to the second ECU; sending the first log information to the second ECU, including: sending the third log information with the log level being the first log level in the first log information to the second ECU.
[0095] Among them, the second ECU only obtains the log information with the log level being the first log level sent by the third ECU.
[0096] In some alternative embodiments of the present application, when the number of second ECUs with the log data processing type being the log upload type is multiple, the log levels corresponding to different second ECUs can be different.
[0097] The first ECU can send the log information with different log levels in the first log information to the corresponding second ECUs.
[0098] In some alternative embodiments of the present application, the second ECU can include multiple ECUs. For example, the second ECU can include the fourth ECU and the fifth ECU.
[0099] Optionally, when the second ECU includes multiple ECUs, different ECUs among the multiple ECUs included in the second ECU may correspond to different log levels. For example, when the fourth ECU corresponds to the second log level, but the fifth ECU corresponds to the third log level, sending the first log information to the second ECU may specifically include:
[0100] Sending the log information with the log level of the second log level in the first log information to the fourth ECU, and sending the log information with the log level of the third log level in the first log information to the fifth ECU.
[0101] When there are multiple ECUs included in the second ECU, the configuration information of each ECU of the log collection type may include: for each ECU among the multiple ECUs included in the second ECU, the IP address of the ECU, the log receiving port of the ECU, and the log level corresponding to the ECU.
[0102] Optionally, when the log data processing type is the log upload type, after the first ECU uploads the first log information and the second log information to the target device, the first ECU may also delete the first log information and the second log information stored locally and enter the sleep state.
[0103] When the ECU receives the end collection instruction, it stops collecting log information.
[0104] The solution applicable to the first ECU in a vehicle provided in this application includes: collecting the first log information in the system memory; obtaining its own log data processing type from the configuration file, where the log data processing type includes the log collection type or the log upload type; processing the first log information based on the log data processing type. The ECU can directly obtain the log information from the system log and can determine the processing solution of the log information based on its own log data processing type. The data in the system memory will not be deleted with the power on and off of the ECU, which can improve the reliability of the data during the process of the ECU collecting and uploading log data. Moreover, in the solution of this application, the ECUs are classified according to their log data processing types, and different ECUs have different processing methods for log data, thereby avoiding the problem that the ECU for uploading log information is under excessive pressure when all the log information of the ECUs in the vehicle is fixedly uploaded by the same ECU, and also improving the flexibility of the ECU to process data.
[0105] Figure 3 It is a schematic structural diagram of a log data processing device provided for an exemplary embodiment of this application; wherein, this device is applicable to the first ECU in a vehicle and includes:
[0106] The acquisition unit 31 is configured to acquire first log information in the system memory;
[0107] The obtaining unit 32 is configured to obtain its own log data processing type from a configuration file, and the log data processing type includes a log acquisition type or a log upload type;
[0108] The processing unit 33 is configured to process the first log information based on the log data processing type.
[0109] In some alternative embodiments of the present application, when the foregoing device is used to process the first log information based on the log data processing type, it is specifically configured to:
[0110] When the log data processing type is the log acquisition type, obtain first log processing configuration information corresponding to the log acquisition type from the configuration file;
[0111] Determine a second ECU of which the type is the log upload type from the first log processing configuration information;
[0112] Send the first log information to the second ECU.
[0113] In some alternative embodiments of the present application, when the foregoing device is used to process the first log information based on the log data processing type, it is specifically configured to:
[0114] When the log data processing type is the log upload type, obtain second log information received from a third ECU of which the type is the log acquisition type;
[0115] Obtain second log processing configuration information corresponding to the log upload type from the configuration file;
[0116] Determine the address information of the target device from the second log processing configuration information;
[0117] Upload the first log information and the second log information to the target device according to the address information.
[0118] In some alternative embodiments of the present application, before the foregoing device is used to upload the first log information and the second log information to the target device according to the address information, when the foregoing device is used to process the first log information based on the log data processing type, it is further specifically configured to:
[0119] Obtain the remaining storage space of the target device;
[0120] When the remaining storage space is less than a first preset space threshold, store the first log information and the second log information locally.
[0121] In some alternative embodiments of the present application, during the process of collecting the first log information in the acquisition system memory, the foregoing device is further configured to:
[0122] Obtain the current log volume in the system memory;
[0123] If the log volume is greater than a first preset threshold, shorten the acquisition period for collecting data from the system memory; if the log volume is less than a second preset threshold, extend the acquisition period for collecting data from the system memory, where the second preset threshold is less than the first preset threshold.
[0124] In some alternative embodiments of the present application, the foregoing device is further configured to: obtain the first log level corresponding to the second ECU;
[0125] In some alternative embodiments of the present application, when the foregoing device is used to send the first log information to the second ECU, it is specifically configured to: send the third log information with the log level being the first log level in the first log information to the second ECU.
[0126] In some alternative embodiments of the present application, the foregoing device is further configured to: obtain a configuration instruction sent by a configuration device; determine the configuration file based on the configuration instruction.
[0127] It should be understood that the device embodiments and the method embodiments can correspond to each other, and similar descriptions can refer to the method embodiments. To avoid repetition, it will not be elaborated here. Specifically, the device can execute the foregoing method embodiments, and the foregoing and other operations and / or functions of each module in the device respectively correspond to the corresponding processes in each method in the foregoing method embodiments. For the sake of brevity, it will not be elaborated here.
[0128] In the foregoing, the device of the embodiments of the present application has been described from the perspective of functional modules in combination with the drawings. It should be understood that the functional modules can be implemented in the form of hardware, can also be implemented by instructions in the form of software, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiments in the present application can be completed by the integrated logic circuit in the hardware in the processor and / or instructions in the form of software. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by a combination of the hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art 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 the memory, and the processor reads the information in the memory and combines its hardware to complete the steps in the foregoing method embodiments.
[0129] Figure 4It is a schematic block diagram of an electronic device provided by an embodiment of the present application. The electronic device may include:
[0130] A memory 301 and a processor 302. The memory 301 is used to store a 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.
[0131] For example, the processor 302 can be used to execute the above method embodiment according to the instructions in the computer program.
[0132] In some embodiments of the present application, the processor 302 may include, but is not limited to:
[0133] A general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and so on.
[0134] In some embodiments of the present application, the memory 301 includes, but is not limited to:
[0135] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double DataRate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synch link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0136] In some embodiments of the present application, the computer program may be divided into one or more modules, and the one or more modules 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 performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0137] As Figure 4 shown, the electronic device may further include:
[0138] A transceiver 303, which may be connected to the processor 302 or the memory 301.
[0139] Among them, the processor 302 can control the transceiver 303 to communicate with other devices. Specifically, it can send information or data to other devices, or 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.
[0140] It should be understood that the various components in the electronic device are connected through a bus system. Among them, the bus system includes, in addition to the data bus, a power bus, a control bus, and a status signal bus.
[0141] This application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a computer, the computer can execute the methods in the above method embodiments. Or rather, the embodiments of this application also provide a computer program product containing instructions. When the instructions are executed by a computer, the computer executes the methods in the above method embodiments.
[0142] When implemented using software, 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 processes or functions according to the embodiments of this application are 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. For example, the computer instructions can be transmitted from a website, a computer, a server, or a data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that integrates one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a digital video disc (DVD)), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0143] Those of ordinary skill in the art can realize that the modules and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0144] In 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 merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, 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 displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the devices or modules can be in electrical, mechanical, or other forms.
[0145] The modules described as separate components may or may not be physically separated. The components shown as modules may or may not be physical modules, that is, they can be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. For example, in each embodiment of the present application, the various functional modules can be integrated in a processing module, or each module can exist physically alone, or two or more modules can be integrated in one module.
[0146] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present application can easily think of changes or substitutions, which should all be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A log data processing method, characterized in that: Suitable for the first ECU in a vehicle, including: Collecting the first log information in the system memory; Obtaining its own log data processing type from the configuration file, where the log data processing type includes a log collection type or a log upload type; The first log information is processed based on the log data processing type.
2. The method according to claim 1, characterized in that The processing of the first log information based on the log data processing type includes: When the log data processing type is the log collection type, obtaining first log processing configuration information corresponding to the log collection type from the configuration file; Determine a second ECU of the log upload type from the first log processing configuration information; The first log information is sent to the second ECU.
3. The method according to claim 1, characterized in that The processing of the first log information based on the log data processing type includes: When the log data processing type is the log upload type, obtaining second log information received from a third ECU of the log collection type; Acquire second log processing configuration information corresponding to the log upload type from the configuration file; Determining address information of a target device from the second log processing configuration information; The first log information and the second log information are uploaded to the target device according to the address information.
4. The method according to claim 3, characterized in that Before uploading the first log information and the second log information to the target device according to the address information, processing the first log information based on the log data processing type further includes: Obtaining the remaining storage space of the target device; When the remaining storage space is less than a first preset space threshold, the first log information and the second log information are stored locally.
5. The method according to claim 1, characterized in that In the process of collecting the first log information in the system memory, the method further includes: Obtain the current amount of logs in the system memory; If the log volume is greater than a first preset threshold, the collection period for collecting data from the system memory is shortened; if the log volume is less than a second preset threshold, the collection period for collecting data from the system memory is extended, and the second preset threshold is less than the first preset threshold.
6. The method according to claim 2, characterized in that The method further includes: obtaining a first log level corresponding to the second ECU; Sending the first log information to the second ECU includes: sending third log information with a log level of the first log level in the first log information to the second ECU.
7. The method according to claim 1, characterized in that The method further includes: acquiring a configuration instruction sent by a configuration device; and determining the configuration file based on the configuration instruction.
8. A log data processing device, characterized in that: Suitable for the first ECU in a vehicle, including: A collection unit, used for collecting first log information in the system memory; An acquisition unit, used to acquire its own log data processing type from a configuration file, where the log data processing type includes a log collection type or a log upload type; A processing unit is used to process the first log information based on the log data processing type.
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.