Data storage method of electronic speed regulator and electronic speed regulator

By employing a combination of RAM and FLASH memory in the electronic speed controller, and dynamically adjusting the sampling frequency and storage area based on event levels, the problems of unreasonable storage resource allocation and easy loss of critical data in traditional solutions are solved, achieving efficient data storage and fault diagnosis.

CN121092085BActive Publication Date: 2026-03-20SHENZHEN HOBBYWING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511651791.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-12
Publication Date
2026-03-20
Estimated Expiration
2045-11-12

AI Technical Summary

Technical Problem

Traditional electronic speed controller data storage solutions cannot dynamically adjust storage strategies according to different operating conditions, resulting in excessive redundant data under normal operating conditions and loss of key parameters under abnormal operating conditions. They also lack intelligent hierarchical processing and data protection, affecting the accuracy of fault diagnosis.

Method used

By employing a combination of RAM and FLASH memory, the sampling frequency and storage area are dynamically adjusted based on event level, including a circular buffer, temporary buffer, record storage area, fault storage area, and protected sector, to achieve differentiated storage.

Benefits of technology

Optimize storage resource allocation, improve the integrity of critical data preservation and the accuracy of fault diagnosis, avoid low-value data occupying storage space, and ensure the complete recording and protection of data in the event of a sudden failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121092085B_ABST
    Figure CN121092085B_ABST
Patent Text Reader

Abstract

The application discloses a data storage method of an electronic speed regulator and the electronic speed regulator, relates to the technical field of electronic speed regulator control, and discloses the data storage method of the electronic speed regulator and the electronic speed regulator. The data storage method of the electronic speed regulator and the electronic speed regulator disclosed realize differentiated storage of data of different importance degrees by dynamically selecting a storage area and a sampling frequency based on an event level, solve the problems that storage resources are not reasonably allocated and key data is prone to loss in a traditional scheme, have the advantages that a storage strategy can be dynamically adjusted according to an event level, storage resource configuration can be optimized, and the saving integrity of key data and fault diagnosis accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic speed controller technology, and in particular to a data storage method for electronic speed controllers and an electronic speed controller. Background Technology

[0002] In electronic speed controller (ESC) control systems, the effective storage of operational data plays a crucial role in equipment status monitoring and fault diagnosis. Traditional ESC data storage schemes suffer from the following technical shortcomings: First, the use of a single storage medium and fixed sampling frequency makes it difficult to adapt to the varying data value under different operating conditions, resulting in a large amount of redundant data under normal operating conditions and the potential loss of critical parameters under abnormal conditions. Second, existing storage architectures lack intelligent data grading capabilities and cannot dynamically adjust storage strategies based on event severity, leading to unreasonable allocation of storage resources. Third, traditional schemes lack sufficient protection mechanisms for fault data, allowing important fault characteristic parameters to be easily overwritten by subsequent data, affecting fault analysis and equipment maintenance. Although some improved solutions attempt to alleviate these problems by increasing storage capacity or adopting a dual-cache structure, the lack of a scientific event grading system prevents optimal allocation of storage resources. Especially when dealing with sudden faults, existing technologies struggle to simultaneously collect and preserve complete data before and after the fault, and lack special protection measures for critical data, hindering the effective utilization of ESC operational data and the accuracy of fault diagnosis.

[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main purpose of this application is to provide a data storage method and an electronic speed controller for an electronic speed controller, which aims to optimize the configuration of storage resources and improve the integrity of key data storage and the accuracy of fault diagnosis.

[0005] To achieve the above objectives, this application proposes a data storage method for an electronic speed controller, wherein the electronic speed controller includes a RAM memory and a FLASH memory, the RAM memory includes a circular buffer and a temporary buffer, and the FLASH memory includes a recording storage area, a fault storage area, and protected sectors; the method includes:

[0006] Obtain the real-time operating parameters of the electronic speed controller;

[0007] The event level is determined based on the real-time operating parameters, and a corresponding event level label is generated.

[0008] The target sampling frequency and target storage area are determined based on the event level label, and the real-time operating parameters are written to the target storage area at the target sampling frequency; the target storage area includes at least one of the circular buffer, the temporary buffer, the record storage area, the fault storage area, and the protected sector.

[0009] In one embodiment, the step of determining the event level based on the real-time operating parameters and generating a corresponding event level label includes:

[0010] When the real-time operating parameters are lower than a preset first threshold, a first event label is generated;

[0011] When the real-time operating parameters are not lower than a preset first threshold and the real-time operating parameters are lower than a preset second threshold, a second event tag is generated;

[0012] When the real-time operating parameters are not lower than a preset second threshold and the real-time operating parameters are lower than a preset third threshold, a third event tag is generated;

[0013] When the real-time operating parameters are not lower than a preset third threshold, a fourth event tag is generated;

[0014] Wherein, the preset first threshold is less than the preset second threshold, and the preset second threshold is less than the preset third threshold.

[0015] In one embodiment, the step of determining the target sampling frequency and target storage area based on the event level label, and writing the real-time operating parameters into the target storage area at the target sampling frequency, includes:

[0016] When the event level label is a level 1 event label, the real-time running parameters are stored in the circular buffer at a first sampling frequency; and,

[0017] When the preset interval is reached, historical operating parameters that have exceeded the preset storage time are extracted from the circular buffer and subjected to frequency reduction and compression processing to generate frequency reduction operating parameters.

[0018] Write the frequency reduction operation parameters into the record storage area.

[0019] In one embodiment, the step of extracting historical operating parameters that exceed a preset storage time from the circular buffer and performing frequency reduction and compression processing to generate frequency reduction operating parameters includes:

[0020] Extract historical running parameters that exceed the preset storage time from the circular cache;

[0021] The historical operating parameters are averaged over a time window to output low-frequency characteristic data points.

[0022] A continuous sequence of low-frequency feature data points is encapsulated into frequency reduction operating parameters.

[0023] In one embodiment, the step of determining the target sampling frequency and target storage area based on the event level label, and writing the real-time operating parameters into the target storage area at the target sampling frequency, further includes:

[0024] When the event level label is a level 2 event label, the real-time operating parameters are stored in the temporary buffer at a second sampling frequency; and,

[0025] If the data in the temporary buffer does not reach the fault threshold within a preset time period, the temporary buffer is cleared; wherein, the second sampling frequency is greater than the first sampling frequency.

[0026] In one embodiment, the step of determining the target sampling frequency and target storage area based on the event level label, and writing the real-time operating parameters into the target storage area at the target sampling frequency, includes:

[0027] When the event level label is a level 3 event label or a level 4 event label, the first operating parameter data within a preset first time period before the fault occurs is extracted from the circular buffer, and the second operating parameter data within a preset second time period after the fault occurs is extracted from the circular buffer.

[0028] The first operating parameter data and the second operating parameter data are encapsulated into fault snapshot data;

[0029] Write the fault snapshot data into the fault storage area.

[0030] In one embodiment, the step of encapsulating the first operating parameter data and the second operating parameter data into fault snapshot data includes:

[0031] The first operating parameter data and the second operating parameter data are merged into the original fault dataset according to the time series.

[0032] Add event level labels and timestamps to the original fault dataset to generate fault snapshot data.

[0033] In one embodiment, the step of determining the target sampling frequency and target storage area based on the event level label, and writing the real-time operating parameters into the target storage area at the target sampling frequency, further includes:

[0034] When the event level label is a level four event label, all operating parameter data and system status data in the current RAM memory are merged into a complete field data packet;

[0035] Write the complete field data packet into the protected sector and mark it with an anti-overwrite flag.

[0036] In one embodiment, before the step of determining the event level based on the real-time operating parameters and generating the corresponding event level label, the method further includes:

[0037] The real-time operating parameters are validated to ensure data integrity and accuracy.

[0038] If an anomaly is detected, an error message is generated, and the abnormal data and error message are directly written to the protected sector.

[0039] Furthermore, to achieve the above objectives, this application also proposes an electronic speed controller, which includes a RAM memory and a FLASH memory. The RAM memory includes a circular buffer and a temporary buffer, and the FLASH memory includes a record storage area, a fault storage area, and a protected sector. The electronic speed controller uses the data storage method of the aforementioned electronic speed controller.

[0040] The data storage method and electronic speed controller proposed in this application achieve differentiated storage of data of different importance by dynamically selecting storage areas and sampling frequencies based on event levels. This solves the problems of unreasonable allocation of storage resources and easy loss of key data in traditional solutions. It has the ability to dynamically adjust storage strategies according to event levels, optimize storage resource configuration, and improve the integrity of key data preservation and the accuracy of fault diagnosis. Attached Figure Description

[0041] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0042] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 A flowchart illustrating an embodiment of the data storage method for the electronic speed controller of this application;

[0044] Figure 2 This is a schematic diagram of a structural embodiment of the electronic speed controller of this application.

[0045] Explanation of icon numbers:

[0046] 100. Electronic speed controller; 110. RAM memory; 111. Circular buffer; 112. Temporary buffer; 120. FLASH memory; 121. Record storage area; 122. Fault storage area; 123. Protected sector.

[0047] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0048] The technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of this application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0049] It should be understood that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0050] In existing technologies, the data storage scheme of electronic speed controllers 100 typically employs a single storage medium and a fixed sampling frequency for data recording. This approach has significant drawbacks: during normal operation, high-frequency sampling generates a large amount of low-value data, consuming storage space; under abnormal conditions, the fixed sampling interval may lead to the loss of critical fault characteristics. Traditional solutions use the same processing method for all data, failing to differentiate event priorities, resulting in insufficient integrity of high-value data storage, and the lack of a dynamic adjustment mechanism leads to wasted storage resources. For example, when the equipment experiences brief abnormal fluctuations, traditional methods cannot distinguish between temporary fluctuations and serious faults, potentially mixing non-critical data with important fault data for storage, increasing the difficulty of subsequent data analysis.

[0051] To address these issues, a method is needed to dynamically allocate storage resources based on data value. The inherent trade-off between storage efficiency and data protection in traditional solutions stems from the lack of an event grading mechanism. Analysis reveals that data generated under different operational states possesses varying timeliness and importance. For example, normally functioning data requires only low-frequency, long-term storage, while data from sudden failures necessitates high-frequency, complete recording. Based on this, a multi-level event assessment system is proposed, comparing operational parameters with preset thresholds to generate event level labels, thereby dynamically adjusting sampling frequency and storage areas. This approach achieves data classification and processing through event grading, avoiding inefficient storage while ensuring the integrity of critical data.

[0052] Based on this, this application provides a data storage method for an electronic speed controller 100, referring to... Figure 2 The electronic speed controller 100 includes a RAM memory 110 and a FLASH memory 120. The RAM memory 110 includes a circular buffer 111 and a temporary buffer 112. The FLASH memory 120 includes a recording storage area 121, a fault storage area 122, and a protected sector 123. (Refer to...) Figure 1 The data storage method of the electronic speed controller 100 includes steps S100 to S300, wherein:

[0053] Step S100: Obtain the real-time operating parameters of the electronic speed controller 100;

[0054] Step S200: Based on the real-time operating parameters, determine the event level and generate the corresponding event level label;

[0055] Step S300: Determine the target sampling frequency and target storage area based on the event level label, and write the real-time operating parameters into the target storage area at the target sampling frequency; the target storage area includes at least one of the circular buffer 111, the temporary buffer 112, the record storage area 121, the fault storage area 122, and the protected sector 123.

[0056] In this embodiment, the circular buffer 111 refers to the storage area that uses a first-in, first-out (FIFO) rule to overwrite old data. Specifically, it can be implemented using a circular queue data structure for high-frequency storage of short-term operational data. The temporary buffer 112 refers to the storage area that temporarily stores potentially abnormal data. Specifically, it can be implemented using an independent memory partition for temporarily storing data that may trigger fault judgment. The record storage area 121 refers to the storage area that long-term stores low-frequency characteristic data. Specifically, it can be implemented using independent sectors of a FLASH chip for storing historical data that has been down-compressed. The fault storage area 122 refers to the storage area that stores data before and after a fault. Specifically, it can be implemented using a write-protected FLASH partition for storing fault snapshot data. The protected sector 123 refers to the storage area that is prohibited from being overwritten. Specifically, it can be implemented using a hardware write protection mechanism for storing critical on-site data. Event level judgment refers to classifying event priorities based on the degree of parameter deviation. Specifically, it can be implemented using a multi-level threshold comparison algorithm to trigger differentiated storage strategies.

[0057] In this embodiment, after real-time operating parameters are acquired, the system performs multi-level comparisons with preset thresholds to generate event tags. For example, when a parameter is below the first threshold, a low-priority tag is generated, triggering low-frequency sampling and storing the data in the circular buffer 111. After the data in the circular buffer 111 reaches a preset duration, low-frequency feature points are generated through mean calculation and transferred to the recording storage area 121. When a parameter exceeds the second threshold, a medium-priority tag is generated, triggering high-frequency sampling and temporarily storing the data in the temporary buffer 112. If the temporary data does not reach the fault threshold within the set time, it is automatically cleared to release space. For parameters exceeding the third threshold, the system extracts data before and after the fault from the circular buffer 111 to form a snapshot, which is stored in the fault storage area 122. When the highest priority event is triggered, all current operating data and system status are packaged and stored in the protected sector 123 to prevent data overwriting.

[0058] Compared to existing technologies, traditional solutions employ a uniform processing method for all data, while this method implements a dynamic storage strategy through event-level classification. For example, traditional fixed sampling methods may lose critical data points due to excessively long sampling intervals when equipment malfunctions, while this solution increases the sampling frequency based on event level, ensuring complete recording of fault characteristics. Furthermore, traditional single-storage-area designs are prone to overwriting high-value data; this solution, through multi-storage-area partitioning and priority management, provides independent storage space for fault snapshots and on-site data. Through the above technical solutions, this application achieves efficient utilization of storage resources and reliable protection of critical data. Operational data is automatically matched to storage strategies based on event level, preventing low-value data from occupying limited storage space. The collaborative work of multi-level storage areas ensures both the traceability of long-term operational trends and the integrity of data during sudden failures, while protected sectors 123 prevent accidental loss of important data.

[0059] In one feasible implementation, the step of determining the event level based on the real-time operating parameters and generating corresponding event level tags includes: generating a first event tag when the real-time operating parameters are lower than a preset first threshold; generating a second event tag when the real-time operating parameters are not lower than the preset first threshold and are lower than a preset second threshold; generating a third event tag when the real-time operating parameters are not lower than the preset second threshold and are lower than a preset third threshold; and generating a fourth event tag when the real-time operating parameters are not lower than the preset third threshold; wherein the preset first threshold is less than the preset second threshold, and the preset second threshold is less than the preset third threshold.

