Log processing method and device, equipment, storage medium and vehicle

By storing logs in the vehicle system to the cache area and synchronously streaming compression of partitioned data, the problem of large storage space and difficulty in decompression is solved, and the life and efficiency of the storage device are improved.

CN120407530APending Publication Date: 2025-08-01BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410131159.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-30
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

In the prior art, the vehicle system log occupies a large storage space and the compressed log is likely to be unable to decompress normally, which affects the erase life of the storage device.

Method used

Store the vehicle logs in the preset cache area, and perform stream compression processing of synchronous generation of multiple partition data when the preset conditions are met to generate log compressed data, avoid interrupts caused by abnormal situations, and reduce invalid data writing.

Benefits of technology

It improves the erase life of the storage device, reduces the possibility that the log compressed data cannot be decompressed normally, and improves storage efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407530A_ABST
    Figure CN120407530A_ABST
Patent Text Reader

Abstract

The invention relates to a log processing method and device, equipment, a storage medium and a vehicle. The method comprises the following steps: storing a vehicle log generated by a target vehicle in a preset cache region to obtain a plurality of target vehicle logs in the preset cache region; if the multiple target vehicle logs meet the preset compression condition, performing streaming compression processing of synchronous generation of multiple partition data on the multiple target vehicle logs, and generating log compression data in a preset file system; wherein the log compressed data comprises a plurality of partition data. According to the embodiment of the invention, the possibility that the log compressed data cannot be normally decompressed is reduced, the writing of invalid data in the storage device corresponding to the preset file system is avoided, the log compressed data is directly obtained in the preset file system, the storage of the original vehicle log in the storage device is avoided, and the storage efficiency is improved. The number of times of writing in the storage device is reduced, and the erasing service life of the storage device is prolonged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of vehicles, and in particular, to a method, device, equipment, storage medium and vehicle for log processing. Background Art

[0002] With the development of vehicle technology, the operating systems, application programs, etc. carried by in-vehicle systems are becoming more and more diverse. During the operation of the operating system and application programs, corresponding logs will be generated. These logs are stored in the file system in the form of original files, occupying a large amount of storage space.

[0003] In the related art, the logs in the file system are compressed, and the logs in the form of original files are deleted in the file system, and the compressed logs are saved. However, there is a possibility that the compressed logs in the file system cannot be decompressed normally, and the generation of the compressed logs has a greater impact on the erasure life of the storage device corresponding to the file system. Summary of the Invention

[0004] In order to solve the above technical problems, the present disclosure provides a method, device, equipment, storage medium and vehicle for log processing.

[0005] In a first aspect, the present disclosure provides a method for log processing, the method comprising:

[0006] Storing vehicle logs generated by a target vehicle in a preset buffer to obtain multiple target vehicle logs in the preset buffer;

[0007] If the multiple target vehicle logs meet a preset compression condition, performing a streaming compression process on the multiple target vehicle logs generated by synchronizing multiple partition data to generate log compression data in a preset file system; wherein, the log compression data includes the multiple partition data.

[0008] In a second aspect, the present disclosure provides a log processing device, the device comprising:

[0009] A storage module, configured to store vehicle logs generated by a target vehicle in a preset buffer to obtain multiple target vehicle logs in the preset buffer;

[0010] A compression module, configured to perform a streaming compression process on the multiple target vehicle logs generated by synchronizing multiple partition data to generate log compression data in a preset file system if the multiple target vehicle logs meet a preset compression condition; wherein, the log compression data includes the multiple partition data.

[0011] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising:

[0012] A processor;

[0013] A memory for storing executable instructions;

[0014] The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the log processing method of the first aspect above.

[0015] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to implement the log processing method of the first aspect above.

[0016] In a fifth aspect, an embodiment of the present disclosure further provides a vehicle including at least one of the following: the above-mentioned log processing device; the above-mentioned electronic device; the above-mentioned computer-readable storage medium.

