CN115454760A - System log processing method and device - Google Patents

System log processing method and device Download PDF

Info

Publication number
CN115454760A
CN115454760A CN202210684924.2A CN202210684924A CN115454760A CN 115454760 A CN115454760 A CN 115454760A CN 202210684924 A CN202210684924 A CN 202210684924A CN 115454760 A CN115454760 A CN 115454760A
Authority
CN
China
Prior art keywords
domain controller
target
ecu
log data
slave
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
CN202210684924.2A
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.)
Beijing CHJ Automobile Technology Co Ltd
Original Assignee
Beijing CHJ Automobile Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing CHJ Automobile Technology Co Ltd filed Critical Beijing CHJ Automobile Technology Co Ltd
Priority to CN202210684924.2A priority Critical patent/CN115454760A/en
Publication of CN115454760A publication Critical patent/CN115454760A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • G06F11/3072Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The utility model provides a system log processing method, a device, an electronic device and a storage medium, which relate to the technical field of vehicles and are executed by a main domain controller in a service cluster, wherein the main domain controller is the domain controller with the largest ticket obtaining quantity in the service cluster, and the method comprises the following steps: receiving log data sent by an Electronic Control Unit (ECU); generating a target log file based on the log data; and sending the target log file to at least one slave domain controller in the service cluster for storage. Therefore, the main domain controller is confirmed by election, the log data in all the domain controllers can be integrated to generate a target log file, the target log file is dispersed to other domain controllers to be stored, the situation that the log data cannot be called due to the fact that a certain domain controller cannot work normally can be prevented, and the stability of the system is improved.

Description

