Vehicle data storage method and device and electronic equipment

By obtaining the CPU and memory occupancy rate of the vehicle system in real time and dynamically adjusting the data storage strategy, the problem of traditional vehicle data storage methods occupying too much resources is solved, and the processing efficiency and user experience of the vehicle system are improved.

CN119536999APending Publication Date: 2025-02-28CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411564814.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

Traditional vehicle data storage methods occupy a lot of resources, affecting the execution of other tasks, resulting in reduced vehicle system processing efficiency and worse user experience.

Method used

By obtaining real-time operation information, including CPU occupancy and memory occupancy, dynamically adjusting data storage policies, reducing the resources occupied by storage operations, and releasing resources that can be used for other tasks.

Benefits of technology

It realizes the flexibility of allocating resources while ensuring the value of vehicle data utilization, improves the processing efficiency and stability of the vehicle system, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119536999A_ABST
    Figure CN119536999A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of vehicle data storage, and provides a vehicle data storage method and device and electronic equipment. The method comprises the steps of obtaining real-time operation information, wherein the real-time operation information comprises a CPU occupancy rate of a target processor and a memory occupancy rate of a target memory; based on a preset relationship, determining a data storage strategy corresponding to the CPU occupancy rate and the memory occupancy rate; and storing the corresponding vehicle data according to the data storage strategy based on the target processor and the target memory. The data storage strategy is dynamically adjusted based on the real-time conditions of the CPU occupancy rate and the memory occupancy rate, and under the condition that the utilization value of the vehicle data is guaranteed as much as possible, flexible allocation of all resources is achieved, the processing efficiency of the vehicle system is improved, the stability and availability of the vehicle system are guaranteed, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of vehicle data storage, and in particular to a method, device and electronic device for storing vehicle data. Background Art

[0002] During the use of the vehicle, the vehicle system operates and generates various operating data. Some of these operating data will be stored to provide data support for subsequent vehicle fault diagnosis, performance analysis, customer service and other needs.

[0003] The traditional vehicle data storage method uses full data and real-time storage, which is not affected by the dynamic state of the vehicle. With the development of vehicle intelligence, more and more vehicle data needs to be stored. The traditional storage method occupies more and more software and hardware resources when implementing it, resulting in fewer and fewer resources in the vehicle that can be allocated to other tasks, which has a negative impact on task execution, lower processing efficiency of the vehicle system, and worse user experience.

[0004] Therefore, how to provide a solution to the above technical problems is a problem that technicians in this field need to solve. Summary of the invention

[0005] In view of this, the embodiments of the present application provide a method, device and electronic device for storing vehicle data to solve the problem in the prior art that vehicle data storage occupies a large amount of resources and affects the execution of other tasks.

[0006] According to a first aspect of an embodiment of the present application, a method for storing vehicle data is provided, which is applied to a vehicle system and includes:

[0007] Obtain real-time operation information, including the CPU usage of the target processor and the memory usage of the target memory;

[0008] Based on the preset relationship, determine the data storage strategy corresponding to the CPU occupancy rate and the memory occupancy rate; the data storage strategy includes at least one of a storage data range and a sampling frequency, the size of the storage data range is negatively correlated with the CPU occupancy rate, the size of the storage data range is negatively correlated with the memory occupancy rate, the size of the sampling frequency is negatively correlated with the CPU occupancy rate, and the size of the storage data range is negatively correlated with the memory occupancy rate;

[0009] Based on the target processor and target memory, the corresponding vehicle data is stored according to the data storage strategy.

[0010] According to a second aspect of an embodiment of the present application, a vehicle data storage device is provided, comprising:

[0011] An acquisition module is used to acquire real-time operation information, including the CPU occupancy rate of the target processor and the memory occupancy rate of the target memory;

[0012] A determination module, used to determine a data storage strategy corresponding to the CPU occupancy rate and the memory occupancy rate based on a preset relationship; the data storage strategy includes at least one of a storage data range and a sampling frequency, the size of the storage data range is negatively correlated with the CPU occupancy rate, the size of the storage data range is negatively correlated with the memory occupancy rate, the size of the sampling frequency is negatively correlated with the CPU occupancy rate, and the size of the storage data range is negatively correlated with the memory occupancy rate;

[0013] The action module is used to store the corresponding vehicle data based on the target processor and the target memory according to the data storage strategy.

[0014] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0015] Compared with the prior art, the beneficial effects of the embodiments of the present application include at least the following: the present application obtains real-time operation information, determines the data storage strategy corresponding to the preset relationship based on the CPU occupancy rate and memory occupancy rate in the real-time operation information, and stores the vehicle data based on the data storage strategy. The data storage strategy in this solution is not fixed, but is dynamically adjusted based on the real-time situation of the CPU occupancy rate and the memory occupancy rate according to the corresponding relationship between the CPU occupancy rate and the memory occupancy rate. While ensuring the utilization value of the vehicle data as much as possible, the dynamic management of the data storage strategy can realize the flexible allocation of various resources, thereby improving the processing efficiency of the vehicle system, ensuring the stability and availability of the vehicle system, and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0017] Figure 1 It is a schematic diagram of an application scenario of an embodiment of the present application;

[0018] Figure 2 It is a flowchart of a method for storing vehicle data provided by an embodiment of the present application;

[0019] Figure 3It is a structural schematic diagram of a vehicle data storage device provided in an embodiment of the present application;

[0020] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0022] Traditional vehicle data storage uses full data and real-time storage, which is not affected by the dynamics of the vehicle. With the development of vehicle intelligence, more and more vehicle data needs to be stored, and more and more software and hardware resources are occupied by vehicle data storage, which means that fewer resources can be allocated to other tasks. Once certain tasks have resource requirements, and the available vehicle resources cannot meet the resource requirements, the resources allocated to the task cannot meet the resource requirements, which will seriously affect the execution of the task and may even cause the task to fail to execute smoothly, reduce the processing efficiency and reliability of the vehicle system, and worsen the user experience.

[0023] Based on this, this embodiment provides a solution for dynamically adjusting the data storage strategy, by obtaining the real-time operation information in the current vehicle system, determining the data storage level according to the real-time operation information, and then performing the operation of storing vehicle data according to the current data storage level. At this time, the operation of storing vehicle data is dynamically adjusted according to the real-time operation information. When the CPU occupancy rate increases or the memory occupancy rate increases, it means that the currently allocable resources are reduced. The data storage level is lowered according to the preset level relationship to reduce the resources occupied by the storage operation. Part of the resources originally occupied by the storage operation are released and can be used for other tasks to execute, thereby dynamically balancing the resource allocation of various tasks and improving the stability and performance of the overall system.

[0024] A method, device and electronic device for storing vehicle data according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0025] Figure 1 1 is a schematic diagram of an application scenario of an embodiment of the present application. The application scenario may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a server 104 and a network 105.

[0026] The first terminal device 101, the second terminal device 102 or the third terminal device 103 can be hardware or software. When the first terminal device 101, the second terminal device 102 or the third terminal device 103 is hardware, it can be various electronic devices with a display screen and supporting communication with the server 104, including but not limited to vehicle systems, smart phones, tablet computers, laptop portable computers and desktop computers; when the first terminal device 101, the second terminal device 102 or the third terminal device 103 is software, it can be installed in the above electronic devices. The first terminal device 101, the second terminal device 102 or the third terminal device 103 can be implemented as multiple software or software modules, or as a single software or software module, which is not limited in the embodiment of the present application. Further, various applications can be installed on the first terminal device 101, the second terminal device 102 or the third terminal device 103, such as data processing applications, instant messaging tools, social platform software, search applications, shopping applications, etc.

[0027] The server 104 may be a server that provides various services, for example, a background server that receives a request sent by a terminal device that establishes a communication connection with the server, and the background server may receive and analyze the request sent by the terminal device, and generate a processing result. The server 104 may be a single server, or a server cluster composed of several servers, or a cloud computing service center, which is not limited in the present embodiment of the application.

[0028] It should be noted that the server 104 can be hardware or software. When the server 104 is hardware, it can be various electronic devices that provide various services for the first terminal device 101, the second terminal device 102, and the third terminal device 103. When the server 104 is software, it can be multiple software or software modules that provide various services for the first terminal device 101, the second terminal device 102, and the third terminal device 103, or it can be a single software or software module that provides various services for the first terminal device 101, the second terminal device 102, and the third terminal device 103, and the embodiment of the present application does not limit this.

[0029] The network 105 can be a wired network connected by coaxial cable, twisted pair and optical fiber, or it can be a wireless network that can interconnect various communication devices without wiring, such as Bluetooth, Near Field Communication (NFC), infrared, etc., which is not limited in the embodiments of the present application.

[0030] It should be noted that the specific types, quantities and combinations of the first terminal device 101, the second terminal device 102, the third terminal device 103, the server 104 and the network 105 can be adjusted according to the actual needs of the application scenario, and the embodiments of the present application do not limit this.

[0031] Figure 2 It is a flowchart of a method for storing vehicle data provided in an embodiment of the present application. Figure 2 The storage method is performed by the vehicle system, and the vehicle system can be Figure 1 The first terminal device, the second terminal device, or the third terminal device is implemented. Figure 2 As shown, the storage method includes:

[0032] S201: Acquire real-time operation information, where the real-time operation information includes a CPU occupancy rate of a target processor and a memory occupancy rate of a target memory;

[0033] S202: Determine a data storage strategy corresponding to the CPU occupancy rate and the memory occupancy rate based on a preset relationship; the data storage strategy includes at least one of a storage data range and a sampling frequency, the size of the storage data range is negatively correlated with the CPU occupancy rate, the size of the storage data range is negatively correlated with the memory occupancy rate, the size of the sampling frequency is negatively correlated with the CPU occupancy rate, and the size of the storage data range is negatively correlated with the memory occupancy rate;

[0034] S203: Based on the target processor and the target memory, store the corresponding vehicle data according to the data storage strategy.

[0035] Among them, the target processor and target memory are the components involved in executing and storing vehicle data in the vehicle system. The target processor is usually a CPU (Central Processing Unit). The resource usage of the target processor is represented by the CPU occupancy rate. A high CPU occupancy rate means that the CPU is busy processing tasks, and a low CPU occupancy rate means that the CPU is relatively idle. When the CPU is fully loaded, the CPU occupancy rate is 100%. The CPU occupancy rate reflects the performance of the target processor to a certain extent, and can be used as a reference for subsequent task allocation.

[0036] The target memory is usually RAM (Random Access Memory), which is a volatile memory with fast read and write speeds but data will be lost after power failure. It is used for temporary storage so that the CPU can quickly access and process it. The memory occupancy rate refers to the percentage of the space occupied by real-time data in the current target memory to the total space size. If the memory occupancy rate is high, there is less available space in the target memory, and it is difficult to provide resource support for new tasks. If the memory occupancy rate is low, there is more available space in the target memory, and there is enough capacity to provide resource support for more tasks.

[0037] Therefore, a preset relationship is set in this embodiment, which reflects the relationship between several parameters, wherein the input parameters are CPU occupancy and memory occupancy, and the output parameter is at least one of the storage data range and the sampling frequency. The increase of each input parameter corresponds to the current resource trend towards tension. In this case, this embodiment will alleviate the development of this resource tension trend by dynamically adjusting the output parameters. Therefore, the preset relationship implies a negative correlation between the input parameters and the output parameters, and the effect of alleviating resource tension is achieved by using the preset relationship.