[0017] The technical solution provided by the embodiment of the present disclosure has the following advantages compared with the prior art: For a log processing method, device, equipment and storage medium according to an embodiment of the present disclosure, vehicle logs generated by a target vehicle are stored in a preset buffer to obtain multiple target vehicle logs in the preset buffer; if the multiple target vehicle logs meet a preset compression condition, a streaming compression process of generating multiple partition data synchronizations is performed on the multiple target vehicle logs to generate log compression data in a preset file system; wherein, the log compression data includes multiple partition data. By adopting the above technical solution, vehicle logs are stored in the preset buffer, and when the preset compression condition is met, streaming compression of generating partition data synchronizations is performed on multiple vehicle logs in the preset buffer. By synchronously generating partition data, interruption of partial partition data generation caused by abnormal conditions such as power failure is avoided, the possibility that the log compression data cannot be normally decompressed is reduced, writing of invalid data into the storage device corresponding to the preset file system is avoided, the erasing and writing life of the storage device is improved, log compression data is directly obtained in the preset file system, storage of original vehicle logs in the storage device is avoided, the number of writes to the storage device is reduced, and the erasing and writing life of the storage device is improved. Description of the Drawings

[0018] The accompanying drawings here are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure and used together with the specification to explain the principles of the present disclosure.

[0019] To more clearly illustrate the technical solutions in the embodiments of the present disclosure 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, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.

[0020] Figure 1Schematic flowchart of a log processing method provided by an embodiment of the present disclosure;

[0021] Figure 2 Schematic diagram of a log processing provided by an embodiment of the present disclosure;

[0022] Figure 3 Schematic flowchart of another log processing method provided by an embodiment of the present disclosure;

[0023] Figure 4 Schematic structural diagram of a log processing device provided by an embodiment of the present disclosure;

[0024] Figure 5 Schematic diagram of the hardware circuit structure of a log compression device provided by an embodiment of the present disclosure. Detailed implementation manners

[0025] In order to more clearly understand the above objects, features and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that, without conflict, the embodiments of the present disclosure and the features in the embodiments may be combined with each other.

[0026] Many specific details are set forth in the following description in order to fully understand the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of the present disclosure, rather than all the embodiments.

[0027] With the development of vehicle technology, the operating systems, application programs, etc. carried by in-vehicle systems are becoming more and more diverse. During the operation of the operating system and application programs, corresponding logs will be generated. These logs will be stored in the file system in the form of original files. This method is applicable to scenarios where performance resources are limited but storage resources are relatively sufficient. This method is commonly used on the vehicle side, but the storage efficiency is low, and the logs occupy a large storage space.

[0028] In the related art, the logs in the file system are compressed, and the logs in the form of original files are deleted in the file system, and the compressed logs are saved. However, although this method has a high storage efficiency, there is still a possibility that the compressed logs in the file system cannot be decompressed normally, and it is necessary to write the original logs and the compressed logs into the file system in sequence, which has a great impact on the erasure life of the storage device corresponding to the file system.

[0029] To solve the above problems, embodiments of the present disclosure provide a log processing method, device, equipment, storage medium and vehicle.

[0030] Figure 1Schematic flowchart of a log processing method provided by an embodiment of the present disclosure. This method can be executed by a log processing device, which can be implemented by software and / or hardware and is generally integrated in an electronic device. The log processing device and / or the electronic device can be configured in a target vehicle. As Figure 1 shown, the method includes:

[0031] Step 101, storing vehicle logs generated by a target vehicle in a preset buffer to obtain multiple target vehicle logs in the preset buffer.

[0032] Among them, the target vehicle can be a vehicle to which this log processing method is applied. This embodiment does not limit the energy supply type of the target vehicle. For example, the energy supply type of the target vehicle can be pure electric power or hybrid power, etc. This embodiment also does not limit the type of the target vehicle. For example, the type of the target vehicle can be a Sport Utility Vehicle (SUV) or a sedan, etc. The vehicle log can be a log recording the running status of the target vehicle. There are various types of this vehicle log, which are not limited in this embodiment. For example, the vehicle log can include system logs generated by the operating system of the target vehicle and / or application program logs generated by the application programs of the target vehicle. The application program logs can include at least one of service logs and Over-the-Air Technology (OTA) logs. The preset buffer can be a pre-set area for caching vehicle logs to be stream-compressed, and the preset buffer can be understood as a storage area for vehicle logs to be stream-compressed. The target vehicle log can be the vehicle log currently to be stream-compressed.

[0033] In the embodiment of the present disclosure, the operating system and / or application programs running in the target vehicle will generate corresponding logs. The log processing device can store the vehicle logs generated by the target vehicle in the preset buffer in real time and perform stream compression on the vehicle logs stored in the preset buffer subsequently.