System log processing method and device
Technical Field
The present disclosure relates to the field of vehicle technologies, and in particular, to a method and an apparatus for processing system logs, an electronic device, and a storage medium.
Background
Based on the existing Electronic Architecture (EE) of the whole vehicle, as many as several tens of Electronic Control Units (ECUs) are respectively responsible for different function implementations, and the functions of the whole vehicle are implemented through mutual communication and cooperation in a bus Communication (CAN) or ethernet manner. In order to solve these distributed problems, many ECU functions with similar functions may be integrated into a processor hardware platform with performance higher than that of the ECU, and the processor hardware platform may be used as a Domain Control Unit (DCU) of the vehicle.
There are occasional problems that occur after real vehicle testing or after the vehicle is sold. The problem can be solved by matching a plurality of domain controllers and/or ECUs, if the functions of the domain controllers and/or the ECUs are abnormal at the moment, the problem can be searched only by means of diagnostic information, the root cause cannot be searched, and potential safety hazards can be brought to the running of the vehicle.
BRIEF SUMMARY OF THE PRESENT DISCLOSURE
The present disclosure is directed to solving, at least to some extent, one of the technical problems in the related art.
To this end, an object of the present disclosure is to provide a system log processing method.
A second object of the present disclosure is to provide a system log processing apparatus.
A third object of the present disclosure is to provide an electronic device.
A fourth object of the present disclosure is to propose a non-transitory computer-readable storage medium.
A fifth object of the present disclosure is to propose a vehicle.
To achieve the above object, an embodiment of the first aspect of the present disclosure provides a system log processing method, which is executed by a master domain controller in a service cluster, where the master domain controller is a domain controller with the largest number of tickets in the service cluster, and the method includes: receiving log data sent by an Electronic Control Unit (ECU); generating a target log file based on the log data; and sending the target log file to at least one slave domain controller in the service cluster for storage.
According to one embodiment of the present disclosure, receiving log data transmitted from an electronic control unit ECU includes: responding to the fact that the ECU is a first ECU of Ethernet communication, and receiving log data sent by the first ECU; or responding to the ECU being a second ECU communicating by the bus, and receiving the log data sent by the domain controller to which the second ECU belongs.
According to one embodiment of the disclosure, sending the target log file to at least one slave domain controller in the service cluster for saving comprises: selecting a target slave domain controller from slave domain controllers in the slave service cluster; and sending the target log file to the target slave domain controller for storage.
According to an embodiment of the present disclosure, selecting a target slave domain controller from the domain controllers in the service cluster further includes: acquiring attribute information and/or state information of a slave domain controller; and sorting the slave domain controllers based on the attribute information and/or the state information, and determining target slave domain controllers according to the sorting, wherein the number of the target slave domain controllers is greater than the preset number.
According to one embodiment of the present disclosure, selecting a target slave domain controller from the slave domain controllers in the service cluster further includes: and selecting the slave domain controller with the ticket obtaining quantity larger than the ticket obtaining threshold value as a target slave domain controller.
According to one embodiment of the present disclosure, based on log data sent by an electronic control unit ECU, the method further includes: generating a target log file according to a preset data arrangement sequence based on log data
According to an embodiment of the present disclosure, the method further comprises: and in response to the existence of a plurality of domain controllers with the largest number of votes, determining the domain controller with the largest number of subordinate ECUs as a main domain controller.
To achieve the above object, a first embodiment of the present disclosure provides a system log processing method, which is executed by a slave domain controller in a service cluster, and includes: receiving log data sent by a second ECU (electronic control unit) in bus communication, and reporting the log data to a main domain controller; and receiving a target log file generated by the main domain controller based on the log data.
According to an embodiment of the present disclosure, the method further comprises: receiving a heartbeat signal sent by a main domain controller; in response to receiving a heartbeat signal timeout, the election vote is redone.
To achieve the above object, a second aspect of the present disclosure provides a system log processing apparatus, which is executed by a master domain controller in a service cluster, where the master domain controller is a domain controller with the largest number of tickets in the service cluster, and the apparatus includes: the receiving module is used for receiving log data sent by an Electronic Control Unit (ECU); the generating module is used for generating a target log file based on the log data; and the storage module is used for sending the target log file to at least one slave domain controller in the service cluster for storage.
To achieve the above object, a second embodiment of the present disclosure provides a system log processing apparatus, which is executed by a slave domain controller in a service cluster, and includes: the first receiving module is used for receiving log data sent by a second ECU which is communicated by a bus and reporting the log data to the main domain controller; and the second receiving module is used for receiving a target log file generated by the main domain controller based on the log data sent by the second ECU.
To achieve the above object, an embodiment of a third aspect of the present disclosure provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to implement the system log processing method as embodied in the first aspect of the disclosure.
To achieve the above object, a fourth aspect of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions for implementing a system log processing method as defined in the first aspect of the present disclosure.
To achieve the above object, an embodiment of a fifth aspect of the present disclosure provides a vehicle including the electronic device as set forth in the above third aspect.
Therefore, the main domain controller is confirmed by election, the log data in all the domain controllers can be integrated to generate a target log file, the target log file is dispersed to other domain controllers to be stored, the situation that the log data cannot be called due to the fact that a certain domain controller cannot work normally can be prevented, and the stability of the system is improved.
Drawings
FIG. 1 is a flow chart of a system log processing method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a service cluster according to an embodiment of the present disclosure;
FIG. 3 is a flow diagram of another method of processing system logs according to one embodiment of the present disclosure;
FIG. 4 is a flow diagram of another method of system log processing according to an embodiment of the present disclosure;
FIG. 5 is a general flow diagram of a system log processing method according to an embodiment of the disclosure;
fig. 6 is a block diagram of a system log processing apparatus according to the present disclosure;
fig. 7 is a block diagram of another system log processing apparatus proposed by the present disclosure;
fig. 8 is a block diagram of an electronic device according to the disclosure.
Detailed Description
Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and intended to be illustrative of the present disclosure, and should not be construed as limiting the present disclosure.
In the prior art, all the ECUs in the automobile are connected together through CAN and LIN buses, the total number of the ECUs is rapidly increased to dozens or even hundreds, and the complexity of the whole system is increased more and is close to the upper limit. To solve these distributed problems, many similar and separate ECU functions can be integrated into a processor hardware platform with performance higher than that of the ECU, and the processor hardware platform can be used as a Domain Control Unit (DCU) of the automobile. A move from ECU distributed EE architecture to domain centralized EE architecture can be achieved through the domain controller. In actual operation, some accidental problems may occur, a plurality of domain controllers and/or ECUs may be needed to be matched for solving, and at this time, if the domain controllers and/or ECUs are abnormal in operation, the problems cannot be analyzed, and great hidden dangers are brought to driving safety.
In order to solve the above problem, the present disclosure provides a system log processing method.
Fig. 1 is a schematic diagram of an exemplary embodiment of a system log processing method provided by the present disclosure, which is executed by a master domain controller in a service cluster, where the master domain controller is a domain controller with the largest number of tickets in the service cluster, and as shown in fig. 1, the system log processing method includes the following steps:
and S101, receiving log data sent by an Electronic Control Unit (ECU).
As shown in fig. 2, a service cluster refers to a cluster in which many domain controllers are centralized together to perform the same service, and appears to a client as if there is only one server. The cluster can use a plurality of computers to perform parallel computation so as to obtain high computation speed, and also can use a plurality of computers to perform backup so as to ensure that any one machine damages the whole system or can normally operate.
As shown in fig. 2, a plurality of domain controllers may exist in a service cluster of a vehicle, and the embodiment of the present disclosure needs to select one master domain controller from the plurality of domain controllers to collect and integrate log data of all the domain controllers.
In the disclosed embodiment, the master domain master may be elected from all domain masters in the service cluster by an election algorithm (Raft). When the domain controllers in the service cluster meet the election voting condition, at least one domain controller is selected as a candidate, all the domain controllers vote, when the candidate meets the election condition, the domain controller becomes a main domain controller, and other candidates serve as slave domain controllers.
Optionally, when it is detected that there is no main domain controller in the domain controllers, for example, when the service cluster is initially started, and all the domain controllers are in a start state, it may be considered that the election voting condition is satisfied, and it is necessary to perform voting to elect a main domain controller.
Optionally, there may also be an existing main domain controller, and when an abnormal operation of the main domain controller is detected, for example, when a delay or a function damage of the main domain controller is detected, the voting condition may be considered to be satisfied, and a new main domain controller needs to be voted for again.
It should be noted that the election condition may be that the domain controller which has most votes elects. Optionally, when the votes obtained by the plurality of domain controllers are the most and the number of votes is the same, the electing is determined based on other attributes of each domain controller, for example, the domain controller with the most number of ECUs may be selected as the main domain controller according to the number of ECUs subordinate to the domain controller.
After the master domain controller is determined, the master domain controller can send the elected message to the ECU, and the ECU sends the collected log data to the master domain controller for processing and storage.
It should be noted that the data transmission manner of each ECU may be different, for example, bus transmission or ethernet transmission.
Optionally, when the ECU performs bus transmission, the log data needs to be reported to the domain controller to which the ECU belongs, and then the log data is sent to the main domain controller by the domain controller for processing and storing.
Optionally, when the ECU is in ethernet transmission, the log data may be directly reported to the main domain controller for processing and storing.
It should be noted that the ECU may periodically send the log data to the main domain controller, for example, once every hour. Different ECU sending periods may be different due to different functions of the ECU, and are not limited herein.
Alternatively, the ECU may also determine whether to transmit based on the size of the collected log data. For example, when the log data collected by the ECU reaches a specified size, the log data is transmitted to the main domain controller.
S102, generating a target log file based on the log data.
In the embodiment of the disclosure, after receiving the log data sent by the ECU, the master domain controller may generate a target log file based on the log data. It should be noted that, the method for generating the target log file may be various, and is not limited herein.
Alternatively, a data directory may be set in advance, and then log data sent by the ECU may be stored in the corresponding directory to generate a target log file.
Optionally, the acquired log data may also be marked and then stored to generate a target log file. When the use is required to be called, the corresponding log data can be acquired through the mark.
S103, sending the target log file to at least one slave domain controller in the service cluster for storage.
After the master domain controller generates the target log file, the target log file can be sent to at least one slave domain controller for storage.
Alternatively, the master domain controller may send the target log file to all slave domain controllers for saving.
Optionally, the master domain controller may further select from the slave domain controllers, and then send the target log file to the selected slave domain controllers for storage.
Optionally, the slave domain controllers exceeding a set proportion are randomly selected based on the number of the slave domain controllers in the service cluster, and then the target log file is sent to the selected slave domain controllers for storage.
In the embodiment of the disclosure, election voting is performed first, a master domain controller is determined based on a voting result, then log data sent by an Electronic Control Unit (ECU) is received, then a target log file is generated based on the log data sent by the ECU, and finally the target log file is sent to at least one slave domain controller in a service cluster for storage. Therefore, the main domain controller is confirmed by election, log data of all the ECUs of the service cluster can be integrated and dispersed into the domain controller for storage, the situation that the log data cannot be called due to the fact that the domain controller and/or the ECUs cannot work normally can be prevented, and stability of the system is improved.
In the disclosed embodiment, determining the master domain controller based on the voting result may include first acquiring a number of votes obtained for the domain controller, determining the controller having the largest number of votes obtained as the master domain controller, or determining the domain controller having the largest number of subordinate ECUs as the master domain controller in response to the existence of a plurality of domain controllers having the largest number of votes obtained. Therefore, the main domain controller can be determined more accurately and conveniently through voting results, when the votes are the same, the main domain controller is determined through the number of subordinate ECUs, the fact that as many ECUs as possible directly transmit data to the main domain controller is guaranteed, transfer to the main domain controller through other domain controllers is not needed, and packet loss or loss of the ECU data in the transmission process is reduced as much as possible.
In the embodiment of the disclosure, the log data may be sorted according to a preset ECU directory to generate a target log file. It should be noted that the directory of the ECU may include a domain controller directory, and the directory of the ECU to which the domain controller belongs is included under the domain controller directory. After receiving the log data of the ECU, the log data may be stored in a corresponding ECU directory, and it should be noted that the ECU directory may be set in advance and set according to different service clusters, which is not limited herein.
It should be noted that the second ECUs communicating via the bus cannot directly transmit log data to the master domain controller, and need to transmit the log data to the slave domain controller to which each second ECU belongs, and then to the master domain controller via the slave domain controller. The slave domain controller transmits the received log data collected by the second ECU in bus communication to the master domain controller.
The main domain controller also comprises a first ECU of Ethernet communication in the received log data sent by the ECU. The first ECU may transmit the log data to the main domain controller directly through the ethernet. As shown in fig. 2, the ECUs 1 to m are first ECUs supporting ethernet communication.
In the embodiment of the disclosure, after the master domain controller is determined, the master domain controller sends a heartbeat signal to the slave domain controller according to a period, and the slave domain controller is informed of normal operation through the heartbeat signal without voting and voting.
Further, when the size of the target log file stored in the domain controller exceeds a size threshold, deletion can be performed one by one according to the time of acquiring the target log file. It should be noted that the size threshold may be set in advance, and may be set according to actual needs.
Optionally, the target log file with the saving time exceeding the storage time threshold value can be deleted based on the saving time of the target log file. It should be noted that the storage time threshold may be set in advance, and may be set according to actual needs.
Therefore, the normal storage function of the domain controller can be ensured, and the situation that a new target log file cannot be stored due to the fact that the memory is too small is prevented.
In the above embodiment, the sending of the target log file to at least one slave domain controller in the service cluster is further explained by fig. 3, and the method includes:
s301, selecting a target slave domain controller from the slave domain controllers in the service cluster.
In the embodiment of the present disclosure, the method of selecting the target slave domain controller may be various.
Alternatively, the attribute information and/or the status information of the slave domain controllers may be first acquired, then the slave domain controllers may be sorted based on the attribute information and/or the status information, and the target slave domain controllers may be determined according to the sorting, where the number of the target slave domain controllers is greater than the preset number. It should be noted that the preset number may be set in advance, and may be changed according to actual needs, which is not limited herein. For example, the preset number may be half of the number of slave domain controllers in the service cluster.
Optionally, the number of the obtained tickets of the slave domain controller can be counted, and the slave domain controller with the number of the obtained tickets larger than the threshold value of the obtained tickets is selected as the target slave domain controller. It should be noted that the threshold value of obtaining a ticket may be set in advance, and may be changed according to actual needs, which is not limited herein. For example, the threshold value of obtaining tickets may be 3, and when the ticket obtaining of the slave domain controller is greater than or equal to 3, the slave domain controller may be considered as the target slave domain controller.
S302, the target log file is sent to the target slave domain controller to be saved.
In the embodiment of the disclosure, a target slave domain controller is selected from the slave domain controllers in the service cluster, and then a target log file is sent to the target slave domain controller for storage. Therefore, the target slave domain controller is determined by screening the slave domain controllers in the service cluster, the storage efficiency of the target log file can be improved, and a foundation is provided for conveniently calling the log data in the target log file subsequently.
Fig. 4 is a schematic diagram of an exemplary embodiment of a system log processing method proposed by the present disclosure, which is executed by a slave domain controller in a service cluster, as shown in fig. 4, the system log processing method includes the following steps:
s401, receiving log data sent by a second ECU which is in bus communication, and reporting the log data to a main domain controller.
It should be noted that before the second ECU sends the log data to the slave domain controller, the log data also needs to be screened, so as to reduce data that can represent the software logic of the second ECU. Optionally, the correlation between the log data and the second ECU software logic may be obtained, and the log data with the larger correlation may be selected and uploaded to the corresponding slave domain controller. Therefore, irrelevant data can be screened out, the data transmission efficiency is improved, and the transmission cost is reduced.
S402, receiving a target log file generated by the main domain controller based on the log data.
In the embodiment of the disclosure, the log data sent by the second ECU in bus communication is received, the log data is reported to the master domain controller, and then a target log file generated by the master domain controller based on the log data sent by the second ECU is received. Therefore, the log data collected from the domain controller is sent to the main domain controller, and the target log file generated based on the log data sent by the second ECU is stored, so that data loss caused by abnormal functions of a certain domain controller can be prevented, and the stability of the service cluster is improved.
In the embodiment of the disclosure, the slave domain controller may further receive a heartbeat signal sent by the master domain controller, and in response to a timeout of the received heartbeat signal, replay voting. It should be noted that the timeout periods of the slave domain controllers receiving the heartbeat signal sent by the master domain controller may be different, and when one slave domain controller delays or does not receive the heartbeat signal due to a short reception timeout period, it is determined that the master domain controller is abnormal in operation, and the slave domain controller may serve as a candidate to initiate election voting, and re-elect a new master domain controller.
Fig. 5 is a schematic flow diagram of a system LOG processing method according to an embodiment of the present disclosure, as shown in fig. 5, when a voting condition is satisfied, a domain controller in a service cluster votes, and after a master domain controller is voted, an ECU sends LOG data LOG collected to the master domain controller, where as shown in fig. 5, ECUs 1 to n in main line communication send respective collected LOG data to corresponding domain controllers, and then the domain controllers send the LOG data to the master domain controller, and meanwhile, ECUs 1 to m in ethernet communication send respective collected LOG data directly to the master domain controller, and the master domain controller processes all LOG data to generate a target LOG file, and sends the target LOG file to other domain controllers for storage. When data is acquired, the cloud server may send a target log file acquisition request to the domain controller, and the domain controller may send the target log file to the cloud based on the request.
Corresponding to the system log processing methods provided in the foregoing several embodiments, an embodiment of the present disclosure further provides a system log processing apparatus, and since the system log processing apparatus provided in the embodiment of the present disclosure corresponds to the system log processing methods provided in the foregoing several embodiments, the implementation of the system log processing method is also applicable to the system log processing apparatus provided in the embodiment of the present disclosure, and detailed description is not given in the following embodiments.
Fig. 6 is a schematic diagram of a system log processing apparatus according to the present disclosure, which is executed by a master domain controller in a service cluster, where the master domain controller is a domain controller with the largest number of tickets in the service cluster, and as shown in fig. 6, the system log processing apparatus 600 includes: a receiving module 610, a generating module 620 and a saving module 630.
The receiving module 610 is configured to receive log data sent by an electronic control unit ECU.
And the generating module 620 is used for generating a target log file based on the log data sent by the electronic control unit ECU.
A saving module 630, configured to send the target log file to at least one slave domain controller in the service cluster for saving.
In an embodiment of the present disclosure, the receiving module 610 is further configured to: responding to the fact that the ECU is a first ECU of Ethernet communication, and receiving log data sent by the first ECU; or responding to the ECU being a second ECU which communicates by a bus, and receiving the log data sent by the domain controller to which the second ECU belongs.
In an embodiment of the present disclosure, the saving module 630 is further configured to: selecting a target slave domain controller from slave domain controllers in the slave service cluster; and sending the target log file to the target slave domain controller for storage.
In an embodiment of the present disclosure, the saving module 630 is further configured to: acquiring attribute information and/or state information of a slave domain controller; and sequencing the slave domain controllers based on the attribute information and/or the state information, and determining target slave domain controllers according to the sequencing, wherein the number of the target slave domain controllers is greater than the preset number.
In an embodiment of the present disclosure, the saving module 630 is further configured to: counting the number of tickets obtained from the domain controller; and selecting the slave domain controller with the number of the obtained tickets larger than the ticket obtaining threshold value as a target slave domain controller.
In an embodiment of the disclosure, the generating module 620 is further configured to: and generating a target log file according to a preset data arrangement sequence based on the log data.
In one embodiment of the disclosure, the apparatus is further to: a heartbeat signal is periodically sent to the slave domain controller.
In one embodiment of the disclosure, the apparatus is further to: and in response to the existence of a plurality of domain controllers with the largest number of tickets, determining the domain controller with the largest number of subordinate ECUs as a main domain controller.
Fig. 7 is a schematic diagram of a system log processing apparatus according to the present disclosure, which is executed by a slave domain controller in a service cluster, as shown in fig. 7, the system log processing apparatus 700 includes: a first charging module 710 and a second charging module 720.
The first receiving module 710 is configured to receive log data sent by a second ECU in bus communication, and report the log data to the master domain controller.
And a second receiving module 720, configured to receive a target log file generated by the main domain controller based on the log data sent by the second ECU.
In one embodiment of the disclosure, the apparatus is further to: receiving a heartbeat signal sent by a main domain controller; and responding to the received heartbeat signal timeout, and re-conducting election voting.
In order to implement the foregoing embodiment, an embodiment of the present disclosure further provides an electronic device 800, as shown in fig. 8, where the electronic device 800 includes: the processor 801 and a memory 802 communicatively connected to the processor, the memory 802 storing instructions executable by at least one processor, the instructions being executed by the at least one processor 801 to implement a system log processing method as an embodiment of the first aspect of the present disclosure.
In order to achieve the above embodiments, embodiments of the present disclosure also provide a vehicle including an electronic device as set forth in the above embodiments.
In order to implement the foregoing embodiments, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, where the computer instructions are used to enable a computer to implement the system log processing method as an embodiment of the first aspect of the present disclosure.
In order to implement the foregoing embodiments, the present disclosure further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program implements the system log processing method according to the embodiment of the first aspect of the present disclosure.
In the description of the present disclosure, it is to be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," "circumferential," and the like are used in the orientations and positional relationships indicated in the drawings for convenience in describing the present disclosure and to simplify the description, but are not intended to indicate or imply that the referenced devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and are therefore not to be considered limiting of the present disclosure.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present disclosure, "a plurality" means two or more unless specifically limited otherwise.
In the description of the present specification, reference to the description of "one embodiment," "some embodiments," "an example," "a specific example," or "some examples" or the like means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present disclosure have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure, and that changes, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present disclosure.

