CN116094908A - Log file storage method, device, equipment and storage medium - Google Patents

Log file storage method, device, equipment and storage medium Download PDF

Info

Publication number
CN116094908A
CN116094908A CN202310066277.3A CN202310066277A CN116094908A CN 116094908 A CN116094908 A CN 116094908A CN 202310066277 A CN202310066277 A CN 202310066277A CN 116094908 A CN116094908 A CN 116094908A
Authority
CN
China
Prior art keywords
log file
log
abnormal
files
controllers
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.)
Pending
Application number
CN202310066277.3A
Other languages
Chinese (zh)
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.)
FAW Group Corp
Original Assignee
FAW Group Corp
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 FAW Group Corp filed Critical FAW Group Corp
Priority to CN202310066277.3A priority Critical patent/CN116094908A/en
Publication of CN116094908A publication Critical patent/CN116094908A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a log file storage method, a log file storage device, log file storage equipment and a log file storage medium. The method is applied to the cloud server, and comprises the following steps: acquiring log files acquired by own controllers sent by different vehicle ends; determining normal log files and abnormal log files in the log files; determining controllers respectively corresponding to the normal log file and the abnormal log file; respectively associating the normal log file and the abnormal log file with a vehicle end identification code of a vehicle end to which the corresponding controller belongs; and sending the vehicle end identification codes corresponding to the controllers to the client so that the client accesses the associated log file according to the vehicle end identification codes. The embodiment of the invention improves the instantaneity and the effectiveness of the log data and improves the checking efficiency of the log data.

Description