[0034] In some embodiments of the present disclosure, storing the vehicle logs generated by the target vehicle in the preset buffer to obtain multiple target vehicle logs in the preset buffer includes:

[0035] Obtaining the vehicle logs generated in real time through a preset log interface and storing the vehicle logs in the preset buffer; determining multiple vehicle logs generated within the current cycle as multiple target vehicle logs, and transferring the multiple target vehicle logs from the preset buffer to the preset cache to obtain multiple target vehicle logs in the preset cache.

[0036] Among them, the preset log interface can be an interface for obtaining vehicle logs, and there can be corresponding preset log interfaces for different types of vehicle logs. For example, the preset log interface corresponding to system logs can be the rsyslog interface built into the operating system, and the preset log interface corresponding to application logs can be a custom liblog interface. The preset buffer can be an area for buffer storing vehicle logs. The current cycle can be the processing cycle for current log compression. The interval corresponding to this current cycle can be 100 milliseconds.

[0037] In this embodiment, the log processing device can obtain system logs through the rsyslog interface of the target vehicle and obtain corresponding application logs through the liblog interface of the target vehicle. Furthermore, it can obtain vehicle logs generated by the target vehicle in real time. Further, store the vehicle logs obtained in real time into a preset buffer, and determine the vehicle logs in the preset buffer between the start time and the end time of the current cycle as the target vehicle logs, determine multiple target vehicle logs, and transfer the target vehicle logs from the preset buffer to a preset cache area.

[0038] In the above solution, buffer the vehicle logs obtained in real time into a preset buffer, and buffer the target vehicle logs that need to be processed by streaming compression within the current cycle into a preset cache area, thereby realizing the caching of target vehicle logs in the preset cache area, avoiding storing the target vehicle logs in the preset file system, and reducing the impact on the write-erase life of the preset file system.

[0039] Step 102, if multiple target vehicle logs meet the preset compression conditions, perform streaming compression processing on the multiple target vehicle logs to generate log compression data containing multiple partition data in the preset file system; where the log compression data contains multiple partition data.

[0040] Among them, the partition data may be data recorded in different functional partitions in a preset compression format based on which streaming compression is performed. The functional partition may be a data area defined in the preset compression format, and this functional partition is used to record data with corresponding functions during the data compression process. This embodiment does not limit this functional partition. For example, the functional partition may include one or more of a file data area (entry), a data encryption area (Encrypting File System, EFS), and a central directory area (centraldirectory). Streaming compression may be a compression algorithm that performs real-time compression while reading and processing target vehicle logs. The preset file system may be a pre-set system for storing log compression data. There may be a corresponding storage device for this preset file system, and this embodiment does not limit this storage device. For example, this storage device may include a storage device with an Embedded Multi Media Card (eMMC) standard specification and / or a Universal Flash Storage (UFS).

[0041] The preset compression condition may be a pre-set condition for performing streaming compression on target vehicle logs. There are various such preset compression conditions, and this embodiment does not limit them.

[0042] In some embodiments of the present disclosure, multiple target vehicle logs meet the preset compression conditions, including: determining the target data volume of the target vehicle logs generated in the current cycle; if the data volume of the target vehicle logs in the preset buffer is consistent with this target data volume, it is determined that multiple target vehicle logs meet the preset compression conditions.

[0043] In other embodiments of the present disclosure, multiple target vehicle logs meet the preset compression conditions, including: determining the cut-off time of the current cycle; if the generation time of the remaining vehicle logs in the preset buffer is after the cut-off time, it is determined that multiple target vehicle logs meet the preset compression conditions.

[0044] Among them, the cut-off time may be the time point with the latest time sequence in the current cycle. The remaining vehicle logs may be the vehicle logs in the preset buffer that have not been transferred to the preset buffer, and these remaining vehicle logs can be understood as the vehicle logs in the current preset buffer. The generation time may be the time point when the vehicle logs are generated.