Claims (14)

1. A system log processing method, performed by a master domain controller in a service cluster, where the master domain controller is a domain controller with the largest number of tickets in the service cluster, the method comprising:
receiving log data sent by an Electronic Control Unit (ECU);
generating a target log file based on the log data;
and sending the target log file to at least one slave domain controller in the service cluster for storage.
2. The method according to claim 1, wherein the receiving log data sent by an Electronic Control Unit (ECU) comprises:
responding to the ECU being a first ECU of Ethernet communication, receiving the log data sent by the first ECU; or alternatively
And responding to the ECU being a second ECU which communicates by a bus, and receiving the log data sent by a domain controller to which the second ECU belongs.
3. The method of claim 1, wherein sending the target log file to at least one slave domain controller in the service cluster for saving comprises:
selecting a target slave domain controller from the slave domain controllers in the service cluster;
and sending the target log file to the target slave domain controller for storage.
4. The method of claim 3, wherein the selecting a target slave domain controller from the slave domain controllers in the service cluster further comprises:
acquiring attribute information and/or state information of the slave domain controller;
and sequencing the slave domain controllers based on the attribute information and/or the state information, and determining the target slave domain controllers according to the sequencing, wherein the number of the target slave domain controllers is greater than a preset number.
5. The method of claim 3, wherein the selecting a target slave domain controller from the slave domain controllers in the service cluster further comprises:
and selecting the slave domain controller with the number of the obtained tickets being larger than the threshold value of the obtained tickets as the target slave domain controller.
6. The method of any of claims 1-5, wherein generating a target log file based on the log data comprises:
and sequencing the log data according to a preset ECU directory to generate the target log file.
7. The method of claim 1, further comprising:
and in response to the existence of a plurality of domain controllers with the largest number of tickets, determining the domain controller with the largest number of subordinate ECUs as the main domain controller.
8. A system log processing method, performed by a slave domain controller in a service cluster, the method comprising:
receiving log data sent by a second ECU (electronic control unit) in bus communication, and reporting the log data to a main domain controller;
and receiving a target log file generated by the main domain controller based on the log data.
9. The method of claim 8, further comprising:
receiving a heartbeat signal sent by the main domain controller;
and in response to receiving the heartbeat signal timeout, re-conducting the election vote.
10. A system log processing apparatus, implemented by a master domain controller in a service cluster, where the master domain controller is a domain controller with the largest number of tickets in the service cluster, and the apparatus includes:
the receiving module is used for receiving log data sent by an Electronic Control Unit (ECU);
the generating module is used for generating a target log file based on the log data;
and the storage module is used for sending the target log file to at least one slave domain controller in the service cluster for storage.
11. A system log processing apparatus, performed by a slave domain controller in a service cluster, the apparatus comprising:
the first receiving module is used for receiving log data sent by a second ECU (electronic control unit) in bus communication and reporting the log data to the main domain controller;
and the second receiving module is used for receiving a target log file generated by the main domain controller based on the log data.
12. An electronic device comprising a memory, a processor;
wherein the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory for implementing the method according to any one of claims 1-7 or claims 8-9.
13. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7 or claims 8-9.
14. A vehicle characterized by comprising the electronic device of claim 12.
CN202210684924.2A 2022-06-14 2022-06-14 System log processing method and device Pending CN115454760A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210684924.2A CN115454760A (en) 2022-06-14 2022-06-14 System log processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210684924.2A CN115454760A (en) 2022-06-14 2022-06-14 System log processing method and device

