CN111930695A - Method and device for storing running logs of microprocessor of vehicle-mounted terminal - Google Patents

Method and device for storing running logs of microprocessor of vehicle-mounted terminal Download PDF

Info

Publication number
CN111930695A
CN111930695A CN202011068858.3A CN202011068858A CN111930695A CN 111930695 A CN111930695 A CN 111930695A CN 202011068858 A CN202011068858 A CN 202011068858A CN 111930695 A CN111930695 A CN 111930695A
Authority
CN
China
Prior art keywords
log
microprocessor
log file
vehicle
storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011068858.3A
Other languages
Chinese (zh)
Other versions
CN111930695B (en
Inventor
冀英超
朱磊
杨彦林
王超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mushroom Car Union Information Technology Co Ltd
Original Assignee
Mushroom Car Union Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mushroom Car Union Information Technology Co Ltd filed Critical Mushroom Car Union Information Technology Co Ltd
Priority to CN202011068858.3A priority Critical patent/CN111930695B/en
Publication of CN111930695A publication Critical patent/CN111930695A/en
Application granted granted Critical
Publication of CN111930695B publication Critical patent/CN111930695B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1737Details of further file system functions for reducing power consumption or coping with limited storage space, e.g. in mobile devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention provides a method and a device for storing an operation log of a microprocessor of a vehicle-mounted terminal, wherein the microprocessor is connected with a main processor, and the method comprises the following steps: checking a log file storage area of a main processor; under the condition that the log files of the current day do not exist, judging whether the stored log files reach a preset number or not; if not, creating a new log file of the current day; if yes, deleting at least one log file with the storage time being earlier, and then building a new log file on the current day; and receiving the daily microprocessor log data, and storing the daily microprocessor log data in a newly-built log file so as to effectively utilize the storage space of the main processor to store the running logs of the microprocessor and ensure that the daily microprocessor log data is stored in the newly-built log file.

Description

Method and device for storing running logs of microprocessor of vehicle-mounted terminal
Technical Field
The invention relates to the technical field of data processing, in particular to a method and a device for storing running logs of a microprocessor of a vehicle-mounted terminal.
Background
The vehicle-mounted terminal is used as one of three major components in the vehicle networking system and is responsible for collecting real-time running data of the vehicle and realizing the collection, storage and transmission of all working information and static and dynamic information of the vehicle. The vehicle-mounted terminal generally comprises a main processor and a microprocessor, wherein the main processor is responsible for image and video processing and has strong data processing capacity; the microprocessor is responsible for the collection of peripheral equipment such as external I/O, sensors and the like, and has strong real-time performance. Various exceptions in the operation process can be traced and positioned through the microprocessor operation log.
At present, the operation log of the microprocessor of the vehicle-mounted terminal is generally stored in Flash or extended Flash of the microprocessor, the storage space is limited, long-time log recording cannot be realized, and the positioning randomness abnormity is difficult. In addition, when the log data of the microprocessor is more, data congestion is easily caused, and serious persons can cause data loss.
Disclosure of Invention
The embodiment of the invention provides a method and a device for storing a microprocessor running log of a vehicle-mounted terminal, electronic equipment and a storage medium, which are used for solving the defects that the storage space of the vehicle-mounted terminal is limited and the vehicle-mounted terminal cannot be stored for a long time in the prior art.
The embodiment of the invention provides a method for storing an operation log of a microprocessor of a vehicle-mounted terminal, wherein the microprocessor is connected with a main processor, and the method comprises the following steps:
checking a log file storage area of a main processor;
under the condition that the log files of the current day do not exist, judging whether the stored log files reach a preset number or not;
if not, creating a new log file of the current day;
if yes, deleting at least one log file with the storage time being earlier, and then building a new log file on the current day;
and receiving the daily microprocessor log data, and storing the daily microprocessor log data in a newly-built log file.
According to an embodiment of the invention, the method for storing the microprocessor operation log of the vehicle-mounted terminal further comprises the following steps: the log file storage area of the main processor is checked, and the received microprocessor log data is stored in the log file of the current day in the case that it is determined that the log file of the current day exists.
According to one embodiment of the invention, the method for storing the microprocessor operation log of the vehicle-mounted terminal deletes at least one log file with earlier storage time, and comprises the following steps: and deleting the log file with the most advanced storage time.
According to an embodiment of the invention, the method for storing the microprocessor operation log of the vehicle-mounted terminal further comprises the following steps:
and continuously judging whether the space of the log file storage area meets the storage requirement, and if not, continuously deleting the log file with the most advanced storage time.
According to an embodiment of the invention, the method for storing the microprocessor operation log of the vehicle-mounted terminal stores the microprocessor log data in a newly-built log file, and comprises the following steps:
and storing the microprocessor log data in a newly-built log file in a fixed naming format, wherein the fixed naming format comprises a date of the day field.
According to the microprocessor operation log storage method of the vehicle-mounted terminal in one embodiment of the invention, before checking the log file storage area of the main processor, the method further comprises the following steps: and starting the vehicle-mounted terminal and automatically starting a log storage process.
According to an embodiment of the invention, the method for storing the microprocessor operation log of the vehicle-mounted terminal further comprises the following steps: and sending a control command to the microprocessor through the main processor so that the microprocessor outputs log data of corresponding categories according to the control command, wherein the microprocessor generates the log data of a plurality of categories.
The embodiment of the invention also provides a microprocessor operation log storage device of the vehicle-mounted terminal, which comprises:
the checking module is used for checking a log file storage area of the main processor;
the judging module is used for judging whether the stored log files reach the preset number under the condition that the log files of the current day do not exist, if not, executing the first processing module, and if so, executing the second processing module;
the first processing module is used for creating a new log file of the current day;
the second processing module is used for deleting at least one log file with the previous storage time and then newly building a log file of the current day;
and the storage module is used for receiving the daily microprocessor log data and storing the daily microprocessor log data in a newly-built log file.
The embodiment of the invention also provides electronic equipment which comprises a memory, a processor and a computer program which is stored on the memory and can be run on the processor, wherein when the processor executes the program, the steps of the microprocessor running log storage method of the vehicle-mounted terminal are realized.
An embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for storing the log of the microprocessor of the vehicle-mounted terminal according to any one of the above descriptions.
The method and the device for storing the microprocessor running log of the vehicle-mounted terminal provided by the embodiment of the invention are used for checking the log file storage area of the main processor, deleting at least one log file with the earlier storage time when the stored log files are judged to reach the preset number under the condition that the daily log files do not exist, and then newly building the daily log file so as to effectively utilize the storage space of the main processor to store the microprocessor running log and ensure that the daily microprocessor log data are stored in the newly built log file.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a hardware structure diagram of a method for storing an operation log of a microprocessor according to an embodiment of the present invention;
FIG. 2 is a schematic flowchart illustrating a method for storing an operation log of a microprocessor of a vehicle-mounted terminal according to an embodiment of the present invention;
FIG. 3 is a schematic flowchart illustrating a method for storing an operation log of a microprocessor of a vehicle-mounted terminal according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a microprocessor operation log storage device of a vehicle-mounted terminal according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the one or more embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the invention. As used in one or more embodiments of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present invention refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that, although the terms first, second, etc. may be used herein to describe various information in one or more embodiments of the present invention, such information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first aspect may be termed a second aspect, and, similarly, a second aspect may be termed a first aspect, without departing from the scope of one or more embodiments of the present invention. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In the embodiment of the invention, a method and a device for storing an operation log of a microprocessor of a vehicle-mounted terminal, an electronic device and a non-transitory computer readable storage medium are provided, and detailed description is made in the following embodiments one by one.
First, a hardware environment to which the method of the embodiment of the present invention is applied will be schematically described.
As shown in fig. 1, fig. 1 is a hardware connection scheme of a microprocessor operation log storage method of a vehicle-mounted terminal.
And the microprocessor of the vehicle-mounted terminal is connected with the main processor through a USB interface (or a serial port, an SPI interface and a CAN interface). And the running log of the vehicle-mounted terminal is sent to the main processor through the USB interface, and the main processor is responsible for storing and maintaining the running log. The main processor can also send instructions to the microprocessor through the USB interface to control log output, including the output type and output frequency of the log.
The embodiment of the invention discloses a method for storing an operation log of a microprocessor of a vehicle-mounted terminal, which is shown in figure 2 and comprises the following steps of 200-204:
200. the log file storage area of the main processor is checked.
In the embodiment, the log file of the microprocessor is stored in the log file storage area of the main processor, so that the storage area of the main processor of the vehicle-mounted terminal is effectively utilized.
In the main processor log file storage area, the log files are stored in a fixed format. For example, in text format: *. log files are stored for easy searching. In addition, the name format of the log file may include a date field to facilitate recognition of the generation date of the log file in the subsequent steps, for example, mcu _20200904.log, which represents that the log file is generated for 9, 9 and 4 days in 2020.
Taking the current date as 2020, 9, month and 20 as an example, first, whether a log file corresponding to the date field of 200920 exists in the storage area is searched. And if not, executing the step of subsequently creating the log file.
201. And under the condition that the log files of the current day do not exist, judging whether the stored log files reach the preset number, if not, executing step 202, and if so, executing step 203.
In this embodiment, before the log file is newly created, it is further determined whether the number of the stored log files reaches a preset number, so as to ensure that the storage area has enough storage space to store the daily microprocessor log data after the log file is newly created.
The preset number may be set according to actual requirements, for example, 1000.
It should be noted that in this embodiment, the number of the stored log files is determined after determining that there is no log file on the current day, instead of determining the number of the stored log files after creating a new log file, so as to avoid that the new log file exceeds the rated space of the storage area, which further causes storage failure.
202. And creating a log file of the current day.
Taking the current day as 2020, 9, 20 as an example, the newly created log file is mcu _20200920. log.
203. And deleting at least one log file stored in the previous time, and then creating a log file of the current day.
Taking the example that 1000 log files are stored in the log file storage area of the main processor, one or more log files with earlier time are deleted in time sequence to save the space of the storage area.
Correspondingly, if the complete microprocessor log data is to be saved, the user is required to copy or read the log file in the storage area out at intervals, such as once a year.
204. And receiving the daily microprocessor log data, and storing the daily microprocessor log data in a newly-built log file.
Still take the newly created log file as mcu _20200920.log as an example, today's microprocessor log data is stored in the log file. Optionally, the storage of the microprocessor log data may also add a time field to facilitate regular and orderly storage of the microprocessor log data in the log file.
In a usage scenario, for example, when the car travels for a certain time in the morning and afternoon, it means that the in-vehicle terminal is operated for two time periods within one day. Correspondingly, the log data of the microprocessor in the two time periods are stored in the log file of the current day.
In another usage scenario, the car is continuously driven from 6 pm on the first day to 4 am on the second day, and although the in-vehicle terminal is continuously operating for a period of time, the period of time spans two days. Correspondingly, two log files are generated in the vehicle-mounted terminal, and microprocessor log data from 6 pm to 12 pm on the first day and microprocessor log data from 12 pm to 4 pm on the second day are respectively stored.
The method for storing the microprocessor running log of the vehicle-mounted terminal provided by the embodiment of the invention checks the log file storage area of the main processor, deletes at least one log file with the earlier storage time when judging that the stored log files reach the preset number under the condition of determining that the daily log files do not exist, and then newly establishes the daily log file so as to effectively utilize the storage space of the main processor to store the microprocessor running log and ensure that the daily microprocessor log data is stored in the newly established log file.
In order to further explain the method of the embodiment, the embodiment of the invention also discloses a method for storing the running log of the microprocessor of the vehicle-mounted terminal, which is shown in fig. 3 and comprises the following steps 301 to 306:
301. and starting the vehicle-mounted terminal and automatically starting a log storage process.
In this embodiment, the vehicle-mounted terminal can be powered on to work when the automobile is ignited and started. Specifically, a main processor of the vehicle-mounted terminal starts a log storage process.
302. And checking a log file storage area of the main processor, judging whether a log file of the current day exists, if so, executing step 306, and if not, executing step 303.
In this embodiment, in the log file storage area of the main processor, the log files are all stored in a fixed format. For example, in text format: *. log files are stored for easy searching. And the name format of the log file may include a date field to facilitate the recognition of the generation date of the log file in the subsequent steps, for example, mcu _20200904.log, which represents that the log file is generated for 9/4/2020.
In the embodiment, the date field is added in the name of the log file, so that the identification and management are facilitated. By looking up the date field of the log file in the storage area, it can be determined whether the log file of the current day exists in the storage area.
303. And judging whether the number of the stored log files reaches a preset number, if not, executing a step 304, and if so, executing a step 305.
In this embodiment, the preset number may be set according to actual requirements, or may be determined according to the actual size of the storage area, for example, set to 800, 1000, and the like.
304. And creating a log file of the current day.
Taking the current day as 2020, 9, 20 as an example, the newly created log file is mcu _20200920. log.
305. And deleting at least one log file stored in the previous time, and then creating a log file of the current day.
In this embodiment, one log file with the most advanced storage time may be deleted each time.
Optionally, in order to ensure that the storage area has enough storage space to store the daily log file, after deleting the log file, the method further includes: and continuously judging whether the space of the storage area meets the storage requirement, if not, continuously deleting the log file with the most advanced storage time until the storage requirement is met, and then newly building the log file of the day.
Taking the preset number of the log files as 800 as an example, the log files are sequentially arranged from 1 to 800 according to the time sequence. Deleting the log file 1 with the most advanced time, then judging whether the space of the storage area meets the storage requirement, if not, continuing deleting the log file 2, and sequentially and circularly judging until determining that the remaining storage space meets the storage requirement, and newly building the log file of the day.
306. And receiving the daily microprocessor log data, and storing the daily microprocessor log data in a newly-built log file.
In the embodiment, the random anomaly is tracked and positioned by realizing long-term storage of the log file according to requirements.
After obtaining the log file, the method further comprises: connecting the vehicle-mounted terminal through a network to download the log file; or the vehicle-mounted terminal is connected through an external storage device to copy the log file.
Optionally, the method further comprises: and sending a control command to the microprocessor through the main processor so that the microprocessor outputs log data of corresponding categories according to the control command, wherein the microprocessor generates the log data of a plurality of categories.
The method for storing the microprocessor running log of the vehicle-mounted terminal provided by the embodiment of the invention checks the log file storage area of the main processor, deletes at least one log file with the earlier storage time when judging that the stored log files reach the preset number under the condition of determining that the daily log files do not exist, and then newly establishes the daily log file so as to effectively utilize the storage space of the main processor to store the microprocessor running log and ensure that the daily microprocessor log data is stored in the newly established log file.
The following describes the microprocessor operation log storage device of the vehicle-mounted terminal according to the embodiment of the present invention, and the microprocessor operation log storage device of the vehicle-mounted terminal described below and the microprocessor operation log storage method of the vehicle-mounted terminal described above may be referred to in a corresponding manner.
The embodiment of the present invention provides a microprocessor operation log storage device of a vehicle-mounted terminal, referring to fig. 4, including:
an inspection module 401, configured to inspect a log file storage area of a host processor;
a determining module 402, configured to determine whether the number of stored log files reaches a preset number under the condition that it is determined that there are no log files of the current day, if not, execute a first processing module 403, and if so, execute a second processing module 404;
a first processing module 403, configured to create a new daily log file;
the second processing module 404 is configured to delete at least one log file stored in the previous time, and create a new log file on the current day;
the storage module 405 is configured to receive the microprocessor log data of the current day, and store the microprocessor log data in a newly created log file.
Optionally, the checking module 401 is further configured to check a log file storage area of the main processor, and store the received microprocessor log data in the log file of the current day if it is determined that the log file of the current day exists.
Optionally, the second processing module 404 is specifically configured to: and deleting the log file with the most advanced storage time.
Optionally, the apparatus further comprises: and the circulating module is used for continuously judging whether the space of the log file storage area meets the storage requirement, and if not, continuously deleting the log file with the most front storage time.
Optionally, the storage module 405 is specifically configured to: and storing the microprocessor log data in a newly-built log file in a fixed naming format, wherein the fixed naming format comprises a date of the day field.
Optionally, the apparatus further comprises: and the process starting module is used for starting the vehicle-mounted terminal and automatically starting the log storage process.
Optionally, the apparatus further comprises: and the control module is used for sending a control command to the microprocessor through the main processor so that the microprocessor outputs log data of corresponding categories according to the control command, wherein the microprocessor generates the log data of a plurality of categories.
The microprocessor operation log storage device of the vehicle-mounted terminal provided by the embodiment of the invention checks the log file storage area of the main processor, deletes at least one log file with the earlier storage time when judging that the stored log files reach the preset number under the condition of determining that the daily log files do not exist, and then newly establishes the daily log file so as to effectively utilize the storage space of the main processor to store the microprocessor operation log and ensure that the daily microprocessor log data is stored in the newly established log file.
Fig. 5 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 5: a processor (processor)510, a communication Interface (Communications Interface)520, a memory (memory)530 and a communication bus 540, wherein the processor 510, the communication Interface 520 and the memory 530 communicate with each other via the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to perform a method for storing a log of the operation of the microprocessor of the in-vehicle terminal, the method including:
checking a log file storage area of the main processor, and judging whether the stored log files reach a preset number or not under the condition that the log files of the current day do not exist;
if not, creating a new log file of the current day;
if yes, deleting at least one log file with the storage time being earlier, and then building a new log file on the current day;
and receiving the daily microprocessor log data, and storing the daily microprocessor log data in a newly-built log file.
Furthermore, the logic instructions in the memory 530 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, an embodiment of the present invention further provides a computer program product, where the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by a computer, the computer is capable of executing the microprocessor operation log storage method of the vehicle-mounted terminal provided in the foregoing method embodiments, where the method includes:
checking a log file storage area of the main processor, and judging whether the stored log files reach a preset number or not under the condition that the log files of the current day do not exist;
if not, creating a new log file of the current day;
if yes, deleting at least one log file with the storage time being earlier, and then building a new log file on the current day;
and receiving the daily microprocessor log data, and storing the daily microprocessor log data in a newly-built log file.
In still another aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented by a processor to execute the microprocessor operation log storage method of the vehicle-mounted terminal provided in the foregoing embodiments, where the method includes:
checking a log file storage area of the main processor, and judging whether the stored log files reach a preset number or not under the condition that the log files of the current day do not exist;
if not, creating a new log file of the current day;
if yes, deleting at least one log file with the storage time being earlier, and then building a new log file on the current day;
and receiving the daily microprocessor log data, and storing the daily microprocessor log data in a newly-built log file.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for storing an operation log of a microprocessor of a vehicle-mounted terminal is characterized in that the microprocessor is connected with a main processor, and the method comprises the following steps:
checking a log file storage area of a main processor;
under the condition that the log files of the current day do not exist, judging whether the stored log files reach a preset number or not;
if not, creating a new log file of the current day;
if yes, deleting at least one log file with the storage time being earlier, and then building a new log file on the current day;
and receiving the daily microprocessor log data, and storing the daily microprocessor log data in a newly-built log file.
2. The microprocessor operation log storage method of the vehicle-mounted terminal according to claim 1, wherein the method further comprises:
the log file storage area of the main processor is checked, and the received microprocessor log data is stored in the log file of the current day in the case that it is determined that the log file of the current day exists.
3. The microprocessor operation log storage method of the vehicle-mounted terminal according to claim 1, wherein deleting at least one log file stored earlier comprises:
and deleting the log file with the most advanced storage time.
4. The microprocessor operation log storage method of the vehicle-mounted terminal according to claim 3, further comprising:
and continuously judging whether the space of the log file storage area meets the storage requirement, and if not, continuously deleting the log file with the most advanced storage time.
5. The microprocessor operation log storage method of the vehicle-mounted terminal according to claim 1, wherein the step of storing the microprocessor log data in a newly created log file comprises the steps of:
and storing the microprocessor log data in a newly-built log file in a fixed naming format, wherein the fixed naming format comprises a date of the day field.
6. The microprocessor operation log storing method of the in-vehicle terminal according to claim 1, wherein before checking a log file storage area of the main processor, the method further comprises:
and starting the vehicle-mounted terminal and automatically starting a log storage process.
7. The microprocessor operation log storage method of the vehicle-mounted terminal according to claim 1, wherein the method further comprises:
and sending a control command to the microprocessor through the main processor so that the microprocessor outputs log data of corresponding categories according to the control command, wherein the microprocessor generates the log data of a plurality of categories.
8. A microprocessor operation log storage device of a vehicle-mounted terminal is characterized in that a microprocessor is connected with a main processor, and the device comprises:
the checking module is used for checking a log file storage area of the main processor;
the judging module is used for judging whether the stored log files reach the preset number under the condition that the log files of the current day do not exist, if not, executing the first processing module, and if so, executing the second processing module;
the first processing module is used for creating a new log file of the current day;
the second processing module is used for deleting at least one log file with the previous storage time and then newly building a log file of the current day;
and the storage module is used for receiving the daily microprocessor log data and storing the daily microprocessor log data in a newly-built log file.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the microprocessor operation log storing method of the in-vehicle terminal according to any one of claims 1 to 7 when executing the program.
10. A non-transitory computer-readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the steps of the microprocessor operation log storing method of the in-vehicle terminal according to any one of claims 1 to 7.
CN202011068858.3A 2020-10-09 2020-10-09 Method and device for storing running logs of microprocessor of vehicle-mounted terminal Active CN111930695B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011068858.3A CN111930695B (en) 2020-10-09 2020-10-09 Method and device for storing running logs of microprocessor of vehicle-mounted terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011068858.3A CN111930695B (en) 2020-10-09 2020-10-09 Method and device for storing running logs of microprocessor of vehicle-mounted terminal

Publications (2)

Publication Number Publication Date
CN111930695A true CN111930695A (en) 2020-11-13
CN111930695B CN111930695B (en) 2020-12-25

Family

ID=73333706

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011068858.3A Active CN111930695B (en) 2020-10-09 2020-10-09 Method and device for storing running logs of microprocessor of vehicle-mounted terminal

Country Status (1)

Country Link
CN (1) CN111930695B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094333A (en) * 2021-03-18 2021-07-09 智道网联科技(北京)有限公司 Method and device for managing running logs of vehicle-mounted terminal
CN114112171A (en) * 2021-12-07 2022-03-01 中国人民解放军63729部队 Automatic detection method and system for air supply interface pressure
CN114253927A (en) * 2021-12-21 2022-03-29 京东方数字科技有限公司 Log generation method and device and log management method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060259207A1 (en) * 2005-04-20 2006-11-16 Denso Corporation Electronic control system for automobile
CN102111423A (en) * 2009-12-29 2011-06-29 中国神华能源股份有限公司 System and method for wirelessly and automatically dumping service data of engine
CN107766198A (en) * 2016-08-23 2018-03-06 佛山市顺德区顺达电脑厂有限公司 Server master board monitoring system
CN108319254A (en) * 2018-01-24 2018-07-24 广东远峰汽车电子有限公司 A kind of collection method, car-mounted terminal and the log collecting server of automobile daily record
CN209057376U (en) * 2019-01-08 2019-07-02 湖北亿咖通科技有限公司 Automobile wireless communication device and system
CN110320048A (en) * 2018-03-28 2019-10-11 上海擎感智能科技有限公司 A kind of method and apparatus storing log in vehicle automatic on/off test of computer

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060259207A1 (en) * 2005-04-20 2006-11-16 Denso Corporation Electronic control system for automobile
CN102111423A (en) * 2009-12-29 2011-06-29 中国神华能源股份有限公司 System and method for wirelessly and automatically dumping service data of engine
CN107766198A (en) * 2016-08-23 2018-03-06 佛山市顺德区顺达电脑厂有限公司 Server master board monitoring system
CN108319254A (en) * 2018-01-24 2018-07-24 广东远峰汽车电子有限公司 A kind of collection method, car-mounted terminal and the log collecting server of automobile daily record
CN110320048A (en) * 2018-03-28 2019-10-11 上海擎感智能科技有限公司 A kind of method and apparatus storing log in vehicle automatic on/off test of computer
CN209057376U (en) * 2019-01-08 2019-07-02 湖北亿咖通科技有限公司 Automobile wireless communication device and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094333A (en) * 2021-03-18 2021-07-09 智道网联科技(北京)有限公司 Method and device for managing running logs of vehicle-mounted terminal
CN114112171A (en) * 2021-12-07 2022-03-01 中国人民解放军63729部队 Automatic detection method and system for air supply interface pressure
CN114253927A (en) * 2021-12-21 2022-03-29 京东方数字科技有限公司 Log generation method and device and log management method and device

Also Published As

Publication number Publication date
CN111930695B (en) 2020-12-25

Similar Documents

Publication Publication Date Title
CN111930695B (en) Method and device for storing running logs of microprocessor of vehicle-mounted terminal
CN108427705B (en) Electronic device, distributed system log query method and storage medium
CN110753084B (en) Uplink data reading method, cache server and computer readable storage medium
CN109359091B (en) File management method, device, terminal and computer readable storage medium
CN105871587A (en) Log uploading method and device
CN111199054B (en) Data desensitization method and device and data desensitization equipment
CN108509322B (en) Method for avoiding excessive return visit, electronic device and computer readable storage medium
CN112256551A (en) Remote log capturing method and device, electronic equipment and storage medium
CN110442439B (en) Task process processing method and device and computer equipment
CN113272785B (en) Method for mounting file system, terminal equipment and storage medium
CN115150348B (en) Mail attachment restoring method and system
CN113595762B (en) Network card configuration storage method and device
CN116450176A (en) Version updating method and device, electronic equipment and storage medium
CN112912841A (en) Hardware upgrading method, device, equipment and storage medium
CN114064724A (en) Report data processing system, method, server, electronic device and storage medium
CN108509478B (en) Splitting and calling method of rule engine file, electronic device and storage medium
CN112256677A (en) Information storage method and device, electronic equipment and computer readable storage medium
CN108133154B (en) Method and device for storing file
CN110593711A (en) Control method and device for cell expansion gate and storage medium
CN111752821A (en) Method and device for packet pressure measurement, computer equipment and readable storage medium
CN112527467B (en) Storage structure, query method, deletion method, device, equipment and medium of container mirror image
CN113568939B (en) Energy consumption monitoring method, device, server and computer readable storage medium
CN113094333A (en) Method and device for managing running logs of vehicle-mounted terminal
CN112684985B (en) Data writing method and device
CN114237444A (en) Application program starting method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant