Log storage method and device

By adjusting the log storage control parameters according to the operating status in the vehicle infotainment system, the problem of IO resource consumption under high load was solved, the matching of log storage with the system operating status was achieved, and the system stability and user experience were improved.

CN122220318APending Publication Date: 2026-06-16GREAT WALL MOTOR CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GREAT WALL MOTOR CO LTD
Filing Date
2026-04-16
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Under high load conditions, the frequent and large-scale output and storage of logs consume a lot of IO resources, affecting the operation of core services and leading to performance degradation and a deterioration in user experience.

Method used

Based on the different operating states of the vehicle system, the log storage control parameters, including log acquisition strategy and storage rate, are dynamically adjusted. By filtering key logs and controlling the storage rate, the log storage process is optimized to match the system load state and reduce IO resource consumption.

Benefits of technology

It improves the flexibility and effectiveness of log storage, avoids excessive IO resource consumption under high load, ensures the stable operation of core services, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122220318A_ABST
    Figure CN122220318A_ABST
Patent Text Reader

Abstract

The application discloses a log storage method and device, relates to the technical field of vehicle machine data processing, and comprises the following steps: after acquiring system running parameters of a vehicle machine system in at least one dimension, first, determining the system running state of the vehicle machine system based on the system running parameters; then, acquiring log storage control parameters including at least one of a log acquisition strategy and a log storage rate according to the system running state; and finally, performing log storage on the system log of the vehicle machine system based on the log storage control parameters. In this way, the log storage is performed based on the log storage control parameters matched with the current system running state, so that the flexibility of system log storage and the matching degree with the current system running state are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle data processing technology, and in particular to a log storage method and device. Background Technology

[0002] With the continuous development of intelligent cockpits, users can participate in services and / or perceive data during driving or riding in vehicles. During this process, logs can be stored, allowing for rapid identification of the root cause of anomalies, enabling fault diagnosis and anomaly alerts. Furthermore, stored logs can identify optimization directions for the intelligent cockpit, leading to improvements in vehicle intelligence and the user's driving experience. Improving the effectiveness of log storage is a key focus for both intelligent cockpit providers and users. Summary of the Invention

[0003] In view of the above problems, this application provides a log storage method and device that overcomes or at least partially solves the above problems, and the technical solution is as follows: A log storage method includes: acquiring system operating parameters of a vehicle infotainment system in at least one dimension; determining the system operating state of the vehicle infotainment system based on the system operating parameters; acquiring log storage control parameters of the vehicle infotainment system according to the system operating state; the log storage control parameters include at least one of a log acquisition strategy and a log storage rate; and storing the system logs of the vehicle infotainment system based on the log storage control parameters.

[0004] In practical applications, the vehicle infotainment system generates a large number of system logs during operation. These system logs need to be written to the vehicle's storage area. However, when the vehicle infotainment system is under high load, the frequent and large-scale output and storage of logs will consume a lot of IO (Input / Output) resources, affecting the operation of core services in the vehicle infotainment system. Based on this, the log storage method provided in this application obtains log storage control parameters from the system operating status of the vehicle system during the log storage process, and then stores the system logs of the vehicle system according to the log storage control parameters. In this way, the current log storage of the system logs is more matched with the current system operating status. By using different log storage control parameters to control the log storage of the system logs under different system operating states, the flexibility of system log storage is improved, and the large amount of log data and / or frequent log storage under high system load conditions are avoided from causing log storage to occupy IO resources, thereby affecting the operation of core services in the vehicle system. In the specific implementation process, the system operating status of the vehicle infotainment system is first determined based on the system operating parameters of the vehicle infotainment system in at least one dimension. This improves the accuracy of the determined system operating status by starting from the actual operating parameters of the vehicle infotainment system. Based on this, log storage control parameters, including log acquisition strategies and / or log storage rates, are obtained according to the system operating status. Then, system logs are stored according to these log storage control parameters. Thus, with a more accurate system operating status, on the one hand, by obtaining log storage control parameters, including log acquisition strategies and / or log storage rates, the obtained log storage control parameters are more closely matched to the current system operating status, thereby ensuring that the log storage is more aligned with the current system operating status and avoiding impact on the operation of core services in the vehicle infotainment system; on the other hand, by obtaining log storage control parameters, including log acquisition strategies and / or log storage rates, log storage can be controlled in a way that better matches the current system operating status from the perspectives of the number of stored logs and / or log storage rate, achieving effective control over log storage.

[0005] Optionally, determining the system operating state of the vehicle system based on the system operating parameters includes: obtaining the baseline operating conditions corresponding to each dimension in the at least one dimension; performing operation detection on each dimension based on the system operating parameters and the corresponding baseline operating conditions in each dimension; and determining the system operating state as a first operating state if the operation detection of any dimension in the at least one dimension fails; the first operating state is the operating state corresponding to the system load exceeding the preset load.

[0006] In this optional implementation, since the system operating parameters are system operating parameters under at least one dimension, in the process of determining the system operating status of the vehicle system based on the system operating parameters, operation detection can be performed on each dimension based on the baseline operating parameters and corresponding baseline operating parameters. If the operation detection of any dimension fails, the system operating status is determined to be the first operating status where the system load exceeds the preset load. In this way, the system operating status is determined by combining the system operating parameters of at least one dimension, and the accuracy and effectiveness of the determined system operating status are improved on the basis of more comprehensive data.

[0007] Optionally, obtaining the log storage control parameters of the vehicle system based on the system operating state includes: obtaining the log acquisition strategy corresponding to the system operating state; if the system operating state is a first operating state, determining the log storage rate based on the system operating parameters.

[0008] In this optional implementation, during the process of obtaining the log storage control parameters of the vehicle system based on the system operating status, on the one hand, the log acquisition strategy corresponding to the system operating status is obtained. By obtaining the log acquisition strategy, the number of logs is better matched with the system operating status, and the system log storage's occupation of IO resources is controlled from the perspective of the number of system logs to be stored. On the other hand, when the system operating status is the first operating state where the system load exceeds the preset load, the log storage rate is determined based on the system operating parameters, and logs are stored according to the log storage rate. Thus, the log storage rate is determined based on the system operating parameters, making the determined log storage rate better matched with the system load at the storage rate level, avoiding frequent log storage under high system load conditions that would cause IO resource occupation, and controlling the system log storage's occupation of IO resources from the perspective of log storage rate.

[0009] Optionally, determining the log storage rate based on the system operating parameters includes: generating a system load index based on the system operating parameters; obtaining the log storage rate corresponding to the system load index; the log storage rate is inversely proportional to the system load index.

