Data flashing method and device, electronic equipment, vehicle and storage medium
By employing dynamic priority arbitration and single-channel resource contention strategies, the problem of low-performance ECUs being unable to achieve seamless OTA upgrades for the entire vehicle has been solved, enabling efficient vehicle software updates without increasing hardware costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-01
- Publication Date
- 2026-03-17
AI Technical Summary
Existing technologies cannot achieve seamless over-the-air (OTA) upgrades for the entire vehicle on low-performance, single-drive-channel ECUs, resulting in lengthy software update times.
By employing dynamic priority arbitration and single-channel resource contention strategies, and utilizing intermediate data storage space and non-volatile storage arrays, OTA service requests are prioritized, ensuring the efficient execution of the seamless upgrade process.
Without increasing hardware costs, seamless OTA upgrades for low-performance ECUs were achieved, shortening upgrade time and improving hardware resource utilization efficiency.
Smart Images

Figure CN121680875A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of OTA (Over The Air) software upgrade technology, and in particular to a data writing method, device, electronic device, vehicle, and storage medium. Background Technology
[0002] OTA technology has become a core capability of intelligent connected vehicles. Among them, seamless OTA upgrades can complete software updates in the background while the vehicle is in motion or parked, without requiring users to wait for a long time, which greatly improves the user experience and has become the focus of technological competition in the industry.
[0003] In related technologies, the mainstream solution for seamless OTA generally relies on high-performance domain controllers, such as smart cockpit domain controllers or smart driving domain controllers. These domain controllers typically adopt a hardware architecture with dual systems or multiple drive channels and are equipped with large-capacity memory. They complete the writing and verification of software packages in the backup partition, thereby achieving seamless switching.
[0004] However, the relevant technologies have failed to effectively solve the core problem of achieving seamless upgrades on resource-constrained ECUs, especially for low-performance nodes equipped with only a single-drive channel Nor Flash (non-volatile flash memory), which cannot achieve seamless OTA upgrades for the entire vehicle and urgently needs to be solved. Summary of the Invention
[0005] This application provides a data flashing method, apparatus, electronic device, vehicle, and storage medium to solve the problem that low-performance, single-drive-channel ECUs cannot achieve seamless OTA upgrades for the entire vehicle, breaking the dependence of seamless OTA on high-performance hardware and greatly improving the utilization efficiency of hardware resources.
[0006] To achieve the above objectives, a first aspect of this application proposes a data writing method, the method comprising the following steps: In the presence of a real-time data write request, it is determined whether an OTA service request has been received, wherein the real-time data write request and the OTA service request use the same driver channel; If the OTA service request is received, then the first priority of the OTA service request and the second priority of the real-time data write request are determined; When the first priority is higher than the second priority, the business data corresponding to the real-time data write request is cached in a preset intermediate data storage space, and the software package data corresponding to the OTA business request is written to the first non-volatile storage array using the driver channel. After the software package data is written, the business data is written to the second non-volatile storage array using the driver channel.
[0007] Based on the aforementioned technical means, the problem of low-performance, single-drive-channel ECUs being unable to achieve seamless OTA upgrades for the entire vehicle is solved through dynamic priority arbitration and single-channel resource competition strategies without increasing hardware costs.
[0008] To achieve the above objectives, a second aspect of this application provides a data apparatus, the apparatus comprising: The first judgment module is used to determine whether an OTA service request has been received when a real-time data write request exists, wherein the real-time data write request and the OTA service request use the same driver channel. The determining module is used to determine the first priority of the OTA service request and the second priority of the real-time data write request when the OTA service request is received; The processing module is configured to cache the business data corresponding to the real-time data write request to a preset intermediate data storage space when the first priority is higher than the second priority, and write the software package data corresponding to the OTA business request to a first non-volatile storage array using the driver channel, and write the business data to a second non-volatile storage array using the driver channel after the software package data is written.
[0009] Based on the aforementioned technical means, dynamic priority arbitration and single-channel resource competition strategies solve the problem that low-performance, single-drive-channel ECUs cannot achieve seamless OTA upgrades for the entire vehicle without increasing hardware costs.
[0010] To achieve the above objectives, a third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the data writing method as described in the above embodiments.
[0011] To achieve the above objectives, a fourth aspect of this application provides a vehicle including the electronic equipment described in the above embodiments.
[0012] To achieve the above objectives, a fifth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the data writing method as described in the above embodiments.
[0013] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0014] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart of a data writing method provided according to an embodiment of this application; Figure 2 This is a schematic diagram of the logic structure of a single-chip memory control system according to an embodiment of this application; Figure 3 A schematic diagram of a single-channel resource contention strategy according to an embodiment of this application; Figure 4 This is a block diagram of a data writing device provided according to an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application. Detailed Implementation
[0015] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0016] The following describes, with reference to the accompanying drawings, a data writing method, apparatus, electronic device, vehicle, and storage medium according to embodiments of this application. First, the data writing method according to embodiments of this application will be described with reference to the accompanying drawings.
[0017] Figure 1 This is a flowchart of a data writing method according to an embodiment of this application.
[0018] Before introducing the data writing method proposed in the embodiments of this application, let's briefly introduce the relevant technical background.
[0019] Currently, seamless OTA (Over-The-Air) upgrade technology is highly sought after, but due to high hardware costs, this function can only be implemented in a few high-performance domain controller nodes (such as IDC (Intelligent Domain Controller), ADC (Autonomous Driving Controller), and 5G TBOX (5th Generation Telematics Box). However, the number of Electronic Control Units (ECUs) with OTA capabilities in a vehicle typically exceeds 30. If only a few nodes support seamless upgrades, while the vast majority still rely on traditional upgrade methods, the vehicle-wide software update process remains time-consuming and cannot fundamentally shorten the upgrade time perceptible to users.
[0020] Therefore, a truly seamless upgrade should aim to achieve seamless and coordinated updates of all ECU nodes in the vehicle, keeping the overall upgrade time within 3 minutes, so that users can complete the system update during short stops or daily driving without having to wait.
[0021] To achieve this goal, this application proposes a data flashing method that, through dynamic priority arbitration and a single-channel resource contention strategy, solves the problem of low-performance, single-drive-channel ECUs being unable to achieve seamless OTA upgrades for the entire vehicle without increasing hardware costs. This application overcomes the limitations of hardware architecture, enabling seamless flashing of ordinary ECUs, CAN (Controller Area Network), and ETH (Ethernet) nodes. This application no longer relies on expensive dual-system hardware; even in a single-system architecture, backup area writing can be completed during vehicle operation, providing an efficient and cost-effective path for seamless vehicle-level upgrades.
[0022] Next, the data writing method proposed in the embodiments of this application will be described in detail.
[0023] It should be noted that this data writing method is applied to single-chip memory control systems, such as... Figure 2As shown, the single-chip storage control system has a single drive channel (Driver, drive interface), which is the "unique data channel" between the MCU (Microcontroller Unit) and the Nor flash chip. OTA applications, APP application 1, APP application 2, etc., can all write data to the Nor flash chip through this physical interface. However, at any given time, this drive channel can only support data writing operations for one application. To achieve seamless flashing in this single-chip storage control system, the Nor flash chip can be divided into a data area and a code area. The code area is further divided into a currently running partition (i.e., partition A) and a backup partition (i.e., partition B). The data area stores dynamic data generated after the program runs, which is frequently written and updated by the application during runtime. The code area stores the program itself, i.e., firmware or software code, which is usually only modified during OTA upgrades. The currently running partition in the code area is the partition where the currently running system code resides, and the backup partition in the code area is the partition where the backup code (i.e., the new version) is located. Furthermore, a dedicated SRAM (Static Random-Access Memory) cache can be planned within the MCU of the single-chip storage control system as a pre-defined intermediate data storage space. This cache is used to temporarily store data from other application software packages received from external sources (such as CAN, Ethernet, etc.) during OTA (Over-The-Air) seamless upgrades. Its capacity can be calculated based on the amount of data generated within the maximum expected write cycle (e.g., 30 minutes). Actual testing shows that an SRAM capacity of 8-10MB is sufficient to meet the data temporary storage requirements in this scenario. The single-chip storage control system also includes an NVM (Non-Volatile Memory) storage module. This module serves as the intelligent core and scheduling hub of the entire system. Its functions go far beyond simple data storage. It can also prioritize data write requests from business applications. Normally, OTA applications are given the highest priority. Only when there is urgent data that must be written immediately can its priority surpass that of the OTA task. Thus, under the hardware limitations of a single drive channel, the NVM storage module ensures that high-priority data is not lost and achieves reliable execution of OTA seamless writing by intelligently arbitrating, scheduling, and managing multiple data write requests.
[0024] For example, such as Figure 1 As shown, the data writing method includes the following steps: In step S101, if a real-time data write request exists, it is determined whether an OTA service request has been received. The real-time data write request and the OTA service request use the same driver channel.
[0025] As can be understood, real-time data write requests refer to data recording requests continuously or intermittently generated by the ECU during normal operation, reflecting vehicle status and user interaction. Real-time data refers to various dynamic business data that needs to be written to the NorFlash data area, with the goal of ensuring the normal operation of vehicle functions and the persistence of vehicle status. OTA service requests refer to an occasional, resource-intensive system-level update task, essentially writing to the NorFlash backup partition (such as...). Figure 2 The complete software package data (shown in partition B) is intended to update the application or firmware of the ECU itself. Both requests are made through the same hardware driver channel (such as...). Figure 2 The system transmits and processes data using the driver shown. Since this driver channel is a shared resource, the system needs to coordinate and respond to OTA service requests in a reasonable manner while ensuring the timeliness and integrity of real-time data writing, so as to avoid transmission conflicts or service abnormalities caused by resource contention.
[0026] Specifically, during the continuous operation of a single-chip storage control system, there will always be real-time data write requests. To achieve seamless OTA (Over-The-Air) updates on a single drive channel, an NVM (Non-Virtual Machine) storage module can be used to continuously detect whether higher-level events, i.e., OTA service requests, are occurring. This ensures that the system responds promptly to the important task of OTA upgrades, rather than always processing only regular data (i.e., real-time data). This is the "switch" that initiates the entire seamless OTA upgrade process.
[0027] In step S102, if an OTA service request is received, the first priority of the OTA service request and the second priority of the real-time data write request are determined.
[0028] Specifically, once the NVM storage module detects an OTA service request, the single-chip storage control system can compare the priority of the current OTA service request (i.e., the first priority) with the priority of the current real-time data write request (i.e., the second priority) according to preset priority rules (the NVM storage module can assign a priority to each possible data write task request; higher-priority tasks can jump the queue or interrupt lower-priority tasks). In other words, in this embodiment, the NVM storage module does not allow OTA to unconditionally preempt resources, but rather makes judgments based on rules, leaving room for handling complex scenarios (such as higher-priority urgent data).
[0029] In step S103, if the first priority is higher than the second priority, the business data corresponding to the real-time data write request is cached in a preset intermediate data storage space, and the software package data corresponding to the OTA business request is written to the first non-volatile storage array using the driver channel. After the software package data is written, the business data is written to the second non-volatile storage array using the driver channel.
[0030] Specifically, when the priority of the current OTA service request (i.e., first priority) is higher than the priority of the current real-time data write request (i.e., second priority), the single drive channel needs to be prioritized for the current OTA service request. To address this, the single-chip storage control system can redirect the service data that would normally be written to Nor Flash to a temporary area, namely a pre-defined intermediate data storage space (e.g., ...). Figure 2 The SRAM shown decouples the real-time data stream from the OTA task, changing their relationship from "competitive" to "sequential". After the business data corresponding to the real-time data write request is properly placed, the drive channel is completely released and can be used to write the software package data corresponding to the OTA business request to the first non-volatile storage array, i.e., the backup partition (e.g., SRAM). Figure 2 Partition B shown (e.g.) Figure 2 The serial number shown (Route). Due to the absence of frequent read / write switching disturbances, the OTA process can be performed most efficiently, significantly reducing the total time required to complete the entire software package write, achieving seamless write operation. After the software package data write is complete (i.e., the OTA task is complete), the driver channel will be used again to perform data synchronization tasks, safely writing all business data temporarily stored in the preset intermediate data storage space to the data area (i.e., the second non-volatile storage array) (e.g., ...). Figure 2 The serial number shown (Route). This ensures the integrity and persistence of all data, and no data will be lost due to caching.
[0031] This demonstrates that intelligent data scheduling maximizes the utilization of a single hardware driver channel on the timeline, satisfying the need for seamless flashing of large OTA software packages while ensuring the integrity and real-time performance of critical business data.
[0032] Furthermore, in some embodiments, when writing the software package data corresponding to the OTA service request to the first non-volatile storage array using the driver channel, the method further includes: determining whether there is a data write request that meets a preset emergency condition; if there is a data write request that meets the preset emergency condition, pausing the software package data writing process, and using the driver channel to write the data corresponding to the data write request that meets the preset emergency condition to the second non-volatile storage array.
[0033] In other words, during the process of writing OTA software package data to the code backup area (i.e., the first non-volatile storage array) using the driver channel, the system does not exclusively occupy resources but is in a standby state that can be interrupted by high-priority events. Specifically, the system continuously monitors and determines whether there are data write requests that meet preset emergency conditions (e.g., data that must be persisted immediately, such as vehicle collision warnings or critical fault code records). These data write requests that meet preset emergency conditions have a higher priority than OTA service requests. Once such a high-priority data write request is generated, the system will immediately initiate an interruption response process: suspending the currently ongoing large-block software package data writing process and forcibly switching the use of the driver channel to the high-priority application that issued the request. Subsequently, the emergency data is written to the data area (the second non-volatile storage array) using the driver channel, ensuring that critical information is not lost. After the writing of data that meets the preset emergency conditions is completed, control of the driver channel will be released, and the system scheduling mechanism will automatically resume the previously interrupted OTA software package writing process, continuing execution from its breakpoint, thereby ultimately completing the seamless upgrade task while ensuring the highest system security.
[0034] Therefore, when a vehicle experiences an emergency such as a collision warning or serious malfunction, the relevant data can immediately seize resources and be persistently stored, eliminating the risk of losing critical security data due to OTA flashing blockage. Through a dynamic and interruptible task management strategy, a single drive channel can simultaneously serve occasional seamless upgrade needs and sudden vehicle safety needs, achieving a level of protection that was previously only available in multi-channel systems on resource-constrained hardware.
[0035] Optionally, in some embodiments, the above data writing method further includes: determining whether a preset sleep command has been received; if a preset sleep command has been received, determining whether the drive channel has completed all data writing operations and whether the service data cached in the preset intermediate data storage space has been written to the second non-volatile storage array; if the drive channel has completed all data writing operations and the service data cached in the preset intermediate data storage space has been written to the second non-volatile storage array, then generating a power-down command; and sending the power-down command to the vehicle power management module, causing the vehicle power management module to perform a power-down operation.
[0036] Specifically, during the data writing process, if the vehicle's electronic system needs to transition from normal operation to low-power or complete power-off mode, the power management module can send a preset sleep command to the NVM storage module. Upon receiving the preset sleep command, to ensure the persistence of all critical data and prevent data loss, the single-chip storage control system can pause receiving new data write requests (i.e., notify the application that it no longer has write permissions) and immediately perform the following status checks: First, it checks whether the drive channel has completed all currently ongoing data write operations; second, it confirms whether all temporarily stored business data in the preset intermediate data storage space (SRAM) has been written to the data area (second non-volatile memory array). Only when both conditions are met—that is, the NVM storage module has completed writing the current data request and the SRAM cache data has been written to the Nor flash—will the single-chip storage control system generate the final power-down command and send it to the vehicle power management module, notifying it that the power-down operation can be performed.
[0037] Therefore, by constructing a secure hibernation channel, it can be ensured that even if a hibernation signal is received during OTA flashing or data writing, all critical data can be saved before power-off. This not only ensures the integrity of user data and upgrade progress, but also achieves truly reliable, seamless flashing process management.
[0038] Furthermore, in some embodiments, before writing data to the first non-volatile storage array or the second non-volatile storage array, the method further includes: sending an authorization request to the storage control unit, wherein the authorization request includes the data size, data type, and target write partition; if an authorization response is received from the storage control unit based on the authorization request, a data write instruction is generated based on the authorization response to write data to the first non-volatile storage array or the second non-volatile storage array based on the data write instruction.
[0039] Specifically, such as Figure 3As shown, before any data (whether it's OTA software package or real-time business data) is written to Nor Flash, a handshake (i.e., sending a permission confirmation request) can be established with the storage control unit (i.e., the NVM storage module) of the single-chip storage control system. The purpose is to inform the NVM storage module in advance of the key information of this write operation (i.e., data size, data type, and target write partition) to provide a basis for its decision. After receiving the permission confirmation request, the NVM storage module analyzes the key information (i.e., data size, data type, and target write partition) and can return an authorization response (essentially a "permit to write" or "wait / deny" instruction). Only after receiving the "permit to write" authorization response will the APP application (the requester) formally generate a real-time data write request or OTA business request. At this time, the drive channel will be activated to write the data to the designated first non-volatile storage array or second non-volatile storage array.
[0040] Therefore, through the initial handshake and authorization, the single-chip storage control system can plan write tasks in advance, avoiding unnecessary waiting or repeated attempts. For example, when the drive channel is busy, the NVM storage module can directly make the requester wait or add it to the queue, instead of letting it blindly retry, thereby optimizing the system process and improving overall efficiency.
[0041] Furthermore, in some embodiments, after determining the first priority of the OTA service request and the second priority of the real-time data write request, the method further includes: if the first priority is lower than the second priority, then the service data is written to the second non-volatile storage array first using a preset driving channel.
[0042] In other words, if the first priority of an OTA service request is lower than the second priority of a real-time data write request—for example, if the current real-time data write request meets a preset urgent condition—the single-chip storage control system will immediately execute the high-priority data write operation. That is, it will first write the business data corresponding to the real-time data write request to the second non-volatile storage array and place the OTA service request in a waiting state, ensuring that critical data is stored promptly and reliably. Furthermore, under normal circumstances without OTA service requests, the data path for the APP application to write to the data area can be as follows: Figure 2 The serial number in As shown.
[0043] This ensures that system resources are always used for the highest priority tasks. In scenarios where urgent data needs to be written, it can decisively interrupt and postpone the OTA upgrade process to prioritize vehicle safety and the integrity of critical data. Afterward, it can intelligently resume the interrupted task, achieving a balance between security and functional integrity.
[0044] According to the data writing method proposed in this application, when a real-time data write request exists, if an OTA service request is received, a first priority of the OTA service request and a second priority of the real-time data write request are determined. When the first priority is higher than the second priority, the service data corresponding to the real-time data write request is first cached in a preset intermediate data storage space, and then the software package data corresponding to the OTA service request is written to the first non-volatile storage array using the drive channel. After the software package data is written, the service data is written to the second non-volatile storage array using the drive channel. Thus, through dynamic priority arbitration and a single-channel resource contention strategy, the problem of low-performance, single-drive-channel ECUs being unable to achieve seamless OTA upgrades for the entire vehicle is solved without increasing hardware costs. This breaks the dependence of seamless OTA on high-performance hardware and greatly improves the utilization efficiency of hardware resources.
[0045] Next, the data writing apparatus proposed according to the embodiments of this application is described with reference to the accompanying drawings.
[0046] Figure 4 This is a block diagram of a data writing device according to an embodiment of this application.
[0047] like Figure 4 As shown, the data writing device 10 includes: a first judgment module 100, a determination module 200, and a processing module 300.
[0048] The first judgment module 100 is used to determine whether an OTA service request has been received when there is a real-time data write request. The real-time data write request and the OTA service request use the same driver channel. The determination module 200 is used to determine the first priority of the OTA service request and the second priority of the real-time data write request when an OTA service request is received. The processing module 300 is used to cache the business data corresponding to the real-time data write request to a preset intermediate data storage space when the first priority is higher than the second priority, and write the software package data corresponding to the OTA business request to the first non-volatile storage array using the driver channel, and write the business data to the second non-volatile storage array using the driver channel after the software package data is written.
[0049] Optionally, in some embodiments, when writing the software package data corresponding to the OTA service request to the first non-volatile storage array using the drive channel, the processing module 300 is further configured to: Determine if there are any data write requests that meet the preset emergency conditions; If a data write request that meets the preset emergency conditions exists, the data writing process of the software package is paused, and the data corresponding to the data write request that meets the preset emergency conditions is written to the second non-volatile storage array using the driver channel.
[0050] Optionally, in some embodiments, the data writing device 10 described above further includes: The second judgment module is used to determine whether a preset sleep command has been received; The third judgment module is used to determine whether the drive channel has completed the writing of all data and whether the business data cached in the preset intermediate data storage space has been written to the second non-volatile storage array when a preset sleep command is received. The generation module is used to generate a power-down command when all data writing operations are completed in the drive channel and the business data cached in the preset intermediate data storage space has been written to the second non-volatile storage array. The sending module is used to send a power-down command to the vehicle power management module, so that the vehicle power management module can perform a power-down operation.
[0051] Optionally, in some embodiments, before writing data to the first non-volatile memory array or the second non-volatile memory array, the processing module 300 is further configured to: Send a permission confirmation request to the storage control unit, wherein the permission confirmation request includes the data size, data type and target write partition; If the storage control unit receives an authorization response based on the permission confirmation request, a data write instruction is generated based on the authorization response to write data to the first non-volatile memory array or the second non-volatile memory array.
[0052] Optionally, in some embodiments, after determining the first priority of the OTA service request and the second priority of the real-time data write request, the determining module 200 is further configured to: When the first priority is lower than the second priority, the business data is written to the second non-volatile storage array first using the preset driving channel.
[0053] It should be noted that the explanation of the aforementioned data writing method embodiment also applies to the data writing device of this embodiment, and will not be repeated here.
[0054] According to the data writing device proposed in this application embodiment, when a real-time data write request exists, if an OTA service request is received, a first priority of the OTA service request and a second priority of the real-time data write request are determined. When the first priority is higher than the second priority, the service data corresponding to the real-time data write request is first cached in a preset intermediate data storage space, and then the software package data corresponding to the OTA service request is written to the first non-volatile storage array using the drive channel. After the software package data is written, the service data is written to the second non-volatile storage array using the drive channel. Thus, through dynamic priority arbitration and a single-channel resource contention strategy, the problem of low-performance, single-drive-channel ECUs being unable to achieve seamless OTA upgrades for the entire vehicle is solved without increasing hardware costs. This breaks the dependence of seamless OTA on high-performance hardware and greatly improves the utilization efficiency of hardware resources.
[0055] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include: The memory 501, the processor 502, and the computer program stored on the memory 501 and capable of running on the processor 502.
[0056] When the processor 502 executes the program, it implements the data writing method provided in the above embodiments.
[0057] Furthermore, electronic devices also include: Communication interface 503 is used for communication between memory 501 and processor 502.
[0058] The memory 501 is used to store computer programs that can run on the processor 502.
[0059] The memory 501 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage.
[0060] If the memory 501, processor 502, and communication interface 503 are implemented independently, then the communication interface 503, memory 501, and processor 502 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0061] Optionally, in a specific implementation, if the memory 501, processor 502, and communication interface 503 are integrated on a single chip, then the memory 501, processor 502, and communication interface 503 can communicate with each other through an internal interface.
[0062] The processor 502 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of this application.
[0063] This application also provides a vehicle that includes the aforementioned electronic equipment.
[0064] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the data writing method described above.
[0065] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0066] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0067] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A data flashing method, characterized in that, The method comprises the following steps: In the presence of real-time data write request, judge whether to receive over-the-air (OTA) service request, wherein the real-time data write request and the OTA service request use the same drive channel; If the OTA service request is received, determine the first priority of the OTA service request and the second priority of the real-time data write request; In the case where the first priority is higher than the second priority, the business data corresponding to the real-time data write request is cached to a preset intermediate data storage space, and the software package data corresponding to the OTA service request is written to the first non-volatile storage array using the drive channel, and after the software package data is written, the business data is written to the second non-volatile storage array using the drive channel.
2. The method of claim 1, wherein, When the software package data corresponding to the OTA service request is written to the first non-volatile storage array using the drive channel, further comprising: Determine whether there is a data write request that meets the preset emergency condition; In the case where there is a data write request that meets the preset emergency condition, suspend the writing process of the software package data, and write the data corresponding to the data write request that meets the preset emergency condition to the second non-volatile storage array using the drive channel.
3. The method according to claim 1 or 2, characterized in that, Further comprising: Determine whether a preset sleep instruction is received; In the case where the preset sleep instruction is received, determine whether the drive channel completes all data writing actions, and whether the business data cached in the preset intermediate data storage space has been written to the second non-volatile storage array; If the drive channel completes all data writing actions, and the business data cached in the preset intermediate data storage space has been written to the second non-volatile storage array, a power-down instruction is generated; Send the power-down instruction to the vehicle power management module, so that the vehicle power management module performs power-down operation.
4. The method of claim 1, wherein, Before writing data to the first non-volatile storage array or the second non-volatile storage array, further comprising: Send an authority confirmation request to the storage control unit, wherein the authority confirmation request includes data size, data type and target write partition; If the authorization response returned by the storage control unit based on the authority confirmation request is received, generate a data write instruction based on the authorization response to write data to the first non-volatile storage array or the second non-volatile storage array based on the data write instruction.
5. The method of claim 1, wherein, After determining the first priority of the OTA service request and the second priority of the real-time data write request, further comprising: If the first priority is lower than the second priority, the business data is written to the second non-volatile storage array using the preset drive channel first.
6. A data flashing device, characterized by, The device comprises: A first determination module is configured to determine whether an over-the-air (OTA) service request is received in the presence of a real-time data write request, wherein the real-time data write request and the OTA service request use the same drive channel; determining a first priority of the OTA service request and a second priority of the real-time data write request when the OTA service request is received; when the first priority is higher than the second priority, buffering service data corresponding to the real-time data write request to a preset intermediate data storage space, and writing software package data corresponding to the OTA service request to a first non-volatile storage array by using the drive channel, and after the software package data is written, writing the service data to a second non-volatile storage array by using the drive channel.
7. The apparatus of claim 6, wherein, when the software package data corresponding to the OTA service request is written to the first non-volatile storage array by using the drive channel, the processing module is further configured to: determine whether there is a data write request meeting a preset emergency condition; when there is a data write request meeting the preset emergency condition, suspend the writing process of the software package data, and write data corresponding to the data write request meeting the preset emergency condition to the second non-volatile storage array by using the drive channel.
8. An electronic device, comprising: comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the data flashing method according to any one of claims 1-5.
9. A vehicle characterized by comprising: comprising:
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, the electronic device according to claim 8. The program is executed by the processor to implement the data flashing method according to any one of claims 1-5.