[0038] It can be understood that the preset relationship determined based on the above correlation relationship is applied to the storage method of this embodiment, which can complete the dynamic adjustment of the data storage strategy for vehicle data. The data storage strategy is the basis followed by the execution subject of this embodiment when storing vehicle data. For example, the sampling frequency stipulates the frequency of specific sampling actions, and the storage data range stipulates the specific vehicle data to be stored. The execution subject of this embodiment will obtain the vehicle data of the CAN (Controller Area Network) protocol returned by the corresponding device through the vehicle gateway according to the sampling frequency, and complete the action of storing vehicle data to the target disk based on the target processor and target memory. The subsequent execution subject will also upload the vehicle data on the target disk to the server according to specific data upload rules, or respond to the server's data retrieval request.

[0039] The method of the embodiment of the present application obtains real-time operation information, determines the data storage strategy corresponding to the preset relationship based on the CPU occupancy rate and memory occupancy rate in the real-time operation information, and stores the vehicle data based on the data storage strategy. The data storage strategy in this solution is not fixed, but is dynamically adjusted based on the real-time situation of the CPU occupancy rate and the memory occupancy rate according to the corresponding relationship between the CPU occupancy rate and the memory occupancy rate. While ensuring the utilization value of the vehicle data as much as possible, the dynamic management of the data storage strategy is used to achieve flexible allocation of various resources, thereby improving the processing efficiency of the vehicle system, ensuring the stability and availability of the vehicle system, and improving the user experience.

[0040] Specifically, considering that the present embodiment is applied to the storage of vehicle data and does not involve complex requirements such as real-time data, there is no need for overly complex numerical calculations between input parameters and output parameters, as long as the trend meets the adjustment requirements. Therefore, a corresponding relationship can be constructed through a simple preset level relationship table of level gears. Specifically, the CPU occupancy rate interval is divided into multiple CPU occupancy rate levels, and similarly, the memory occupancy rate interval is divided into multiple memory occupancy rate levels. A certain CPU occupancy rate level and a certain memory occupancy rate level jointly determine the corresponding data storage level; the data storage level includes at least one of a data range level and a sampling frequency level, wherein each data range level corresponds to a storage data range, and each sampling frequency level corresponds to a sampling frequency.

[0041] Based on the inherent negative correlation between the parameters, that is, as the CPU occupancy rate or the memory occupancy rate increases, the size of the storage data range or the size of the sampling frequency will decrease, and the association between the levels is determined. Therefore, in some specific embodiments, based on the preset relationship, the process of determining the data storage strategy corresponding to the CPU occupancy rate and the memory occupancy rate may include:

[0042] Determine the CPU usage level corresponding to the CPU usage;

[0043] Determine a memory usage level corresponding to the memory usage;

[0044] Based on the preset level relationship table, based on the CPU occupancy level and the memory occupancy level, determine the corresponding data storage level as the data storage strategy;

[0045] The data storage level includes at least one of a data range level and a sampling frequency level;

[0046] In the preset level relationship table, each data range level corresponds to a storage data range, and each sampling frequency level corresponds to a sampling frequency.

[0047] Furthermore, the relationship between each parameter and its level can be set as a positive correlation, that is, the larger the parameter value, the higher the corresponding level. In this case,

[0048] There is a positive correlation between the CPU usage level and the CPU usage;

[0049] There is a positive correlation between the memory usage level and the memory usage;

[0050] The data range level is positively correlated with the size of the corresponding storage data range, the data range level is negatively correlated with the CPU usage level, and the data range level is negatively correlated with the memory usage level;

[0051] The sampling frequency level is positively correlated with the corresponding sampling frequency, the sampling frequency level is negatively correlated with the CPU occupancy level, and the sampling frequency level is negatively correlated with the memory occupancy level.

[0052] It can be understood that in the above correlations, each level describes the degree in terms of high and low. Taking the CPU occupancy level as an example, the larger the CPU occupancy value, the higher the CPU occupancy level; similarly, the higher the data range level, the larger the corresponding storage data range size.

[0053] In some embodiments, the data storage strategy may only include the storage data range. In this case, the data storage level only includes the data range level. The data range level in the preset level relationship table is negatively correlated with the CPU occupancy level and the memory occupancy level. As the CPU occupancy rate or the memory occupancy rate increases, the range of the storage data range will be reduced. Specifically, taking the preset level relationship table as an example with four data range levels, the multiple storage data ranges corresponding to the preset level relationship table are, from large to small, the maximum storage data range, the medium storage data range, the minimum storage data range, and the no storage data range, where:

[0054] The maximum storage data range includes core data, intermediate data and peripheral data of vehicle data;

[0055] The medium storage data range includes only core data and intermediate data;

[0056] The minimum storage data scope includes only core data;

[0057] The no storage data range does not include any vehicle data.

[0058] It can be understood that the storable vehicle data can be divided into core data, intermediate data and peripheral data according to the priority from high to low, wherein the core data can specifically include basic vehicle data, such as vehicle speed, door, lathe, brake status, etc.; the intermediate data can specifically include maintenance diagnosis data, that is, the data that needs to be queried when the subsequent diagnostic instrument performs vehicle fault query; the peripheral data can specifically include other data that does not involve user privacy. The amount of peripheral data is large, so the storage data range can be further partitioned by refining the peripheral data partition. Among them, the maximum storage data range includes all vehicle data, the medium storage data range does not include peripheral data, which saves some resources relative to the maximum storage data range, the minimum storage data range only includes core data, which saves most resources at this time, while still ensuring the storage of core data, and the last non-storage data range does not include any vehicle data, corresponding to the empty set, which is usually used when resources are very tight. When the data storage level corresponding to the real-time operation information corresponds to the non-storage data range, that is, no vehicle data needs to be stored, the software program corresponding to the storage vehicle data can be directly stopped to release the corresponding resources.

[0059] It can be understood that as the data range level decreases from high to low, the corresponding storage data range gradually decreases from large to small, and the storage data range with a lower level is a subset of the storage data range with a higher level.

