Data storage method, data storage device, vehicle device and storage medium

By dividing the recorded data into trigger data and status data, and allocating storage space in the embedded controller, the problem of storage space utilization of the embedded software controller on the on-board controller is solved, efficient data recording and management are achieved, and improved Improves storage space utilization and real-time performance.

CN114415936BActive Publication Date: 2024-10-18BEIJING AUTOMOBILE RES GENERAL INST
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111466987.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-03
Publication Date
2024-10-18
Estimated Expiration
2041-12-03

AI Technical Summary

Technical Problem

Due to performance limitations, embedded software controllers cannot effectively perform file management, which leads to the problem of rationally utilizing storage space to achieve local data recording on the vehicle-mounted controller.

Method used

The payload of recorded data is divided into trigger data and status data, and the random access memory space is divided into status information units and integrated data units. When a trigger event occurs, relevant data is extracted to form target data and saved to the integrated data unit. , reduce useless information records and make full use of storage space.

Benefits of technology

It achieves efficient recording and management of vehicle operating data within limited storage space, reduces resource consumption, and improves the real-time performance and utilization of data storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114415936B_ABST
    Figure CN114415936B_ABST
Patent Text Reader

Abstract

The present application discloses a data storage method, a data storage device, a vehicle device and a storage medium. The data storage method includes: dividing the effective load in the recorded data into trigger data and status data; dividing the random access memory space into a status information unit and an integrated data unit, the status information unit is used to store the status data; when a trigger event occurs, extracting the status data related to the real-time trigger data of the trigger event from the status information unit as associated status data; integrating the real-time trigger data and the associated status data to form target data; and saving the target data into the integrated data unit. In the data storage method of the present application, the effective load of the recorded data is classified, and the random access memory space storing the recorded data is classified. When a trigger event occurs, the status data is extracted to be combined with the trigger data to integrate the recorded data related to the trigger source and store them in the corresponding unit, thereby reducing the occupation of the random access memory space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the development of automotive electronic technology, the number of on-board controllers continues to increase. In order to debug and analyze vehicle driving problems, on-board controllers have gradually added data logging functions to record software running under some unconventional operations. However, for some embedded software controllers that are still in large quantities, they are limited by their own performance and cannot implement high-capability operating systems to perform file management to record data. Therefore, how to reasonably use storage space on such devices to achieve simple, easy-to-manage and resource-saving local data recording has become a problem to be solved. Summary of the invention

[0003] Embodiments of the present application provide a data storage method, a data storage device, a vehicle device, and a storage medium.

[0004] The data storage method in the embodiment of the present application includes:

[0005] The effective load in the recorded data is divided into trigger data and status data;

[0006] Dividing the random access memory space into a state information unit and an integrated data unit, wherein the state information unit is used to store the state data;

[0007] When a trigger event occurs, extracting state data related to the real-time trigger data of the trigger event from the state information unit as associated state data;

[0008] integrating the real-time trigger data and the associated state data to form target data;

[0009] The target data is saved in the integrated data unit.

[0010] In the data storage method of the present application, the effective load of the recorded data is classified, and the space of the random access memory storing the recorded data is classified, so that when a trigger event occurs, the associated status data corresponding to the real-time trigger data can be extracted from the status information unit storing the status data, and then the two can be combined to form the target data and stored in the integrated data unit, thereby reducing the recording of a large amount of useless information and making full use of the space of the random access memory.

[0011] In certain embodiments, the data storage method comprises:

[0012] When the data storage amount of the state information unit exceeds the reserved space, the earliest state data stored in the reserved space is deleted.

[0013] In certain embodiments, the data storage method comprises:

[0014] The timestamp when the triggering event occurs is recorded, and the timestamp is saved in the integrated data unit, wherein the timestamp is associated with the target data.

[0015] In certain embodiments, the data storage method comprises:

[0016] encoding a trigger source that generates the trigger event;

[0017] The code of the trigger source is saved in the integrated data unit, and the code of the trigger source is associated with the target data.

[0018] In some embodiments, the data storage method further comprises:

[0019] The target data stored in the integrated data unit is written into a storage device.

[0020] In some embodiments, writing the target data stored in the integrated data unit into a storage device includes:

[0021] When the data storage capacity of the integrated data unit exceeds the reserved space, the target data is written into a storage device.

[0022] In some embodiments, writing the target data stored in the integrated data unit into a storage device includes:

[0023] When the vehicle machine device is about to go into sleep mode, the target data is written into the storage device.

[0024] In some embodiments, writing the target data stored in the integrated data unit into a storage device includes:

[0025] In the event of a vehicle collision, the target data is written to the storage device.

[0026] The present application provides a data storage device, the data storage device comprising:

[0027] A first classification module, used for classifying the effective load in the recorded data into trigger data and status data;

[0028] A second classification module, used for dividing the random access memory space into a state information unit and an integrated data unit, wherein the state information unit is used for storing the state data;

[0029] an extraction module, configured to extract, when a trigger event occurs, state data related to the real-time trigger data of the trigger event from the state information unit as associated state data;

[0030] An integration module, used for integrating the real-time trigger data and the associated state data to form target data;

[0031] A saving module is used to save the target data into the integrated data unit.

[0032] The embodiment of the present application provides a vehicle machine device, the vehicle machine device comprising:

[0033] A random access memory, wherein the random access memory is used to store target data;

[0034] a storage device, the storage device being used to store the target data written by the random access memory; and,

[0035] A processor is used to implement the data storage method in any of the above embodiments.

[0036] An embodiment of the present application provides a non-volatile computer-readable storage medium of computer-executable instructions. When the computer-executable instructions are executed by one or more processors, the processors execute the data storage method described in any of the above embodiments.

[0037] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0039] Figure 1 It is a flowchart of a data storage method in an embodiment of the present application;

[0040] Figure 2 is a schematic diagram of a module of a data storage device in an embodiment of the present application;

[0041] Figure 3 is a schematic diagram of a scenario in which a vehicle is installed with a vehicle machine device in an embodiment of the present application;

[0042] Figure 4 It is a schematic diagram of the composition of the recorded data in the implementation mode of the present application;

[0043] Figure 5is a schematic diagram of a random access memory in an embodiment of the present application storing target data in different ways;

[0044] Figure 6 It is a flowchart of a data storage method in an embodiment of the present application;

[0045] Figure 7 It is a flowchart of a data storage method in an embodiment of the present application;

[0046] Figure 8 It is a flowchart of a data storage method in an embodiment of the present application;

[0047] Fig. 9 It is a flowchart of a data storage method in an embodiment of the present application;

[0048] Fig.10 It is a flowchart of a data storage method in an embodiment of the present application;

[0049] Fig.11 It is a flowchart of a data storage method in an embodiment of the present application;

[0050] Fig.12 It is a flowchart of the data storage method in the implementation mode of the present application.

[0051] Description of main component symbols:

[0052] Vehicle 1000, vehicle machine device 100, random access memory 11, status information unit 111, integrated data unit 112, storage device 12, processor 13, data storage device 200, first classification module 21, second classification module 22, extraction module 23, integration module 24, storage module 25, recorded data 300, target data 31. DETAILED DESCRIPTION

[0053] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.

[0054] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0055] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection, or mutual communication; it can be a direct connection, or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0056] In the present application, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may include that the first and second features are in direct contact, or may include that the first and second features are not in direct contact but are in contact through another feature between them. Moreover, a first feature being "above", "above" and "above" a second feature includes that the first feature is directly above and obliquely above the second feature, or simply indicates that the first feature is higher in level than the second feature. A first feature being "below", "below" and "below" a second feature includes that the first feature is directly below and obliquely below the second feature, or simply indicates that the first feature is lower in level than the second feature.

[0057] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or reference letters in different examples, and this repetition is for the purpose of simplification and clarity, which itself does not indicate the relationship between the various embodiments and / or settings discussed. In addition, the various specific processes and material examples provided by the present application, but those of ordinary skill in the art can appreciate the application of other processes and / or the use of other materials.

[0058] See also Figure 1 , the embodiment of the present application provides a data storage method, wherein the data storage method comprises:

[0059] Step S10: dividing the effective load in the recorded data 300 into trigger data and status data;

[0060] Step S20: Divide the random access memory 11 space into a state information unit and an integrated data unit, wherein the state information unit is used to store state data;