[0060] In this embodiment, the preset first threshold is a critical value used to distinguish between normal operating conditions and potential abnormal conditions. It can be implemented using the equipment's factory calibration value or a dynamic adjustment algorithm, and its function is to initially identify slight deviations in operating parameters. The preset second threshold is a critical value used to distinguish between potential abnormalities and explicit abnormal conditions. It can be determined through historical fault data analysis, and its function is to capture operating conditions that require key monitoring. The preset third threshold is a critical value used to define serious fault events. It can be implemented using the equipment's safe operating limits, and its function is to trigger the highest level of data protection mechanism. The event level label is a classification identifier generated based on the threshold range of the parameter. It can be implemented using four-bit binary encoding or enumerated type variables, and its function is to provide a decision-making basis for subsequent data storage strategies.

[0061] In this embodiment, after the electronic speed controller 100 acquires real-time operating parameters, it first compares them with three preset incremental thresholds. For example, when the speed parameter is below the first threshold, it is determined to be a normal operating state and a first event tag is generated; when the parameter falls between the first and second thresholds, a second event tag is generated to mark a potential anomaly; when the parameter exceeds the second threshold but does not reach the third threshold, a third event tag is generated to indicate a clear anomaly; when the parameter exceeds the third threshold, a fourth event tag is generated to characterize a serious fault. This hierarchical judgment mechanism achieves refined differentiation of equipment operating states by setting multiple threshold intervals.

[0062] In this embodiment, four event levels are formed by setting three progressively increasing thresholds, enabling events of different severity to trigger differentiated data storage strategies. For example, routine operating data is stored at low frequency, potentially abnormal data is temporarily cached, explicitly abnormal data triggers a fault snapshot, and severely faulty data is protected at the highest level, thereby optimizing storage resource utilization while ensuring data integrity. Thus, this application achieves dynamic hierarchical evaluation of the operating status of the electronic speed controller 100, providing accurate event classification criteria for subsequent data storage. By dividing the data into multi-level threshold ranges, it avoids the problems of misjudgment or omission caused by a single threshold, and can match the corresponding data acquisition frequency and storage strategy according to the severity of the event, effectively solving the technical contradiction in traditional solutions where data storage efficiency and critical data protection are difficult to balance.

[0063] In one feasible implementation, the step of determining the target sampling frequency and target storage area based on the event level label, and writing the real-time operating parameters into the target storage area at the target sampling frequency, includes: when the event level label is a level 1 event label, storing the real-time operating parameters into the circular buffer 111 at a first sampling frequency; and when a preset interval duration is reached, retrieving historical operating parameters that exceed the preset storage duration from the circular buffer 111, and performing frequency reduction and compression processing on them to generate frequency reduction operating parameters; and writing the frequency reduction operating parameters into the record storage area 121.

[0064] In this embodiment, the circular buffer 111 refers to a storage area used for temporarily storing high-frequency sampled data. Specifically, it can be implemented using a circular queue structure, maintaining a fixed capacity by overwriting old data. The first sampling frequency refers to the basic data acquisition rate set for low-level events, specifically using sampling frequencies such as 100Hz or 200Hz, to balance data accuracy and storage resource consumption. Frequency reduction and compression processing refers to the operation of feature extraction and redundant information removal from high-frequency data. Specifically, it can be implemented using a sliding window mean calculation combined with data point merging to reduce the amount of data while retaining trend characteristics.

[0065] In this embodiment, when the real-time operating parameters are determined to be a Level 1 event, data is continuously written to the circular buffer 111 at a lower first sampling frequency. The circular buffer 111 maintains the latest data through an overwrite mechanism to avoid storage overflow. When a preset time interval is reached, the system automatically filters out data segments whose storage duration exceeds a set threshold, such as historical data exceeding 24 hours. These data undergo sliding window averaging, for example, calculating the average of data points within every 60 seconds to generate a low-frequency characteristic data sequence. Finally, the compressed data packets are written to the record storage area 121 for long-term storage.

[0066] In this embodiment, the proposed solution significantly reduces storage pressure while ensuring the integrity of basic data by dynamically adjusting the sampling frequency and combining it with data compression. Furthermore, this solution effectively extracts key features and reduces redundant storage through time window mean calculation. Thus, this application solves the problem of wasted storage resources caused by high-frequency sampling under low-level events, extending the storage period of effective data through frequency reduction and compression. Trend features are preserved during data compression to ensure that key information is not lost during subsequent analysis. The collaborative operation of the circular buffer 111 and the record storage area 121 achieves hierarchical data management and optimizes storage space utilization.