Log file storage method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for storing log files.
Background
With the development of intelligent networking of automobiles, SOMEIP (Scalable service-Oriented MiddlewarE over IP, IP-based extensible service-oriented middleware) technology becomes a research hotspot for whole-vehicle Ethernet communication. Because ethernet communications have been developed later than conventional communications, they are not fully mature at present, and problems frequently occur In vehicle controllers, particularly controllers involving a large number of ethernet communications, such as vehicle TBOX (remote communication terminals, telecommunications-BOX) or IVI (In-Vehicle Infotainment). At this time, a log including data such as a SOMEIP message and an ethernet message needs to be intercepted for analysis.
The conventional somei log is generally stored directly in the system path of the controller itself, and must be taken out by a professional on-site operation or remote guidance, and is operated by a USB (Universal Serial Bus ) remote connection, which is limited in time and space. And because the storage space of the controller is limited, the problem that data is covered due to too late interception time often occurs to the road test problem or the commodity vehicle quality problem, and the data checking efficiency is affected.
Disclosure of Invention
The invention provides a log file storage method, a device, equipment and a storage medium, which are used for improving the instantaneity and the effectiveness of log data and improving the investigation efficiency of the log data.
According to an aspect of the present invention, there is provided a log file storage method applied to a cloud server, the method including:
acquiring log files acquired by own controllers sent by different vehicle ends;
determining normal log files and abnormal log files in the log files;
determining controllers respectively corresponding to the normal log file and the abnormal log file;
respectively associating the normal log file and the abnormal log file with a vehicle end identification code of a vehicle end to which the corresponding controller belongs;
And sending the vehicle end identification codes corresponding to the controllers to the client so that the client accesses the associated log file according to the vehicle end identification codes.
According to another aspect of the present invention, there is provided a log file storage method applied to a vehicle end, the method including:
acquiring a log file corresponding to at least one controller inside;
uploading the log files corresponding to the controllers to a cloud server, so that the cloud server can determine the normal log files and the abnormal log files in the log files and the controllers corresponding to the normal log files and the abnormal log files respectively, correlate the normal log files and the abnormal log files with the vehicle end identification codes of the vehicle ends to which the corresponding controllers belong respectively, and send the vehicle end identification codes corresponding to the controllers to a client, so that the client can access the correlated log files according to the vehicle end identification codes.
According to another aspect of the present invention, a log file storage device configured on a cloud server, the device includes:
the log file acquisition module is used for acquiring log files acquired by the controllers of the vehicles sent by different vehicle ends;
The log file determining module is used for determining normal log files and abnormal log files in the log files;
the controller determining module is used for determining controllers corresponding to the normal log file and the abnormal log file respectively;
the identification code association module is used for associating the normal log file and the abnormal log file with the vehicle end identification code of the vehicle end to which the corresponding controller belongs respectively;
and the identification code sending module is used for sending the vehicle end identification codes corresponding to the controllers to the client so that the client can access the associated log files according to the vehicle end identification codes.
According to another aspect of the present invention, a log file storage device configured at a vehicle end, the device includes:
the log file acquisition module is used for acquiring a log file corresponding to at least one controller inside;
the log file uploading module is used for uploading the log files corresponding to the controllers to the cloud server, so that the cloud server can determine the normal log files and the abnormal log files in the log files and the controllers corresponding to the normal log files and the abnormal log files respectively, correlate the normal log files and the abnormal log files with the vehicle end identification codes of the vehicle ends to which the corresponding controllers belong respectively, and send the vehicle end identification codes corresponding to the controllers to the client so that the client can access the correlated log files according to the vehicle end identification codes.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the log file storage method of any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the log file storage method according to any one of the embodiments of the present invention when executed.
The embodiment of the invention determines the normal log files and the abnormal log files in the obtained log files; determining controllers respectively corresponding to the normal log file and the abnormal log file; respectively associating the normal log file and the abnormal log file with a vehicle end identification code of a vehicle end to which the corresponding controller belongs; and sending the vehicle end identification codes corresponding to the controllers to the client so that the client accesses the associated log file according to the vehicle end identification codes. According to the technical scheme, the cloud server is adopted to store the log files of the vehicle, so that the storage time of the files is prolonged, and the validity of the log for problem analysis is ensured; the cloud mechanism is introduced to process the log data from the vehicle end, so that the real-time synchronization is realized, the rationality of the whole flow is ensured, the instantaneity and the effectiveness of the log data are improved, and the checking efficiency of related technicians on the log data is improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1A is a flowchart of a log file storing method according to a first embodiment of the present invention;
fig. 1B is a schematic flow chart of a method for determining an abnormal log file and a normal log file according to a second embodiment of the present invention;
FIG. 2 is a flowchart of a log file storing method according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram of a log file storage device according to a third embodiment of the present invention;
FIG. 4 is a schematic diagram of a log file storage device according to a fourth embodiment of the present invention;
Fig. 5 is a schematic structural diagram of an electronic device implementing a log file storing method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1A is a flowchart of a log file storage method according to an embodiment of the present invention, where the embodiment is applicable to a case of real-time storage of log data of a vehicle-end controller, the method may be performed by a log file storage device, the log file storage device may be implemented in a hardware and/or software form, the log file storage device may be configured in an electronic device, and the electronic device may be a cloud server.
Referring to fig. 1A, the log file storage method includes:
s110, acquiring log files acquired by the controllers of the vehicles sent by different vehicle ends.
The log file may be a SOME/IP log file, among others. The number of controllers of the vehicle end can be one or more, and correspondingly, the obtained log files can be the log files collected by one or more controllers of the vehicle end sent by different vehicle ends.
For example, the cloud server may obtain log files collected by one or more controllers of the cloud server, where the log files are sent by different vehicle ends. The cloud server may be a TSP (Telematics Service Platform, telematics platform) cloud server.
S120, determining normal log files and abnormal log files in the log files.
In order to facilitate the subsequent related service and developer to complete the log file access operation and problem analysis more quickly, the log files can be classified to obtain normal log files and abnormal log files, so that the complexity and the classification error probability of the related technician for classifying the log files are reduced, and the determination efficiency is improved.
In an alternative embodiment, determining normal log files and abnormal log files in the log files includes: judging whether a message record exists in the log file or not; if so, determining whether the sent message and the received message exist in the log file at the same time, obtaining a message existence determination result, and determining a normal log file and an abnormal log file in the log file according to the message existence determination result; if not, determining the log file as an abnormal log file.
The cloud server judges whether a message record exists in the obtained log file or not. If the message record exists in the log file, further determining whether the message sending and receiving exist in the log file at the same time, and obtaining a message existence determination result. The cloud server determines normal log files and abnormal log files in the log files according to the existence conditions of the sending message and the receiving message in the log files. If the message record does not exist in the log file, determining the log file as an abnormal log file.
In an alternative embodiment, determining whether a sending message and a receiving message exist in the log file at the same time, to obtain a message existence determination result, and determining a normal log file and an abnormal log file in the log file according to the message existence determination result, including: determining whether a sending message and a receiving message exist in the log file at the same time; if yes, determining that the log file is a normal log file if abnormal message records do not exist in the log file; if not, determining the log file as an abnormal log file, and determining the abnormal type of the abnormal log file according to the existence condition of the sent message or the received message in the log file.
The cloud server determines whether the sending message and the receiving message exist in the log file at the same time under the condition that the cloud server determines that the message record exists in the log file. If the sending message and the receiving message exist at the same time and abnormal message records do not exist in the log file, the log file is determined to be a normal log file. If the sending message and the receiving message exist at the same time, but abnormal message records exist in the log file, the log file is determined to be an abnormal log file, and the abnormal type of the abnormal log file is a process and pipeline abnormal type. If the sending message and the receiving message do not exist in the log file at the same time, determining that the log file is an abnormal log file, and determining the abnormal type of the abnormal log file according to the existence condition of the sending message or the receiving message in the log file.
In an alternative embodiment, determining the exception type of the exception log file according to the existence of the sending message or the receiving message in the log file includes: if only the sent message exists in the log file, determining that the abnormal type of the abnormal log file is a network connection abnormal type; if only the received message exists in the log file, determining that the abnormal type of the abnormal log file is the application abnormal type.
In a specific embodiment, a flowchart of a method for determining an abnormal log file and a normal log file is shown in fig. 1B.
S11, acquiring a log file.
S12, judging whether a message record exists in the log file; if yes, S13A is executed, and if no, S13B is executed.
S13A, judging whether a sending message and a receiving message exist in the log file at the same time; if yes, executing S14A; if not, S14B is performed.
S13B, determining the log file as an abnormal log file.
S14A, judging whether abnormal message records exist in the log file; if yes, executing S15A; if not, S15B is performed.
S14B, determining the log file as an abnormal log file, and executing S16.
S15A, determining that the log file is an abnormal log file, and the abnormal type is a process and pipeline abnormal type.
S15B, determining the log file as a normal log file.
S16, judging whether a message is sent out in the log file; if yes, executing S17A; if not, S17B is performed.
S17A, determining that the abnormal type of the abnormal log file is the network connection abnormal type.
S17B, determining the abnormality type of the abnormality log file as the application abnormality type.
The scheme realizes the accurate determination of the normal log message and the abnormal log message in the log file by judging whether the message record exists in the log file, whether the message sending and receiving exists or not and judging whether the message record exists or not.
S130, determining controllers respectively corresponding to the normal log file and the abnormal log file.
For example, the cloud server may determine a controller corresponding to the normal log file and a controller corresponding to the abnormal log file.
And S140, respectively associating the normal log file and the abnormal log file with the vehicle end identification code of the vehicle end to which the corresponding controller belongs.
The vehicle end identification code is used for characterizing vehicle end uniqueness, and for example, the vehicle end identification code may be a vehicle VIN (Vehicle Identification Number, vehicle identification code) code.
The cloud server determines the vehicle end to which the controller corresponding to the normal log file belongs, determines the vehicle end to which the controller corresponding to the abnormal log file belongs, and associates the vehicle end identification codes of the corresponding vehicle ends.
And S150, sending the vehicle end identification codes corresponding to the controllers to the client so that the client accesses the associated log file according to the vehicle end identification codes.
The client may actively acquire the vehicle end identifier code from the cloud server to query the log file.
The client may be a mobile phone or a client corresponding to a computer, and the relevant user or operator may search and view all the someip log files of the vehicle on the cloud server according to the vehicle identification code through the client and download the same. Specifically, all the log files which can be found in the vehicle can be searched in the client through the vehicle end identification code, and the log files comprise normal log files and abnormal log files. The compressed package of the corresponding log file can be selected for downloading according to the time point of the problem. Meanwhile, the client can also provide a message notification function, after the log file is downloaded, a download completion notification is generated, and after clicking, the client can jump to a corresponding interface to know more information, including the vin code of the corresponding vehicle of the log, the software and hardware version numbers of each controller, the log time and the like.
The embodiment of the invention determines the normal log files and the abnormal log files in the obtained log files; determining controllers respectively corresponding to the normal log file and the abnormal log file; respectively associating the normal log file and the abnormal log file with a vehicle end identification code of a vehicle end to which the corresponding controller belongs; and sending the vehicle end identification codes corresponding to the controllers to the client so that the client accesses the associated log file according to the vehicle end identification codes. According to the technical scheme, the cloud server is adopted to store the log files of the vehicle, so that the storage time of the files is prolonged, and the validity of the log for problem analysis is ensured; the cloud mechanism is introduced to process the log data from the vehicle end, so that the real-time synchronization is realized, the rationality of the whole flow is ensured, the instantaneity and the effectiveness of the log data are improved, and the checking efficiency of related technicians on the log data is improved.
Example two
Fig. 2 is a flowchart of a log file storage method provided in a second embodiment of the present invention, where the present embodiment is applicable to a case of real-time storage of log data of a vehicle-end controller, the method may be performed by a log file storage device, where the log file storage device may be implemented in a hardware and/or software form, and the log file storage device may be configured in an electronic device, and the electronic device may be a vehicle-end.
Referring to the log file storage method shown in fig. 2, the method includes:
s210, acquiring a log file corresponding to at least one internal controller.
S220, uploading the log files corresponding to the controllers to a cloud server, so that the cloud server can determine the normal log files and the abnormal log files in the log files and the controllers corresponding to the normal log files and the abnormal log files respectively, correlate the normal log files and the abnormal log files with the vehicle end identification codes of the vehicle ends to which the corresponding controllers belong respectively, and send the vehicle end identification codes corresponding to the controllers to the client so that the client can access the correlated log files according to the vehicle end identification codes.
The vehicle end uploads the log files corresponding to the controllers to the cloud server; the cloud server acquires log files acquired by the controllers of the cloud server and transmitted by different vehicle ends; determining normal log files and abnormal log files in the log files; and determining controllers respectively corresponding to the normal log file and the abnormal log file; respectively associating the normal log file and the abnormal log file with a vehicle end identification code of a vehicle end to which the corresponding controller belongs; and sending the vehicle end identification codes corresponding to the controllers to the client so that the client accesses the associated log file according to the vehicle end identification codes.
In order to further perfect the uploading mode of uploading the log files corresponding to the controllers to the cloud server by the vehicle end, the uploading efficiency is improved, and the real-time performance and the effectiveness of the uploaded log files are ensured while the blockage of a large amount of log file data uploading process is avoided.
In an alternative embodiment, uploading the log file corresponding to each controller to the cloud server includes: determining at least one target controller using the middleware component from among the controllers; the method comprises the steps of controlling each target controller to transmit generated intermediate logs to a vehicle-mounted remote communication terminal TBOX through Ethernet, so that the vehicle-mounted TBOX can determine whether to upload log files of the corresponding target controllers to a cloud server according to the file sizes of log files corresponding to the target controllers and comprising the intermediate logs, and an uploading determination result is obtained; and according to the uploading determination result, uploading the log files corresponding to the target controllers to the cloud server.
The vehicle end determines at least one target controller using the intermediate component from the controllers of the vehicle end, and controls the target controllers to transmit the generated intermediate log to the vehicle-mounted remote communication terminal TBOX through the Ethernet. The vehicle-mounted TBOX determines the uploading time of the corresponding target controllers according to the file writing amount corresponding to the log files of the target controllers, and determines whether the logs corresponding to the corresponding target controllers are uploaded to the cloud server according to the uploading time of the target controllers to obtain an uploading determination result. Specifically, the vehicle-mounted TBOX judges whether the uploading time of each target controller meets a time uploading threshold, and uploads a log corresponding to the target controller meeting the time uploading threshold to the cloud server to obtain an uploading determination result. The uploading threshold may be preset by a related technician, for example, the uploading threshold may be 3 hours.
Illustratively, the vehicle-mounted TBOX uploads all currently generated SOMEIP log files of each controller of the vehicle end to the cloud server through the external network. Since the sometip log file size is generally set to 10MB, the effective storage time is 3 hours, and the new log content can directly cover the old content, the uploading policy can be set to upload the log as a file to the cloud server every three hours, and the storage time of each file on the cloud server can be 3 days, i.e. the client can view all log files within 72 hours at the longest. The vehicle-mounted TBOX packages all current logs into compressed packets every 3 hours, and uploads the compressed packets to the cloud server as a record, and names the compressed packets according to the vehicle-end identification code and uploading time. The maximum save time for each record was set to 72 hours, i.e. for one vehicle, it saved 24 log records on the cloud server altogether. After the record is full, the overlay starts from the log file record with the earliest time.
According to the embodiment of the invention, the log file corresponding to at least one internal controller is obtained; uploading the log files corresponding to each controller to a cloud server, so that the cloud server can determine the normal log files and the abnormal log files in the log files and the controllers corresponding to the normal log files and the abnormal log files respectively, correlate the normal log files and the abnormal log files with the vehicle end identification codes of the vehicle ends to which the corresponding controllers belong respectively, and send the vehicle end identification codes corresponding to each controller to a client, so that the client can access the correlated log files according to the vehicle end identification codes. According to the technical scheme, the cloud server is adopted to store the log files of the vehicle, so that the storage time of the files is prolonged, and the validity of the log for problem analysis is ensured; the cloud mechanism is introduced to process the log data from the vehicle end, so that the real-time synchronization is realized, the rationality of the whole flow is ensured, the instantaneity and the effectiveness of the log data are improved, and the checking efficiency of related technicians on the log data is improved.
Example III
Fig. 3 is a schematic structural diagram of a log file storage device according to a third embodiment of the present invention. The log file storage device provided by the embodiment of the invention can be suitable for the condition of real-time storage of log data of a vehicle-end controller, can be realized in a hardware and/or software mode, and can be configured in a cloud server, as shown in fig. 3, and the device specifically comprises: a log file acquisition module 301, a log file determination module 302, a controller determination module 303, an identification code association determination module 304, and an identification code transmission module 305. Wherein,,
the log file obtaining module 301 is configured to obtain log files collected by the own controllers sent by different vehicle ends;
a log file determining module 302, configured to determine a normal log file and an abnormal log file in the log files;
a controller determining module 303, configured to determine controllers corresponding to the normal log file and the abnormal log file respectively;
the identification code association module 304 is configured to associate the normal log file and the abnormal log file with a vehicle end identification code of a vehicle end to which the corresponding controller belongs, respectively;
The identifier code sending module 305 is configured to send, to a client, a vehicle end identifier code corresponding to each controller, so that the client accesses the associated log file according to the vehicle end identifier code.
The embodiment of the invention determines the normal log files and the abnormal log files in the obtained log files; determining controllers respectively corresponding to the normal log file and the abnormal log file; respectively associating the normal log file and the abnormal log file with a vehicle end identification code of a vehicle end to which the corresponding controller belongs; and sending the vehicle end identification codes corresponding to the controllers to the client so that the client accesses the associated log file according to the vehicle end identification codes. According to the technical scheme, the cloud server is adopted to store the log files of the vehicle, so that the storage time of the files is prolonged, and the validity of the log for problem analysis is ensured; the cloud mechanism is introduced to process the log data from the vehicle end, so that the real-time synchronization is realized, the rationality of the whole flow is ensured, the instantaneity and the effectiveness of the log data are improved, and the checking efficiency of related technicians on the log data is improved.
Optionally, the log file determining module 302 includes:
the message record judging unit is used for judging whether a message record exists in the log file or not;
The result determining unit is used for determining whether a sending message and a receiving message exist in the log file at the same time if a message record exists, obtaining a message existence determining result, and determining a normal log file and an abnormal log file in the log file according to the message existence determining result;
and the log file determining unit is used for determining that the log file is an abnormal log file if the message record does not exist.
Optionally, the result determining unit includes:
a message determining subunit, configured to determine whether the sent message and the received message exist in the log file at the same time;
a normal log file determining subunit, configured to determine that the log file is a normal log file if the sending message and the receiving message exist simultaneously and no abnormal message record exists in the log file;
and the abnormal log file determining subunit is used for determining that the log file is an abnormal log file if the sending message and the receiving message do not exist at the same time, and determining the abnormal type of the abnormal log file according to the existence condition of the sending message or the receiving message in the log file.
Optionally, the anomaly log file determining subunit is specifically configured to:
if only the sent message exists in the log file, determining that the abnormal type of the abnormal log file is a network connection abnormal type;
and if only the received message exists in the log file, determining that the abnormal type of the abnormal log file is an application abnormal type.
The log file storage device provided by the embodiment of the invention can execute the log file storage method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 4 is a schematic structural diagram of a log file storage device according to a fourth embodiment of the present invention. The log file storage device provided by the embodiment of the invention can be suitable for the condition of real-time storage of log data of a vehicle-end controller, can be realized in a hardware and/or software mode and can be configured at a vehicle end, and as shown in fig. 4, the device specifically comprises: a log file acquisition module 401 and a log file upload module 402. Wherein,,
a log file obtaining module 401, configured to obtain a log file corresponding to at least one controller inside;
The log file uploading module 402 is configured to upload log files corresponding to each controller to a cloud server, so that the cloud server determines a normal log file and an abnormal log file in the log files and controllers corresponding to the normal log file and the abnormal log file respectively, associates the normal log file and the abnormal log file with a vehicle end identifier of a vehicle end to which the corresponding controller belongs respectively, and sends the vehicle end identifier corresponding to each controller to a client, so that the client accesses the associated log file according to the vehicle end identifier.
According to the embodiment of the invention, the log file corresponding to at least one internal controller is obtained; uploading the log files corresponding to each controller to a cloud server, so that the cloud server can determine the normal log files and the abnormal log files in the log files and the controllers corresponding to the normal log files and the abnormal log files respectively, correlate the normal log files and the abnormal log files with the vehicle end identification codes of the vehicle ends to which the corresponding controllers belong respectively, and send the vehicle end identification codes corresponding to each controller to a client, so that the client can access the correlated log files according to the vehicle end identification codes. According to the technical scheme, the cloud server is adopted to store the log files of the vehicle, so that the storage time of the files is prolonged, and the validity of the log for problem analysis is ensured; the cloud mechanism is introduced to process the log data from the vehicle end, so that the real-time synchronization is realized, the rationality of the whole flow is ensured, the instantaneity and the effectiveness of the log data are improved, and the checking efficiency of related technicians on the log data is improved.
Optionally, the log file uploading module 402 includes:
a target controller determining unit configured to determine at least one target controller using a middleware component from among the controllers;
the log file transmission unit is used for controlling each target controller to transmit the generated intermediate log to a vehicle-mounted remote communication terminal TBOX through an Ethernet so that the vehicle-mounted TBOX can determine whether to upload the log file of the corresponding target controller to the cloud server according to the file size of the log file corresponding to each target controller and comprising the intermediate log to obtain an uploading determination result;
and the log file uploading unit is used for controlling the log files corresponding to the target controllers to be uploaded to the cloud server according to the uploading determination result.
The log file storage device provided by the embodiment of the invention can execute the log file storage method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example five
Fig. 5 shows a schematic diagram of an electronic device 50 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 50 includes at least one processor 51, and a memory, such as a Read Only Memory (ROM) 52, a Random Access Memory (RAM) 53, etc., communicatively connected to the at least one processor 51, in which the memory stores a computer program executable by the at least one processor, and the processor 51 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 52 or the computer program loaded from the storage unit 58 into the Random Access Memory (RAM) 53. In the RAM 53, various programs and data required for the operation of the electronic device 50 can also be stored. The processor 51, the ROM 52 and the RAM 53 are connected to each other via a bus 54. An input/output (I/O) interface 55 is also connected to bus 54.
Various components in the electronic device 50 are connected to the I/O interface 55, including: an input unit 56 such as a keyboard, a mouse, etc.; an output unit 57 such as various types of displays, speakers, and the like; a storage unit 58 such as a magnetic disk, an optical disk, or the like; and a communication unit 59 such as a network card, modem, wireless communication transceiver, etc. The communication unit 59 allows the electronic device 50 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks.
The processor 51 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 51 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 51 performs the various methods and processes described above, such as the log file storage method.
In some embodiments, the log file storage method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 58. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 50 via the ROM 52 and/or the communication unit 59. When the computer program is loaded into RAM 53 and executed by processor 51, one or more steps of the log file storage method described above may be performed. Alternatively, in other embodiments, the processor 51 may be configured to perform the log file storage method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A log file storage method, which is applied to a cloud server, the method comprising:
acquiring log files acquired by own controllers sent by different vehicle ends;
determining normal log files and abnormal log files in the log files;
determining controllers respectively corresponding to the normal log file and the abnormal log file;
respectively associating the normal log file and the abnormal log file with a vehicle end identification code of a vehicle end to which the corresponding controller belongs;
And sending the vehicle end identification codes corresponding to the controllers to the client so that the client accesses the associated log file according to the vehicle end identification codes.
2. The method of claim 1, wherein the determining normal and abnormal ones of the log files comprises:
judging whether a message record exists in the log file or not;
if yes, determining whether the sent message and the received message exist in the log file at the same time, obtaining a message existence determination result, and determining a normal log file and an abnormal log file in the log file according to the message existence determination result;
if not, determining the log file as an abnormal log file.
3. The method according to claim 2, wherein determining whether the sent message and the received message exist in the log file at the same time, to obtain a message existence determination result, and determining a normal log file and an abnormal log file in the log file according to the message existence determination result, includes:
determining whether the sent message and the received message exist in the log file at the same time;
if yes, determining that the log file is a normal log file if abnormal message records do not exist in the log file;
If not, determining the log file as an abnormal log file, and determining the abnormal type of the abnormal log file according to the existence condition of the sent message or the received message in the log file.
4. A method according to claim 3, wherein said determining the exception type of said exception log file based on the presence of said send message or said receive message in said log file comprises:
if only the sent message exists in the log file, determining that the abnormal type of the abnormal log file is a network connection abnormal type;
and if only the received message exists in the log file, determining that the abnormal type of the abnormal log file is an application abnormal type.
5. A log file storage method, applied to a vehicle end, the method comprising:
acquiring a log file corresponding to at least one controller inside;
uploading the log files corresponding to the controllers to a cloud server, so that the cloud server can determine the normal log files and the abnormal log files in the log files and the controllers corresponding to the normal log files and the abnormal log files respectively, correlate the normal log files and the abnormal log files with the vehicle end identification codes of the vehicle ends to which the corresponding controllers belong respectively, and send the vehicle end identification codes corresponding to the controllers to a client, so that the client can access the correlated log files according to the vehicle end identification codes.
6. The method of claim 5, wherein uploading the log file corresponding to each controller to a cloud server comprises:
determining at least one target controller using a middleware component from among the controllers;
the method comprises the steps of controlling each target controller to transmit generated intermediate logs to a vehicle-mounted remote communication terminal TBOX through Ethernet, so that the vehicle-mounted TBOX can determine whether to upload log files of corresponding target controllers to the cloud server according to the file sizes of log files corresponding to each target controller and comprising the intermediate logs, and an uploading determination result is obtained;
and according to the uploading determination result, uploading the log files corresponding to the target controllers to the cloud server.
7. A log file storage device configured at a cloud server, the device comprising:
the log file acquisition module is used for acquiring log files acquired by the controllers of the vehicles sent by different vehicle ends;
the log file determining module is used for determining normal log files and abnormal log files in the log files;
the controller determining module is used for determining controllers corresponding to the normal log file and the abnormal log file respectively;
The identification code association module is used for associating the normal log file and the abnormal log file with the vehicle end identification code of the vehicle end to which the corresponding controller belongs respectively;
and the identification code sending module is used for sending the vehicle end identification codes corresponding to the controllers to the client so that the client can access the associated log files according to the vehicle end identification codes.
8. A log file storage device, configured at a vehicle end, the device comprising:
the log file acquisition module is used for acquiring a log file corresponding to at least one controller inside;
the log file uploading module is used for uploading the log files corresponding to the controllers to the cloud server, so that the cloud server can determine the normal log files and the abnormal log files in the log files and the controllers corresponding to the normal log files and the abnormal log files respectively, correlate the normal log files and the abnormal log files with the vehicle end identification codes of the vehicle ends to which the corresponding controllers belong respectively, and send the vehicle end identification codes corresponding to the controllers to the client so that the client can access the correlated log files according to the vehicle end identification codes.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the log file storage method of any one of claims 1-4 or claims 5-6.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the log file storage method of any one of claims 1-4 or claims 5-6 when executed.
CN202310066277.3A 2023-01-17 2023-01-17 Log file storage method, device, equipment and storage medium Pending CN116094908A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310066277.3A CN116094908A (en) 2023-01-17 2023-01-17 Log file storage method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310066277.3A CN116094908A (en) 2023-01-17 2023-01-17 Log file storage method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116094908A true CN116094908A (en) 2023-05-09