[0010] In this optional implementation, during the process of determining the log storage rate based on system operating parameters, a system load index is generated based on system operating parameters of at least one dimension. Then, a log storage rate inversely proportional to the system load index is obtained. Thus, the system load index is generated by first combining system operating parameters of at least one dimension, starting from comprehensive system operating parameters to improve the accuracy and effectiveness of the generated system load index. Furthermore, by obtaining a log storage rate inversely proportional to the system load index, the log storage rate is reduced when the system load index is high. This controls the IO resource consumption of log storage from the storage rate level, avoiding the need to output and store a large number of system logs to be stored when the system load index is high, which would lead to the occupation of IO resources and affect the operation of core services in the vehicle system.

[0011] Optionally, storing the system logs of the vehicle system based on the log storage control parameters includes: obtaining the system logs to be stored from the system logs based on the log acquisition strategy corresponding to the system operating state; and storing the system logs to be stored according to the log storage rate corresponding to the system operating state.

[0012] In this optional implementation, during the process of storing system logs of the vehicle system based on log storage control parameters, the system logs to be stored are first obtained from the system logs based on the log acquisition strategy corresponding to the system operating state. In this way, the number of logs is matched with the system operating state. On this basis, the system logs to be stored are stored according to the log storage rate corresponding to the system operating state. In this way, the log storage rate is matched with the system operating state. By controlling the log storage at both the number of logs and the log storage rate, the degree of matching between the log storage and the current system operating state is improved.

[0013] Optionally, the step of obtaining the system logs to be stored from the system logs based on the log acquisition strategy corresponding to the system operating state includes: filtering the system logs based on the log filtering strategy corresponding to the first operating state to obtain key system logs; and using the key system logs as the system logs to be stored.

[0014] In this optional implementation, during the process of obtaining system logs to be stored from the system logs based on the log acquisition strategy corresponding to the system running state, if the system running state is the first running state, the system logs are filtered based on the log filtering strategy corresponding to the first running state to obtain key system logs as system logs to be stored. In this way, when the system is in a running state where the system load exceeds the preset load, that is, when the system is in a high-load running state, the key system logs in the system logs are used as system logs to be stored. By reducing the number of system logs to be stored, the occupation of a large amount of IO resources by log storage is reduced.

[0015] Optionally, storing the system log to be stored according to the log storage rate corresponding to the system operating state includes: generating a storage token for the system log to be stored according to the log storage rate; and storing the target system log to be stored in the vehicle storage area after detecting the generation of the storage token for the target system log to be stored in the system log to be stored.

[0016] In this optional implementation, during the process of storing system logs to be stored according to the log storage rate corresponding to the system operating state, a storage token is generated for the system logs to be stored according to the log storage rate. When the generation of a storage token for a target system log to be stored is detected, the target system log to be stored is stored in the vehicle storage area. In this way, by generating storage tokens for system logs to be stored according to the log storage rate and storing the target system log with the generated storage token in the vehicle storage area, the effectiveness of storing system logs according to the log storage rate is improved.

[0017] Optionally, the step of obtaining the system log to be stored from the system log based on the log acquisition strategy corresponding to the system operating state includes: determining the system log as the system log to be stored based on the full acquisition strategy corresponding to the second operating state; the second operating state is an operating state in which the system load does not exceed the preset load.

[0018] In this optional implementation, during the process of obtaining the system logs to be stored from the system logs based on the log acquisition strategy corresponding to the system running state, if the system running state is the second running state, the full system logs are determined as the system logs to be stored based on the full acquisition strategy corresponding to the second running state. Thus, when the system running state is the second running state where the system load does not exceed the preset load, the full system logs are determined as the system logs to be stored, enabling the output and storage of the full system logs under low system load, thereby improving the comprehensiveness of the output and stored system logs.

[0019] Optionally, storing the system logs to be stored according to the log storage rate corresponding to the system operating state includes: determining the storage admission traffic of a sliding window based on the log storage rate; obtaining the log data volume of the system logs to be stored within the time range of the sliding window; storing the system logs to be stored within the time range of the sliding window to the vehicle storage area when the log data volume is less than or equal to the storage admission traffic; and pausing the storage of the system logs to be stored when the log data volume is greater than the storage admission traffic.

[0020] In this optional implementation, during the process of storing system logs to be stored according to the log storage rate corresponding to the system operating state, on the one hand, the storage admission flow of the sliding window is determined based on the log storage rate, and on the other hand, the log storage amount of the system logs to be stored within the time range of the sliding window is obtained. Based on this, if the log data amount is less than or equal to the storage admission flow, the system logs to be stored are stored in the vehicle storage area. If the log data amount is greater than the storage admission flow, the log storage of the system logs to be stored is suspended. This avoids storing the system logs to be stored in the vehicle storage area when the log data amount is greater than the storage admission flow, which would result in the system logs not being stored according to the log storage rate.

[0021] A log storage device, the device comprising: The operating parameter acquisition module is used to acquire the system operating parameters of the vehicle system in at least one dimension; The operating status determination module is used to determine the system operating status of the vehicle system based on the system operating parameters. The control parameter acquisition module is used to acquire the log storage control parameters of the vehicle system according to the system operating status; the log storage control parameters include at least one of the log acquisition strategy and log storage rate. The log storage module is used to store the system logs of the vehicle system based on the log storage control parameters.

[0022] A vehicle that includes the log storage device as described above.

[0023] An electronic device includes: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above-described log storage methods.

[0024] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the above-described log storage methods.

[0025] A computer program product includes a computer program that, when executed by a processor, implements the steps of any of the above-described log storage methods.

[0026] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below. Attached Figure Description

[0027] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is an illustrative flowchart of a log storage method provided in an embodiment of this application. Figure 1 ; Figure 2 This is an illustrative flowchart of a log storage method provided in an embodiment of this application. Figure 2 ; Figure 3 This is a schematic diagram of a log storage system provided in an embodiment of this application; Figure 4 This is a schematic structural diagram of a log storage device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a vehicle provided in an embodiment of this application. Detailed Implementation

[0028] Exemplary embodiments of the present application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the scope of the present application to those skilled in the art.