[0067] In one feasible implementation, the step of extracting historical operating parameters that exceed a preset storage time from the circular buffer 111 and performing frequency reduction and compression processing to generate frequency reduction operating parameters includes: extracting historical operating parameters that exceed a preset storage time from the circular buffer 111; calculating the average of the historical operating parameters according to a time window to output low-frequency feature data points; and encapsulating a continuous sequence of low-frequency feature data points into frequency reduction operating parameters.

[0068] In this embodiment, the preset retention period refers to the maximum time threshold for data to be retained in the circular buffer 111. This can be achieved using a fixed time interval or a dynamic adjustment strategy to control the data storage cycle in the buffer. The time window refers to a continuous time period used to divide historical operating parameters. This can be implemented using a fixed length or a variable length triggered by events, such as a statistical interval of 5 seconds or 10 seconds. Mean calculation refers to performing an arithmetic average on all data points within the time window. This can be implemented using a sliding window algorithm or a segmented accumulation algorithm to extract representative features from the data fluctuation trend. Encapsulation refers to integrating the processed low-frequency data points into a structured data packet. This can be implemented using binary data stream encapsulation or a timestamped compression format, such as using a TLV encoding structure or the Protobuf serialization protocol.

[0069] In this embodiment, when the historical operating parameters stored in the circular buffer 111 exceed the preset retention period, the system automatically triggers the data migration process. First, overdue data segments are selected according to the first-in, first-out (FIFO) principle. Then, the original high-frequency sampled data within each time window is averaged to generate low-frequency feature data points representing the operating status of that time period. For example, for data collected 100 times per second, it is compressed into one data point within a 10-second time window through averaging, reducing the data volume to one-thousandth of the original size. Finally, the continuous low-frequency feature data points are arranged in chronological order, and time reference information is added to form a complete dataset of down-frequency operating parameters.

[0070] In this embodiment, the proposed solution significantly reduces storage redundancy while preserving the overall trend characteristics of the data through a dynamic frequency reduction and compression mechanism, while avoiding the omission of key operational information. For example, in the engine speed monitoring scenario, mean calculation can eliminate the influence of instantaneous interference signals and accurately reflect the macroscopic trend of speed changes. Thus, this application solves the problem of excessive storage space occupied by high-frequency sampling data over long periods, improving storage efficiency by two orders of magnitude while ensuring data availability. The serialization and encapsulation of low-frequency feature data points further enhances data traceability, providing a structured foundation dataset for subsequent fault analysis.

[0071] In one feasible implementation, the step of determining the target sampling frequency and target storage area based on the event level label, and writing the real-time operating parameters into the target storage area at the target sampling frequency, further includes: when the event level label is a level 2 event label, storing the real-time operating parameters into the temporary buffer 112 at a second sampling frequency; and if the data in the temporary buffer 112 does not reach the fault threshold within a preset time period, clearing the temporary buffer 112; wherein the second sampling frequency is greater than the first sampling frequency.

[0072] In this embodiment, the secondary event label refers to the classification identifier generated when the real-time operating parameters are not lower than a preset first threshold and are lower than a preset second threshold. Specifically, it can be implemented by comparing the rotational speed or temperature data collected by the sensor with the preset threshold range. The temporary buffer 112 refers to an independent storage area in the RAM memory 110 used to temporarily store potentially abnormal data. Specifically, it can be implemented using a first-in-first-out queue structure and is used to temporarily store high-frequency sampled operating parameters. The second sampling frequency refers to a sampling frequency higher than the normal data acquisition rate, which can be set to 1kHz, 1.2kHz, etc., and is implemented by adjusting the trigger interval of the analog-to-digital converter. The preset duration refers to the time window for determining whether to retain or clear the data, for example, set to 30 seconds, and monitored through a timer interrupt mechanism.

[0073] In this embodiment, when the real-time operating parameters of the electronic speed controller 100 enter the secondary event judgment range, the data acquisition module immediately switches to the second sampling frequency and writes the parameter data into the temporary buffer 112. The temporary buffer 112 adopts a circular buffer structure, continuously overwriting old data to maintain the latest state. If the data fluctuation does not exceed the fault threshold within a preset time period, it is determined to be an occasional anomaly, and the buffer is automatically cleared by the memory management unit. For example, if it is detected that the engine speed does not continuously exceed the upper limit of the secondary threshold within 30 seconds, all relevant speed and load data in the temporary buffer 112 are deleted to release storage space.

[0074] Compared to existing technologies, traditional solutions use fixed-frequency storage without a temporary caching mechanism, resulting in occasional abnormal data occupying storage space for extended periods. This solution dynamically switches the sampling frequency in conjunction with a temporary storage area. When potential anomalies are detected, the data acquisition density is increased, and an automatic data cleanup mechanism prevents the accumulation of invalid data, achieving efficient utilization of storage resources. This solves the problem of excessive storage space occupation by occasional abnormal data. By capturing potential fault characteristics through high-frequency sampling and automatically cleaning up invalid data with a preset time-limited judgment mechanism, storage space utilization is optimized while ensuring the integrity of critical data.