[0061] Step S30: when a trigger event occurs, extracting state data related to the real-time trigger data of the trigger event from the state information unit as associated state data;

[0062] Step S40: Integrate the real-time trigger data and the associated state data to form target data 31;

[0063] Step S50: Save the target data 31 into the integrated data unit.

[0064] See also Figure 2 , the embodiment of the present application provides a data storage device 200. The data storage device 200 includes a first classification module 21, a second classification module 22, an extraction module 23, an integration module 24 and a storage module 25. Among them, the first classification module 21 is used to divide the effective load in the recorded data 300 into trigger data and state data; the second classification module 22 is used to divide the random access memory 11 space into a state information unit and an integrated data unit, and the state information unit is used to store state data; the extraction module 23 is used to extract the state data related to the real-time trigger data of the trigger event from the state information unit as the associated state data when the trigger event occurs; the integration module 24 is used to integrate the real-time trigger data and the associated state data to form the target data 31; the storage module 25 is used to save the target data 31 into the integrated data unit.

[0065] See also Figure 3The embodiment of the present application provides a vehicle device 100, which includes a random access memory 11, a storage device 12 and a processor 13. The random access memory 11 is used to store target data 31; the storage device 12 is used to save the target data 31 written by the random access memory 11.

[0066] The processor 13 is used to divide the payload in the recorded data 300 into trigger data and status data; and to divide the random access memory 11 space into a status information unit and an integrated data unit, the status information unit being used to store status data; and to extract status data related to the real-time trigger data of the trigger event from the status information unit as associated status data when a trigger event occurs; and to integrate the real-time trigger data and the associated status data to form target data 31; and to save the target data 31 into the integrated data unit.

[0067] In the data storage method of the present application, the effective load of the recorded data 300 is classified, and the space of the random access memory 11 storing the recorded data 300 is classified, so that when a trigger event occurs, the associated status data corresponding to the real-time trigger data can be extracted from the status information unit storing the status data, and then the two can be combined to form the target data 31 and stored in the integrated data unit. This reduces the recording of a large amount of useless information and makes full use of the space of the random access memory 11.

[0068] Specifically, the vehicle device 100 may include an ECU (Electronic Control Unit) controller, and may be a single-chip electronic controller, such as a driving controller. The vehicle device 100 may be installed on a vehicle 1000, which may be a truck, an off-road vehicle, a tractor, a car, a bus, etc., and may be a hybrid vehicle 1000, a new energy vehicle 1000, or a diesel and gasoline vehicle 1000 according to the power classification.

[0069] The vehicle device 100 may include a random access memory 11, namely RAM (Random Access Memory), which can record relevant data when the vehicle 1000 is driving; since the storage space of the random access memory 11 is limited, the vehicle device 100 may also include a storage device 12, which may be a non-volatile memory such as a flash memory or a hard disk. The random access memory 11 can write the saved data into the storage device 12 for storage, so as to avoid the loss of saved data when the vehicle 1000 faces unexpected events such as the vehicle device 100 being dormant or colliding.

[0070] It is understandable that in actual use of the vehicle 1000, it is inevitable to encounter errors or confusion in functional logic. Therefore, the vehicle device 100 is increasingly equipped with a data recording function to record the data of the software that has been running under some unconventional operations. For the vehicle device 100, the ability to record data is of great help to the development, test verification and problem analysis of the vehicle device 100, which can greatly shorten the development cycle and improve development efficiency; at the same time, the ability to record data also greatly reduces the time for actual vehicle inspection.

[0071] However, since the vehicle device 100 in the present application adopts a real-time operating system, it is limited by system performance and cannot use a file management method to record local data. In view of this, the present application proposes a data storage method that can reasonably utilize the storage space of the random access memory 11 and the storage device 12 in the vehicle device 100 to record local data, providing convenience for providing local data for problem analysis and troubleshooting.

[0072] In step S10-step S20, the recorded data 300 is the data stored in the random access memory 11 (RAM), or in other words, the recorded data 300 can be data packets, which are stored in the random access memory 11 in a certain format and are also written from the random access memory 11 to a storage device 12 such as a flash memory in the same format.