[0060] In an exemplary embodiment, it is assumed that the CPU occupancy rate interval is divided into five CPU occupancy rate levels according to the nodes of 15%, 30%, 50% and 70%, and the memory occupancy rate interval is divided into five memory occupancy rate levels according to the nodes of 10%, 20%, 50% and 60%. Assuming that all levels are described as L1, L2, L3... from high to low, the CPU occupancy rate level is recorded as CL, the memory occupancy rate level is recorded as RL, and the data storage level is recorded as DL. At this time, the preset relationship table can be shown in Table 1 below, in which the maximum storage data range, the medium storage data range, the minimum storage data range and the no storage data range are abbreviated as large, medium, small and empty, respectively.

[0061] Table 1 A preset level relationship table of data range levels

[0062]

[0063] It can be understood that Table 1 is only an example of a specific preset relationship table of data storage levels including data range levels. The specific relationship between the data range level and the CPU occupancy level, the memory occupancy level, and the specific values ​​of the parameters in each level can be set according to actual conditions and user needs, and are not limited here.

[0064] It can be understood that when the data storage level only includes the data range level, the sampling frequency corresponding to each data range level is determined, and all data range levels correspond to the same sampling frequency. The lowest data range level DL4 is a non-stored data range, which does not include any vehicle data. Regardless of the sampling frequency, the data object of the storage action is an empty set, and the storage effect is always empty. Usually in this case, the storage program will be stopped, so the sampling frequency is usually 0.

[0065] The data storage strategy only includes the sampling frequency, and the data storage level only includes the sampling frequency level. Similar to the case where the data storage level only includes the data range level, the corresponding sampling frequency gradually decreases from high to low sampling frequency levels. Assuming that the sampling frequency level is recorded as FL, for example, there are five sampling frequency levels, then the sampling frequencies corresponding to the sampling frequency levels FL1-FL5 from high to low are k1×f0, k2×f0, k3×f0, k4×f0, k5×f0, respectively, where k1-k5 are positive rational numbers, k1>k2>k3>k4>k5≥0, and f0 is a frequency value greater than 0. Assuming that the CPU occupancy level is CL1-CL5 and the memory occupancy level is RL1-RL5, at this time, a specific preset relationship table can be shown in Table 2 below.

[0066] Table 2 Preset level relationship table of a sampling frequency level

[0067] CL5 CL4 CL3 CL2 CL1 RL5 FL1 FL1 FL1 FL2 FL3 RL4 FL1 FL1 FL2 FL3 FL4 RL3 FL2 FL2 FL3 FL3 FL4 RL2 FL4 FL4 FL4 FL5 FL5 RL1 FL5 FL5 FL5 FL5 FL5

[0068] It can be understood that Table 2 is only an example of a specific preset relationship table of data storage levels including sampling frequency levels. The specific relationship between the sampling frequency level and the CPU occupancy level, the memory occupancy level, and the specific values ​​of the parameters in each level can be set according to actual conditions and user needs, and are not limited here.

[0069] It is understandable that the sampling frequency corresponds to the amount of CPU tasks, and the size of the storage data range will affect the memory space occupied. When considering the storage of vehicle data, on the one hand, the storage data range is considered, that is, as many types of data as possible are stored, and on the other hand, the sampling frequency is considered, that is, as much time-continuous data as possible is stored. Therefore, when setting the data storage level, if the data storage strategy includes both the storage data range and the sampling frequency, and the data storage level includes both the data range level and the sampling frequency level, then as the data storage level goes from high to low, the range of the storage data range gradually decreases, and the sampling frequency gradually decreases. For example, Table 3 is a storage setting relationship table of a data storage level, where the data storage level is recorded as SL, the data range level from high to low includes DL1-DL4, and the sampling frequency level from high to low includes FL1-FL3.

[0070] Table 3 A storage setting relationship table of data storage level

[0071] Data storage level Data range level Sampling frequency level SL1 DL1 FL1 SL2 DL1 FL2 SL3 DL2 FL2 SL4 DL2 FL3 SL5 DL3 FL3 SL6 DL4 /

[0072] It can be understood that the storage data range of DL1-DL4 is reduced in sequence. When DL4 is a range without storage data, the storage program usually stops running and the sampling frequency is 0. At this time, SL6 means stopping running the storage program.

[0073] It can be understood that Table 3 is only an example of a specific storage setting relationship table of a data storage level including a data storage level and a sampling frequency level. The specific correspondence between the data storage level and the data range level, the sampling frequency level, and the specific values ​​of the parameters in each level can be set according to actual conditions and user needs, and are not limited here.

[0074] Furthermore, each sampling frequency level in the data storage level can also set different sampling frequencies for different data types, that is, each sampling frequency level includes a group of multiple sampling frequencies for vehicle data of different priorities. In the same group of sampling frequencies, the higher the priority of the vehicle data, the higher the corresponding sampling frequency. Taking the example that vehicle data can be divided into core data, intermediate data and peripheral data according to priority from high to low, the sampling frequency of core data is higher than that of intermediate data, which is higher than that of peripheral data.

[0075] Similarly, when the data storage level includes the data range level and the data storage level, assuming that the data storage level is SL1-SL6 shown in Table 3, the CPU occupancy level is CL1-CL5, and the memory occupancy level is RL1-RL5, then a specific preset relationship table can be shown in Table 4 below.

[0076] Table 4 A preset level relationship table of data storage level

[0077] CL5 CL4 CL3 CL2 CL1 RL5 SL1(DL1,FL1) SL1(DL1,FL1) SL1(DL1,FL1) SL2(DL1,FL2) SL2(DL1,FL2) RL4 SL1(DL1,FL1) SL2(DL1,FL2) SL3(DL2,FL2) SL3(DL2,FL2) SL3(DL2,FL2) RL3 SL2(DL1,FL2) SL3(DL2,FL2) SL3(DL2,FL2) SL3(DL2,FL2) SL4(DL2,FL3) RL2 SL3(DL2,FL2) SL3(DL2,FL2) SL4(DL2,FL3) SL4(DL2,FL3) SL5(DL3,FL3) RL1 SL4(DL2,FL3) SL5(DL3,FL3) SL5(DL3,FL3) SL6(DL4, / ) SL6(DL4, / )