[0045] In this embodiment, the log processing device sequentially transfers vehicle logs from a preset buffer to a preset cache area according to the generation order of the vehicle logs. The log processing device may determine the latest time in the current cycle as the cut-off time, and determine the reference vehicle log with the oldest time sequence (i.e., the first generated) among the remaining vehicle logs in the preset cache area, and determine the reference generation time of the reference vehicle log. It is judged whether the time sequence of the reference generation time is after the cut-off time. If so, it means that the vehicle logs generated in the current cycle have been transferred from the preset buffer to the preset cache area, and it is determined that multiple target vehicle logs meet the preset compression conditions. Otherwise, it means that the basic vehicle log was generated before the cut-off time, and the transfer of the target vehicle log to the preset cache area needs to continue.

[0046] In the above solution, based on the time sequence relationship, it is determined whether the target vehicle meets the preset compression conditions, which creates a basis for the streaming compression of vehicle logs in the current cycle.

[0047] The log compression data can be data generated by performing streaming compression on the target vehicle logs. In this embodiment, the preset compression format of the log compression data is not limited, and the preset compression format can be a format preset for performing streaming compression on the target vehicle logs. For example, the preset compression format can be the ZIP format. In some embodiments of the present disclosure, the partition data includes: file sub-data, encryption / decryption sub-data, and core directory sub-data; among them, the file sub-data includes a file header.

[0048] Among them, the file sub-data may include a file header (localfileheader), compressed data (filedata), and description information (datadescriptor). The description information may include the last modification time of the file, a Cyclic Redundancy Check (CRC), the file size, etc. The encryption / decryption sub-data may be the data recorded in the encrypted area of the preset compression format. The encryption / decryption sub-data may be the data used to record the encryption / decryption information of the log compressed data. The encryption / decryption data may include an encryption / decryption header (archivedecryptionheader) and an encryption / decryption value (archiveextradatarecord). The core directory sub-data may be the data recorded in the core directory area of the preset compression format. The core directory sub-data may include a directory header, a directory data record (zip64endofcentraldirectoryrecord), a target location (zip64 endofcentraldirectorylocator), and a directory tail (endofcentraldirectoryrecord). Among them, the directory data record is used to record the size, structure, etc. of the core directory, and the directory location is used to record the relative offset of the start position of the core directory, etc.

[0049] In some embodiments of the present disclosure, a streaming compression process is performed on multiple target vehicle logs for generating multiple partition data synchronizations, and log compressed data is generated in a preset file system, including:

[0050] Perform a streaming compression process on multiple target vehicle logs according to a preset compression format, synchronously generate a file header, encryption / decryption sub-data, and core directory sub-data, and obtain the log compressed data in the preset file system.

[0051] In this embodiment, the log processing device may perform a streaming compression process on multiple target vehicle logs as a whole according to a preset compression format. During this streaming compression process, the following updates are performed in a synchronous manner. Update the file data area according to the file header in the file sub-data, update the data encryption area according to the encryption / decryption sub-data, and update the core directory area according to the core directory sub-data. Furthermore, synchronous generation of the file header, encryption / decryption sub-data, and core directory sub-data, as well as synchronous updates of the file data area, data encryption area, and core directory area, are achieved. Furthermore, log compressed data is generated in a preset buffer area and the log compressed data is stored in the preset file system.

[0052] In the above solution, the process of synchronous update is also called the Sync process. By synchronously updating the file data area, the data encryption area, and the core target area, even if the log compression data is not properly closed during the generation of the log compression data, the log compression data that has been written to disk can still be decompressed normally. And since the synchronization period of the Sync process is at the millisecond level, even in the case of abnormal power failure, the data integrity of the log compression data can still be guaranteed.

[0053] The log processing method provided by the embodiments of the present disclosure stores the vehicle logs generated by the target vehicle in a preset buffer to obtain multiple target vehicle logs in the preset buffer; if the multiple target vehicle logs meet the preset compression conditions, perform a streaming compression process of generating multiple partition data synchronizations on the multiple target vehicle logs to generate log compression data in the preset file system; wherein, the log compression data includes multiple partition data. In the embodiments of the present disclosure, the vehicle logs are stored in the preset buffer, and when the preset compression conditions are met, the multiple vehicle logs in the preset buffer are subjected to streaming compression by generating partition data synchronizations. By generating partition data synchronizations, it is possible to avoid the interruption of the generation of some partition data caused by abnormal situations such as power failure, reduce the possibility that the log compression data cannot be decompressed normally, avoid the writing of invalid data in the storage device corresponding to the preset file system, improve the erase-write life of the storage device, directly obtain the log compression data in the preset file system, avoid storing the original vehicle logs in the storage device, reduce the number of writes to the storage device, and improve the erase-write life of the storage device.

