Vehicle-mounted log processing method and device and vehicle

By performing multi-dimensional value assessment and link identification processing on vehicle logs, the problem of discarding key information in logs in existing technologies has been solved, and high-value logs have been retained and system anomalies have been accurately located.

CN121523951APending Publication Date: 2026-02-13ROX MOTOR TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511963995.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

Existing vehicle log processing methods can easily lead to the indiscriminate discarding of critical logs when the system is under high load or abnormal, making it impossible to accurately locate the cause of system abnormalities.

Method used

By evaluating the value of logs generated by vehicle components from multiple dimensions, an initial value score is determined, and logs are added to the target log chain according to the log chain identifier. The overall value score is used to process the log cache and retain high-value logs.

Benefits of technology

It improves the accuracy of log processing, can identify and retain critical logs, avoids discarding them, and ensures that the cause of system anomalies can be analyzed through the complete log chain when system anomalies occur.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121523951A_ABST
    Figure CN121523951A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle-mounted log processing method and device and a vehicle, and the method comprises the steps: carrying out the value evaluation of a current log generated by a vehicle-mounted component from multiple dimensions, determining the initial value score of the current log, and enabling the current log to carry a log link identifier; determining a target log link corresponding to the current log according to the log link identifier, adding the current log into the target log link, and updating the overall value score of the target log link according to the initial value score; and storing the current log in a log cache, and processing the log in the log cache by using the overall value score and the initial value score to reserve a high-value log. By the adoption of the vehicle-mounted log processing method and device and the vehicle, the high-value vehicle-mounted logs are effectively recognized and reserved, key logs are prevented from being discarded, and the accuracy of vehicle-mounted log processing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automotive electronics technology, and more specifically, to an in-vehicle log processing method, device, and vehicle. Background Technology

[0002] In the field of intelligent vehicles, core in-vehicle components such as in-vehicle entertainment systems and dashboards often rely on in-vehicle operating systems, which run a large number of services and applications. These components continuously generate massive amounts of runtime logs, which are temporarily stored in limited memory or non-volatile caches. When the in-vehicle operating system faces high loads or malfunctions, the rate of log generation increases dramatically, easily exhausting the cache space. Existing methods for handling in-vehicle logs typically employ first-in-first-out (FIFO) or circular overwrite strategies, indiscriminately discarding earlier logs.

[0003] However, the aforementioned crude log processing method may discard important logs containing key causes of system anomalies along with other vehicle logs, making it impossible to accurately locate the cause of system anomalies. Summary of the Invention

[0004] In view of the above, the purpose of this application is to provide an in-vehicle log processing method, device and vehicle to overcome at least one of the above-mentioned defects.

[0005] In a first aspect, embodiments of this application provide a vehicle log processing method, including: The current logs generated by the vehicle components are evaluated from multiple dimensions to determine the initial value score of the current logs. The current logs carry log link identifiers. The target log link corresponding to the current log is determined based on the log link identifier, the current log is added to the target log link, and the overall value score of the target log link is updated based on the initial value score. The current log is stored in the log cache, and the logs in the log cache are processed using the overall value score and the initial value score to retain high-value logs.

[0006] Optionally, the steps to evaluate the value of the current logs generated by the vehicle components from multiple dimensions and determine the initial value score of the current logs include: evaluating the current logs from four dimensions: log level, log generation duration, log source, and log content, and determining multiple value scores; and determining the initial value score of the current logs based on the sum of the multiple value scores.

[0007] Optionally, the step of storing the current log in the log cache includes: determining the log storage strategy based on the current operating status of the vehicle operating system; and storing the current log in the log cache according to the log storage strategy.

[0008] Optionally, the current operating state includes a first state, a second state, and a third state. The initial value score is determined based on multiple value scores, including a first value score corresponding to the log level and a second value score corresponding to the log generation duration. The steps for determining the log storage strategy based on the current operating state of the vehicle operating system include: if the current operating state is the first state, a lenient strategy is adopted, keeping the initial value score unchanged and allowing the recording of logs at the second preset log level. The first state is the normal state of the vehicle operating system. If the current operating state is the second state, a log tightening strategy is adopted, increasing the initial value score of logs at the first preset log level and decreasing the initial value score of logs at the second preset log level. The second state is a sub-healthy state where the error rate or load of the vehicle operating system exceeds a set threshold. If the current operating state is the third state, a log preservation strategy is adopted, prohibiting the recording of logs at the third preset log level, and adding a locking flag to the log to indicate that it is not to be deleted when the initial value score meets the preset threshold condition. The third state is a fault state where the core service of the vehicle operating system has crashed or is seriously abnormal.