[0073] like Figure 4 As shown, Figure 4 The data format of the recorded data 300 is shown in FIG. 1 . In the present application, when the recorded data 300 is stored in the random access memory 11, the format of the recorded data 300 needs to be controlled within 16 bytes; further, the recorded data 300 can be divided into a data packet header (Message header) and a payload (Payload). The data packet header can provide simple information about the data in the data packet, which is convenient for simple and intuitive viewing, and can also be used to verify whether the data packet content is correct. The payload is the actual information to be transmitted in the data transmission, that is, the valid data. In the present application, the payload is further divided into trigger data and status data.

[0074] It can be understood that the trigger data can be the operating data of the relevant software installed on the vehicle 1000 recorded by the processor 13 when triggered by events such as door opening and closing, window lifting and lowering; that is to say, the trigger data is generally event-based trigger source information or the jump of certain key status information. For example, the trigger event of window raising includes the jump of the glass raising switch, the remote CAN (Controller Area Network) rising signal, etc., and the action of the door being opened or closed, etc.

[0075] The status data can be recorded based on the actual needs of recording, for example, the current vehicle speed can be recorded as status data, or the lighting status of the low beam, high beam and other lamps of the vehicle 1000 can be recorded as status data, or the current state of the door can be recorded as status data. This application does not make inherent restrictions on this, and the specific status data to be recorded can be determined according to the actual debugging needs.

[0076] The random access memory 11 space can be divided into a state information unit and an integrated data unit, wherein the state information unit can be used to store state data. The size of the state information unit can be allocated according to the amount of state data that the actual vehicle device 100 needs to record.

[0077] In steps S30-S50, the trigger event can be the actions mentioned above, such as window raising / lowering, door opening / closing, and light turning on / off. When the trigger event occurs, corresponding real-time trigger data will be generated. In the present application, the action for which relevant data needs to be recorded can be set as a trigger event. When the trigger event occurs, the processor 13 can extract the status data related to the real-time trigger data from the status information unit as the associated status data. It can be understood that the association relationship between the trigger data and the status data can be predetermined according to the actual debugging requirements; then, the processor 13 integrates the real-time trigger data and the associated status data to form the target data 31, and finally stores the target data 31 in the integrated data unit.

[0078] For example, in one embodiment, door status information, vehicle speed information, low beam lighting status information, etc. are set as status data that need to be recorded, and the above status data are stored in real time in the status information unit; when the window rising event is triggered, the corresponding glass rising switch, remote CAN signal, etc. change, that is, real-time trigger data is generated after the trigger source is actuated; the processor 13 extracts status data related to the real-time trigger data from the status information unit, that is, the door status information and the vehicle speed information are used as associated status data; then, the processor 13 integrates the real-time trigger data with the associated status data to form about 7 bytes of data stored in the integrated data unit. At this time, the format of the effective load of the recorded data 300 saved in the integrated data unit can be the real-time trigger data generated after the last trigger source action of the window, the door status information and the vehicle speed information, that is, the data stored in the integrated data unit can include the integration of the real-time trigger data generated after the trigger source action and the associated status data related to the real-time trigger data.

[0079] In this way, in the present application, real-time trigger data is only triggered and recorded when a trigger event occurs, and at the same time, the associated status data of the corresponding trigger source is extracted from the status data stored in the status information unit in a rolling manner, and the two are combined and stored in the integrated data unit to ensure the real-time nature of the target data 31 stored in the random access memory 11. At the same time, compared with the method of storing the target data 31 in a fixed format, the method of storing the target data 31 in the present method can make full use of the storage space in the random access memory 11.

[0080] Specifically, in one embodiment, Figure 5 As shown, Figure 5 The left figure in the figure shows a method of storing target data 31 in a fixed format. Figure 5 The right figure in the figure shows the method of storing the target data 31 in the floating format in the present method. For the convenience of explanation, in the method of storing the target data 31 in the fixed format, the space of the random access memory 11 is divided into four fields, namely field 1, field 2, field 3 and field 4; in the method of storing the target data 31 in the floating format, the space of the random access memory 11 is divided into a state information unit and an integrated data unit.

[0081] Since it is a fixed format, field 1 can only store the target data 31 when event 1 is triggered, field 2 can only store the target data 31 when event 2 is triggered, field 3 can only store the target data 31 when event 3 is triggered, and field 4 can only store the target data 31 when event 4 is triggered. It should be noted that the target data 31 corresponding to event 1 may include the trigger information and status information related to event 1. Figure 4 It is simply illustrated as event 1, state X (A, B, C...), and the target data 31 corresponding to event 2, event 3, etc. are in the same format.