[0078] It can be understood that Table 4 is only an example of a specific preset relationship table of data storage levels including data range levels and sampling frequency levels. The specific relationship between the data storage level and the CPU occupancy level, the memory occupancy level, and the specific values ​​of the parameters in each level can be set according to actual conditions and user needs, and are not limited here.

[0079] It can be understood that in the above examples, the specific values ​​of the parameters in each level and the specific correspondence between the levels can be set according to actual conditions and user needs. There is no limitation here, as long as the correlation between the levels and the correlation between each level and the corresponding parameters are satisfied.

[0080] It can be understood that in this embodiment, steps S201-S203 obtain the CPU occupancy rate and the memory occupancy rate and are executed cyclically at a certain frequency. When the CPU occupancy rate and the memory occupancy rate are relatively stable, the data storage level usually remains unchanged. Once the level corresponding to the CPU occupancy rate or the memory occupancy rate changes, the current data storage level may change accordingly, and then the action of storing vehicle data is adjusted according to the current data storage level, thereby achieving the effect of dynamic change of data storage action according to real-time operation information.

[0081] In some embodiments, it is considered that the life of the target disk storing vehicle data will change with the storage action. It is understandable that the disk life generally refers to the working time of the disk being able to reliably store and retrieve data. In order to keep the target disk in a good use state, the data storage level can be readjusted considering the remaining service life of the target disk after determining the data storage level, so as to avoid the situation where the target disk is over-consumed, the loss exceeds the reasonable expected loss, and the life is shortened. Therefore, the real-time operation information also includes the actual remaining life of the target disk storing vehicle data;

[0082] Based on the target processor and the target memory, according to the data storage strategy, before storing the corresponding vehicle data, it also includes:

[0083] When the actual remaining life is lower than the expected remaining life, the current data storage level is lowered.

[0084] It can be understood that if the actual remaining life of the target disk is lower than the expected remaining life, it proves that the current loss of the target disk exceeds the reasonable expected loss. In order to reduce the loss of the target disk caused by the storage action, at least one of the corresponding sampling frequency and the amount of stored data can be reduced. In this embodiment, such loss is reduced by lowering the current data storage level. The order of data storage levels is known from high to low. When the actual remaining life is lower than the expected remaining life, the data storage level determined based on the preset level relationship table is adjusted downward, thereby reducing at least one of the range of the storage data range or the sampling frequency corresponding to the data storage level.

[0085] Specifically, when lowering the current data storage level, the number of levels adjusted downward can be fixed to N, where N is a positive integer, such as N=1. For example, the data storage levels SL1-SL6 in Table 4 are lowered by one level, and the lowering process includes: SL1 is lowered to SL2, SL2 is lowered to SL3, SL3 is lowered to SL4, SL4 is lowered to SL5, SL5 is lowered to SL6, and SL6 maintains the lowest data storage level. The number of levels adjusted downward can also be determined according to the degree of wear and tear, and the degree of wear and tear is determined by the difference between the actual remaining life and the expected remaining life, that is, the specific reduction by one or more levels is determined by the difference, and the larger the difference, the more levels are lowered. It can be understood that each data storage level cannot be adjusted downward indefinitely, and can be lowered to the lowest data storage level at most.

[0086] Specifically, the remaining life of the target disk can be obtained by subtracting the difference between the total life cycle and the service life. When the target disk leaves the factory, it has factory parameters to describe the total life cycle. The factory parameters include the total number of times the target disk can be rewritten, the total amount of data that can be written, and the length of time the target disk can be used. The relevant parameters of the service life of the target disk during actual use include the total number of times the target disk has been rewritten, the actual amount of data written, etc. The actual remaining life is related to the actual operation of the target disk, and the expected remaining life is related to the actual length of time the target disk is used.

[0087] Therefore, the relevant life calculation of the target disk can include:

[0088] The actual remaining life is specifically the difference between 1 and the actual service life, and the actual service life is specifically the ratio of the actual total number of flashing times to the total number of flashing times that can be flashed before leaving the factory, or the actual service life is specifically the ratio of the actual amount of written data to the total amount of writable data before leaving the factory;

[0089] The expected remaining life is specifically the difference between 1 and the expected service life. The expected service life is specifically the ratio of the actual usage time to the factory usable time.

[0090] It is understandable that in addition to the above method for calculating the remaining life of the target disk, the actual remaining life of the target disk, the expected remaining life, and the comparison between the two can also be determined by other parameters or operating data, as long as they can be used to indicate whether the loss of the target disk exceeds the reasonable expected loss, without specific limitation.

[0091] It is understandable that the actual remaining life of the target disk is relatively stable and does not require high-frequency real-time acquisition, so the acquisition frequency is usually lower than the CPU usage and memory usage. When the storage method is executed multiple times in a row, the actual remaining life is likely to remain unchanged, so the degree of adjustment based on the disk life for each different data storage level determined based on the CPU usage and memory usage may be the same.

[0092] In some embodiments, since the storage of vehicle data will affect the work of the target processor and the target memory, it is likely to cause a decrease in processing speed, a freeze in external display, and other user dissatisfaction. Therefore, in order to improve the user experience, the data storage level determined according to the CPU occupancy rate and the memory occupancy rate can be further adjusted according to user feedback. In this case, the real-time operation information also includes the user status information of the target user;

[0093] Based on the target processor and the target memory, according to the data storage strategy, before storing the corresponding vehicle data, it also includes:

[0094] Based on the user status information, determine the user patience level. The user patience level is used to indicate the target user's minimum expected speed for the system response. The user patience level is negatively correlated with the minimum expected speed.

[0095] When the user's patience level is lower than a preset value, the current data storage level is lowered.