[0029] In practical applications, during the operation of the vehicle infotainment system, the system service module continuously generates and outputs a large amount of system logs, which need to be written to the vehicle's storage area in real time. Currently, the log writing function can be enabled or disabled. When the log writing function is enabled, all generated system logs will be written. However, in high system load scenarios, such as when users are simultaneously using navigation, playing multimedia data, and / or connecting multiple devices via Bluetooth, the frequent and large-scale output of system logs will consume a large amount of IO resources, leading to IO anomalies. IO anomalies will then cause the entire vehicle infotainment system to experience operational lag, core service response delays, and other phenomena, seriously affecting the user experience and reducing the reliability of the vehicle infotainment system. When the log writing function is disabled, when related problems occur, the lack of logs will make it impossible to locate the time and cause of the problem.

[0030] To address this, the log storage method provided in this embodiment configures corresponding log storage control parameters for different system operating states. This allows the system logs of the vehicle system to be stored based on different log storage control parameters under different system operating states, improving the flexibility of log storage and its matching degree with the current system operating state. In this way, by controlling the storage of system logs differently under different system operating states, the frequent and large-scale output of system logs can be avoided from consuming a large amount of IO resources and affecting the operation of the vehicle's core services.

[0031] like Figure 1 As shown, Figure 1 This is an illustrative flowchart of a log storage method provided in an embodiment of this application. Figure 1 The method includes: Step 101: Obtain the system operating parameters of the vehicle system in at least one dimension.

[0032] The vehicle infotainment system in this embodiment includes an embedded vehicle system installed inside the vehicle for running in-vehicle applications and possessing data processing, log output, and storage functions. For example, the vehicle infotainment system is an in-vehicle smart cockpit system that can run in-vehicle applications such as Bluetooth, multimedia data, and / or navigation, and can also generate system logs during operation.

[0033] In this embodiment, system operating parameters at least in one dimension include parameters characterizing operating capabilities in different dimensions. Optionally, the system operating parameters at least in one dimension in this embodiment include at least one of the following: CPU load in the CPU (Central Processing Unit) dimension, IO load in the IO dimension, storage bandwidth in the storage dimension, and log output rate of the system service module. The system service module may include modules providing system services in the vehicle infotainment system, such as Bluetooth modules, Wi-Fi modules, etc. The Fi (Wireless Fidelity) module. Correspondingly, the system log in this embodiment includes Bluetooth logs generated by the Bluetooth module and / or Wi-Fi logs. Wi generated by the Fi module Fi log.

[0034] It should be noted that the Bluetooth logs in this embodiment can be Bluetooth HCI (Host Controller Interface) logs, specifically the interaction logs generated by Bluetooth HCI. Similarly, Wi... Fi logs can provide Wi-Fi Fi HCI logs, for Wi Interaction logs generated by Fi HCI.

[0035] In practice, during the process of acquiring the system operating parameters of the vehicle system in at least one dimension, the system operating parameters of the vehicle system in at least one dimension can be acquired according to a preset period. For example, if the preset period is 100 milliseconds, the system operating parameters of the vehicle system in at least one dimension within that 100 millisecond period can be acquired every 100 milliseconds.

[0036] In practice, the implementation priority of acquiring system operating parameters of the vehicle infotainment system in at least one dimension can be lower than that of the core vehicle infotainment services. This ensures that the parameter acquisition logic does not preempt the resources of the core vehicle infotainment services and does not affect the user's use of the vehicle infotainment system. The core vehicle infotainment services may include services that interact with the user to enable the user to perceive driving data; for example, core vehicle infotainment services include navigation services, instrument control services, and / or audio and video playback services.

[0037] Step 102: Determine the system operating status of the vehicle system based on the system operating parameters.

[0038] In practice, after obtaining the system operating parameters of the vehicle system in at least one dimension, the system operating status of the vehicle system is determined based on the system operating parameters. In this way, the system operating status is determined by combining the system operating parameters in at least one dimension, thereby improving the accuracy and effectiveness of the determined system operating status.

[0039] The system operating status in this embodiment includes status information characterizing the current resource occupancy, load level, and / or service busyness of the vehicle system, which can be used to characterize the system load level of the vehicle system. Optionally, the system operating status in this embodiment may include a first operating status where the system load exceeds a preset load and a second operating status where the system load does not exceed the preset load; that is, the first operating status can characterize a high system load, and the second operating status can characterize a low system load.

[0040] Specifically, in the process of determining the system operating status of the vehicle system based on system operating parameters, if the operation detection of any system operating parameter in at least one dimension fails, the system operating status is determined to be the first operating status; if the operation detection of system operating parameters in at least one dimension passes, the system operating status is determined to be the second operating status. Here, the operation detection of system operating parameters in any dimension includes detecting whether the system operating parameters in any dimension meet the baseline operating conditions corresponding to that dimension. If yes, the operation detection of that dimension is determined to have passed; if no, the operation detection of that dimension is determined to have failed.

[0041] In the specific execution process, when determining the system operating status of the vehicle system based on system operating parameters, the baseline operating conditions corresponding to each dimension in at least one dimension can be obtained first. Based on the system operating parameters and corresponding baseline operating conditions in each dimension, operation tests are performed on each dimension. If the operation test in any dimension fails, the system operating status is determined to be the first operating status. Furthermore, if the operation tests in at least one dimension all pass, the system operating status can be determined to be the second operating status.

[0042] In this embodiment, the baseline operating condition can be within a baseline operating threshold range. Specifically, in the process of determining the system operating state of the vehicle system based on the system operating parameters, the baseline operating threshold range corresponding to each dimension in at least one dimension can be obtained first, and the system operating parameters under each dimension can be detected as being within the corresponding baseline operating threshold range. If the system operating parameters of any dimension are not within the corresponding baseline operating threshold range, the system operating state is determined to be the first operating state. In addition, if the system operating parameters under each dimension in at least one dimension are all within the corresponding baseline operating threshold range, the system operating state is determined to be the second operating state.

[0043] For example, the baseline CPU load range for the CPU dimension is (60%, 80%), the baseline IO load range for the IO dimension is (70%, 90%), the baseline storage bandwidth range for the storage dimension is 60% to 80% of the maximum bandwidth of the current in-vehicle storage medium, and the baseline log output rate range for the Bluetooth module is (100KB / s, 500KB / s). The system checks whether the CPU load, IO load, storage bandwidth, and Bluetooth log output rate are within the baseline CPU load range, the baseline IO load range, the baseline storage bandwidth range, and the baseline log output rate range of the Bluetooth module. If yes, the system is determined to be in the first operating state. If any system operating parameter in any dimension is not within the corresponding baseline operating threshold range, the system is determined to be in the second operating state.

[0044] Furthermore, the baseline operating condition in this embodiment can also be less than the baseline operating threshold. Specifically, in the process of determining the system operating state of the vehicle system based on the system operating parameters, the baseline operating threshold corresponding to each dimension in at least one dimension can be obtained first, and the system operating parameters under each dimension can be detected as less than the corresponding baseline operating threshold. If the system operating parameters in any dimension are greater than or equal to the corresponding baseline operating threshold, the system operating state is determined to be the first operating state. In addition, if the system operating parameters under each dimension in at least one dimension are all less than the corresponding baseline operating threshold, the system operating state is determined to be the second operating state.

[0045] For example, the baseline CPU load for the CPU dimension is 80%, the baseline IO load for the IO dimension is 90%, the baseline storage bandwidth for the storage dimension is 80% of the maximum bandwidth of the current vehicle storage medium, and the baseline log output rate for the output rate dimension is 500KB / s. The system checks whether the CPU load, IO load, storage bandwidth, and Bluetooth log output rate are less than the baseline CPU load, IO load, storage bandwidth, and Bluetooth log output rate. If so, the system is determined to be in the second operating state. If any system operating parameter in any dimension is greater than or equal to the corresponding baseline operating threshold, the system is determined to be in the first operating state.

[0046] Step 103: Obtain the log storage control parameters of the vehicle system based on the system operating status.

[0047] In practice, after determining the system operating status of the vehicle infotainment system based on its system operating parameters in at least one dimension, the log storage control parameters of the vehicle infotainment system can be obtained according to the system operating status. Optionally, the log storage control parameters include at least one of log acquisition strategy and log storage rate.

[0048] In the specific execution process, during the process of obtaining the log storage control parameters of the vehicle system based on the system operating status, the log acquisition strategy and / or log storage rate corresponding to the system operating status can be obtained.

[0049] The following sections describe the log acquisition strategy and the log storage rate corresponding to obtaining the system's operating status.

[0050] (1) Obtain the log acquisition strategy corresponding to the system running status.

[0051] In this embodiment, the log acquisition strategy corresponding to the first running state can be a log filtering strategy. Specifically, when the system is in the first running state with high system load, the system logs are filtered according to the log filtering strategy. In this way, under the first running state with high system load, the number of logs that need to be output and stored is reduced by log filtering, thereby controlling the large amount of IO resources occupied from the perspective of reducing the number of logs. The log acquisition strategy corresponding to the second operating state can be a full acquisition strategy. Specifically, when the system is in the second operating state with low system load, all system logs are output and stored. In this way, the comprehensiveness of the stored system logs is improved by storing all system logs without affecting the core services of the vehicle system.

[0052] Specifically, in the process of obtaining the log acquisition strategy corresponding to the system's running status, if the system is in the first running status, the log filtering strategy corresponding to the first running status is obtained; if the system is in the second running status, the full acquisition strategy corresponding to the second running status is obtained. That is, obtaining the log acquisition strategy corresponding to the system's running status can be either obtaining the log filtering strategy corresponding to the first running status or obtaining the full acquisition strategy corresponding to the second running status.

[0053] (2) Obtain the log storage rate corresponding to the system running status.

[0054] In the process of obtaining the log storage control parameters of the vehicle system based on the system operating parameters, in addition to obtaining the log acquisition strategy corresponding to the system operating status, the log storage rate corresponding to the system operating status can also be obtained.

[0055] In the specific execution process, when obtaining the log storage rate corresponding to the system running status, if the system running status is the first running status, the log storage rate can be determined based on the system running parameters.

[0056] In practical implementation, since there are at least one dimension of system operating parameters, but only one determined log storage rate, this embodiment provides an optional implementation method in which, in the process of determining the log storage rate based on system operating parameters, a system load index is first generated based on the system operating parameters, and then the log storage rate corresponding to the system load index is obtained. The log storage rate can be inversely proportional to the system load index.

[0057] In this embodiment, the correspondence between system load metrics and log storage rates can be pre-configured. This allows the log storage rate corresponding to the system load metrics to be obtained after the system load metrics are generated, based on this correspondence. Specifically, by configuring the log storage rate and system load metrics inversely, the log storage rate decreases as the system load metrics increase. This reduces the log storage rate when the system load metrics are high, making it more adaptable to the current load situation. This reduces the IO resource consumption of log storage when the system load is high, and increases the log storage rate when the system load is low, thereby improving storage efficiency.

[0058] Specifically, in the process of generating system load indicators based on system operating parameters, the average value of the system operating parameters can be calculated as the system load indicator.

[0059] For example, if the CPU load is m1, the I / O load is m2, the storage bandwidth is m3, and the log output rate is m4 in the system operating parameters, then the system load index is calculated as follows: .

[0060] Furthermore, the weights corresponding to each system operating parameter can be pre-configured. During the process of generating the system load index based on the system operating parameters, the average value of the product of each system operating parameter and its weight can be calculated as the system load index. Optionally, the sum of the weights corresponding to each system operating parameter can be 1.

[0061] For example, if the weight corresponding to CPU load is 0.3, the weight corresponding to IO load is 0.2, the weight corresponding to storage bandwidth is 0.2, and the weight corresponding to log output rate is 0.3, then the calculated system load metric is: .

[0062] In practice, if the system is in the second operating state, the baseline storage rate can be obtained as the log storage rate corresponding to the second operating state. For example, the baseline storage rate is 256KB / s.

[0063] Step 104: Based on the log storage control parameters, store the system logs of the vehicle system.

[0064] In practice, after obtaining the log storage control parameters of the vehicle system based on the system's operating status, that is, after obtaining the log storage control parameters corresponding to the system operating parameters, the system logs of the vehicle system can be stored based on the log storage control parameters.

[0065] In the specific execution process, when the log storage control parameters include both the log acquisition strategy and the log storage rate, the system log to be stored can be obtained first based on the log acquisition strategy corresponding to the system operating status, and then the system log to be stored can be stored according to the log storage rate corresponding to the system operating status. In this way, the log storage of the vehicle system can be better matched with the current system operating status through the log storage control parameters.

[0066] The following sections provide detailed explanations of the process of obtaining system logs to be stored from the system logs based on the log acquisition strategy corresponding to the system operating status, and storing the system logs to be stored according to the log storage rate corresponding to the system operating status.

[0067] (1) Based on the log acquisition strategy corresponding to the system running status, acquire the system log to be stored in the system log.