[0082] However, when event 1 is triggered frequently, field 1 can be fully utilized and continuously refreshed and released with the frequent triggering; the triggering frequency of events 2, 3 and 4 is significantly lower than that of event 1, so that the target data 31 related to events 2, 3 and 4 cached in fields 2, 3 and 4 always exists, and because the saved target data 31 does not reach the maximum storage capacity under the field, fields 2, 3 and 4 cannot be released, and there is still a large amount of unused space when the space of fields 2, 3 and 4 is always occupied.

[0083] In the case of a floating format, the state information unit scrolls with state information, such as state A, state B, ..., state E, etc. It can be understood that each state may include multiple state data, for example, state A may be ECU schedule state information, and the ECU schedule state information may include door state information, vehicle speed state information, window state information, etc. Figure 4 The states A, B...E, etc. are only used for illustrative purposes and should not be understood as the target data 31 stored in the integrated data unit being a simple combination of states A, B...E and triggering events such as events 1, 2, 3 and 4.

[0084] When a trigger event occurs, the processor 13 extracts the associated state data corresponding to the trigger event from the state data, and then integrates the extracted associated state data with the real-time trigger data corresponding to the trigger event (here simply illustrated as event 1, event 2, etc.), and finally stores them in the integrated data unit. In this way, compared with the original real-time operating system, for a certain trigger event, a fixed address is opened in the random access memory 11 to store a certain data in a fixed manner, this method can reduce the occupation of the random access memory 11 resources, and avoid writing data to the storage device 12 multiple times, thereby reducing the life of the storage device 12.

[0085] See also Figure 6 In some embodiments, the data storage method may include:

[0086] Step S60: When the data storage amount of the state information unit exceeds the reserved space, the earliest state data stored in the reserved space is deleted.

[0087] In some embodiments, the data storage device 200 may include a deletion module, which may be configured to delete the earliest state data stored in the reserved space when the data storage amount of the state information unit exceeds the reserved space.

[0088] In some implementations, the processor 13 is configured to delete the earliest state data stored in the reserved space when the data storage amount of the state information unit exceeds the reserved space.

[0089] In this way, when no triggering event occurs, the state data stored in the reserved space can be automatically overwritten, that is, the cache of the state information unit is released, which plays a role in not occupying computing resources and improving the utilization rate of the reserved space.

[0090] Specifically, when the state information unit is opened in the random access memory 11, storage space can be reserved according to the amount of state information data that the vehicle device 100 needs to record. In particular, in the state information unit, a "first in, first out" rolling data storage method is adopted, that is, as in step S60, when the data storage amount of the state information unit exceeds the reserved space, the earliest state data stored in the reserved space is deleted.

[0091] For example, in one embodiment, the data volume of the ECU schedule status information per unit time is about 2KB, so when planning the status information unit, 20KB can be reserved to ensure that the ECU schedule status information can be stored in the status information unit with a certain amount of data; when the reserved space is completely occupied by the ECU schedule status information, the earliest saved ECU schedule status information is overwritten by the next ECU schedule status information stored in the reserved space, so that a certain amount of data forms a "rolling" operation in the reserved space. It should be noted that the ECU schedule status information can include a variety of status data, such as door status information, vehicle speed status information, window status information, etc. The above embodiment is only for exemplary description and cannot be understood as a limitation on the specific content of the status data.

[0092] In this way, by adopting the method of real-time rolling cache status data, when the relevant status data is useful, the related status data for a period of time before and after the trigger event can be stored in the integrated data unit, which is conducive to time-based analysis and troubleshooting; when no trigger event occurs, the earliest status data is automatically overwritten, the cache is released, computing resources are not occupied, and useless data is reasonably discarded, thereby improving the space utilization of the random access memory 11.

[0093] See also Figure 7 In some embodiments, the data storage method includes:

[0094] Step S70: Record the timestamp when the triggering event occurs, save the timestamp to the integrated data unit, and associate the timestamp with the target data 31.