Publications (1)

Publication Number Publication Date
CN115454760A true CN115454760A (en) 2022-12-09

Family

ID=84297384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210684924.2A Pending CN115454760A (en) 2022-06-14 2022-06-14 System log processing method and device

Country Status (1)

Country Link
CN (1) CN115454760A (en)

Similar Documents

Publication Publication Date Title
CN108563214B (en) Vehicle diagnosis method, device and equipment
CN110912998B (en) Vehicle problem troubleshooting system and method based on remote equipment terminal
CN108803580B (en) Method for matching vehicle CAN protocol and related equipment
EP3559625B1 (en) Device and method for managing an electric vehicle
CN112286171B (en) Remote diagnosis method, device, vehicle and storage medium
CN110572443B (en) Long connection state updating method, server and storage medium
DE102018102660A1 (en) METHOD AND DEVICE FOR DETECTING A BATTERY DISCHARGE
US20100185356A1 (en) Compiling Source Information From A Motor Vehicle Data System and Configuring A Telematic Module
CN103699108A (en) OBD (on-board diagnostics) technology-based motor vehicle real-time monitoring system
CN113608518B (en) Data generation method, device, terminal equipment and medium
CN112904758B (en) Data return link state monitoring method and system based on unmanned vehicle
CN102426453A (en) Remote diagnosis device and method for automobile
CN110995823B (en) Vehicle-mounted terminal offline processing method, device, storage medium and device
CN112834818B (en) Method and device for determining electric quantity, storage medium and electronic equipment
CN115454760A (en) System log processing method and device
CN203882164U (en) OBD (on-board diagnostics) technology-based motor vehicle real-time monitoring system
CN115545452A (en) Operation and maintenance method, operation and maintenance system, equipment and storage medium
CN111143225B (en) Vulnerability processing method of automobile diagnosis software and related products
US10733815B2 (en) Method and system for selective recall of motor vehicles
CN115454015A (en) Controller node detection method, controller node detection device, control system, vehicle and storage medium
CN114500178A (en) Intelligent internet of things gateway capable of self-operation and self-maintenance
CN111946528B (en) Engine diagnosis system, engine diagnosis method, and storage medium
CN112965902A (en) Application system evaluation method and device
CN211855849U (en) Vehicle failure detection device
CN114415646B (en) Remote vehicle diagnosis method, system and terminal equipment based on DoIP protocol

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