[0068] In the first optional implementation provided in this embodiment, during the process of obtaining the system logs to be stored from the system logs based on the log acquisition strategy corresponding to the system running state, the system logs are filtered based on the log filtering strategy corresponding to the first running state to obtain key system logs, and the key system logs are used as the system logs to be stored.

[0069] The key system logs in this embodiment include logs closely related to the operating status of the corresponding system service modules. Taking the Bluetooth module as an example, the key system logs may include Bluetooth connection establishment logs, Bluetooth connection disconnection logs, and Bluetooth data transmission interruption logs. It should be noted that the system logs of the Bluetooth module other than the key system logs can be non-key system logs. The non-key system logs of the Bluetooth module may include music data from Bluetooth music and phone data from Bluetooth calls.

[0070] In the specific execution process, when obtaining the system logs to be stored from the system logs based on the log acquisition strategy corresponding to the system running state, if the system running state is the first running state, the system logs are filtered based on the log filtering strategy corresponding to the first running state to obtain the key system logs, and the key system logs are used as the system logs to be stored.

[0071] In other words, in the first running state, the system logs to be stored are the critical system logs in the system logs.

[0072] In the second optional implementation provided in this embodiment, during the process of obtaining the system logs to be stored from the system logs based on the log acquisition strategy corresponding to the system operating state, the system logs are determined as the system logs to be stored based on the full acquisition strategy corresponding to the second operating state. Optionally, the second operating state is an operating state in which the system load does not exceed the preset load.

[0073] In the specific execution process, when retrieving system logs to be stored from the system logs based on the log retrieval strategy corresponding to the system running state, if the system running state is the second running state, the system logs are fully determined as system logs to be stored based on the full retrieval strategy corresponding to the second running state, thereby achieving full storage of the system logs.

[0074] That is, in the second running state, the system log to be stored is the full system log.

[0075] It should be noted that the above-mentioned log acquisition strategy based on the system running status, which acquires the system log to be stored in the system log, can be replaced by acquiring the system log to be stored corresponding to the system running status in the system log, and forming a new implementation method with other processing procedures provided in this embodiment.

[0076] (2) Store the system logs to be stored according to the log storage rate corresponding to the system operating status.

[0077] In practice, after obtaining the system logs to be stored corresponding to the system running status in the system logs, the system logs to be stored are stored according to the log storage rate corresponding to the system running status.

[0078] In practice, when the system is in its first operating state, the system logs to be stored can be stored at the log storage rate determined based on the system operating parameters. When the system is in its second operating state, the system logs to be stored can be stored at the baseline storage rate.

[0079] In specific implementation, a token authorization mechanism can be used to control the storage of system logs to be stored according to the log storage rate. In the first optional implementation provided in this embodiment, during the process of storing system logs to be stored according to the log storage rate corresponding to the system operating state, a storage token is generated for the system log to be stored according to the log storage rate. After detecting the generation of a storage token for the target system log to be stored, the target system log is stored in the vehicle storage area. The vehicle storage area in this embodiment includes vehicle memory or a hard disk.

[0080] Specifically, during the process of storing system logs to be stored according to the log storage rate, storage tokens are generated for each system log to be stored according to the log storage rate, and after the storage token of any system log to be stored is detected to be generated, the system log to be stored is stored in the vehicle storage area.

[0081] Specifically, during the process of generating storage tokens for each system log to be stored according to the log storage rate, the tokens are generated according to the log storage rate. If the amount of data in the current system log to be stored is less than or equal to the amount of data corresponding to the storage token, then a storage token is allocated to the current system log to be stored. If the amount of data in the system log to be stored is greater than the amount of data corresponding to the storage token, then the next storage token is generated before a storage token is allocated to the current system log to be stored.

[0082] Specifically, after allocating a storage token to the current system log to be stored, the current system log to be stored is identified as the target system log to be stored, and the data volume of the storage token is updated according to the data volume of the target system log to be stored, so as to obtain the data volume corresponding to the remaining available storage tokens, in order to allocate the next system log to be stored.

[0083] For example, if the determined log storage rate is 64KB / s, then storage tokens with a data volume of 64KB per second are generated according to this log storage rate. The data volume of the system logs to be stored is counted. If the data volume of the current system log to be stored is less than or equal to the data volume corresponding to the current available storage token, then a storage token is allocated to the system log to be stored, and the data volume corresponding to the current available storage token is updated to obtain the data volume corresponding to the remaining available storage tokens. If the data volume of the current system log to be stored is greater than the data volume corresponding to the current available storage token, then after the next storage token is generated, it is checked whether the data volume of the current system log to be stored is less than or equal to the sum of the data volume corresponding to the current available storage token and the data volume corresponding to the next storage token. In this way, storage tokens are allocated to each system log to be stored.

[0084] In addition to controlling the storage of system logs according to the log storage rate through a token authorization mechanism, the storage of system logs according to the log storage rate can also be controlled through a sliding window. In one optional implementation of this embodiment, during the process of storing system logs according to the log storage rate corresponding to the system operating state, the storage admission traffic of the sliding window is first determined based on the log storage rate, and the amount of log data of the system logs to be stored within the time range of the sliding window is obtained. If the amount of log data is less than or equal to the storage admission traffic, the system logs to be stored within the time range of the sliding window are stored in the vehicle storage area. In addition, if the amount of log data is greater than the storage admission traffic, log storage is paused.

[0085] For example, the determined log storage rate is 64KB / s, the time range of the sliding window corresponding to 64KB / s is 1 second, the storage admission traffic is 64KB, and the amount of log data of the system log to be stored within 1 second is counted. If the amount of log data is less than or equal to 64KB, the system log to be stored is stored in the vehicle storage area. If the amount of log data is greater than 64KB, the log storage of the system log to be stored is paused until the sliding window is updated to the next time period.

[0086] The above provides detailed explanations of the processes for controlling the storage of system logs according to the log storage rate corresponding to the system's operating state through a token authorization mechanism and the process for controlling the storage of system logs according to the log storage rate corresponding to the system's operating state through a sliding window.

[0087] In this embodiment, the two can also be combined. Specifically, during the process of storing system logs to be stored according to the log storage rate corresponding to the system operating state, the storage admission traffic of the sliding window can be determined first based on the log storage rate, and the amount of log data of the system logs to be stored within the time range of the sliding window can be obtained. If the amount of log data is less than or equal to the storage admission traffic, a storage token is generated for the system logs to be stored within the time range of the sliding window according to the log storage rate. After the storage token of the target system log to be stored is detected, the target system log to be stored is stored in the vehicle storage area. If the amount of log data is greater than the storage admission traffic, the storage of system logs to be stored within the time range of the sliding window is suspended until the sliding window is updated to the next time period.