[0095] In some embodiments, the storage module 25 is used to record the timestamp when the triggering event occurs, save the timestamp to the integrated data unit, and associate the timestamp with the target data 31.

[0096] In some embodiments, the processor 13 is used to record a timestamp when a triggering event occurs, save the timestamp to an integrated data unit, and associate the timestamp with the target data 31 .

[0097] In this way, the timestamp stored in the integrated data unit is associated with the integrated target data 31, which can reflect the time when the triggering event occurs, and is conducive to time-based analysis and troubleshooting.

[0098] Specifically, in step S70, each time a trigger event is triggered, the processor 13 records the timestamp at the moment, saves the timestamp in the integrated data unit, and associates it with the integrated target data 31. Specifically, in one embodiment, the recorded data 300 is a data packet, including a data packet header and a payload, so each time a trigger event is triggered, the processor 13 adds a timestamp and stores it in the data packet header of the recorded data 300. The payload corresponding to the data packet header is the corresponding integrated target data 31 after the trigger event is triggered, so the timestamp is associated with the target data 31.

[0099] In this way, the time when the triggering event corresponding to the target data 31 is triggered can be clearly known from the timestamp, which is convenient for checking and analyzing the target data 31; at the same time, it can also be verified whether the recorded data 300 is saved in chronological order.

[0100] See also Figure 8 , data storage methods include:

[0101] Step S80: Encode the trigger source that generates the trigger event;

[0102] Step S90: Save the code of the trigger source to the integrated data unit, and associate the code of the trigger source with the target data 31.

[0103] In some embodiments, the data storage device 200 may further include an encoding module, wherein the encoding module is used to encode the trigger source that generates the trigger event; the storage module 25 is used to store the code of the trigger source to the integrated data unit, and the code of the trigger source is associated with the target data 31.

[0104] In some embodiments, the processor 13 is used to encode a trigger source that generates a trigger event, and is used to save the code of the trigger source to the integrated data unit, and the code of the trigger source is associated with the target data 31.

[0105] In this way, it is possible to identify through coding which trigger source has generated a trigger event to generate the target data 31, thereby simply and accurately locating the trigger source, facilitating subsequent analysis and troubleshooting based on the trigger source.

[0106] Specifically, Figure 5 As shown, in the present application, the recorded data 300 is stored in a floating format, so that when the recorded data 300 is subsequently exported for analysis and troubleshooting, the trigger source that generates the trigger event cannot be determined according to the fixed field. Therefore, the trigger source that generates the trigger event can be encoded in step S80 so that each trigger source has a unique code, and then the unique code of the trigger source is saved to the integrated data unit in step S90, for example, it can be stored in the corresponding space of the integrated data unit as part of the data packet header of the recorded data 300.

[0107] In this way, after obtaining the recorded data 300, the trigger source that generates the trigger event can be determined by the code of the trigger source in the data packet header of the recorded data 300, so as to facilitate the location analysis of the problem based on the trigger source.

[0108] See also Fig. 9 In some embodiments, the data storage method further comprises:

[0109] Step S100 : writing the target data 31 stored in the integrated data unit into the storage device 12 .

[0110] In some embodiments, the data storage apparatus 200 further includes a writing module, and the writing module is used to write the target data 31 stored in the integrated data unit into the storage device 12 .

[0111] In some implementations, the processor 13 is configured to write the target data 31 stored in the integrated data unit into the storage device 12 .

[0112] In this way, it is convenient to store the target data 31 for a long time to locate, analyze and troubleshoot problems.

[0113] Specifically, the random access memory 11 in the vehicle device 100 is used as a storage medium for temporary data, and the data stored inside is volatile, that is, once the power is off, the stored data will be lost. Then, in order to preserve the target data 31 integrated with the real-time trigger data and the associated state data generated after the trigger source is activated for a long time, so as to facilitate the analysis of the target data 31, the vehicle device 100 is also equipped with a storage device 12 for long-term preservation of the target data 31 written by the processor 13 in step S100.

[0114] It is understood that the storage device 12 can be a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc. The storage device 12 mentioned in this application is mainly a flash memory. The storage device 12 needs to be a non-volatile memory, and the data stored in it is non-volatile and will not be lost when the power is off. In this way, the target data 31 can be stored in the storage device 12 for a long time to locate, analyze and troubleshoot problems.

[0115] See also Fig.10 In some embodiments, writing the target data 31 stored in the integrated data unit to the storage device 12 (step S100) may include:

[0116] Step S101 : when the data storage capacity of the integrated data unit exceeds the reserved space, write the target data 31 into the storage device 12 .

[0117] In some embodiments, the write module may be used to write the target data 31 into the storage device 12 when the data storage capacity of the integrated data unit exceeds the reserved space.

[0118] In some embodiments, the processor 13 may be configured to write the target data 31 into the storage device 12 when the data storage capacity of the integrated data unit exceeds the reserved space.

[0119] In this way, when the storage device 12 is a flash memory, when the data storage of the integrated data unit exceeds the reserved space, the target data 31 is written into the storage device 12, which can increase the number of erase and write times of the storage device 12 and extend the life of the storage device 12.

[0120] Specifically, when the storage device 12 is a flash memory, since the number of times the flash memory can be erased and written is limited, it is necessary to reasonably utilize the number of times the storage device 12 can be erased and written to maximize the storage space utilization of the storage device 12 .

[0121] Please refer again Figure 5 In the case of storing the target data 31 in a fixed format, it can be understood that when the cache of any field is full of the target data 31, the processor 13 needs to write the target data 31 stored in the field into the storage device 12. In this way, the number of times the storage device 12 is erased and written is increased, which greatly reduces the storage space utilization of the storage device 12 and also reduces the life of the storage device 12.

[0122] Then, when the target data 31 is stored in a floating format, through step S101, when the data storage capacity of the entire integrated data unit exceeds the reserved space, the target data 31 can be written to the storage device 12, thereby rationally utilizing the erase and write times of the storage device 12 and improving the utilization rate of the storage space of the storage device 12.

[0123] See also Fig.11 In some embodiments, writing the target data 31 stored in the integrated data unit to the storage device 12 (step S100) may include:

[0124] Step S102 : when the vehicle machine device 100 is about to enter sleep mode, the target data 31 is written into the storage device 12 .

[0125] In some implementations, the writing module may be used to write the target data 31 into the storage device 12 when the vehicle device 100 is about to go into sleep mode.

[0126] In some implementations, the processor 13 may be configured to write the target data 31 into the storage device 12 when the vehicle-mounted device 100 is about to enter sleep mode.

[0127] In this way, the target data 31 can be transferred to the storage device 12 in a timely manner for long-term storage, thereby improving the stability of data storage.

[0128] Specifically, the vehicle machine device 100 installed on the current vehicle 1000 generally needs long-term power supply. Therefore, the design and research of the vehicle machine device 100 often involves the direction of reducing the power consumption of the vehicle machine device 100. At present, the vehicle machine device 100 can enter the sleep state in the idle state. At this time, in order to avoid the loss of the target data 31 stored in the internal random access memory 11 due to the sleep of the vehicle machine device 100, the target data 31 can be written into the storage device 12 for long-term storage before the vehicle machine device 100 goes into sleep.

[0129] See also Fig.12 In some embodiments, writing the target data 31 stored in the integrated data unit to the storage device 12 (step S100) may include:

[0130] Step S103 : When the vehicle 1000 collides, the target data 31 is written into the storage device 12 .

[0131] In some embodiments, the writing module may be used to write the target data 31 to the storage device 12 in the event that the vehicle 1000 is involved in a collision.

[0132] In some embodiments, the processor 13 may be configured to write the target data 31 to the storage device 12 in the event that the vehicle 1000 is involved in a collision.

[0133] In this way, it is possible to avoid the loss of the target data 31 due to an accident that may cause the vehicle device 100 to stop working, thereby improving the security of storing the target data 31.

[0134] Specifically, it is easy to understand that the vehicle 1000 may have an accidental collision during driving. Under a slight or strong collision, the vehicle device 100 may be damaged or cause the vehicle device 100 to experience unexpected situations such as power failure, so that the vehicle device 100 is forced to stop working. Then, at this time, through step S103, once a collision event is detected, the processor 13 immediately writes the target data 31 stored in the current integrated data unit to the storage device 12, thereby improving the security of the storage of the target data 31 and avoiding the loss of the target data 31.

[0135] The embodiments of the present application provide a non-volatile computer-readable storage medium storing a computer program. When the computer program is executed by one or more processors 13, the processor 13 executes the data storage method of any of the above embodiments.

[0136] For example, when the computer program is executed by one or more processors 13, the processor 13 performs the following steps:

[0137] Step S10: dividing the effective load in the recorded data 300 into trigger data and status data;

[0138] Step S20: Divide the random access memory 11 space into a state information unit and an integrated data unit, wherein the state information unit is used to store state data;

[0139] Step S30: when a trigger event occurs, extracting state data related to the real-time trigger data of the trigger event from the state information unit as associated state data;

[0140] Step S40: Integrate the real-time trigger data and the associated state data to form target data 31;

[0141] Step S50: Save the target data 31 into the integrated data unit.

[0142] Specifically, in one embodiment, the vehicle machine device may further include a processor 13, which may be a central processing unit (CPU). The processor 13 may also be 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, or a combination of the above chips.

[0143] The computer program may be stored in a memory, which, as a non-transitory computer-readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions / modules corresponding to the methods in the above method embodiments. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions, and modules stored in the memory, that is, implementing the methods in the above method embodiments.

[0144] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the implemented program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.

[0145] In the description of this specification, the description with reference to the terms "one embodiment", "certain embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0146] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.

Claims

1. A data storage method, characterized in that: include: The effective load in the recorded data is divided into trigger data and status data; Dividing the random access memory space into a state information unit and an integrated data unit, wherein the state information unit is used to store the state data; When a trigger event occurs, extracting state data related to the real-time trigger data of the trigger event from the state data scrollingly stored in the state information unit as associated state data; integrating the real-time trigger data and the associated state data to form target data; The target data is saved in the integrated data unit in a floating format.

2. The data storage method according to claim 1, characterized in that: The data storage method comprises: When the data storage amount of the state information unit exceeds the reserved space, the earliest state data stored in the reserved space is deleted.

3. The data storage method according to claim 1, characterized in that: The data storage method comprises: The timestamp when the triggering event occurs is recorded, and the timestamp is saved in the integrated data unit, wherein the timestamp is associated with the target data.

4. The data storage method according to claim 1, characterized in that: The data storage method comprises: encoding a trigger source that generates the trigger event; The code of the trigger source is saved in the integrated data unit, and the code of the trigger source is associated with the target data.

5. The data storage method according to claim 1, characterized in that: The data storage method further comprises: The target data stored in the integrated data unit is written into a storage device.

6. The data storage method according to claim 5, characterized in that: Writing the target data stored in the integrated data unit into a storage device comprises: When the data storage capacity of the integrated data unit exceeds the reserved space, the target data is written into the storage device.

7. The data storage method according to claim 5, characterized in that: Writing the target data stored in the integrated data unit into a storage device comprises: When the vehicle machine device is about to go into sleep mode, the target data is written into the storage device.

8. The data storage method according to claim 5, characterized in that: Writing the target data stored in the integrated data unit into a storage device comprises: In the event of a vehicle collision, the target data is written to the storage device.

9. A data storage device, characterized in that: The data storage device comprises: A first classification module, used for classifying the effective load in the recorded data into trigger data and status data; A second classification module, used for dividing the random access memory space into a state information unit and an integrated data unit, wherein the state information unit is used for storing the state data; An extraction module, used for extracting, when a trigger event occurs, state data related to the real-time trigger data of the trigger event from the state data scrollingly stored in the state information unit as associated state data; An integration module, used for integrating the real-time trigger data and the associated state data to form target data; The saving module is used to save the target data in the integrated data unit in a floating format.

10. A vehicle machine device, characterized in that: include: A random access memory, wherein the random access memory is used to store target data; A storage device, the storage device is used to store the target data written by the random access memory; and, A processor, wherein the processor is used to execute the data storage method according to any one of claims 1 to 8.

11. A non-volatile computer-readable storage medium of computer-executable instructions, characterized in that: When the computer executable instructions are executed by one or more processors, the processors are caused to perform the data storage method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Log data storage method and device for application software, equipment and storage medium

    CN109491827A

  • Data storage device and method, black box, vehicle, controller and medium

    CN110232752A

  • Vehicle data recording method and equipment, and device and storage medium

    CN112330841A