[0096] It can be understood that the user status information includes multimodal user information that can be monitored in the car when the target user is in the smart cockpit, such as the user's operation of the human-computer interaction interface, the user's voice, expression, body movements, etc. The user's patience is analyzed based on the multimodal user information. If the user's patience is high, the system is allowed to respond slower, that is, the minimum expected speed of the user's expected system response speed is low. If the user's patience is low, the system response speed cannot be too slow, that is, the minimum expected speed of the user's expected system response speed is high. Based on this, the user's patience is set. When the user's patience is lower than the preset value, that is, the user's patience is obviously low, the current data storage level is lowered, the resources occupied by storage actions are reduced, the overall system response speed is improved, and user satisfaction is improved.

[0097] Specifically, the multimodal user information in the user status information is classified by interactive media, including click operations, image information, sound information, etc. Therefore, the user status information includes at least one of the click operation of the target user on the human-computer interaction interface, the image information of the target user, and the sound information of the target user;

[0098] There is a negative correlation between user patience and the frequency of click operations;

[0099] There is a negative correlation between the user's patience and the negative emotion corresponding to the image information;

[0100] There is a negative correlation between the user's patience and the negative emotion corresponding to the sound information;

[0101] The negative emotion level is used to indicate the intensity of the negative emotion of the target user.

[0102] It is understandable that the target user's click operation on the human-computer interaction interface normally has a certain time interval, and continuous click operations may correspond to different interface positions; if the target user continuously issues multiple click operations in a short period of time and corresponds to the same interface position, such as clicking the same interface position more than three times within one second, it reflects that the current user is dissatisfied with the speed of system response, and thus the number of consecutive multiple click operations issued is high, the time interval is short, and the user's patience is low. It can be seen that the user's patience is negatively correlated with the operation frequency of click operations.

[0103] It is understandable that the target user's voice information and image information can reflect the target user's emotions. Voice information includes speaking, screaming, singing, crying, laughing, etc., and image information includes user expression image information and body movement information. By analyzing at least one of the voice information and image information, the current target user's emotions, such as calm, irritable, excited, angry, nervous, etc., can be determined. Emotions include positive emotions and negative emotions. Positive emotions usually do not reduce the user's patience, so here we mainly focus on negative emotions. Negative emotions have different degrees of intensity. For example, anger is more intense than irritability. If the current target user has negative emotions, he is likely to be dissatisfied with the speed of the system response, and the dissatisfaction deepens according to the intensity of the negative emotions.

[0104] Therefore, in this embodiment, both sound information and image information are used to determine the degree of negative emotion. The intensity of negative emotion is also the degree of negative emotion. The degree of negative emotion is negatively correlated with the user's patience. The higher the degree of negative emotion, the lower the corresponding user's patience, and the higher the target user's requirement for system response speed.

[0105] It is understandable that in order to simplify the processing operation, the judgment of whether the user's patience is lower than the preset degree value can be achieved through some relatively simple parameter standards. For example, the preset operation frequency of the click operation corresponding to the preset degree value is 3 times / second. If the actual frequency of the click operation is higher than the preset operation frequency, it is considered that the user's patience is lower than the preset degree value; for another example, judging by the cumulative duration of screaming in the sound information, if the cumulative duration of screaming in the sound monitoring window exceeds the preset duration of screaming corresponding to the preset degree value, the negative emotion is high, and it is considered that the user's patience is lower than the preset degree value; for another example, analyzing the sound information and image information to obtain that the user's emotion belongs to the negative emotion in the preset intense emotion, the preset intense emotion is specifically the emotion when the user's patience is lower than the preset degree value, such as irritability, anger, etc., it is considered that the current user's patience is lower than the preset degree value.

[0106] It is understandable that the specific correlation between the user's patience, operation frequency, and negative emotion can be realized through specific numerical expressions and level settings, and can be set and adjusted according to actual conditions, and is not limited here. The reduction of the data storage level based on the user's patience is similar to the reduction of the data storage level based on the actual remaining life. The reduction degree can be fixed or flexibly adjusted according to the current user's patience, so as to flexibly manage the system's resources and adjust the system's response speed.

[0107] Furthermore, considering that the user's emotions may change at any time while using the vehicle, the following situation is likely to occur: the storage method is executed in a loop, and the system response speed increases after the current data storage level is lowered based on the user's patience. If the user is still not satisfied, that is, the user's patience is still lower than the preset value, the current data storage level will be lowered again. If the user is relatively satisfied with the system response speed after the first reduction and no longer complains, and the user's patience rises to no less than the preset value, assuming that the current data storage level is no longer lowered according to the user's patience at this time, the system response speed will decrease, and the user's patience will decrease again, and the current data storage level will need to be lowered again, which will not only cause repeated oscillations in the data storage level, but also bring a poor user experience to the user.

[0108] Therefore, this embodiment adopts a relatively conservative adjustment strategy of immediate downward adjustment and delayed regression for the level adjustment related to the user's patience level, that is, a downward adjustment operation is immediately taken after monitoring that the user's patience level is lower than the preset level value, and an upward adjustment operation is not immediately taken after monitoring that the user's patience level returns to the preset level value, but waits until certain preset retention conditions are met before performing the upward adjustment operation.

[0109] The downgrade operation here not only downgrades the current data storage level, but also downgrades the preset level relationship table used subsequently. When the entire plan is subsequently cyclically operated, the preset level relationship table is downgraded. Therefore, the data storage level determined based on the preset level relationship table is downgraded according to the user's patience level, ensuring that the user status information feedback is still followed in subsequent use.

[0110] Accordingly, the adjustment object of the upward adjustment operation does not include the current data storage level, but the preset level relationship table in use, so as to directly update the basis for determining the data storage level in the subsequent method operation. The preset retention condition here can be that the number of cycles of the entire storage method exceeds the preset number, or the retention time exceeds the preset time, or the system is powered off. The purpose of setting the preset retention condition is to extend the time difference between the moment when the user's patience changes and the moment of the upward adjustment operation, so as to avoid the repeated oscillation mentioned above.