[0088] In practice, during the process of storing system logs according to the log storage rate corresponding to the system's operating status, the available storage space in the vehicle storage area and / or the number of devices connected to the vehicle system can be used to update the log storage rate. This further makes the log storage rate more suitable for the current state of the vehicle system and improves the effectiveness of the log storage rate.

[0089] In the specific execution process, while storing the system logs to be stored according to the log storage rate corresponding to the system's operating status, if the available storage space in the vehicle's onboard storage area is less than a preset space threshold, the log storage rate is updated to a target storage rate that is less than the log storage rate. The system logs to be stored are then stored according to the target storage rate. In this way, when it is detected that the available storage space in the onboard storage area is small, the storage rate of the system logs to be stored is further reduced to reserve more storage space for data storage of core services and avoid the system logs to be stored occupying a large amount of available storage space.

[0090] Alternatively, during the process of storing system logs according to the log storage rate corresponding to the system's operating status, if the number of devices connected to the vehicle system exceeds a preset threshold, the log storage rate is updated, and the system logs are stored according to the updated log storage rate. In this way, when the number of devices connected to the vehicle system exceeds the preset threshold, the log storage rate is reduced, reducing the IO resource consumption of log output and storage in high-concurrency multi-device connection scenarios. This avoids system lag and core service delays caused by a surge in the number of logs due to an increase in connected devices, and improves the operational stability of the vehicle system in multi-device connection scenarios.

[0091] In one optional implementation of this embodiment, during the process of storing system logs to be stored according to the log storage rate corresponding to the system operating state, the available storage space of the vehicle's on-board storage area is first obtained. If the available storage space is detected to be less than a preset space threshold, the log storage rate is updated to obtain a target storage rate, and then the system logs to be stored are stored according to the target storage rate. Optionally, the target storage rate is less than the log storage rate.

[0092] Specifically, during the process of storing system logs to be stored according to the log storage rate, if the available storage space in the vehicle storage area is less than the preset space threshold, the log storage rate is updated to obtain the target storage rate, and then the system logs to be stored are stored according to the target storage rate; in addition, if the available storage space in the vehicle storage area is greater than or equal to the preset space threshold, the system logs to be stored are stored according to the log storage rate.

[0093] For example, if the log storage rate is 64KB / s and the preset space threshold is 1GB (gigabyte), and the available storage space in the vehicle storage area is detected to be 800MB (megabyte), which is less than the preset space threshold of 1GB, then the log storage rate will be updated to 32KB / s, and the system logs to be stored will be stored at 32KB / s; if the available storage space in the vehicle storage area is detected to be 1.2GB, which is greater than the preset space threshold of 1GB, then the system logs to be stored will be stored at 64KB / s.

[0094] In another optional implementation of this embodiment, during the process of storing the system logs to be stored according to the log storage rate corresponding to the system operating state, the number of devices connected to the vehicle system is obtained. If the number of devices is detected to be greater than a preset threshold, the log storage rate is updated, and the system logs to be stored are stored according to the updated log storage rate. The updated log storage rate can be a target storage rate.

[0095] Specifically, during the process of storing system logs according to the log storage rate, if the number of devices connected to the vehicle system is greater than a preset threshold, the log storage rate is updated to obtain the target storage rate, and then the system logs to be stored are stored according to the target storage rate; otherwise, if the number of devices connected to the vehicle system is less than or equal to the preset threshold, the system logs to be stored are stored according to the log storage rate.

[0096] For example, the log storage rate is 64KB / s, and the preset quantity threshold is 3. If the number of Bluetooth devices connected to the current vehicle system is detected to be greater than 3, the log storage rate will be updated to 32KB / s, and the system logs to be stored will be stored at 32KB / s. If the number of Bluetooth devices connected to the current vehicle system is detected to be less than or equal to 3, the system logs to be stored will be stored at 64KB / s.

[0097] It should be noted that updating the log storage rate can involve halving the log storage rate. Alternatively, a target storage rate can be pre-configured, and the log storage rate can be updated to the pre-configured target storage rate during the log storage rate update process. This embodiment does not limit this approach.

[0098] The above details the process of updating the log storage rate by incorporating the available storage space of the vehicle storage area and the number of devices connected to the vehicle system. In practice, both the available storage space of the vehicle storage area and the number of devices connected to the vehicle system can be used simultaneously to update the log storage rate. Specifically, during the process of storing system logs to be stored according to the log storage rate, if the available storage space of the vehicle storage area is less than a preset space threshold and / or the number of devices connected to the vehicle system is greater than a preset number threshold, the log storage rate is updated to obtain the target storage rate, and then the system logs to be stored are stored according to the target storage rate. If the available storage space of the vehicle storage area is greater than or equal to the preset space threshold and the number of devices connected to the vehicle system is less than or equal to the preset number threshold, the system logs to be stored are stored according to the log storage rate. In this process, updating the log storage rate can be done by halving the log storage rate; alternatively, a target storage rate can be pre-configured, and the log storage rate can be updated to the pre-configured target storage rate during the log storage rate update process; furthermore, the log storage rate can be halved and then halved again to obtain the target storage rate, which is not limited in this embodiment.

[0099] It should be noted that storing system logs according to the target storage rate is similar to the process described above of controlling the storage of system logs according to the log storage rate through the token authorization mechanism and the process of controlling the storage of system logs according to the log storage rate through the sliding window. The log storage rate is simply modified to the target storage rate. For details, please refer to the relevant content above. This embodiment will not repeat it here.

[0100] The log storage rate is updated by introducing the available storage space in the vehicle storage area and / or the number of devices connected to the vehicle system. For the above-mentioned baseline storage rate, the available storage space in the vehicle storage area and / or the number of devices connected to the vehicle system can also be introduced to update the baseline storage rate. The specific execution process is similar to the process of updating the log storage rate. Please refer to the above-mentioned relevant content. This embodiment does not limit it here.

[0101] In practice, when the system is in the first operating state, the system operating state of the vehicle system can be detected in real time. After the system operating state is detected to switch from the first operating state to the second operating state, the system log of the vehicle system is fully stored. This ensures that the system log can be fully stored when storage resources are sufficient, thereby improving the comprehensiveness and completeness of the stored system log.

[0102] The above describes in detail the process of storing system logs of the vehicle's infotainment system based on log storage control parameters, assuming both log acquisition strategy and log storage rate are included. In practice, the log storage control parameters may also include only either the log acquisition strategy or the log storage rate.