[0075] In one feasible implementation, the step of determining the target sampling frequency and target storage area based on the event level label, and writing the real-time operating parameters into the target storage area at the target sampling frequency, includes: when the event level label is a level 3 event label or a level 4 event label, extracting first operating parameter data within a preset first time period before the fault occurs from the circular buffer 111, and extracting second operating parameter data within a preset second time period after the fault occurs from the circular buffer 111; encapsulating the first operating parameter data and the second operating parameter data into fault snapshot data; and writing the fault snapshot data into the fault storage area 122.

[0076] In this embodiment, the first operating parameter data within a preset first time period before the fault occurs refers to the equipment operating parameters collected within a specific time period before the fault is triggered. Specifically, it can be extracted from the circular buffer 111 using a time window sliding method to preserve the trend of equipment state changes before the fault occurs. The second operating parameter data within a preset second time period after the fault occurs refers to the operating parameters collected within a specific time period after the fault is triggered. Specifically, it can be extracted from the circular buffer 111 through an event triggering mechanism to record the system response characteristics after the fault occurs. The fault snapshot data refers to a data set containing the complete context before and after the fault. Specifically, the first operating parameter data and the second operating parameter data can be concatenated using a timestamp alignment method to form a complete fault record that can be used for subsequent analysis.

[0077] In this embodiment, when a Level 3 or Level 4 event tag is detected, the system automatically retrieves historical data from the circular buffer 111 within a set time period before the fault occurred, while continuously capturing real-time data within a set time period after the fault occurred. These two data sets are then time-series aligned and integrated into a snapshot dataset containing the complete fault evolution process. This dataset is written to the fault storage area 122 with independent storage space to prevent it from being overwritten by subsequent data. For example, when a sudden drop in engine speed is detected reaching the Level 3 event threshold, the system automatically saves the engine speed fluctuation data for the five minutes before the fault and the abnormal state data for the two minutes after the fault, forming a traceable fault analysis sample.

[0078] In this embodiment, the solution effectively preserves abnormal symptoms before a fault is triggered and system responses after the fault through a data backtracking and continuous capture mechanism over a preset time period. This provides a complete time-series data chain for fault diagnosis, achieving full-cycle recording of critical fault data and ensuring accurate tracing of event causes and evolution processes during fault analysis. Simultaneously, by setting fixed storage areas and independent storage strategies, the risk of important fault data being overwritten by regular data is avoided, improving the accuracy of fault diagnosis and equipment maintenance efficiency.

[0079] In one feasible implementation, the step of encapsulating the first operating parameter data and the second operating parameter data into fault snapshot data includes: merging the first operating parameter data and the second operating parameter data into an original fault dataset according to a time series; adding event level labels and timestamps to the original fault dataset to generate fault snapshot data.

[0080] In this embodiment, time series merging refers to concatenating data from a preset first time period before the fault occurs with data from a preset second time period after the fault occurs in chronological order to form a continuous data set. This can be achieved using timestamp alignment and segmented data concatenation techniques to ensure the temporal continuity of data before and after the fault. A timestamp refers to the precise time information recording the moment the fault occurred, which can be implemented using a system clock signal or an external synchronization clock signal, used to mark the time node when the fault snapshot data was generated.

[0081] In this embodiment, when a level 3 or level 4 event label is detected, the operating parameter data within the first time period before the fault occurs is extracted from the circular buffer 111 as the first operating parameter data, and the operating parameter data within the second time period after the fault occurs is extracted as the second operating parameter data. The first operating parameter data and the second operating parameter data are merged in chronological order to form the original fault dataset, which covers the complete operating state before and after the fault occurs. Subsequently, the event level label and a timestamp accurate to milliseconds are appended to the header metadata area of ​​the original fault dataset to form fault snapshot data containing fault type, time information, and complete operating parameters. Finally, the fault snapshot data is written to the fault storage area 122.

[0082] In this embodiment, the solution constructs a structured dataset containing complete time span and fault classification information by merging data from the time periods before and after the fault and adding event level labels. This achieves full-cycle recording and classified storage of fault data, ensuring that the parameter evolution process before and after the fault can be accurately traced during fault analysis. At the same time, the addition of event level labels significantly improves the retrieval efficiency and classification processing capability of fault data.

[0083] In one feasible implementation, the step of determining the target sampling frequency and target storage area based on the event level label and writing the real-time operating parameters into the target storage area at the target sampling frequency further includes: when the event level label is a level four event label, merging all operating parameter data and system status data in the current RAM memory 110 into a complete field data packet; writing the complete field data packet into the protected sector 123 and marking it with an anti-overwrite identifier.