Family

ID=86207978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310066277.3A Pending CN116094908A (en) 2023-01-17 2023-01-17 Log file storage method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116094908A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140005880A1 (en) * 2012-06-28 2014-01-02 Harman Becker Automotive Systems Gmbh Telematics system
CN112199266A (en) * 2020-10-23 2021-01-08 中国第一汽车股份有限公司 Log transmission method and system for vehicle-mounted machine system, vehicle and storage medium
CN113064752A (en) * 2019-12-16 2021-07-02 华晨宝马汽车有限公司 Method, system, and computer readable medium for archiving logs
US20210344700A1 (en) * 2019-01-21 2021-11-04 Ntt Communications Corporation Vehicle security monitoring apparatus, method and non-transitory computer readable medium
CN113791802A (en) * 2021-09-07 2021-12-14 东风汽车有限公司东风日产乘用车公司 Vehicle upgrading method, device, equipment and storage medium
CN114385210A (en) * 2022-01-11 2022-04-22 中国第一汽车股份有限公司 Method, device and equipment for generating upgrade log and storage medium
CN114691407A (en) * 2022-03-30 2022-07-01 成都中科创达软件有限公司 Method and device for acquiring vehicle log, electronic equipment and storage medium
CN114937316A (en) * 2022-05-18 2022-08-23 深圳市易孔立出软件开发有限公司 Software fault detection method, device, equipment and medium
CN114968643A (en) * 2022-06-24 2022-08-30 长城汽车股份有限公司 Link analysis method and device, electronic equipment, storage medium and vehicle
CN115225629A (en) * 2022-07-12 2022-10-21 芜湖雄狮汽车科技有限公司 Remote monitoring method and device for vehicle log, electronic equipment and storage medium
CN115277780A (en) * 2022-07-30 2022-11-01 重庆长安汽车股份有限公司 Vehicle-end log obtaining method and device, electronic equipment and computer-readable storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140005880A1 (en) * 2012-06-28 2014-01-02 Harman Becker Automotive Systems Gmbh Telematics system
US20210344700A1 (en) * 2019-01-21 2021-11-04 Ntt Communications Corporation Vehicle security monitoring apparatus, method and non-transitory computer readable medium
CN113064752A (en) * 2019-12-16 2021-07-02 华晨宝马汽车有限公司 Method, system, and computer readable medium for archiving logs
CN112199266A (en) * 2020-10-23 2021-01-08 中国第一汽车股份有限公司 Log transmission method and system for vehicle-mounted machine system, vehicle and storage medium
CN113791802A (en) * 2021-09-07 2021-12-14 东风汽车有限公司东风日产乘用车公司 Vehicle upgrading method, device, equipment and storage medium
CN114385210A (en) * 2022-01-11 2022-04-22 中国第一汽车股份有限公司 Method, device and equipment for generating upgrade log and storage medium
CN114691407A (en) * 2022-03-30 2022-07-01 成都中科创达软件有限公司 Method and device for acquiring vehicle log, electronic equipment and storage medium
CN114937316A (en) * 2022-05-18 2022-08-23 深圳市易孔立出软件开发有限公司 Software fault detection method, device, equipment and medium
CN114968643A (en) * 2022-06-24 2022-08-30 长城汽车股份有限公司 Link analysis method and device, electronic equipment, storage medium and vehicle
CN115225629A (en) * 2022-07-12 2022-10-21 芜湖雄狮汽车科技有限公司 Remote monitoring method and device for vehicle log, electronic equipment and storage medium
CN115277780A (en) * 2022-07-30 2022-11-01 重庆长安汽车股份有限公司 Vehicle-end log obtaining method and device, electronic equipment and computer-readable storage medium