[0009] Optionally, logs in the log cache can be processed using the overall value score in the following ways: monitor the space utilization of the log cache to determine whether the space utilization meets the log eviction criteria; when the log eviction criteria are met, select log links to be evicted based on the overall value score and execution status, and delete the log links to be evicted from the log cache.

[0010] Optionally, after deleting the log links to be phased out from the log cache, the method further includes: determining whether the space utilization rate of the log cache after deleting the log links to be phased out meets the log eviction criteria; if the log eviction criteria are met, cyclically deleting the log links to be phased out that do not belong to any log links and have the lowest initial value score from the log cache until the space utilization rate meets the log eviction criteria.

[0011] Optionally, the step of selecting log links to be phased out based on the overall value score and execution status includes: identifying the log link with the lowest overall value score and which has been completed as the log link to be phased out.

[0012] Optionally, the step of updating the overall value score of the target log link based on the initial value score includes: determining the statistical value of the initial value score of all logs in the target log link as the updated overall value score of the target log link.

[0013] Secondly, embodiments of this application also provide an in-vehicle log processing device, the device comprising: The value assessment module is used to assess the value of the current logs generated by the vehicle components from multiple dimensions, determine the initial value score of the current logs, and the current logs carry log link identifiers. The link update module is used to determine the target log link corresponding to the current log based on the log link identifier, add the current log to the target log link, and update the overall value score of the target log link based on the initial value score. The log processing module is used to store the current logs into the log cache and process the logs in the log cache using the overall value score and the initial value score in order to retain high-value logs.

[0014] Thirdly, embodiments of this application also provide a vehicle, including a vehicle controller, on-board components, and a log cache; The onboard components are used to generate the current log and send it to the vehicle controller; The vehicle controller is used to receive the current log and execute the steps of the above-described vehicle log processing method; The log cache is used to store the current logs.

[0015] The embodiments of this application bring the following beneficial effects: This application provides a vehicle log processing method, apparatus, and vehicle that can find the target log link associated with the current log. By using a complete, cross-service target log link, it avoids the problem of not being able to determine the cause of system anomalies. At the same time, it uses an overall value score to reflect the overall evaluation of all logs generated by a series of operations under a single business request, and then decides how to process the logs based on the overall evaluation results, which improves the accuracy of log processing. Compared with existing vehicle log processing methods, it can effectively identify and retain high-value vehicle logs, avoid the discarding of critical logs, and improve the accuracy of vehicle log processing.

[0016] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A flowchart of the vehicle log processing method provided in an embodiment of this application is shown; Figure 2A flowchart illustrating the steps for setting the log link identifier provided in an embodiment of this application is shown; Figure 3 A flowchart illustrating the second current log storage steps provided in an embodiment of this application is shown; Figure 4 A flowchart illustrating the log processing steps in the log cache provided in an embodiment of this application is shown; Figure 5 A schematic diagram of the structure of the vehicle log processing device provided in an embodiment of this application is shown; Figure 6 A schematic diagram of the structure of the electronic device provided in the embodiments of this application is shown. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. Based on the embodiments of this application, every other embodiment obtained by those skilled in the art without inventive effort falls within the scope of protection of this application.

[0020] To facilitate understanding of this embodiment, the following description uses the application of the vehicle log processing method provided in this application embodiment to a vehicle controller as an example to illustrate the exemplary steps provided in this application embodiment. The vehicle controller includes a link topology management module.

[0021] Please see Figure 1 , Figure 1 This is a flowchart illustrating a vehicle log processing method provided in an embodiment of this application. Figure 1 As shown in the embodiments of this application, the vehicle log processing method includes: Step S101: Evaluate the value of the current log generated by the vehicle components from multiple dimensions to determine the initial value score of the current log.

[0022] Vehicle components refer to the collective term for hardware devices, software modules, and related system units integrated inside a vehicle to achieve core functions such as vehicle driving control, intelligent interaction, safety assurance, and network communication. For example, vehicle components include, but are not limited to: autonomous driving domain controller, millimeter-wave radar, vehicle camera, instrument panel, central control screen, vehicle audio, and voice recognition module.