[0054] In some embodiments of the present disclosure, the log processing method further includes:

[0055] Upload the log compression data to a preset cloud platform so that the client accessing the preset cloud platform can obtain the log compression data and decompress the log compression data.

[0056] Among them, the preset cloud platform can be a viewing platform for vehicle logs pre-set in the cloud. The client can be a user terminal for viewing vehicle logs.

[0057] Figure 2 For a schematic diagram of the log processing provided by the embodiments of the present disclosure, as Figure 2As shown in the figure, the system for implementing the log processing method may include a collection layer, a management layer, and an upload layer. The collection layer obtains the system logs of the target vehicle through the rsyslog interface and the application logs generated by the application (APP) of the target vehicle through the liblog interface. And transmits the vehicle logs to the management layer through Shared Memory (SHM) or Transmission Control Protocol (TCP). The management layer performs log rolling, log storage, and streaming compression processing on the target vehicle logs in the current cycle, stores the log compression data in the file system, and transmits the log compression data to the upload layer. After receiving the log compression data, the upload layer uploads the log compression data to a preset cloud platform through the Hypertext Transfer Protocol (HTTP) or the 5th Generation Mobile Communication Technology (5G). Developers at the user end can access the preset cloud platform through the client and decompress the log compression data through a preset query interface, thereby realizing the viewing of the target vehicle logs.

[0058] In the above solution, uploading the log compression data to a preset cloud platform enables the client to decompress the log compression data and view the corresponding target vehicle logs.

[0059] In some embodiments of the present disclosure, the decompression order of decompressing the log compression data is: core directory sub-data, file sub-data, encryption / decryption sub-data.

[0060] In the related art, after decompressing the file sub-data and the encryption / decryption sub-data, the core directory sub-data is decompressed. If there is an abnormality in the file sub-data or the encrypted sub-data, the core directory sub-data is not decompressed, and the overall compression package decompression is abnormal. In this embodiment, since the client accessing the preset cloud platform first decompresses the core directory sub-data, the directory location can be obtained before decompressing the file sub-data and the encrypted sub-data. This directory location records the relative offset of the start position of the core directory. Furthermore, in the case of an abnormality in the log compression data, etc., this directory location is obtained before decompressing the file sub-data and the encryption / decryption sub-data. During the decompression process of the file sub-data and the decryption sub-data, the data processing device can perform data recovery on the file sub-data and the encryption / decryption sub-data according to this target location, thereby increasing the possibility that the log compression data can be normally decompressed.

[0061] Next, a specific example is used to further illustrate the log processing method in the embodiments of the present disclosure. Figure 3The flowchart of another log processing method provided by the embodiments of the present disclosure is shown as Figure 3 As shown, the clamping method of the workpiece model includes:

[0062] Step 301: Obtain the target vehicle logs generated in the current cycle from the preset buffer.

[0063] Step 302: Determine whether all the target vehicle logs have been transferred to the preset buffer. If so, execute Step 304; otherwise, execute Step 303.

[0064] Step 303: Continue to transfer the target vehicle logs.

[0065] Step 304: Perform streaming compression to obtain log compression data.

[0066] Step 305: Store the log compression data in the file system.

[0067] Regarding the method of updating the file data area, data encryption area, and core directory area when the compressed file is closed, if an abnormal exit occurs during the intermediate process, the generated compressed package cannot be decompressed because the data is incomplete. In this embodiment, after the logs generated in the current cycle are taken out from the preset buffer, streaming compression is performed once, and the contents in the file data area, data encryption area, and core directory area are synchronously updated. Therefore, even if the target vehicle logs are not normally closed, the log compression data can still be normally decompressed, and due to the short synchronization period of the synchronous update, the integrity of the data can be guaranteed in the case of abnormal power off or the like.

[0068] The log processing method provided by the embodiments of the present disclosure improves the write life of the storage device corresponding to the file system and increases the effective storage capacity of vehicle logs through the log processing method based on streaming compression. Moreover, through the Sync mechanism, the integrity of the log compression data in an abnormal environment is improved, and the robustness of the log processing method is enhanced.