[0111] Therefore, in this embodiment, when the user's patience is lower than a preset value, after lowering the current data storage level, the following steps may also be performed:

[0112] The preset level relationship table is updated by lowering each data storage level in the preset level relationship table;

[0113] When the user patience level changes from less than the preset level value to not less than the preset level value, and the state of not less than the preset level value meets the preset retention condition, the preset level relationship table is updated by increasing the data storage level in the preset level relationship table.

[0114] It can be understood that, taking Table 1 as an example, assuming that the data storage level in the preset level relationship table is lowered by one level, the updated preset level relationship table is shown in Table 5.

[0115] Table 5 An updated preset level relationship table

[0116]

[0117] It is understandable that there are limits on the increase and decrease of each data storage level. The lowest level it can only be decreased to is the lowest data storage level in the preset level relationship table. The essence of an increase is a callback to a decrease. The highest level it can only be increased to is the data storage level corresponding to the initially set preset level relationship table. For example, if the original data storage level is DL2, it may be decreased to DL3 or DL4, and the lowest level it can be decreased to is DL4. If it is increased later, it can be increased to DL2 at most, and it is impossible to increase it to DL1.

[0118] The method of the embodiment of the present application obtains real-time operation information, determines the data storage strategy corresponding to the preset relationship based on the CPU occupancy rate and memory occupancy rate in the real-time operation information, and stores the vehicle data based on the data storage strategy. The data storage strategy in this solution is not fixed, but is dynamically adjusted based on the real-time situation of the CPU occupancy rate and the memory occupancy rate according to the corresponding relationship between the CPU occupancy rate and the memory occupancy rate. While ensuring the utilization value of the vehicle data as much as possible, the dynamic management of the data storage strategy is used to achieve flexible allocation of various resources, thereby improving the processing efficiency of the vehicle system, ensuring the stability and availability of the vehicle system, and improving the user experience.

[0119] All the above optional technical solutions can be combined in any way to form optional embodiments of the present application, and will not be described in detail here. It should be understood that the size of the sequence number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

[0120] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0121] Figure 3 Schematic diagram of a vehicle data storage device provided in an embodiment of the present application. Figure 3 As shown, the storage device includes:

[0122] The acquisition module 301 is used to acquire real-time operation information, where the real-time operation information includes the CPU occupancy rate of the target processor and the memory occupancy rate of the target memory;

[0123] The determination module 302 is used to determine the data storage strategy corresponding to the CPU occupancy rate and the memory occupancy rate based on the preset relationship; the data storage strategy includes at least one of a storage data range and a sampling frequency, the size of the storage data range is negatively correlated with the CPU occupancy rate, the size of the storage data range is negatively correlated with the memory occupancy rate, the size of the sampling frequency is negatively correlated with the CPU occupancy rate, and the size of the storage data range is negatively correlated with the memory occupancy rate;

[0124] The action module 303 is used to store the corresponding vehicle data based on the target processor and the target memory according to the data storage strategy.

[0125] The device of the present application obtains real-time operation information, determines the data storage strategy corresponding to the preset relationship based on the CPU occupancy rate and memory occupancy rate in the real-time operation information, and stores the vehicle data based on the data storage strategy. The data storage strategy in this solution is not fixed, but is dynamically adjusted based on the real-time situation of the CPU occupancy rate and the memory occupancy rate according to the corresponding relationship between the CPU occupancy rate and the memory occupancy rate. While ensuring the utilization value of the vehicle data as much as possible, the dynamic management of the data storage strategy can realize the flexible allocation of various resources, thereby improving the processing efficiency of the vehicle system, ensuring the stability and availability of the vehicle system, and improving the user experience.

[0126] In an exemplary embodiment, the plurality of storage data ranges corresponding to the preset hierarchical relationship table are, from large to small, the maximum storage data range, the medium storage data range, the minimum storage data range, and the no storage data range, wherein:

[0127] The maximum storage data range includes core data, intermediate data and peripheral data of vehicle data;

[0128] The medium storage data range includes only core data and intermediate data;

[0129] The minimum storage data scope includes only core data;

[0130] The no storage data range does not include any vehicle data.

[0131] In an exemplary embodiment, the real-time operation information also includes an actual remaining life of the target disk storing the vehicle data;

[0132] The Determine module is also used to:

[0133] When the actual remaining life is lower than the expected remaining life, the current data storage level is lowered.

[0134] In an exemplary embodiment, the actual remaining life is specifically the difference between 1 and the actual used life, and the actual used life is specifically the ratio of the actual total number of times of flashing to the total number of times that can be flashed before leaving the factory, or the actual used life is specifically the ratio of the actual amount of written data to the total amount of data that can be written before leaving the factory;

[0135] The expected remaining life is specifically the difference between 1 and the expected service life. The expected service life is specifically the ratio of the actual usage time to the factory usable time.

[0136] In an exemplary embodiment, the real-time operation information also includes user status information of the target user;

[0137] The Determine module is also used to:

[0138] Based on the user status information, determine the user patience level. The user patience level is used to indicate the target user's minimum expected speed for the system response. The user patience level is negatively correlated with the minimum expected speed.

[0139] When the user's patience level is lower than a preset value, the current data storage level is lowered.

[0140] In an exemplary embodiment, the determination module is further configured to:

[0141] The preset level relationship table is updated by lowering each data storage level in the preset level relationship table;

[0142] When the user patience level changes from less than the preset level value to not less than the preset level value, and the state of not less than the preset level value meets the preset retention condition, the preset level relationship table is updated by increasing the data storage level in the preset level relationship table.

[0143] In an exemplary embodiment, the user status information includes at least one of a click operation of the target user on the human-computer interaction interface, image information of the target user, and voice information of the target user;

[0144] There is a negative correlation between user patience and the frequency of click operations;