[0023] Each vehicle component continuously generates vehicle logs. Each time a new vehicle log is generated, it is used as the current log. A log link identifier is set for the current log based on the business request corresponding to the current log, so as to determine the target log link according to the log link identifier carried by the current log.

[0024] The following reference Figure 2 This section will introduce the process of setting up log link identifiers.

[0025] Figure 2 A flowchart illustrating the steps for setting the log link identifier provided in an embodiment of this application is shown, such as... Figure 2 As shown, the steps for setting the log link identifier include: Step S1011: Monitor the preset external entry point that triggers the business request.

[0026] External entry points refer to all external triggering sources that may trigger the execution of internal business logic, data flow, or service calls within the system. External entry points are the starting point of business requests and are also the objects that the framework layer needs to focus on monitoring.

[0027] The framework layer monitors all preset external entry points that may trigger business requests. These preset external entry points include: user interaction entry points, vehicle event entry points, network request entry points, and scheduled task entry points. For example, a user interaction entry point could be an InputManagerService (IMS), such as touch or button events; a vehicle event entry point could be a VehicleHalService, such as receiving CAN bus signals, like door opening / closing or gear shifting; a network request entry point could be a network management module, such as external connections or data requests from Bluetooth or Wi-Fi; and a scheduled task entry point could be a critical task triggered by a system timer.

[0028] Step S1012: When the external entry point of the current business request is a preset external entry point, create a log link identifier corresponding to the current business request.

[0029] When the external entry point of the current business request is detected to be any of the above-mentioned preset external entry points, such as the external entry point of the current business request being a user interaction entry point, the link topology management module creates a globally unique log link identifier for the current business request. The log link identifier is denoted as TraceID. For example, when the user clicks the "Navigate Home" button, a TraceID will be created for the business request. This TraceID can be Nav_Req_123456.

[0030] Step S1013: Pass the log link identifier to all logs generated under the current business request.

[0031] There may be one or more system services handling the current business request. Assuming there are multiple system services handling the current business request, the first system service handling the request sets the generated TraceID to the local storage of the current thread or the context attribute of the request. This allows all logs generated by the first system service to have a TraceID. When the first system service calls the next system service, it passes the TraceID to the server of the second system service. The second system service then adds the TraceID to every log it generates, and so on. Logs generated by each service handling the business request will be associated with this TraceID.

[0032] After setting the log link identifier for the log, the log value determination module calculates the initial value score for each log.

[0033] Taking the current log as an example, the log value determination module evaluates the current log from four dimensions: log level, log generation duration, log source, and log content, determining multiple value scores. These scores include a first value score obtained from the log level dimension, a second value score obtained from the log generation duration dimension, a third value score obtained from the log source dimension, and a fourth value score obtained from the log content dimension. Then, the initial value score of the current log is determined based on the sum of these initial value scores. The log level includes FATAL, ERROR, WARN, INFO, and DEBUG. The log generation duration refers to the interval between the generation time of the first log entry with the same content as the current log and the generation time of the current log. The log source refers to the service from which the log originates; for example, the log source could be the vehicle hardware abstraction layer service or the power management service. The log content can be characterized by keywords included in the log content; for example, keywords could include CRASH, CAN_TIMEOUT, and NAV_FAILED.

[0034] For example: Regarding the first value score, denoted as Wb, when the log level is FATAL... When the log level is ERROR, When the log level is WARN, When the log level is INFO, the first value score is... When the log level is DEBUG, the first value score is .

[0035] The second value score, denoted as Wt, is negatively correlated with the log generation duration. The formula for calculating the second value score is: ,in, Indicates the duration of log generation. This represents a constant parameter.

[0036] Regarding the third value score, denoted as Wm, when the log source is the vehicle hardware abstraction layer service, When the log source is the power management service, And so on, each log source corresponds to its own third-value score.

[0037] The fourth value score, denoted as Wk, corresponds to different fourth value scores depending on the keywords in the log content.

[0038] After determining the values ​​of multiple value scores, the sum of the weights of the multiple value scores is determined as the initial value score of the current log.