[0084] In this embodiment, the complete field data package refers to a data set containing all real-time operating parameters and device system status within the RAM memory 110. Specifically, it can be implemented using memory mirroring technology combined with metadata encapsulation to completely save the operating state at the moment of device failure. The protected sector 123 refers to a write-protected storage area in the FLASH memory 120. Specifically, it can be implemented using independent partition management combined with hardware write protection circuitry to prevent critical data from being overwritten by subsequent operations. The anti-overwrite flag refers to control information marking data blocks as unerasable or unwriteable. Specifically, it can be implemented using file attribute marking combined with a storage block locking mechanism to ensure the persistent preservation of important fault data in the storage medium.

[0085] In this embodiment, when a Level 4 event tag is detected, the system immediately triggers a data acquisition thread to collect all historical operating parameters from the circular buffer 111, real-time data from the temporary buffer 112, and the contents of the system status register of the device control unit. After acquisition, the data packaging module integrates the multi-source data into a complete field data packet with time synchronization markers according to a preset encapsulation format. This data packet is transmitted to the protected sector 123 of the FLASH memory 120 through a dedicated interface, and an anti-overwrite flag is written to the file header information, so that the storage controller automatically skips this data block when performing a normal data overwrite operation.

[0086] In this embodiment, the solution achieves complete capture and permanent storage of the device's full state data at the moment of failure by constructing a complete field data package and a protected storage mechanism. This solves the problem in the prior art that serious fault data is easily lost and the fault scene cannot be completely restored. By establishing a protected storage area and a data anti-overwrite mechanism, it ensures that the key data of the highest level fault event can be completely preserved, providing a reliable data foundation for subsequent fault diagnosis.

[0087] In one feasible implementation, before the step of determining the event level based on the real-time operating parameters and generating the corresponding event level label, the method further includes: performing data verification on the real-time operating parameters to ensure the integrity and accuracy of the data; if data abnormality is detected, generating error message, and directly writing the abnormal data and error message into the protected sector 123.

[0088] In this embodiment, data verification refers to verifying whether real-time operating parameters conform to logical ranges or physical laws through a preset algorithm. Specifically, cyclic redundancy check (CRUD) or hash value comparison can be used to identify abnormal data caused by sensor failure, communication interference, or data tampering. Error message information refers to tagged data containing the anomaly type, occurrence time, and associated parameters. Specifically, it can be generated by combining predefined error codes with timestamps to quickly locate the source of data anomalies. Abnormal data refers to real-time operating parameters that exceed preset threshold ranges or violate data association relationships. This can be detected by setting upper and lower limits for parameters or using dynamic association rules to isolate unreliable data and prevent interference with subsequent processing flows.

[0089] In this embodiment, during the operation of the electronic speed controller 100, real-time operating parameters are first input to the data verification module before entering the event level judgment process. This verification module compares the parameter values ​​with preset valid ranges, such as whether the speed is between 0-5000 rpm or whether the oil pressure is reasonably correlated with the temperature. If a parameter exceeds a threshold or a logical contradiction is detected, an error message generation process is immediately triggered, encapsulating the abnormal data, its corresponding error code, and timestamp into an independent data packet. This data packet is directly written to the protected sector 123 via a dedicated interface, bypassing the conventional storage path to ensure that abnormal data is not overwritten by subsequent normal data.

[0090] In some specific implementations, the data verification process may include a multi-level verification mechanism. For example, the first level of verification checks whether the parameters are within the physical range allowed by the hardware, while the second level of verification analyzes the dynamic correlation between multiple parameters, such as whether the rate of change of rotational speed and oil pressure matches. When any level of verification fails, the event level judgment process is immediately terminated, and abnormal data storage operations are performed first.

[0091] In this embodiment, the solution employs a pre-verification mechanism to perform credibility screening before data enters the storage process. Simultaneously, abnormal data is stored independently in a protected area to avoid interference caused by mixing it with normal data. Thus, this application can identify and isolate abnormal data at the data acquisition source, ensuring the reliability of stored data; by associating abnormal data with error information, it provides complete contextual information for fault diagnosis; and by utilizing the anti-overwrite characteristics of protected sector 123, it ensures the long-term traceability of critical abnormal data.

[0092] In the embodiments of this application, the data storage method of the electronic speed controller 100 achieves differentiated storage of data of different importance by dynamically selecting the storage area and sampling frequency based on the event level. This solves the problems of unreasonable allocation of storage resources and easy loss of key data in traditional solutions. It has the ability to dynamically adjust the storage strategy according to the event level, optimize the storage resource configuration, and improve the integrity of key data preservation and the accuracy of fault diagnosis.

[0093] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the data storage method of the electronic speed controller 100 of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0094] This application also provides an electronic speed controller 100, see reference. Figure 2 The electronic speed controller 100 includes a RAM memory 110 and a FLASH memory 120. The RAM memory 110 includes a circular buffer 111 and a temporary buffer 112. The FLASH memory 120 includes a record storage area 121, a fault storage area 122, and a protected sector 123. The electronic speed controller 100 uses the data storage method described above.