[0103] Specifically, when the log storage control parameters include a log acquisition strategy, during the process of storing the system logs of the vehicle system based on the log storage control parameters, the system logs to be stored can be obtained from the system logs based on the log acquisition strategy corresponding to the system operating status, and then stored. Optionally, during the process of storing the system logs to be stored, the system logs to be stored can be stored according to a baseline storage rate.

[0104] When the log storage control parameters include the log storage rate, during the process of storing the system logs of the vehicle system based on the log storage control parameters, the system logs can be stored according to the log storage rate corresponding to the system operating status.

[0105] It should be noted that steps 103 to 104 above can be replaced by obtaining the log acquisition strategy corresponding to the system operating state, and acquiring the system logs to be stored in the vehicle system's system log based on the log acquisition strategy; if the system operating state is the first operating state, the log storage rate of the system logs to be stored is determined based on the system operating parameters, and the system logs to be stored are stored according to the log storage rate, forming a new implementation method with other processing procedures provided in this embodiment. Furthermore, if the system operating state is the second operating state, the system logs to be stored can be stored according to the baseline storage rate.

[0106] In summary, the log storage method provided in this embodiment, on the one hand, configures corresponding log acquisition strategies for different system operating states, enabling the storage of different numbers of system logs under different system operating states, thereby controlling the IO resource consumption during system log storage from the perspective of the number of logs; on the other hand, when the system is in the first operating state, the log storage rate is determined based on system operating parameters, and the system logs to be stored are stored according to the log storage rate. Thus, in the first operating state, the log storage rate for log storage is determined based on at least one dimension of system operating parameters, thereby controlling the IO resource consumption during system log storage from the perspective of the storage rate. In this way, by combining the two aspects of the number of logs and the storage rate, the storage control of system logs is achieved, avoiding the frequent and large-scale output of system logs from consuming a large amount of IO resources and affecting the operation of the vehicle's core services.

[0107] like Figure 2As shown, Figure 2 This is an illustrative flowchart of a log storage method provided in an embodiment of this application. Figure 2 The method includes the following steps: Step 201: Obtain the system operating parameters of the vehicle system in at least one dimension.

[0108] Step 202: Determine the system operating status of the vehicle system based on the system operating parameters.

[0109] Step 203: If the system is in the first running state, obtain the log filtering strategy corresponding to the first running state.

[0110] Step 204: Filter the Bluetooth logs based on the log filtering strategy to obtain key Bluetooth logs as Bluetooth logs to be stored.

[0111] Step 205: Generate system load metrics based on system operating parameters and obtain the log storage rate corresponding to the system load metrics.

[0112] Step 206: Generate storage tokens for the system logs to be stored according to the log storage rate.

[0113] Step 207: If the system is in the second running state, obtain the full acquisition strategy corresponding to the second running state.

[0114] Step 208: Based on the full acquisition strategy, determine the full Bluetooth logs as Bluetooth logs to be stored.

[0115] Step 209: Obtain the baseline storage rate corresponding to the second operating state.

[0116] Step 210: Generate storage tokens for the system logs to be stored according to the baseline storage rate.

[0117] Step 211: After detecting the generation of the storage token for the target system log to be stored, store the target system log to be stored in the vehicle storage area.

[0118] Steps 203 to 206 and steps 207 to 210 can be executed in parallel. Step 211 can be executed after steps 206 and 210 are executed.

[0119] It should be noted that any one or more of steps 201 to 211, or any combination of steps 101 to 104, can be combined with any one or more of steps 101 to 104 to form a new implementation method, depending on the needs of implementation and deployment. In addition, any one or more technical features can be selected in steps 201 to 211 and combined with any one or more technical features provided in steps 101 to 104 to form a new implementation method, depending on the needs of actual deployment. Alternatively, any one or more technical features in steps 201 to 211 can be replaced with any one or more technical features provided in steps 101 to 104 to form a new implementation method, which will not be elaborated here.

[0120] like Figure 3 As shown, Figure 3 This is a schematic diagram of a log storage system provided in an embodiment of this application. The system includes: The parameter acquisition module 301 is used to acquire system operating parameters of the vehicle system in at least one dimension. The status determination module 302 is used to determine the system operating status of the vehicle system based on the system operating parameters. The log scheduling module 303 is used to obtain the log storage control parameters of the vehicle system according to the system operating status; Optionally, the log storage control parameters include at least one of the log acquisition strategy and the log storage rate.

[0121] Storage module 304 is used to store the system logs of the vehicle system based on the log storage control parameters.

[0122] It should be noted that the parameter acquisition module 301, the status determination module 302, the log scheduling module 303, and the storage module 304 can all be deployed within the vehicle infotainment system, or the log storage system can be the vehicle infotainment system.

[0123] Regarding the system in the above embodiments, the specific manner in which each unit performs operations has been described in detail in the embodiments related to the method, and will not be elaborated here.

[0124] like Figure 4 As shown, Figure 4 A schematic structural diagram of a log storage device provided for embodiments of this application, the device comprising: The operating parameter acquisition module 401 is used to acquire the system operating parameters of the vehicle system in at least one dimension. The operating status determination module 402 is used to determine the system operating status of the vehicle system based on the system operating parameters. The control parameter acquisition module 403 is used to acquire the log storage control parameters of the vehicle system according to the system operating status; the log storage control parameters include at least one of log acquisition strategy and log storage rate; The log storage module 404 is used to store the system logs of the vehicle system based on the log storage control parameters.

[0125] Optionally, the operation status determination module 402 is specifically used to: obtain the baseline operation conditions corresponding to each dimension in the at least one dimension; perform operation detection on each dimension based on the system operation parameters and the corresponding baseline operation conditions under each dimension; if the operation detection of any dimension in the at least one dimension fails, determine the system operation status as a first operation status; the first operation status is the operation status corresponding to the system load exceeding the preset load.

[0126] Optionally, the control parameter acquisition module 403 is specifically used to: acquire the log acquisition strategy corresponding to the system operating state; if the system operating state is the first operating state, determine the log storage rate based on the system operating parameters.

[0127] Optionally, when determining the log storage rate based on the system operating parameters, the control parameter acquisition module 403 is specifically used to: generate a system load index based on the system operating parameters; acquire the log storage rate corresponding to the system load index; and the log storage rate is inversely proportional to the system load index.