[0039] Step S102: Determine the target log link corresponding to the current log based on the log link identifier, add the current log to the target log link, and update the overall value score of the target log link based on the initial value score.

[0040] After determining the initial value score of the current log, the log value determination module sends the current log to the link topology management module. The link topology management module maintains a topology data structure in memory, which is a hash table with log link identifiers as keys.

[0041] The link topology management module queries the existing log links to see if there is a target log link that matches the current log link identifier.

[0042] If a target log link that matches the log link identifier exists, the current log is added as a node to the target log link, and the metadata of the current log, such as timestamp, service name, and initial value score, is recorded in the topology data structure.

[0043] If no target log link matches the log link identifier, the created TraceID is determined to be the first occurrence. If the created TraceID is the first occurrence, the link topology management module creates an empty log link corresponding to the TraceID in the topology data structure. Each log link includes all associated logs of a business request from initiation to completion.

[0044] In one embodiment, when each log link changes, the link topology management module calculates the overall value score of that log link.

[0045] For example, after adding the current log to the target log link, because the target log link has changed, the link topology management module will determine the statistical value of the initial value score of all logs in the target log link after adding the current log. This statistical value of the initial value score of all logs in the target log link will be used as the overall value score of the updated target log link. The statistical value of the initial value score of all logs in the target log link can be the sum of the initial value scores of all logs, or it can be the average or maximum value of the initial value scores of all logs.

[0046] In one embodiment, the link topology management module also continuously monitors the execution status of the log link. When a log indicating the completion of a service request is detected, the execution status of the log link is updated and marked as "completed". Otherwise, the execution status of the log link is "in progress".

[0047] Step S103: Store the current log in the log cache, and process the logs in the log cache using the overall value score and the initial value score to retain high-value logs.

[0048] When storing the current log, the first method is to store the current log directly in the log cache.

[0049] The second method is to determine the log storage strategy based on the current operating status of the vehicle operating system, and then store the current log in the log cache according to the log storage strategy.

[0050] The current operating status of the vehicle operating system includes a first state, a second state, and a third state. The first state can refer to the normal state of the vehicle operating system; the second state can refer to the sub-healthy state of the vehicle operating system when the error rate or load exceeds a set threshold; and the third state can refer to the fault state of the vehicle operating system when the core service crashes or a serious anomaly occurs.

[0051] The following reference Figure 3 Let's introduce the second type of current log storage procedure.

[0052] Figure 3 A flowchart illustrating the second method for storing the current log provided in an embodiment of this application is shown, as follows: Figure 3 As shown, the second method for storing the current log includes: Step S1031: If the current running state is the first state, then the log leniency policy is adopted.

[0053] A log permissive policy refers to a log storage policy that neither changes the initial value score of logs nor sets log interception conditions. In this case, logs of all levels can be recorded without changing the initial value score of the current log. For example, under a log preservation policy, logging of DEBUG level logs is prohibited by setting log interception conditions, but under a log permissive policy, logging of DEBUG level logs is allowed.

[0054] Step S1032: If the current running state is the second state, then the log tightening strategy is adopted.

[0055] A log tightening strategy can refer to a log storage strategy that reduces the number of logs stored in the log cache by adjusting the initial value score of the logs. For example, a log tightening strategy can be to increase the initial value score of logs at a first preset log level and decrease the initial value score of logs at a second preset log level. The first preset log level includes at least one of the following: ERROR and WARN, and the second preset log level includes DEBUG.

[0056] Step S1033: If the current running state is the third state, then the log preservation strategy is adopted.

[0057] Log preservation strategies refer to log storage policies that reduce the number of logs stored in the log cache by setting log interception conditions. For example, a log interception condition could be to prohibit logging at a third preset log level. This third preset log level could be DEBUG, and it can be the same as or different from the second preset log level. A log preservation strategy could also prohibit logging at the third preset log level and, when the initial value score meets a preset threshold, add a locking flag to the log to prevent deletion. For instance, it could prohibit logging at the DEBUG level, and if the initial value score is greater than a set threshold, determine that the log meets the preset threshold condition and add a locking flag to the log.

[0058] In one embodiment, the current log can be stored in the log cache according to the log storage policy.

[0059] If a lenient logging strategy is adopted, the current log can be directly stored in the cache.