[0145] There is a negative correlation between the user's patience and the negative emotion corresponding to the image information;

[0146] There is a negative correlation between the user's patience and the negative emotion corresponding to the sound information;

[0147] The negative emotion level is used to indicate the intensity of the negative emotion of the target user.

[0148] Figure 4 Schematic diagram of an electronic device 4 provided in an embodiment of the present application. Figure 4 As shown, the electronic device 4 of this embodiment includes: a processor 401, a memory 402, and a computer program 403 stored in the memory 402 and executable on the processor 401. When the processor 401 executes the computer program 403, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 401 executes the computer program 403, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0149] The electronic device 4 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 4 may include, but is not limited to, a processor 401 and a memory 402. Those skilled in the art will appreciate that Figure 4 The electronic device 4 is merely an example and does not limit the electronic device 4 , and may include more or less components than those shown in the figure, or different components.

[0150] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0151] The memory 402 may be an internal storage unit of the electronic device 4, for example, a hard disk or memory of the electronic device 4. The memory 402 may also be an external storage device of the electronic device 4, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 4. The memory 402 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 402 is used to store computer programs and other programs and data required by the electronic device.

[0152] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments 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. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0153] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium, such as a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. The readable storage medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0154] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for storing vehicle data, characterized in that: Applied to vehicle systems, including: Acquire real-time operation information, wherein the real-time operation information includes a CPU occupancy rate of a target processor and a memory occupancy rate of a target memory; Based on a preset relationship, determine a data storage strategy corresponding to the CPU occupancy rate and the memory occupancy rate; the data storage strategy includes at least one of a storage data range and a sampling frequency, the size of the storage data range is negatively correlated with the CPU occupancy rate, the size of the storage data range is negatively correlated with the memory occupancy rate, the size of the sampling frequency is negatively correlated with the CPU occupancy rate, and the size of the storage data range is negatively correlated with the memory occupancy rate; Based on the target processor and the target memory, the corresponding vehicle data is stored according to the data storage strategy.

2. The storage method according to claim 1, characterized in that: The process of determining the data storage strategy corresponding to the CPU occupancy rate and the memory occupancy rate based on the preset relationship includes: Determine a CPU occupancy level corresponding to the CPU occupancy; Determine a memory occupancy level corresponding to the memory occupancy; Based on the preset level relationship table, based on the CPU occupancy level and the memory occupancy level, determining a corresponding data storage level as a data storage strategy; The data storage level includes at least one of a data range level and a sampling frequency level; In the preset level relationship table, each data range level corresponds to a stored data range, and each sampling frequency level corresponds to a sampling frequency.

3. The method according to claim 2, characterized in that The plurality of storage data ranges corresponding to the preset level relationship table are, from large to small, the maximum storage data range, the medium storage data range, the minimum storage data range, and the no storage data range, wherein: The maximum storage data range includes the core data, intermediate data and peripheral data of the vehicle data; The medium storage data range only includes the core data and the intermediate data; The minimum storage data range only includes the core data; The no-stored-data range does not include any of the vehicle data.

4. The method according to claim 2, characterized in that: The real-time operation information also includes the actual remaining life of the target disk storing the vehicle data; Based on the target processor and the target memory, before storing the corresponding vehicle data according to the data storage strategy, the method further includes: When the actual remaining life is lower than the expected remaining life, the current data storage level is lowered.

5. The method according to claim 4, characterized in that The actual remaining life is specifically the difference between 1 and the actual service life, and the actual service life is specifically the ratio of the actual total number of times of flashing and writing to the total number of times that can be flashed before leaving the factory, or the actual service life is specifically the ratio of the actual amount of data written to the total amount of data that can be written before leaving the factory; The expected remaining life is specifically the difference between 1 and the expected service life, and the expected service life is specifically the ratio of the actual usage time to the factory usable time.

6. The method according to any one of claims 2 to 5, characterized in that: The real-time operation information also includes user status information of the target user; Based on the target processor and the target memory, before storing the corresponding vehicle data according to the data storage strategy, the method further includes: Determine user patience based on the user status information, where the user patience is used to indicate the minimum expected speed of the target user to respond to the system, and the user patience is negatively correlated with the minimum expected speed; When the user's patience level is lower than a preset level, the current data storage level is lowered.

7. The method according to claim 6, characterized in that When the user's patience is lower than a preset value, after lowering the current data storage level, the method further includes: The preset level relationship table is updated by lowering each of the data storage levels in the preset level relationship table; When the user patience level changes from lower than the preset level value to not lower than the preset level value, and the state of not lower than the preset level value satisfies the preset retention condition, the preset level relationship table is updated by increasing the data storage level in the preset level relationship table.

8. The method according to claim 6, characterized in that The user status information includes at least one of a click operation of the target user on the human-computer interaction interface, image information of the target user, and voice information of the target user; The user's patience is negatively correlated with the operation frequency of the click operation; The user's patience level is negatively correlated with the negative emotion level corresponding to the image information; The user's patience level is negatively correlated with the negative emotion level corresponding to the sound information; The negative emotion level is used to indicate the intensity of the negative emotion of the target user.

9. A storage device for vehicle data, characterized in that: include: An acquisition module, used to acquire real-time operation information, wherein the real-time operation information includes a CPU occupancy rate of a target processor and a memory occupancy rate of a target memory; A determination module, used to determine a data storage strategy corresponding to the CPU occupancy rate and the memory occupancy rate based on a preset relationship; The data storage strategy includes at least one of a storage data range and a sampling frequency, the size of the storage data range is negatively correlated with the CPU occupancy rate, the size of the storage data range is negatively correlated with the memory occupancy rate, the size of the sampling frequency is negatively correlated with the CPU occupancy rate, and the size of the storage data range is negatively correlated with the memory occupancy rate; An action module is used to store corresponding vehicle data based on the target processor and the target memory according to the data storage strategy.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.