Similar Documents

Publication Publication Date Title
US20150120914A1 (en) Service monitoring system and service monitoring method
WO2019051948A1 (en) Method, apparatus, server, and storage medium for processing monitoring data
CN113641544B (en) Method, apparatus, device, medium and product for detecting application state
CN111309696A (en) Log processing method and device, electronic equipment and readable medium
CN116074183B (en) C3 timeout analysis method, device and equipment based on rule engine
CN115883647B (en) Service log recording method, system, device, terminal, server and medium
CN115296979B (en) Fault processing method, device, equipment and storage medium
CN110309028B (en) Monitoring information acquisition method, service monitoring method, device and system
CN116450176A (en) Version updating method and device, electronic equipment and storage medium
CN111506641A (en) Data management method, data acquisition platform, data management system and storage medium
CN111159009A (en) Pressure testing method and device for log service system
CN116094908A (en) Log file storage method, device, equipment and storage medium
CN114500105A (en) Network packet interception method, device, equipment and storage medium
CN109327433B (en) Threat perception method and system based on operation scene analysis
CN115766696A (en) File uploading method and device, electronic equipment and storage medium
CN113381907A (en) Log collection method and device, electronic equipment and storage medium
CN113360348A (en) Exception request processing method and device, electronic equipment and storage medium
CN116974856B (en) Method, device, equipment and medium for automatically acquiring log file
CN117251769B (en) Abnormal data identification method, device, equipment and medium based on monitoring component
CN117176839B (en) Remote measurement message transmission method, device, communication equipment and storage medium
CN115269055A (en) Nginx request data acquisition method, device, equipment and storage medium
US20230064755A1 (en) Data processing method and apparatus
CN116682195A (en) Vehicle data acquisition method, device, equipment and medium
CN115509586A (en) Upgrade package processing method, device, equipment and medium
CN113672910A (en) Security event processing method and device

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