[0069] Figure 4 The structural schematic diagram of a log processing device provided by the embodiments of the present disclosure is shown.

[0070] In some embodiments of the present disclosure, Figure 4 The log processing device shown can be executed by an electronic device or a server. The electronic device may include, but is not limited to, mobile terminals such as in-vehicle terminals, and fixed terminals such as vehicle domain controllers. The server may be a server cluster or a cloud server.

[0071] As Figure 4 shown, the log processing device 400 may include: a storage module 401 and a compression module 402.

[0072] A storage module 401 for storing vehicle logs generated by a target vehicle in a preset buffer area to obtain multiple target vehicle logs in the preset buffer area;

[0073] A compression module 402 for performing streaming compression processing on the multiple target vehicle logs to generate log compression data in a preset file system if the multiple target vehicle logs meet a preset compression condition; wherein the log compression data includes the multiple partition data.

[0074] Optionally, the storage module 401 is configured to:

[0075] Obtain the vehicle logs generated in real time through a preset log interface and store the vehicle logs in a preset buffer;

[0076] Determine multiple vehicle logs generated in the current period as the multiple target vehicle logs, transfer the multiple target vehicle logs from the preset buffer to the preset buffer area to obtain multiple target vehicle logs in the preset buffer area.

[0077] Optionally, the multiple target vehicle logs meet the preset compression condition, including:

[0078] Determine the cut-off time of the current period;

[0079] If the generation time of the remaining vehicle logs in the preset buffer area is after the cut-off time, determine that the multiple target vehicle logs meet the preset compression condition.

[0080] Optionally, the partition data includes: file sub-data, encryption / decryption sub-data, core directory sub-data; wherein the file sub-data includes a file header.

[0081] Correspondingly, the compression module 402 is configured to:

[0082] Perform streaming compression processing on the multiple target vehicle logs according to a preset compression format, and synchronously generate the file header, the encryption / decryption sub-data, and the core directory sub-data to obtain log compression data in the preset file system.

[0083] Optionally, the log processing device 400 further includes:

[0084] An upload module for uploading the log compression data to a preset cloud platform so that a client accessing the preset cloud platform can obtain the log compression data and decompress the log compression data.

[0085] Optionally, the decompression order of the decompressing the log compression data is: core directory sub-data, file sub-data, encryption / decryption sub-data.

[0086] The log processing device provided by the embodiments of the present disclosure can execute the log processing method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects for executing the method.

[0087] Figure 5 The figure shows a schematic diagram of the hardware circuit structure of a log compression device provided by the embodiments of the present disclosure.

[0088] As Figure 5 shown, the log compression device 500 may include a controller 501 and a memory 502 storing computer program instructions.

[0089] Specifically, the controller 501 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0090] The memory 502 may include a mass storage for information or instructions. By way of example and not limitation, the memory 502 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disc, a magneto-optical disc, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In a suitable case, the memory 502 may include removable or non-removable (or fixed) media. In a suitable case, the memory 502 may be internal or external to the integrated gateway device. In a particular embodiment, the memory 502 is a non-volatile solid state memory. In a particular embodiment, the memory 502 includes a read-only memory (ROM). In a suitable case, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM), or a flash memory, or a combination of two or more of these.

[0091] The controller 501 reads and executes the computer program instructions stored in the memory 502 to perform the steps of the log processing method provided by the embodiments of the present disclosure.

[0092] In one example, the log compression device 500 may further include a transceiver 503 and a bus 505. Among them, as Figure 5 shown, the controller 501, the memory 502, and the transceiver 503 are connected through the bus 504 and complete communication with each other.

[0093] The bus 504 includes hardware, software, or both. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side BUS (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. In a suitable case, the bus 504 may include one or more buses. Although the embodiments of the present application describe and illustrate specific buses, the present application contemplates any suitable bus or interconnect.

[0094] The following are embodiments of a computer-readable storage medium provided by the embodiments of the present disclosure. The computer-readable storage medium and the log processing methods of the above embodiments belong to the same inventive concept. Details not described in detail in the embodiments of the computer-readable storage medium may refer to the embodiments of the above log processing methods.

[0095] This embodiment provides a storage medium containing computer-executable instructions. The computer-executable instructions are used to execute a log processing method when executed by a computer processor.

[0096] Of course, for a storage medium containing computer-executable instructions provided by an embodiment of the present disclosure, the computer-executable instructions are not limited to the method operations as described above, and can also execute related operations in the log processing method provided by any embodiment of the present disclosure.

[0097] From the above description of the embodiments, those skilled in the art can clearly understand that the present disclosure can be implemented by means of software and necessary general-purpose hardware. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present disclosure, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a floppy disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (FLASH), a hard disk, or an optical disc of a computer, and includes several instructions for causing a computer cloud platform (which can be a personal computer, a server, or a network cloud platform, etc.) to execute the log processing methods provided by various embodiments of the present disclosure.

[0098] An embodiment of the present disclosure further provides a vehicle, including at least one of the following: the above-mentioned log processing device; the above-mentioned electronic device; the above-mentioned computer-readable storage medium.

[0099] Note that the above is only a preferred embodiment of the present disclosure and the applied technical principle. Those skilled in the art will understand that the present disclosure is not limited to the specific embodiments here, and various obvious changes, re-adjustments, and substitutions can be made by those skilled in the art without departing from the protection scope of the present disclosure. Therefore, although the present disclosure has been described in detail through the above embodiments, the present disclosure is not limited to the above embodiments. Without departing from the concept of the present disclosure, it can also include more other equivalent embodiments, and the scope of the present disclosure is determined by the scope of the appended claims.

Claims

1. A log processing method, characterized in that, Including: Storing vehicle logs generated by a target vehicle in a preset buffer to obtain multiple target vehicle logs in the preset buffer; If the multiple target vehicle logs meet a preset compression condition, performing a streaming compression process for generating multiple partition data synchronously on the multiple target vehicle logs to generate log compression data in a preset file system; wherein, the log compression data includes the multiple partition data.

2. The method according to claim 1, characterized in that, The storing vehicle logs generated by a target vehicle in a preset buffer to obtain multiple target vehicle logs in the preset buffer includes: Obtaining the vehicle logs generated in real time through a preset log interface and storing the vehicle logs in a preset buffer; Determining multiple vehicle logs generated in the current cycle as the multiple target vehicle logs, and transferring the multiple target vehicle logs from the preset buffer to the preset cache to obtain multiple target vehicle logs in the preset cache.

3. The method according to claim 2, wherein The multiple target vehicle logs meeting the preset compression condition includes: Determining the cut-off time of the current cycle; If the generation time of the remaining vehicle logs in the preset cache is after the cut-off time, determining that the multiple target vehicle logs meet the preset compression condition.

4. The method according to claim 1, characterized in that The partition data includes: file sub-data, encryption / decryption sub-data, core directory sub-data; wherein, the file sub-data includes a file header. Correspondingly, the performing a streaming compression process for generating multiple partition data synchronously on the multiple target vehicle logs to generate log compression data in a preset file system includes: Performing a streaming compression process on the multiple target vehicle logs according to a preset compression format, synchronously generating the file header, the encryption / decryption sub-data, and the core directory sub-data to obtain log compression data in the preset file system.

5. The method according to claim 1, characterized in that The method further includes: Uploading the log compression data to a preset cloud platform so that a client accessing the preset cloud platform can obtain the log compression data and decompress the log compression data.

6. The method according to claim 5, wherein The decompression order of the log compression data is the core directory sub-data, the file sub-data, and the encryption / decryption sub-data in sequence.

7. A log processing device, characterized in that, Including: A storage module, configured to store vehicle logs generated by a target vehicle in a preset buffer to obtain multiple target vehicle logs in the preset buffer; A compression module, configured to, if the multiple target vehicle logs meet a preset compression condition, perform a streaming compression process for generating multiple partition data synchronously on the multiple target vehicle logs to generate log compression data in a preset file system; wherein, the log compression data includes the multiple partition data.

8. An electronic device, characterized in that, The electronic device includes: A processor and a memory; The processor is configured to execute the steps of the method according to any one of claims 1 to 6 by calling a program or instruction stored in the memory.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program or instruction, and the program or instruction causes a computer to execute the steps of the method according to any one of claims 1 to 6.

10. A vehicle, characterized in that, Including at least one of the following: The log processing device according to claim 7 above; The electronic device according to claim 8 above; The computer-readable storage medium according to claim 9 above.