[0060] If a log tightening strategy is adopted, the log level of the current log is determined. If the log level of the current log is the first preset log level, the initial value score of the current log is increased; if the log level of the current log is the second preset log level, the initial value score of the current log is decreased.

[0061] If a log preservation strategy is adopted, the log level of the current log is determined. If the log level of the current log is the third preset log level, the recording of the current log is prohibited. If the log level of the current log is not the third preset log level, it is determined whether the initial value score is greater than the set score threshold. If it is greater than the set score threshold, a locking flag is added to the current log to prevent the current log from being discarded from the log cache.

[0062] The following reference Figure 4 This section will introduce the log processing procedure in the log cache.

[0063] Figure 4 A flowchart illustrating the log processing steps in the log cache provided in this application embodiment is shown, such as... Figure 4 As shown, the log processing steps in the log cache include: Step S1034: Monitor the space utilization rate of the log cache to determine whether the space utilization rate meets the log eviction conditions.

[0064] The space utilization rate of the log cache is continuously monitored in real time to determine whether it is greater than the set utilization rate threshold. If it is greater than the set utilization rate threshold, the log eviction condition is met and step S1035 is executed; if it is less than or equal to the set utilization rate threshold, the log eviction condition is not met and the space utilization rate of the log cache continues to be monitored.

[0065] Step S1035: When the space utilization rate meets the log eviction conditions, select the log links to be eviction based on the overall value score and execution status of the target log links, and delete the log links to be eviction from the log cache.

[0066] Specifically, the log link with the lowest overall value score and which has been completed can be identified as the log link to be phased out, and all logs under the log link to be phased out can be deleted from the log cache, and step S1036 can be executed.

[0067] Step S1036: Determine whether the space utilization rate of the log cache after deleting the log link to be phased out meets the log eviction conditions.

[0068] Check whether the space utilization rate of the log cache after deleting all logs under the log eviction link is greater than the set utilization rate threshold. If it is greater than the set utilization rate threshold, it is determined that the log eviction condition is met and step S1037 is executed; if it is less than or equal to the set utilization rate threshold, it is determined that the log eviction condition is not met and step S1034 is executed.

[0069] Step S1037: If the log eviction condition is met, delete logs that do not belong to any log chain and have the lowest initial value score from the log cache in a loop until the space utilization meets the log eviction condition.

[0070] If the log eviction criteria are met, select the log that does not belong to any log link and has the lowest initial value score from the remaining logs stored in the log cache as the log to be evictioned. Delete the log to be evictioned from the log cache and return to step S1036 to repeat the above process until the space utilization of the log cache no longer meets the log eviction criteria.

[0071] This way, while deleting low-value logs, logs belonging to the log chain can be retained, allowing for timely analysis of the cause of problems when they occur in the system.

[0072] The vehicle log processing method provided in this application can find the target log link associated with the current log. By using a complete, cross-service target log link, it avoids the problem of not being able to determine the cause of system anomalies. At the same time, it uses an overall value score to reflect the overall evaluation of all logs generated by a series of operations under a single business request, and then decides how to process the logs based on the overall evaluation results, which improves the accuracy of log processing. Compared with the vehicle log processing methods in the prior art, it solves the problem of not being able to accurately locate the cause of system anomalies.

[0073] Based on the same inventive concept, this application also provides an in-vehicle log processing device corresponding to the in-vehicle log processing method. Since the principle of the device in this application is similar to that of the in-vehicle log processing method described above, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0074] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of an in-vehicle log processing device provided in an embodiment of this application. Figure 5 As shown, the vehicle log processing device 200 includes: The value assessment module 201 is used to assess the value of the current log generated by the vehicle components from multiple dimensions, determine the initial value score of the current log, and the current log carries a log link identifier. Link update module 202 is used to determine the target log link corresponding to the current log based on the log link identifier, add the current log to the target log link, and update the overall value score of the target log link based on the initial value score. The target log link is determined based on the business request that generated the current log. The log processing module 203 is used to store the current logs into the log cache and process the logs in the log cache using the overall value score and the initial value score in order to retain high-value logs.

[0075] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a vehicle provided in an embodiment of this application. Figure 6 As shown, the vehicle 300 includes an on-board component 310, a vehicle controller 320, and a log cache 330.

[0076] The on-board component 310 is used to generate the current log and send the current log to the vehicle controller 320; The vehicle controller 320 is used to receive the current log and perform the actions described above. Figure 1 The steps of the vehicle log processing method in the illustrated embodiment; Log cache 330 is used to store the current log.

[0077] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can perform the above-described actions. Figure 1 The steps of the vehicle log processing method in the method embodiment shown are described in detail in the method embodiment, and will not be repeated here.

[0078] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0079] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0080] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0081] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0082] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0083] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The scope of protection of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for processing vehicle logs, characterized in that, include: The current logs generated by the vehicle components are evaluated from multiple dimensions to determine the initial value score of the current logs, which carry log link identifiers. The target log link corresponding to the current log is determined based on the log link identifier, the current log is added to the target log link, and the overall value score of the target log link is updated based on the initial value score. The current log is stored in the log cache, and the logs in the log cache are processed using the overall value score and the initial value score to retain high-value logs.

2. The method according to claim 1, characterized in that, The step of evaluating the value of the current logs generated by the vehicle components from multiple dimensions and determining the initial value score of the current logs includes: The current log is evaluated from four dimensions: log level, log generation duration, log source, and log content, to determine multiple value scores. The initial value score of the current log is determined based on the sum of the multiple value scores.

3. The method according to claim 1, characterized in that, The step of storing the current log into the log cache includes: Determine the log storage strategy based on the current operating status of the vehicle's operating system; According to the log storage strategy, the current log is stored in the log cache.

4. The method according to claim 3, characterized in that, The current operating state includes a first state, a second state, and a third state. The initial value score is determined based on multiple value scores, including a first value score corresponding to the log level and a second value score corresponding to the log generation duration. The step of determining the log storage strategy based on the current operating state of the vehicle operating system includes: If the current operating state is the first state, a lenient strategy is adopted to keep the initial value score unchanged and allow the recording of logs at the second preset log level. The first state is the normal state of the vehicle operating system. If the current operating state is the second state, a log tightening strategy is adopted to increase the initial value score of logs at the first preset log level and decrease the initial value score of logs at the second preset log level. The second state is a sub-healthy state in which the error rate or load of the vehicle operating system exceeds a set threshold. If the current operating state is the third state, a log preservation strategy is adopted to prohibit the recording of logs at the third preset log level. When the initial value score meets the preset threshold condition, a locking mark is added to the log to indicate that it is not to be deleted. The third state is a fault state in which the core service of the vehicle operating system has crashed or is seriously abnormal.

5. The method according to claim 1, characterized in that, The logs in the log cache are processed using the overall value score in the following manner: Monitor the space utilization of the log cache to determine whether the space utilization meets the log eviction criteria; When the log eviction conditions are met, log links to be eviction are selected based on the overall value score and execution status, and the log links to be eviction are deleted from the log cache.

6. The method according to claim 5, characterized in that, After deleting the log link to be phased out from the log cache, the process also includes: Determine whether the space utilization rate of the log cache after deleting the log link to be phased out meets the log eviction conditions; If the log eviction criteria are met, logs that do not belong to any log chain and have the lowest initial value score are repeatedly deleted from the log cache until the space utilization rate meets the log eviction criteria.

7. The method according to claim 5, characterized in that, The step of selecting log links to be phased out based on overall value scores includes: The log link with the lowest overall value score that has been completed is identified as the log link to be phased out.

8. The method according to claim 1, characterized in that, The step of updating the overall value score of the target log link based on the initial value score includes: The statistical values ​​of the initial value scores of all logs in the target log link are determined as the overall value score of the updated target log link.

9. A vehicle-mounted log processing device, characterized in that, include: The value assessment module is used to assess the value of the current logs generated by the vehicle components from multiple dimensions and determine the initial value score of the current logs, wherein the current logs carry log link identifiers. The link update module is used to determine the target log link corresponding to the current log based on the log link identifier, add the current log to the target log link, and update the overall value score of the target log link based on the initial value score. The log processing module is used to store the current log into the log cache, and to process the logs in the log cache using the overall value score and the initial value score, so as to retain high-value logs.

10. A vehicle, characterized in that, The vehicle includes a vehicle controller, on-board components, and a log cache; The on-board component is used to generate the current log and send the current log to the vehicle controller; The vehicle controller is used to receive the current log and execute the steps of the vehicle log processing method as described in any one of claims 1 to 8; The log cache is used to store the current log.