[0128] Optionally, the log storage module 404 is specifically used to: obtain the system log to be stored in the system log based on the log acquisition strategy corresponding to the system operating state; and store the system log to be stored according to the log storage rate corresponding to the system operating state.

[0129] Optionally, when the log storage module 404 obtains the system logs to be stored from the system logs based on the log acquisition strategy corresponding to the system operating state, it specifically performs the following: filters the system logs based on the log filtering strategy corresponding to the first operating state to obtain key system logs; and uses the key system logs as the system logs to be stored.

[0130] Optionally, when the log storage module 404 stores the system log to be stored according to the log storage rate corresponding to the system operating state, it is specifically used to: generate a storage token for the system log to be stored according to the log storage rate; and after detecting the generation of the storage token of the target system log to be stored in the system log to be stored, store the target system log to be stored in the vehicle storage area.

[0131] Optionally, when the log storage module 404 obtains the system log to be stored from the system log based on the log acquisition strategy corresponding to the system operating state, it specifically performs the following: based on the full acquisition strategy corresponding to the second operating state, it determines the system log as the system log to be stored; the second operating state is the operating state in which the system load does not exceed the preset load.

[0132] Optionally, when the log storage module 404 stores the system logs to be stored according to the log storage rate corresponding to the system operating state, it specifically performs the following: based on the log storage rate, it determines the storage admission flow of the sliding window; it obtains the log data volume of the system logs to be stored within the time range of the sliding window; if the log data volume is less than or equal to the storage admission flow, it stores the system logs to be stored within the time range of the sliding window to the vehicle storage area; if the log data volume is greater than the storage admission flow, it suspends the log storage of the system logs to be stored.

[0133] Regarding the apparatus in the above embodiments, the specific manner in which each unit performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0134] Figure 5 This is a schematic diagram of the structure of a vehicle provided in an embodiment of this application.

[0135] For example, such as Figure 5 As shown, the vehicle includes a memory 501 and a processor 502. The memory 501 stores executable program code 5011, and the processor 502 is used to call and execute the executable program code 5011 to execute the log storage method.

[0136] This embodiment can divide the vehicle into functional modules based on the above method example. For example, each function can be assigned to a separate module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. When dividing each functional module according to its corresponding function, the vehicle may include: an operating parameter acquisition module, an operating status determination module, a control parameter acquisition module, and a log storage module, etc. It should be noted that all relevant content of each step involved in the above method embodiment can be referenced from the functional description of the corresponding functional module, and will not be repeated here.

[0137] The vehicle provided in this embodiment is used to execute the log storage method described above, and thus can achieve the same effect as the implementation method described above.

[0138] When using integrated units, the vehicle may include a processing module and a storage module. The processing module is used to control and manage the vehicle's movements. The storage module is used to support the vehicle in executing relevant program code and data.

[0139] The processing module may be a processor or a controller, which can implement or execute various exemplary logic blocks, modules, and circuits as disclosed in this application. The processor may also be a combination of computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module may be a memory.

[0140] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above-described log storage method embodiments.

[0141] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described log storage method embodiments at runtime.

[0142] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0143] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described log storage method embodiments.

[0144] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described log storage method embodiments.

[0145] The beneficial effects of the above embodiments can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0146] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

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

[0148] In the description of this application, it should be understood that if the terms "upper", "lower", "front", "rear", "left" and "right" are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the position or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.

[0149] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0150] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A log storage method, characterized in that, The method includes: Obtain the system operating parameters of the vehicle infotainment system in at least one dimension; Based on the system operating parameters, the system operating status of the vehicle system is determined; Based on the system operating status, obtain the log storage control parameters of the vehicle system; the log storage control parameters include at least one of log acquisition strategy and log storage rate. Based on the log storage control parameters, the system logs of the vehicle infotainment system are stored.

2. The method according to claim 1, characterized in that, Determining the system operating status of the vehicle system based on the system operating parameters includes: Obtain the baseline operating conditions corresponding to each dimension in the at least one dimension; Based on the system operating parameters and corresponding baseline operating conditions under each dimension, the operation of each dimension is detected. If the operation detection in any of the at least one dimension fails, the system operation state is determined to be the first operation state; the first operation state is the operation state corresponding to the system load exceeding the preset load.

3. The method according to claim 1, characterized in that, The step of obtaining the log storage control parameters of the vehicle system based on the system operating status includes: Obtain the log acquisition strategy corresponding to the system's operating status; If the system is in the first operating state, the log storage rate is determined based on the system operating parameters.

4. The method according to claim 3, characterized in that, Determining the log storage rate based on the system operating parameters includes: Based on the system operating parameters, generate system load indicators; Obtain the log storage rate corresponding to the system load index; the log storage rate is inversely proportional to the system load index.

5. The method according to claim 1, characterized in that, The process of storing the system logs of the vehicle infotainment system based on the log storage control parameters includes: Based on the log acquisition strategy corresponding to the system operating status, the system logs to be stored in the system logs are acquired; The system logs to be stored are stored according to the log storage rate corresponding to the system's operating status.

6. The method according to claim 5, characterized in that, The method of obtaining the system logs to be stored from the system logs based on the log acquisition strategy corresponding to the system operating status includes: Based on the log filtering strategy corresponding to the first running state, the system logs are filtered to obtain key system logs; The critical system logs are used as the system logs to be stored.

7. The method according to claim 5 or 6, characterized in that, The step of storing the system logs to be stored according to the log storage rate corresponding to the system operating state includes: According to the log storage rate, a storage token is generated for the system log to be stored; After detecting the storage token for the target system log to be stored in the system log to be stored, the target system log to be stored is stored in the vehicle storage area.

8. The method according to claim 5, characterized in that, The method of obtaining the system logs to be stored from the system logs based on the log acquisition strategy corresponding to the system operating status includes: Based on the full acquisition strategy corresponding to the second operating state, the system log is determined as the system log to be stored; the second operating state is the operating state in which the system load does not exceed the preset load.

9. The method according to claim 5, 6 or 8, characterized in that, The step of storing the system logs to be stored according to the log storage rate corresponding to the system operating state includes: Based on the log storage rate, determine the storage admission traffic of the sliding window; Obtain the amount of log data to be stored from the system logs within the time range of the sliding window; If the amount of log data is less than or equal to the storage admission traffic, the system logs to be stored within the time range of the sliding window will be stored in the vehicle storage area. If the amount of log data exceeds the storage admission traffic, the storage of the logs of the system to be stored is suspended.

10. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the log storage method as described in any one of claims 1 to 9 when executing the computer program.