[0095] The electronic speed controller 100 provided in this application, employing the data storage method of the electronic speed controller 100 in the above embodiments, can optimize storage resource allocation and improve the integrity of key data preservation and the accuracy of fault diagnosis. Compared with the prior art, the beneficial effects of the electronic speed controller 100 provided in this application are the same as the beneficial effects of the data storage method of the electronic speed controller 100 provided in the above embodiments, and other technical features in the electronic speed controller 100 are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0096] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0097] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. All equivalent structural transformations made under the technical concept of this application using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included within the scope of patent protection of this application.

Claims

1. A data storage method for an electronic speed controller, characterized in that, The electronic speed controller includes a RAM memory and a FLASH memory. The RAM memory includes a circular buffer and a temporary buffer. The FLASH memory includes a recording storage area, a fault storage area, and protected sectors. The method includes: Obtain the real-time operating parameters of the electronic speed controller; The event level is determined based on the real-time operating parameters, and a corresponding event level label is generated. The target sampling frequency and target storage area are determined based on the event level label, and the real-time operating parameters are written to the target storage area at the target sampling frequency; the target storage area includes at least one of the circular buffer, the temporary buffer, the record storage area, the fault storage area, and the protected sector; The step of determining the event level based on the real-time operating parameters and generating the corresponding event level label includes: When the real-time operating parameters are lower than a preset first threshold, a first event label is generated; When the real-time operating parameters are not lower than a preset first threshold and the real-time operating parameters are lower than a preset second threshold, a second event tag is generated; When the real-time operating parameters are not lower than a preset second threshold and the real-time operating parameters are lower than a preset third threshold, a third event tag is generated; When the real-time operating parameters are not lower than a preset third threshold, a fourth event tag is generated; Wherein, the preset first threshold is less than the preset second threshold, and the preset second threshold is less than the preset third threshold; The step of determining the target sampling frequency and target storage area based on the event level label, and writing the real-time operating parameters into the target storage area at the target sampling frequency, includes: When the event level label is a level 1 event label, the real-time running parameters are stored in the circular buffer at a first sampling frequency; and, When the preset interval is reached, historical operating parameters that have exceeded the preset storage time are extracted from the circular buffer and subjected to frequency reduction and compression processing to generate frequency reduction operating parameters. Write the frequency reduction operation parameters into the recording storage area; The step of determining the target sampling frequency and target storage area based on the event level label, and writing the real-time operating parameters into the target storage area at the target sampling frequency, further includes: When the event level label is a level 2 event label, the real-time operating parameters are stored in the temporary buffer at a second sampling frequency; and, If the data in the temporary buffer does not reach the fault threshold within a preset time period, the temporary buffer is cleared; wherein, the second sampling frequency is greater than the first sampling frequency; The step of determining the target sampling frequency and target storage area based on the event level label, and writing the real-time operating parameters into the target storage area at the target sampling frequency, includes: When the event level label is a level 3 event label or a level 4 event label, the first operating parameter data within a preset first time period before the fault occurs is extracted from the circular buffer, and the second operating parameter data within a preset second time period after the fault occurs is extracted from the circular buffer. The first operating parameter data and the second operating parameter data are encapsulated into fault snapshot data; Write the fault snapshot data into the fault storage area; The step of encapsulating the first operating parameter data and the second operating parameter data into fault snapshot data includes: The first operating parameter data and the second operating parameter data are merged into the original fault dataset according to the time series. Add event level labels and timestamps to the original fault dataset to generate fault snapshot data; The step of determining the target sampling frequency and target storage area based on the event level label, and writing the real-time operating parameters into the target storage area at the target sampling frequency, further includes: When the event level label is a level four event label, all operating parameter data and system status data in the current RAM memory are merged into a complete field data packet; Write the complete field data packet into the protected sector and mark it with an anti-overwrite flag.

2. The data storage method for an electronic speed controller as described in claim 1, characterized in that, The steps of extracting historical operating parameters that exceed a preset storage time from the circular buffer and performing frequency reduction and compression processing to generate frequency-reduced operating parameters include: Extract historical running parameters that exceed the preset storage time from the circular cache; The historical operating parameters are averaged over a time window to output low-frequency characteristic data points. A continuous sequence of low-frequency feature data points is encapsulated into frequency reduction operating parameters.

3. The data storage method for the electronic speed controller as described in claim 1, characterized in that, Before the step of determining the event level based on the real-time operating parameters and generating the corresponding event level label, the method further includes: The real-time operating parameters are validated to ensure data integrity and accuracy. If an anomaly is detected, an error message is generated, and the abnormal data and error message are directly written to the protected sector.

4. An electronic speed controller, characterized in that, The electronic speed controller includes a RAM memory and a FLASH memory. The RAM memory includes a circular buffer and a temporary buffer. The FLASH memory includes a record storage area, a fault storage area, and a protected sector. The electronic speed controller uses the data storage method of the electronic speed controller as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Unmanned aerial vehicle power system data processing method based on MCU external Flash memory

    CN119479108A

  • Electrical equipment fault monitoring and positioning system based on data analysis

    CN120101883A