CN116094908B - Log file storage method, device, equipment and storage medium - Google Patents
Log file storage method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN116094908B CN116094908B CN202310066277.3A CN202310066277A CN116094908B CN 116094908 B CN116094908 B CN 116094908B CN 202310066277 A CN202310066277 A CN 202310066277A CN 116094908 B CN116094908 B CN 116094908B
- Authority
- CN
- China
- Prior art keywords
- log file
- log
- abnormal
- determining
- files
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 61
- 230000002159 abnormal effect Effects 0.000 claims abstract description 125
- 230000000875 corresponding effect Effects 0.000 claims description 102
- 238000004891 communication Methods 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 16
- 230000002596 correlated effect Effects 0.000 claims description 7
- 230000001276 controlling effect Effects 0.000 claims description 6
- 230000005540 biological transmission Effects 0.000 claims description 3
- 230000008569 process Effects 0.000 description 11
- 238000004458 analytical method Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 7
- 238000012545 processing Methods 0.000 description 6
- 230000007246 mechanism Effects 0.000 description 5
- 230000002035 prolonged effect Effects 0.000 description 5
- 230000005856 abnormality Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 102100024113 40S ribosomal protein S15a Human genes 0.000 description 2
- 101001118566 Homo sapiens 40S ribosomal protein S15a Proteins 0.000 description 2
- 102220492605 Numb-like protein_S17A_mutation Human genes 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 102220171488 rs760746448 Human genes 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 238000011835 investigation Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/069—Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/1805—Append-only file systems, e.g. using logs or journals to store data
- G06F16/1815—Journaling file systems
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols 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)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (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
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
Along 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, logs including SOMEIP messages, ethernet messages, and other data need to be intercepted for analysis.
The conventional SOMEIP 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 through 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) 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, 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 someip log files of the vehicle on the cloud server according to the vehicle identifier and download the log files. 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 at the vehicle end to the cloud server through an external network. Since SOMEIP log files are generally set to 10MB in size, 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, that is, the client can view all log files within 72 hours at maximum. 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 (8)
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;
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;
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 according to claim 1, 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.
3. The method according to claim 2, wherein determining the exception type of the exception log file based on the presence of the send message or the receive message in the 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.
4. 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 log files corresponding to the controllers to a cloud server, so that the cloud server can determine normal log files and abnormal log files in the log files and controllers corresponding to the normal log files and the abnormal log files respectively, correlate the normal log files and the abnormal log files with vehicle end identification codes of 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;
The uploading the log file corresponding to each controller to the cloud server includes:
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.
5. 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;
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;
wherein, the log file determining module 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.
6. 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 system comprises a log file uploading module, a cloud server and a client, wherein the log file uploading module is used for uploading log files corresponding to each controller to the cloud server, so that the cloud server can determine normal log files and abnormal log files in the log files and controllers corresponding to the normal log files and the abnormal log files respectively, correlate the normal log files and the abnormal log files with vehicle end identification codes of vehicle ends to which the corresponding controllers belong respectively, and send the vehicle end identification codes corresponding to each controller to the client so that the client can access the correlated log files according to the vehicle end identification codes;
The log file uploading module comprises:
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.
7. 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-3 or claim 4.
8. 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-3 or claim 4 when executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310066277.3A CN116094908B (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 CN116094908B (en) | 2023-01-17 | 2023-01-17 | Log file storage method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116094908A CN116094908A (en) | 2023-05-09 |
CN116094908B true CN116094908B (en) | 2024-07-26 |
Family
ID=86207978
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310066277.3A Active CN116094908B (en) | 2023-01-17 | 2023-01-17 | Log file storage method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116094908B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112199266A (en) * | 2020-10-23 | 2021-01-08 | 中国第一汽车股份有限公司 | Log transmission method and system for vehicle-mounted machine system, vehicle and storage medium |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2680534B1 (en) * | 2012-06-28 | 2017-12-27 | Harman Becker Automotive Systems GmbH | Logging for telematic systems |
JP7139257B2 (en) * | 2019-01-21 | 2022-09-20 | エヌ・ティ・ティ・コミュニケーションズ株式会社 | VEHICLE SECURITY MONITORING DEVICE, METHOD AND PROGRAM |
CN113064752B (en) * | 2019-12-16 | 2023-11-21 | 华晨宝马汽车有限公司 | Method, system and computer readable medium for archiving logs |
CN113791802B (en) * | 2021-09-07 | 2024-02-27 | 东风汽车有限公司东风日产乘用车公司 | 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 |
CN114937316B (en) * | 2022-05-18 | 2023-12-29 | 深圳市易孔立出软件开发有限公司 | 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 |
CN115277780B (en) * | 2022-07-30 | 2023-11-14 | 重庆长安汽车股份有限公司 | Method and device for acquiring vehicle-end log, electronic equipment and storage medium |
-
2023
- 2023-01-17 CN CN202310066277.3A patent/CN116094908B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112199266A (en) * | 2020-10-23 | 2021-01-08 | 中国第一汽车股份有限公司 | Log transmission method and system for vehicle-mounted machine system, vehicle and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN116094908A (en) | 2023-05-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111506641A (en) | Data management method, data acquisition platform, data management system and storage medium | |
CN111309696A (en) | Log processing method and device, electronic equipment and readable medium | |
CN113641544B (en) | Method, apparatus, device, medium and product for detecting application state | |
CN113381907A (en) | Log collection method and device, electronic equipment and storage 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 | |
CN117093627A (en) | Information mining method, device, electronic equipment and storage medium | |
CN116094908B (en) | Log file storage 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 | |
CN111159009A (en) | Pressure testing method and device for log service system | |
CN114500105A (en) | Network packet interception method, device, equipment and storage medium | |
CN113360348B (en) | Abnormal request processing method and device, electronic equipment and storage medium | |
CN115146309A (en) | Privacy compliance detection method, device, server, terminal and storage medium | |
CN111950232B (en) | Method and device for automatically switching number segments | |
CN115766696A (en) | File uploading method and device, electronic equipment and storage medium | |
CN113079055A (en) | Method and device for dynamically acquiring AGV (automatic guided vehicle) running data | |
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 | |
CN115269055A (en) | Nginx request data acquisition method, device, equipment and storage medium | |
CN116682195A (en) | Vehicle data acquisition method, device, equipment and medium | |
CN117650967A (en) | Multi-cluster index processing method, system, electronic equipment and storage 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |