Method and device for storing data through memory in vehicle driving process
By detecting the working status of two memories in the intelligent driving and intelligent cockpit system, determining the target memory, and switching to another memory for data storage when the memory is abnormal, the data loss problem caused by the inability to communicate directly by independent memory is solved, and data security is improved.
Patent Information
- Application Number
- CN202411712248.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-14
AI Technical Summary
The independent memory of the intelligent driving and the intelligent cockpit system cannot communicate directly, resulting in the loss of data in the corresponding system when a memory is abnormal, and in severe cases, the system may not be started.
By detecting the working status of two memories in the integrated circuit, determining the target memory, and storing the travel data through the target memory. When an abnormality occurs in one memory, the data is stored using the other memory.
Ensure the normal storage of driving data during vehicle driving, improve data security and avoid data loss problems caused by memory abnormalities.
Smart Images

Figure CN119621478A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to data storage technology, and in particular to a method and device for storing data via a memory during vehicle driving. Background Art
[0002] In the field of intelligent driving, current intelligent driving and smart cockpits use operating systems including two system-level chips (SoCs) respectively. The storage devices corresponding to intelligent driving and smart cockpits are respectively set in different system-level chips and stored independently. The two system-level chips cannot communicate directly. When the memory in one system-level chip is abnormal, it will cause data loss of the corresponding system. Summary of the invention
[0003] In order to solve the above technical problems, the present disclosure is proposed. The embodiments of the present disclosure provide a method and device for storing data in a memory during vehicle driving.
[0004] According to one aspect of an embodiment of the present disclosure, a method for storing data in a memory during vehicle driving is provided, comprising:
[0005] Detecting a first working state of a first memory in the integrated circuit during vehicle driving, the first memory being used to store first driving data in a first preset mode that the integrated circuit needs to process;
[0006] Detecting a second working state of a second memory in the integrated circuit during the driving of the vehicle, the second memory being used to store second driving data in a second preset mode that the integrated circuit needs to process;
[0007] Based on the first working state and the second working state, determining a target memory from the first memory and the second memory;
[0008] The first driving data and the second driving data are stored in the target memory.
[0009] According to another aspect of an embodiment of the present disclosure, there is provided a device for storing data in a memory during vehicle driving, comprising:
[0010] A first state detection module, used for detecting a first working state of a first memory in the integrated circuit during vehicle driving, the first memory being used for storing first driving data in a first preset mode to be processed by the integrated circuit;
[0011] A second state detection module, used for detecting a second working state of a second memory in the integrated circuit during the driving of the vehicle, the second memory being used for storing second driving data in a second preset mode to be processed by the integrated circuit;
[0012] a memory determination module, which determines a target memory from the first memory and the second memory based on the first working state determined by the first state detection module and the second working state determined by the second state detection module;
[0013] A data storage module is used to store the first driving data and the second driving data in a target memory determined by the memory determination module.
[0014] According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the storage medium stores a computer program for executing the method of storing data through a memory during vehicle driving as described in any embodiment.
[0015] According to another aspect of the embodiments of the present disclosure, an electronic device is provided, the electronic device comprising:
[0016] processor;
[0017] a memory for storing instructions executable by the processor;
[0018] The processor is used to read the executable instructions from the memory and execute the instructions to implement the method of storing data through the memory during vehicle driving as described in any embodiment.
[0019] Based on the method and device for storing data through a memory during vehicle driving provided by the above-mentioned embodiments of the present disclosure, the working states of the first memory and the second memory in the integrated circuit are detected, and the target memory for storing the first driving data and the second driving data is determined according to the working states of the two memories. When one of the memories is abnormal, all driving data can be stored based on the other memory, thereby ensuring the normal storage of driving data during vehicle driving and improving the safety of driving data during vehicle driving.
[0020] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the embodiments of the present disclosure in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. In the drawings, the same reference numerals generally represent the same components or steps.
[0022] Figure 1is a schematic structural diagram of a dual memory storage system in an integrated circuit provided by an exemplary embodiment of the present disclosure;
[0023] Figure 2 It is a flowchart of a method for storing data through a memory during vehicle driving provided by an exemplary embodiment of the present disclosure;
[0024] Figure 3a is a schematic structural diagram of a dual memory storage system in an integrated circuit provided by another exemplary embodiment of the present disclosure;
[0025] Figure 3b It is a flowchart of determining a target storage in a method for storing data through a storage during vehicle driving provided by another exemplary embodiment of the present disclosure;
[0026] Figure 4 It is a flowchart of data storage in a method for storing data through a memory during vehicle driving provided by another exemplary embodiment of the present disclosure;
[0027] Figure 5a It is a flowchart of determining a storage address in a method for storing data through a memory during vehicle driving provided by another exemplary embodiment of the present disclosure;
[0028] Figure 5b It is a flowchart of determining an address segment in a method for storing data through a memory during vehicle driving provided by another exemplary embodiment of the present disclosure;
[0029] Figure 6 It is a schematic diagram of a flow chart of determining a spatial address in a method for storing data through a memory during vehicle driving provided by yet another exemplary embodiment of the present disclosure;
[0030] Figure 7 is a schematic structural diagram of a device for storing data through a memory during vehicle driving provided by an exemplary embodiment of the present disclosure;
[0031] Figure 8 is a schematic structural diagram of a device for storing data through a memory during vehicle driving provided by another exemplary embodiment of the present disclosure;
[0032] Figure 9a is a structural schematic diagram of an address determination unit in a device for storing data through a memory during vehicle driving provided by another exemplary embodiment of the present disclosure;
[0033] Figure 9b It is a structural schematic diagram of an address segment unit in a device for storing data through a memory during vehicle driving provided by another exemplary embodiment of the present disclosure;
[0034] Fig.9c is a structural schematic diagram of an address segment unit in a device for storing data through a memory during vehicle driving provided by another exemplary embodiment of the present disclosure;
[0035] Figure 9d is a structural schematic diagram of an address segment unit in a device for storing data through a memory during vehicle driving provided by another exemplary embodiment of the present disclosure;
[0036] Fig.10 is a structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0037] To explain the present disclosure, example embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure. It should be understood that the present disclosure is not limited to the example embodiments described herein.
[0038] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
[0039] The disclosed embodiments can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.
[0040] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.
[0041] Application Overview
[0042] In the process of implementing the present disclosure, the inventors discovered that the existing intelligent driving and smart cockpit correspond to two independent memories respectively, and the two memories cannot communicate directly. When an abnormality occurs in one memory, it will cause data loss of the corresponding system. In severe cases, the system may fail to start, that is, the intelligent driving system or the smart cockpit system cannot be used. In extreme scenarios, the vehicle may be unable to drive.
[0043] Exemplary Systems
[0044] Figure 1 FIG. 1 is a schematic diagram of a dual memory storage system in an integrated circuit provided by an exemplary embodiment of the present disclosure. Figure 1 As shown, in the vehicle application scenario, before the storage protection function is started, the memory A in the integrated circuit is used to store the driving data corresponding to the intelligent driving, and the memory B is used to store the driving data corresponding to the intelligent cockpit.
[0045] Optionally, memory A and memory B have the same structure, both including system partitions and data partitions; wherein memory A includes a system A partition and a data A partition (there may actually be multiple partitions, and different types of data can be stored through different partitions, which is only illustrated in the figure), and memory B includes a system B partition and a data B partition (there may actually be multiple partitions, and different types of data can be stored through different partitions, which is only illustrated in the figure).
[0046] In addition, in order to store the driving data corresponding to the smart cockpit when an abnormality occurs in the memory B, the memory A supports the storage protection function. When the storage protection function is activated, the system B partition in the memory A is activated, and the data B partition in the memory A is determined according to the system B partition; wherein, the system B partition has been burned into the memory A at the factory, but only when the system B partition is started, the data B partition is determined, and the driving data corresponding to the smart cockpit is stored based on the data B partition; the system B partition in the memory A can be the smallest storage set that supports the startup of the smart cockpit.
[0047] Similar to memory A, memory B already has system B partition and system A partition when leaving the factory. When the system A partition is started, the data A partition in memory B is determined based on the system A partition, and the driving data corresponding to the intelligent driving is stored based on the data A partition. The system A partition in memory B can be the smallest storage set that supports the startup of intelligent driving.
[0048] The storage system provided in the embodiment of the present disclosure has a control for the storage system protection function. According to the control (for example, according to the control of instructions received from the outside), the protection function is in different states, and the enabling states corresponding to the memory A and the memory B are also different; optionally, the protection function includes three states: 1. Off state: In this state, the system B partition in the memory A is not started, and the system A partition in the memory B is not started. Regardless of whether the memory abnormality occurs, the memory A is only used to store the driving data corresponding to the intelligent driving, and the memory B is only used to store the driving data corresponding to the intelligent cockpit. 2. Automatic enabling status: When one memory state is abnormal, the system partition in another memory is started through the protection function. For example, when the state of memory B is abnormal, the system B partition in memory A is started, and whether to start the data B partition in memory A (used to store the driving data corresponding to the smart cockpit) is determined according to the free storage space in memory A. When the free storage space of memory A is large, the data B partition is started, and when the free storage space of memory A is insufficient, the data B partition will not be started, and the storage of the driving data corresponding to the smart driving is mainly used, that is, the driving data corresponding to the smart cockpit will not be stored, and the driving data of the smart cockpit will not be able to be read and written (the smart cockpit can be started normally, and user-defined operations may be affected). 3. Forced enabling state: When a memory state is abnormal, the system partition in another memory is started through the protection function. For example, when the memory B state is abnormal, the system B partition in the memory A is started, and the data B partition is started. The data B partition is directly determined in the free storage space of the memory A according to the storage capacity required by the data B partition. When the free storage space of the memory A is insufficient, the less important part of the data in the data A partition (driving data corresponding to the intelligent driving) is automatically deleted (the data can be sorted according to their importance, and the data with the lowest importance is deleted) to release the storage space required by the data B partition.
[0049] Exemplary Methods
[0050] Figure 2 FIG. 1 is a flow chart of a method for storing data in a memory during vehicle driving provided by an exemplary embodiment of the present disclosure. This embodiment can be applied in an integrated circuit, such as Figure 2 As shown, the following steps are included:
[0051] Step 202, detecting a first working state of a first memory in an integrated circuit during driving of a vehicle.
[0052] The first memory is used to store first driving data in a first preset mode that the integrated circuit needs to process.
[0053] Among them, the integrated circuit in this embodiment can be a system-on-chip (System on Chip, SoC for short), also known as a system on chip. Optionally, in this embodiment, the integrated circuit can be a vehicle-mounted SoC, in which a first memory is integrated. The memory is also called a memory chip, which is a memory component used to store programs and various data information. Optionally, the memory involved in the embodiment of the present disclosure can be an embedded multimedia card (Embedded Multi Media Card, eMMC), universal flash storage (Universal Flash Storage, UFS), solid state drive (Solid State Drive, SSD), etc., or it can be a NAND flash memory (Nand Flash) used for active backup, etc. Among them, the first working state can be abnormal or normal. Optionally, the first driving data is the corresponding data generated by the vehicle driving in the first preset mode (intelligent driving mode), such as route information, images, videos, etc.; in addition, optionally, under the premise of user authorization, the first driving data can also include user-related information, such as user habit information, user image information, etc.
[0054] Step 204 , detecting a second working state of a second memory in the integrated circuit during the driving of the vehicle.
[0055] The second memory is used to store second driving data in a second preset mode that the integrated circuit needs to process.
[0056] Optionally, the types of the first memory and the second memory may be the same or different, for example, both are RAM, etc. In one embodiment, the first memory and the second memory may be integrated in different integrated circuits, or in the same integrated circuit; for example, the first memory is integrated in the SoC corresponding to the intelligent driving, and the second memory is integrated in the SoC corresponding to the intelligent cockpit; for another example, the first memory corresponds to the intelligent driving working mode of the vehicle SoC, and the second memory corresponds to the intelligent cockpit working mode of the vehicle SoC. Among them, the second working state can be abnormal or normal. Optionally, the second driving data is the corresponding data generated by the vehicle driving in the second preset mode (intelligent cockpit mode), such as route information, images, videos, etc.; in addition, optionally, under the premise of user authorization, the second driving data may also include user-related information, such as user habit information, user image information, etc.
[0057] There is no specific order for executing the above steps 202 and 204 , and they can be executed simultaneously or one after the other.
[0058] In some optional examples, the first working state and the second working state can be detected during the startup phase of the storage system. For example, if it is detected that the intelligent driving system cannot be started normally, it can be determined that the first working state of the first memory is abnormal; or, if it is detected that the intelligent cockpit system cannot be started normally, it can be determined that the second working state of the second memory is abnormal. In other optional examples, after the storage system is started (when both the intelligent driving and the intelligent cockpit can be started, it means that the corresponding system partitions are normal), it is possible to monitor whether the data read and write functions can be performed normally. For example, when data cannot be read and written in the intelligent cockpit, it means that the data storage space of the second memory is damaged, which is reflected in the abnormality of the second working state.
[0059] Step 206: determine a target memory from the first memory and the second memory based on the first working state and the second working state.
[0060] The first working state and the second working state are independent of each other, do not affect each other, and can be the same or different.
[0061] Optionally, the target memory may be at least one of the first memory and the second memory; for example, when the first working state is abnormal and the second working state is normal, the second memory is used as the target memory; when the second working state is abnormal and the first working state is normal, the first memory is used as the target memory; when the first working state and the second working state are both normal, the first memory and the second memory are used as the target memories.
[0062] Step 208: Store the first driving data and the second driving data in a target memory.
[0063] In this embodiment, in the target memory, the first driving data and the second driving data are stored independently without interfering with each other; for example, when the target memory is one memory (the first memory or the second memory), the first driving data and the second driving data can be stored independently by dividing the memory into different storage spaces; for another example, when the target memory is two memories, the first driving data and the second driving data are stored separately based on the two memories to ensure that the first driving data and the second driving data are stored independently.
[0064] Optionally, in the disclosed embodiment, when an abnormality occurs in one memory and the other memory is used as the target memory, the dual memory storage system further includes a communication module for sending a prompt message to at least one preset terminal (e.g., a user's mobile phone, computer, cloud, etc.) to notify the user that there is a memory damage problem. For example, a prompt message that the memory needs to be repaired or replaced is sent through the user interface (UI) of the vehicle's central control screen, so that the memory damage can be handled in a timely manner. Optionally, if Figure 3aAs shown, in Figure 1 The provided dual-memory storage system also includes a communication module C, through which communication (wireless or wired, for example, mobile network, Bluetooth, etc.) is communicated with at least one external preset terminal D (a scenario of multiple preset terminals is shown in the figure, but those skilled in the art should understand that the present disclosure can also be applied to a scenario of one preset terminal), and prompt information is sent to at least one preset terminal D.
[0065] The above-mentioned embodiment of the present disclosure provides a method for storing data through a memory during vehicle driving. The working states of the first memory and the second memory in the integrated circuit are detected, and the target memory for storing the first driving data and the second driving data is determined according to the working states of the two memories. When one of the memories is abnormal, all driving data can be stored based on the other memory, thereby ensuring the normal storage of driving data during vehicle driving and improving the safety of driving data during vehicle driving.
[0066] like Figure 3b As shown in the above Figure 2 Based on the illustrated embodiment, step 206 may include the following steps:
[0067] Step 2061, determining the relationship between the first working state and the preset working state, and determining the relationship between the second working state and the preset working state.
[0068] Optionally, the preset working state is abnormal or normal. For example, the preset working state is abnormal, which means that the corresponding memory cannot work normally under the preset working state; for another example, the preset working state is normal, which means that the corresponding memory can perform data storage normally under the preset working state.
[0069] Step 2062: If the relationship between the first working state and the preset working state satisfies the first relationship, and the relationship between the second working state and the preset working state satisfies the second relationship, determine the second memory as the target memory.
[0070] Optionally, it may also include determining the first memory as the target memory if the relationship between the first working state and the preset working state satisfies the second relationship, and the relationship between the second working state and the preset working state satisfies the first relationship.
[0071] In this embodiment, the first relationship and the second relationship represent opposite relationships. For example, the first relationship represents the same, and the corresponding second relationship represents different. The determination of the first relationship is related to the preset working state. When the preset working state is abnormal, the first relationship is the same, and the second relationship is different; when the preset working state is normal, the first relationship is different, and the second relationship is the same.
[0072] This embodiment compares the first working state and the second working state with the preset working state to achieve that when one of the working states in the first memory and the second memory is abnormal, the other memory is used as the target memory to store the first driving data and the second driving data, so that the driving data during the vehicle driving process can always be saved and is not affected by the working state of individual memories, thereby ensuring the normal storage of the driving data during the vehicle driving process and improving the safety of the driving data during the vehicle driving process.
[0073] like Figure 4 As shown in the above Figure 2 Based on the illustrated embodiment, step 208 may include the following steps:
[0074] Step 2081: Determine the first storage address segment and the second storage address segment respectively corresponding to the first storage space and the second storage space in the second memory.
[0075] The first storage address segment does not overlap with the second storage address segment.
[0076] Optionally, this embodiment uses the second memory as the target memory for illustration, and when the first memory is used as the target memory, the corresponding operations can be understood with reference to the second memory (for example, determining the first storage space in the first memory and the first storage space and the second storage address segment corresponding to each other). It is only necessary to replace the second memory with the first memory, and it will not be repeated in this embodiment and subsequent embodiments.
[0077] In this embodiment, when the second memory is used as the target memory to store the first driving data and the second driving data, independent first storage space and second storage space are determined based on non-overlapping first storage address segments and second storage address segments, so as to facilitate the storage of independent first driving data and second driving data.
[0078] Step 2082: Store the first driving data in the first storage space, and store the second driving data in the second storage space.
[0079] In this embodiment, when one memory is used to store driving data under two preset modes, by dividing the storage space into a first storage space and a second storage space with non-overlapping address segments, independent storage of the first driving data and the second driving data in the same memory is achieved, that is, the storage problem of the corresponding driving data when the state of one memory is abnormal is solved, and at the same time, the independence of the corresponding driving data under the two preset modes is guaranteed, thereby improving the reading and writing accuracy of the driving data.
[0080] like Figure 5a As shown in the above Figure 4Based on the illustrated embodiment, step 2081 may include the following steps:
[0081] Step 501: respectively start the first system partition and the second system partition in the second memory.
[0082] Among them, the first system partition corresponds to the first preset mode, and the second system partition corresponds to the second preset mode; since the first preset mode corresponds to the first driving data and the second preset mode corresponds to the second driving data, the first storage space determined based on the first system partition is used to store the first driving data, and the second storage space determined based on the second system partition is used to store the second driving data.
[0083] Step 502: Determine a first storage address segment corresponding to a first storage space and a second storage address segment corresponding to a second storage space in a second memory according to the first system partition and the second system partition respectively.
[0084] Optionally, the first system partition and the second system partition are already burned into the second memory when the second memory leaves the factory. When the first system partition is started, a minimum storage space that satisfies the first driving data storage is determined in the second memory (over the air (OTA) upgrade may not be supported) so that the second memory can store the first driving data in free space on the basis of satisfying the second driving data storage function, thereby ensuring the normal reading and writing functions of the driving data corresponding to the intelligent driving, and ensuring the normal storage of the driving data during vehicle driving.
[0085] In addition, when the storage system protection function is in different states, the first storage space can be determined in different ways. For example, when the protection function is in the automatic enabling state, the first storage space is determined only when the free space in the second storage meets the required capacity of the first storage space, and when the free space in the second storage is less than the required capacity of the first storage space, the first storage space is not determined. Figure 5b As shown in the above Figure 5a Based on the illustrated embodiment, step 502 may include the following steps:
[0086] Step 5021: Determine a first storage capacity corresponding to the first storage space and a second storage capacity corresponding to the second storage space according to the first system partition and the second system partition, respectively.
[0087] Optionally, due to the limited storage space of the second memory, when the first driving data and the second driving data need to be stored simultaneously, in order to ensure the normal storage of the second driving data, the space occupied by the first system partition in the second memory can be reduced, thereby ensuring the operation of the second system partition in the second memory and the storage of the second driving data. In addition, in order to ensure that after the first system partition is started, the intelligent driving can read and write data by using the first data partition in the second memory, at least the operation of the intelligent driving function needs to be guaranteed, that is, in some optional examples, the storage space occupied by the first system partition in the second memory is the minimum space value for starting the first preset mode.
[0088] In this embodiment, the first system partition is set within the minimum space value for starting the first preset mode. On the premise of starting the first preset mode, the space occupied by the first system partition in the second memory is minimized, so that when the protection function is turned on, the first driving data can be stored in the second memory while ensuring the storage of the second driving data. This solves the problem of storing the corresponding driving data after an error in a memory in the storage system occurs.
[0089] Step 5022: Determine a start address of the first storage space and an end address of the first storage space based on the first storage capacity.
[0090] Optionally, after determining the first storage capacity based on the first system partition, in order to obtain a first storage space corresponding to the first storage capacity, an arbitrary address can be used as the starting address in the second memory, and the first storage capacity can be accumulated from the starting address to obtain the corresponding end address, or the end address can be determined first, and then the corresponding start address can be determined according to the first storage capacity; for example, the last storage address in the second memory is used as the end address of the first storage space, and the start address is determined by the end address and the first storage capacity.
[0091] Step 5023: Determine a first storage address segment corresponding to the first storage space based on the start address of the first storage space and the end address of the first storage space.
[0092] Optionally, all addresses between the start address and the end address may constitute a first storage address segment corresponding to the first storage space, and based on the first storage address segment, the first driving data may be stored and read and write operations on the first driving data may be received.
[0093] Step 5024: Determine the start address of the second storage space and the end address of the second storage space based on the second storage capacity.
[0094] Since the second memory is only used to store the second driving data before executing the protection function, after the first storage address segment is determined, it can be considered that all remaining addresses in the second memory correspond to the second storage space. In addition, in this embodiment, the second storage space can be determined first, and then the first storage space can be determined, or the first storage space and the second storage space can be determined at the same time; the starting address corresponding to the second storage space can be any address in the second memory, and the corresponding end address can be determined by accumulating the second storage capacity from the starting address. For example, the initial storage address in the second memory is used as the starting address of the second storage space, and the end address is determined by the starting address and the second storage capacity.
[0095] Step 5025: Determine a second storage address segment corresponding to the second storage space based on the start address of the second storage space and the end address of the second storage space.
[0096] Optionally, all addresses between the start address and the end address may constitute a second storage address segment corresponding to the second storage space, and the second driving data may be stored based on the second storage address segment and read and write operations on the second driving data may be received.
[0097] In this embodiment, the execution order between step 5022 and step 5023 and step 5024 and step 5025 is not limited by the present disclosure. Step 5022 and step 5023 may be executed first, and then step 5024 and step 5025; or, step 5024 and step 5025 may be executed first, and then step 5022 and step 5023; or, step 5022 and step 5023 and step 5024 and step 5025 may be executed simultaneously.
[0098] This embodiment determines the positions of the first storage space and the second storage space in the second memory through storage capacity and address, and realizes that the first storage space and the second storage space are independently allocated in corresponding address segments in the second memory, providing space for storing the first driving data in the second memory; and based on the first storage address segment and the second storage address segment, the first driving data and the second driving data from different sources are stored in the same memory, and independent data reading and writing operations are realized based on the first storage address segment and the second storage address segment.
[0099] like Figure 6 As shown, based on the embodiment shown in FIG. 5 above, step 5022 may include the following steps:
[0100] Step 601: determine the storage capacity of a first free space in the storage space of a second memory where no data is stored.
[0101] When it is necessary to occupy the second memory to store the first driving data originally stored in the first memory, it is first necessary to obtain free space corresponding to the first storage capacity in the second memory to provide a basis for subsequent determination to store the first driving data. Therefore, it is necessary to determine the storage capacity of the first free space in the second memory that currently does not store data.
[0102] Step 602: According to the relationship between the storage capacity of the first free space and the first storage capacity, the second memory is controlled to delete part of the stored data to obtain a second free space.
[0103] Optionally, if the storage capacity of the first free space is greater than or equal to the first storage capacity, the start address of the first storage space and the end address of the first storage space are determined directly based on the first free space. In this case, the start address of the first free space is used as the start address of the first storage space, and the end address is determined by the start address and the first storage capacity.
[0104] Optionally, if the storage capacity of the first free space is smaller than the first storage capacity, the priority corresponding to the data stored in the second memory is determined; part of the data is deleted according to the priority to obtain the second free space.
[0105] When there is insufficient free space in the second memory, in order to still store the first driving data to realize the data reading and writing function of intelligent driving, this embodiment deletes some of the data with lower priority stored in the second memory to obtain more free space, wherein the priority of the data can be preset according to the application scenario, and the same data may have different priorities in different application scenarios. For example, route information has a higher priority in the intelligent driving scenario, but a lower priority in the intelligent cockpit scenario. Optionally, the stored data in the second memory is sorted by priority (from low to high, or from high to bottom), and the data with the lowest priority is deleted in order to obtain the second free space.
[0106] Step 603: Determine a start address of the first storage space and an end address of the first storage space based on the first free space and the second free space.
[0107] Optionally, the capacity of the second free space is determined according to the difference between the first storage capacity and the storage capacity of the first free space, and therefore, the sum of the storage capacities of the first free space and the second free space corresponds to the first storage capacity. Optionally, if the addresses of the first free space and the second free space are continuous, the starting address of the continuous address can be used as the starting address of the first storage space, and the ending address of the continuous address can be used as the ending address of the first storage space. If the addresses of the first free space and the second free space are not continuous, multiple start addresses and multiple end addresses can be determined for the first storage space. For example, when the first free space is a continuous address segment and the second free space is also a continuous address segment, the start address of the first free space is used as a start address of the first storage space, and the end address of the first free space is used as an end address of the first storage space; the start address of the second free space is used as another start address of the first storage space, and the end address of the second free space is used as another end address of the first storage space; the first storage space consisting of two continuous address segments can be obtained; for another example, when the first free space and / or the second free space are multiple continuous address segments, multiple start addresses and end addresses can be determined for the first storage space based on the multiple continuous address segments.
[0108] This embodiment ensures the storage and reading and writing functions of the first driving data without losing important data by deleting some of the data with lower priority stored in the second memory.
[0109] In some embodiments of the present disclosure, a third memory may be further included. When an error occurs in either the first memory or the second memory, the third memory and the other memory are used as target memories.
[0110] The capacity of the third memory is smaller than that of the first memory and the second memory. In an optional example, when an error occurs in the first memory, the third memory and the second memory are used as target memories, and the first driving data is stored in the third memory, or, when an error occurs in the second memory, the third memory and the first memory are used as target memories, and the second driving data is stored in the third memory; in order to realize these functions, it is necessary to burn the first system partition and the second system partition in the third memory when the third memory leaves the factory, and set the first system partition within the minimum space value for starting the first preset mode, and set the second system partition within the minimum space value for starting the second preset mode. Under the premise that the first preset mode or the second preset mode can be started, the capacity of the third memory is compressed to the maximum extent, and by reducing the capacity of the third memory, the data backup of the abnormal memory can be completed with a smaller space cost.
[0111] Any method for storing data through a memory during vehicle driving provided by the embodiments of the present disclosure can be executed by any appropriate device with data processing capabilities, including but not limited to: terminal devices and servers, etc. Alternatively, any method for storing data through a memory during vehicle driving provided by the embodiments of the present disclosure can be executed by a processor, such as the processor executing any method for storing data through a memory during vehicle driving mentioned in the embodiments of the present disclosure by calling the corresponding instructions stored in the memory. This will not be repeated below.
[0112] Exemplary Devices
[0113] Figure 7 is a schematic diagram of a structure of a device for storing data through a memory during vehicle driving provided by an exemplary embodiment of the present disclosure. The device provided by the present disclosure may be implemented by a chip disposed in an integrated circuit or a chip independent of the integrated circuit, such as Figure 7 As shown, the device provided in this embodiment includes:
[0114] The first state detection module 71 is used to detect a first working state of a first memory in the integrated circuit during the driving of the vehicle.
[0115] The first memory is used to store first driving data in a first preset mode that the integrated circuit needs to process.
[0116] The second state detection module 72 is used to detect the second working state of the second memory in the integrated circuit during the driving process of the vehicle.
[0117] The second memory is used to store second driving data in a second preset mode that the integrated circuit needs to process.
[0118] The memory determination module 73 determines a target memory from the first memory and the second memory based on the first working state determined by the first state detection module and the second working state determined by the second state detection module.
[0119] The data storage module 74 is used to store the first driving data and the second driving data in the target storage determined by the storage determination module.
[0120] The above-mentioned embodiment of the present disclosure provides a device for storing data through a memory during vehicle driving. The working status of the first memory and the second memory in the integrated circuit is detected, and the target memory for storing the first driving data and the second driving data is determined according to the working status of the two memories. When one of the memories is abnormal, all the driving data can be stored based on the other memory, thereby ensuring the normal storage of the driving data during vehicle driving and improving the safety of the driving data during vehicle driving.
[0121] Figure 8 FIG. 1 is a schematic diagram of a structure of a device for storing data through a memory during vehicle driving provided by another exemplary embodiment of the present disclosure. Figure 8 As shown, in the implementation of the present disclosure, the memory determination module 73 includes:
[0122] The relationship determining unit 731 is used to determine the relationship between the first working state and the preset working state, and to determine the relationship between the second working state and the preset working state.
[0123] The target determination unit 732 is used to determine the second memory as the target memory if the relationship between the first working state and the preset working state satisfies the first relationship, and the relationship between the second working state and the preset working state satisfies the second relationship.
[0124] The target determination unit 732 is further configured to determine the first memory as the target memory if the relationship between the first working state and the preset working state satisfies the second relationship, and the relationship between the second working state and the preset working state satisfies the first relationship.
[0125] like Figure 8 As shown, in the implementation of the present disclosure, the data storage module 74 includes:
[0126] The address determination unit 741 is used to determine the first storage address segment and the second storage address segment corresponding to the first storage space and the second storage space in the second memory, or to determine the first storage address segment and the second storage address segment corresponding to the first storage space and the second storage space in the first memory.
[0127] The first storage address segment does not overlap with the second storage address segment.
[0128] The independent storage unit 742 is used to store the first driving data through the first storage space and store the second driving data through the second storage space.
[0129] Figure 9a FIG. 1 is a schematic diagram of the structure of an address determination unit in a device for storing data through a memory during vehicle driving provided by another exemplary embodiment of the present disclosure. Figure 9a As shown, the address determination unit 741 includes:
[0130] The partition startup unit 91 is used to respectively start the first system partition and the second system partition in the second memory; or respectively start the first system partition and the second system partition in the first memory, wherein the storage space occupied by the first system partition in the second memory is smaller than the storage space occupied by the second system partition.
[0131] Optionally, the storage space occupied by the first system partition in the second memory is a minimum space value for starting the first preset mode.
[0132] Correspondingly, the storage space occupied by the second system partition in the first memory is smaller than the storage space occupied by the first system partition. Optionally, the storage space occupied by the second system partition in the first memory is the minimum space value for starting the second preset mode.
[0133] The address segment unit 92 is used to determine the first storage address segment corresponding to the first storage space in the second memory and the second storage address segment corresponding to the second storage space according to the first system partition and the second system partition respectively; or, determine the first storage address segment corresponding to the first storage space in the first memory and the second storage address segment corresponding to the second storage space according to the first system partition and the second system partition respectively.
[0134] Figure 9b FIG. 1 is a schematic diagram of the structure of an address segment unit in a device for storing data through a memory during vehicle driving provided by another exemplary embodiment of the present disclosure. Figure 9b As shown, the address segment unit 92 includes:
[0135] The storage capacity determining unit 921 is used to determine a first storage capacity corresponding to the first storage space and a second storage capacity corresponding to the second storage space according to the first system partition and the second system partition, respectively.
[0136] The first storage space determination unit 922 is used to determine the start address and the end address of the first storage space based on the first storage capacity; based on the start address and the end address of the first storage space, determine the first storage address segment corresponding to the first storage space.
[0137] The second space determination unit 923 is used to determine the start address and the end address of the second storage space based on the second storage capacity; based on the start address of the second storage space and the end address of the second storage space, determine the second storage address segment corresponding to the second storage space.
[0138] Fig.9c FIG. 1 is a schematic diagram of the structure of an address segment unit in a device for storing data through a memory during vehicle driving provided by another exemplary embodiment of the present disclosure. Fig.9c As shown, the first storage space determining unit 922 in the address segment unit 92 includes:
[0139] The first free space determining unit 9221 is configured to determine the storage capacity of a first free space in the storage space of the second memory that does not store data.
[0140] The second free space determining unit 9222 is used to control the second memory to delete part of the stored data according to the relationship between the storage capacity of the first free space and the first storage capacity, so as to obtain the second free space.
[0141] Optionally, the second free space determining unit 9222 is specifically configured to determine the priority corresponding to the data stored in the second memory if the storage capacity of the first free space is smaller than the first storage capacity; and delete part of the data according to the priority to obtain the second free space.
[0142] The first storage space combining unit 9223 is used to determine the start address of the first storage space and the end address of the first storage space based on the first free space and the second free space.
[0143] Figure 9d FIG. 1 is a schematic diagram of the structure of an address segment unit in a device for storing data through a memory during vehicle driving provided by another exemplary embodiment of the present disclosure. Figure 9d As shown, the second space determination unit 923 in the address segment unit 92 includes:
[0144] The third free space determining unit 9231 is configured to determine the storage capacity of a first free space in the storage space of the first memory where no data is stored.
[0145] The fourth free space determining unit 9232 is used to control the first memory to delete part of the stored data according to the relationship between the storage capacity of the first free space and the first storage capacity, so as to obtain the second free space.
[0146] Optionally, the fourth free space determining unit 9232 is specifically configured to determine the priority corresponding to the data stored in the first memory if the storage capacity of the first free space is smaller than the second storage capacity; and delete part of the data according to the priority to obtain the second free space.
[0147] The second space combining unit 9233 is used to determine the start address of the second storage space and the end address of the second storage space based on the first free space and the second free space.
[0148] The beneficial technical effects corresponding to the exemplary embodiment of the present device can be found in the corresponding beneficial technical effects of the above exemplary method section, which will not be repeated here.
[0149] Exemplary Electronic Devices
[0150] Fig.10 A structural diagram of an electronic device provided in an embodiment of the present disclosure includes at least one processor 11 and a memory 12.
[0151] The processor 11 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 10 to perform desired functions.
[0152] The memory 12 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 11 may execute one or more computer program instructions to implement the method of storing data through the memory during vehicle driving in the various embodiments of the present disclosure described above and / or other desired functions.
[0153] In one example, the electronic device 10 may further include: an input device 13 and an output device 14, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0154] The input device 13 may also include, for example, a keyboard, a mouse, etc.
[0155] The output device 14 can output various information to the outside, and may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0156] Of course, to simplify, Fig.10 Only some of the components related to the present disclosure in the electronic device 10 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 10 may also include any other appropriate components.
[0157] Exemplary computer program products and computer-readable storage media
[0158] In addition to the above-mentioned methods and devices, embodiments of the present disclosure may also provide a computer program product, including computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method for storing data through a memory during vehicle driving in various embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section.
[0159] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0160] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the method of storing data through a memory during vehicle driving in various embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section.
[0161] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium is, for example, but not limited to, a system, device or device including electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0162] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and cannot be considered as necessary for each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, rather than limitation, and the above details do not limit the present disclosure to being implemented by adopting the above specific details.
[0163] Those skilled in the art may make various changes and modifications to the present disclosure without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the present disclosure claims and their equivalents, the present disclosure is also intended to include these modifications and variations.
Claims
1. A method for storing data in a memory during vehicle driving, comprising: Detecting a first working state of a first memory in the integrated circuit during vehicle driving, the first memory being used to store first driving data in a first preset mode that the integrated circuit needs to process; Detecting a second working state of a second memory in the integrated circuit during the driving of the vehicle, the second memory being used to store second driving data in a second preset mode that the integrated circuit needs to process; Based on the first working state and the second working state, determining a target memory from the first memory and the second memory; The first driving data and the second driving data are stored in the target memory.
2. The method according to claim 1, wherein determining a target memory from the first memory and the second memory based on the first working state and the second working state comprises: Determining a relationship between the first working state and a preset working state, and determining a relationship between the second working state and the preset working state; If the relationship between the first working state and the preset working state satisfies a first relationship, and the relationship between the second working state and the preset working state satisfies a second relationship, the second memory is determined as the target memory.
3. The method according to claim 2, wherein storing the first driving data and the second driving data in the target memory comprises: Determine a first storage address segment and a second storage address segment respectively corresponding to the first storage space and the second storage space in the second memory, wherein the first storage address segment does not overlap with the second storage address segment; The first driving data is stored in the first storage space, and the second driving data is stored in the second storage space.
4. The method according to claim 3, wherein determining the first storage address segment and the second storage address segment corresponding to the first storage space and the second storage space in the second memory, respectively, comprises: respectively starting the first system partition and the second system partition in the second memory; A first storage address segment corresponding to the first storage space and a second storage address segment corresponding to the second storage space in the second memory are determined according to the first system partition and the second system partition respectively.
5. The method according to claim 4, wherein determining, according to the first system partition and the second system partition, a first storage address segment corresponding to the first storage space in the second memory and a second storage address segment corresponding to the second storage space comprises: Determine, according to the first system partition and the second system partition, a first storage capacity corresponding to the first storage space and a second storage capacity corresponding to the second storage space; Based on the first storage capacity, determining a start address of the first storage space and an end address of the first storage space; Determining a first storage address segment corresponding to the first storage space based on a start address of the first storage space and an end address of the first storage space; Based on the second storage capacity, determining a start address of the second storage space and an end address of the second storage space; Based on the start address of the second storage space and the end address of the second storage space, a second storage address segment corresponding to the second storage space is determined.
6. The method according to claim 5, wherein determining the start address of the first storage space and the end address of the first storage space based on the first storage capacity comprises: Determining the storage capacity of a first free space in the storage space of the second memory where no data is stored; According to the relationship between the storage capacity of the first free space and the first storage capacity, controlling the second memory to delete part of the stored data to obtain a second free space; Based on the first free space and the second free space, a start address of the first storage space and an end address of the first storage space are determined.
7. The method according to claim 6, wherein the step of controlling the second memory to delete part of the stored data to obtain the second free space according to the relationship between the storage capacity of the first free space and the first storage capacity comprises: If the storage capacity of the first free space is smaller than the first storage capacity, determining the priority corresponding to the data stored in the second memory; The portion of data is deleted according to the priority level to obtain the second free space.
8. According to the method of any one of claims 4 to 7, the storage space occupied by the first system partition in the second memory is smaller than the storage space occupied by the second system partition.
9. According to the method of any one of claims 4 to 8, the storage space occupied by the first system partition in the second memory is a minimum space value for starting the first preset mode.
10. A device for storing data in a memory during vehicle driving, comprising: A first state detection module, used for detecting a first working state of a first memory in the integrated circuit during vehicle driving, the first memory being used for storing first driving data in a first preset mode to be processed by the integrated circuit; A second state detection module, used for detecting a second working state of a second memory in the integrated circuit during the driving of the vehicle, the second memory being used for storing second driving data in a second preset mode to be processed by the integrated circuit; a memory determination module, which determines a target memory from the first memory and the second memory based on the first working state determined by the first state detection module and the second working state determined by the second state detection module; A data storage module is used to store the first driving data and the second driving data in a target memory determined by the memory determination module.
11. A computer-readable storage medium storing a computer program, wherein the computer program is used to execute the method for storing data through a memory during vehicle driving as described in any one of claims 1 to 9.
12. An electronic device, comprising: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method for storing data through the memory during vehicle driving as described in any one of claims 1-9 above.