Dynamic storage control method for motor control system and related equipment thereof

By adopting a dynamic storage control method in the motor control system, the storage space is calculated dynamically according to data priority, and the writing method and storage location are determined, the problem of data chaos under the unreasonable utilization of resources and high concurrent write operations under the fixed storage allocation method is solved, and the rational utilization of storage resources and stable storage of data is realized.

CN120162004APending Publication Date: 2025-06-17SHENZHEN SILICON MOUNTAIN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510261528.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2025-06-17

AI Technical Summary

Technical Problem

In the existing motor control system, the fixed storage allocation method leads to unreasonable utilization of storage resources, and the locking mechanism under high concurrent write operations is likely to cause data writing confusion, resulting in data inconsistency or loss.

Method used

The dynamic storage control method is adopted to determine the priority of the write request through the preset data priority classification method, calculate the storage space of each write request based on the priority, and determine the write method and storage location based on the priority to ensure the version control and update order of the data.

Benefits of technology

It realizes the rational allocation of storage space, avoids waste of storage resources, ensures the version control and update order of data, enhances the stability and security of the system, and avoids data loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120162004A_ABST
    Figure CN120162004A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of storage management, and provides a dynamic storage control method for a motor control system and related equipment thereof. The method comprises the following steps: judging the priority of a plurality of received write-in requests through a preset data priority classification mode, and calculating a first storage space of each write-in request according to a preset dynamic storage calculation formula and the priority, and determining a write-in mode of each write-in request based on the priority, extracting to-be-written data in each write-in request according to the write-in mode, and determining a storage position of the write-in request according to the priority, thereby storing the to-be-written data according to the storage position and the first storage space. According to the method and the device, the priorities of the write requests are distinguished, the storage space of each write request is calculated according to the priorities, and the to-be-written data is determined from the multiple write requests by adopting the corresponding write mode, so that the dynamic allocation of the storage space is realized, and a storage data fault caused by concurrent write is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of storage management, and in particular to a dynamic storage control method for a motor control system and related devices thereof. Background Art

[0002] Electrically Erasable Programmable Read Only Memory (EEPROM) is widely used in various electronic devices, especially in motor control systems, due to its simple and stable structure and the flexibility of electrically erasable data.

[0003] Currently, in terms of storage allocation management, EEPROM stores data by presetting storage spaces with fixed sizes according to different types of data; in terms of data modification control, EEPROM uses a lock mechanism with security measures to protect data from unauthorized access or modification for data modification control.

[0004] As an important power source in industrial production and daily life, motors can effectively improve the operating efficiency of equipment by achieving precise control and automated operation of motors. To achieve precise control of motors, more and more sensors and monitored data are integrated in the motor control system, resulting in an unreasonable existing fixed storage allocation method. At the same time, the existing lock mechanism writing method is prone to data writing chaos under high-concurrency operations, leading to inconsistent written data and even data loss. Summary of the Invention

[0005] In view of this, the present application provides a dynamic storage control method for a motor control system and related devices thereof to solve the problems of storage space allocation and concurrent writing control.

[0006] The first aspect of the present application provides a dynamic storage control method for a motor control system, the method including: Determining the priorities of a plurality of received write requests according to a preset data priority classification method; Calculating a first storage space for each write request according to a preset dynamic storage calculation formula and the priorities; Determining the write mode of the write request according to the priorities, and determining the data to be written according to the write mode and the write request; Determining the storage location of the write request according to the priorities; Storing the data to be written according to the storage location and the first storage space.

[0007] In an optional embodiment, calculating the first storage space for each write request according to the preset dynamic storage calculation formula and the priority includes: Calculating the first storage space through the following formula: ; wherein, the is the first storage space of the write request received at time t, the is the storage requirement in the write request, the is the priority, the is the first coefficient corresponding to the priority, the is the available space at time t, and the is the second coefficient corresponding to the available space at time t.

[0008] In an optional embodiment, determining the write mode of the write request according to the priority includes: Classifying the write requests according to the priority; When the priority is a low priority, the write request is a preset real-time update request, and the write mode adopts a preset first write mode; When the priority is a high priority, the write request is a preset frequent update request, and the write mode adopts a preset second write mode.

[0009] In an optional embodiment, when the write request is the real-time update request, determining the data to be written according to the write mode and the write request includes: Obtaining the target information in the write request and recording the target information in a preset working log; Generating the data to be written according to the target information in the working log.

[0010] In an optional embodiment, when the write request is the frequent update request, determining the data to be written according to the write mode and the write request includes: Caching the frequent update request in a preset cache area; Classifying multiple write requests according to the operation object in the write request to generate a data version set according to the classification result; Sorting the target requests in the data version set according to the time stamps in the order of reception time; When the number of write requests cached in the data version set reaches a preset first threshold, obtaining the latest write request in the data version set according to the sorting order of the time stamps, and determining the data in the write request as the data to be written.

[0011] In an alternative embodiment, the method further includes: Obtaining multiple data version sets of the same operation object according to the operation object, and sorting the data version sets according to the chronological order of generation of the data version sets; When the duration counted by a preset timer is equal to a preset duration threshold, deleting the earliest generated data version set according to the sorting order of the data version sets.

[0012] In an alternative embodiment, the method further includes: Reading the currently allocated space, and calculating a pre-allocated storage space according to the currently allocated space and each first storage space; When the pre-allocated storage space reaches a preset second threshold, performing an alarm and data storage according to a preset emergency storage method.

[0013] A second aspect of the present application provides a dynamic storage control device for a motor control system, the device includes: A priority determination module, configured to determine the priorities of multiple received write requests according to a preset data priority classification method; A storage calculation module, configured to calculate a first storage space for each write request according to a preset dynamic storage calculation formula and the priority; A write determination module, configured to determine a write method of the write request according to the priority, and determine data to be written according to the write method and the write request; A position determination module, configured to determine a storage position of the write request according to the priority; A request execution module, configured to store the data to be written according to the storage position and the first storage space.

[0014] A third aspect of the present application provides an electronic device, the electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the steps of the dynamic storage control method for a motor control system as described above are implemented.

[0015] A fourth aspect of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the dynamic storage control method for a motor control system as described above are implemented.

[0016] In summary, the present application at least includes the following beneficial technical effects: 1. Dynamically calculate the storage space required for each write request according to the priority, avoiding waste of storage resources and ensuring the reasonable utilization of storage space.

[0017] 2. Classify multiple write requests and generate a data version set, and then sort them according to the timestamp to ensure data version control and update order, so as to avoid data chaos and conflicts caused by high-concurrency write operations.

[0018] 3. Calculate the pre-allocated storage space according to the currently allocated space and each first storage space, and give an alarm and store data when the pre-allocated storage space reaches a preset threshold. This mechanism enhances the stability and security of the system and avoids system crashes or data loss caused by insufficient storage space. Description of the Drawings

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0020] Figure 1 is a flowchart of a dynamic storage control method for a motor control system provided by an embodiment of the present application; Figure 2 is a functional module diagram of a dynamic storage control device for a motor control system provided by an embodiment of the present application; Figure 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed Embodiments

[0021] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0022] With the development of motor intelligent control technology, the data acquisition module, as the "eyes" and "ears" of the vehicle control core, can perceive and monitor various key parameters in real time. These parameters are crucial for the efficient operation, optimized control, and safety guarantee of the motor. Among them, the data acquisition module mainly monitors the operating state of the target motor through various sensors. The data collected by the data acquisition module includes but is not limited to key parameters such as current, voltage, temperature, and speed. In different usage scenarios, real-time monitoring of multiple levels of targets may also be involved, resulting in a large amount of monitoring data, causing problems such as unreasonable allocation of data storage resources and chaotic data writing during concurrent operation control of the same target data.

[0023] Next, from the perspective of the dynamic storage control device for the motor control system, the dynamic storage control method for the motor control system provided by the embodiments of the present application will be described in combination with the process of controlling a new energy vehicle integrated with multiple motors.

[0024] As Figure 1 shown, it is a flowchart of the dynamic storage control method for the motor control system provided by the embodiments of the present application. The dynamic storage control method for the motor control system provided by the embodiments of the present application includes the following steps.

[0025] Step S11: Determine the priorities of multiple received write requests according to a preset data priority classification method.

[0026] It should be understood that the write requests include but are not limited to data sources, data contents, timestamps, and metadata, etc. In the vehicle control system, key data related to motor control (such as control commands, key fault information, and high-risk data, etc.) has extremely high requirements for the real-time performance and reliability of the system. These data are directly related to the safety and performance of the vehicle. If processed untimely or errors occur, serious consequences may occur, such as vehicle out of control, accidents, etc. In contrast, non-critical data such as debugging data has lower requirements for the real-time performance and reliability of the system. These data are mainly used for system debugging, performance analysis, etc. Even if there is a slight delay or loss in processing, it will not directly affect the basic functions and safety of the system.

[0027] Therefore, by classifying the write requests by priority, resources can be reasonably allocated and reasonable control management methods can be adopted for different data, so as to ensure that the system can respond and store key data in a timely manner, and ensure the stability and safety of the system. In this embodiment, according to the different importance of the data content in the write request to the system operation and functions, critical data is defined as high-priority data, and non-critical data is defined as low-priority data, thereby establishing a mapping table between the data content and the priority.

[0028] When receiving multiple write requests, the data content in the write requests is read to traverse a preset mapping table between data content and priorities according to the data content, so as to perform priority matching on the write requests.

[0029] Step S12: Calculate the first storage space of each write request according to a preset dynamic storage calculation formula and the priority.

[0030] After receiving a write request, the available space size in the memory for data storage is obtained by reading the memory, so as to perform space dynamic allocation calculation according to the storage space required by the write request, the priority, and the available space of the memory, thereby obtaining the first storage space representing the storage requirements of each write request to achieve reasonable allocation of storage resources.

[0031] The first storage space is calculated by the following formula: ; where, the is the first storage space of the write request received at time t. The is the storage requirement in the write request, which is used to represent the size of the data in the write request. The is the priority. The is the first coefficient corresponding to the priority, which is used to adjust the storage space requirement according to the priority. The is the available space at time t. The is the second coefficient corresponding to the available space at time t, which is used to adjust the storage space allocation strategy according to the available space size.

[0032] According to different priorities, in this embodiment, a mapping table between preset priorities and first coefficients is adopted to map each priority to a corresponding first coefficient. The first coefficient is a positive value, and the higher the priority, the larger the corresponding first coefficient, so as to increase the storage space requirement for high-priority data. After obtaining the priority corresponding to the write request, the first coefficient corresponding to the write request is obtained according to the priority of the write request and the preset mapping table between priorities and first coefficients. Similarly, in this embodiment, according to the available space obtained by reading the memory and the preset mapping table between available space and second coefficients, the second coefficient of the write request is determined, so as to flexibly adjust the storage space size of each write request according to the remaining space in the memory.

[0033] Exemplarily, at a certain moment t , the remaining available space in the memory = 1000 MB. At this time, the system receives a write request with a storage requirement Di = 200 MB and a priority of 3, where the priority range is from 1 to 5 and 5 is the highest priority. According to the priority mapping table, the first coefficient PF(Pi) corresponding to priority 3 = 0.2. According to the available space mapping table, the second coefficient AF( S avail(t)) = 1.0.

[0034] According to Calculating to obtain Δ S ( t ) = 200 × (1 + 0.2) × 1 = 200 × 1.2 × 1 = 240 MB. Therefore, the first storage space required for this write request at the moment is 240 MB.

[0035] In an alternative embodiment, to avoid the sum of the first storage spaces calculated based on the same available space being greater than the available space when different write requests are received at the same moment, resulting in the memory being unable to meet the storage requirements of all write requests and causing critical data loss, the method further includes: Calculating the pre-allocated storage space through the following formula: ; wherein, the is the storage space that the memory needs to allocate at time t, the is the pre-allocated storage space that the memory needs at time t + 1, and the is the sum of the respective first storage spaces calculated at time t.

[0036] And comparing the pre-allocated storage space with a preset second threshold. When the pre-allocated storage space reaches the preset second threshold, alarm and data storage are performed according to a preset emergency storage method. Among them, the second threshold is set according to relevant factors such as the total capacity of the memory and the expected number of write requests.

[0037] Exemplarily, during the vehicle exit collision experiment detection process, at time t, the storage space already allocated by the memory is Salloc(t) = 100 MB, the available space is 100 MB, and the preset second threshold is 200 MB. At the same time, three write requests are received, namely request A, request B, and request C. The storage requirement of request A is D A = 20 MB, and the first coefficient corresponding to the priority P A is PF(P A ) = 0.2; the storage requirement of request B is D B = 30 MB, and the first coefficient corresponding to the priority P B is PF(PB ) = 0.1; The storage requirement of Request C is D C = 50 MB, priority P C The corresponding first coefficient is PF(P C ) = 0. And according to the available space, the second coefficients are all determined to be 1.

[0038] Through Calculate to obtain ΔS A (t) = 24MB, ΔS B (t) = 33MB, ΔS C (t) = 50MB, according to Calculate to obtain = 207MB. Since is greater than 200MB (i.e., the pre-allocated storage space reaches the preset second threshold), the system uploads the received Request A, Request B, and Request C to the cloud storage network disk for backup through the connected vehicle system according to the preset emergency storage method, and responds to the write requests of Request A and Request B with higher priorities. At the same time, generate fault information according to the preset alarm method and send it to the corresponding management personnel, so as to remind the management personnel to take corresponding measures in time.

[0039] By comparing the pre-allocated storage space with the preset second threshold, when the storage space is insufficient that may occur in high-concurrency write requests, the preset emergency storage method is adopted for alarm and data storage backup, so that critical data is preferentially stored, thereby reducing the risk of data loss. At the same time, by notifying the administrator through the alarm, the administrator can fully understand the status of the storage system and take intervention measures when necessary, improving the manageability and monitorability of the system.

[0040] Step S13: Determine the write method of the write request according to the priority, and determine the data to be written according to the write method and the write request.

[0041] It should be understood that the motor control system needs to control the operation of the motor in real time and accurately to ensure the safety, performance and efficiency of the vehicle. Therefore, key data directly related to the motor state, control instructions, etc. (such as current, voltage, speed, position, etc.) needs to be updated frequently to reflect the latest state of the motor and make adjustments accordingly. At the same time, in the motor control system of electric vehicles, in order to reduce the detection error of key data, multiple sensors are usually used to cooperate to monitor the working state of the same motor. The data collected by each of these sensors needs to be updated and fused frequently to generate more reliable and comprehensive motor state information. Therefore, there is a phenomenon of high-concurrency writing operations for write requests of key data. However, high-concurrency writing operations will significantly increase the load of the storage system, may lead to a decline in storage performance, and then affect the overall response time and real-time performance of the system. At the same time, high-concurrency writing operations may trigger the protection mechanism of the storage system (such as write protection, lock mechanism, etc.), resulting in the system entering an unstable state, thus causing the loss of key data and even triggering a system crash.

[0042] After determining the priority corresponding to the write request, the system adds a priority label at a specific position (such as the head of the write request data packet) of each write request according to the determination result of the priority of the write request and the preset priority label adding method. Exemplarily, the preset number 1 is a high-priority label, and the number 0 is a low-priority label. After receiving a new write request and determining that the priority of the write request is high priority, the system adds the number 1 as the priority label of the write request at the head of the data content of the write request.

[0043] It should be understood that the priority is used to represent the criticality and update frequency of the data content in the write request. In the embodiments of the present application, a real-time writing mechanism (i.e., the first writing method) is adopted for non-critical data, and a cache writing mechanism (i.e., the first writing method) is set for the characteristic of frequent update of critical data.

[0044] By parsing the priority label, the system divides the multiple received write requests into real-time update requests (i.e., non-critical data write requests) and frequent update requests (i.e., critical data write requests), so as to determine the write method corresponding to each write request by querying the mapping table between the preset write request classification result and the write method.

[0045] When the priority is the low priority, the write request is a preset real-time update request, and the write method adopts a preset first write method. The system parses the write request according to the first write method to obtain the target information in the write request, so as to record the target information in a preset working log. The target information includes, but is not limited to, information such as data content, timestamp, and request source. At the same time, format and encode and encrypt the data content to generate the data to be written that meets the requirements of the storage system data format.

[0046] When the priority is the high priority, the write request is a preset frequent update request, and the write method adopts a preset second write method. The system stores the write request in a cache area, so as to reduce the number of writes to the EEPROM. By parsing the data content (i.e., the operation object) in the write request, multiple frequent update requests are classified according to the operation object, so that multiple frequent update requests corresponding to the same operation object are grouped into a set to form a data version set.

[0047] In each data version set, the frequent update requests are sorted according to the timestamp in the write request in the order of receiving time. At the same time, monitor the number of frequent update requests in each data version set.

[0048] When the number of write requests temporarily stored in a certain data version set reaches a preset first threshold, stop storing frequent update requests in the data version set, and according to the sorting order of the timestamps, obtain the write request with the latest receiving time (i.e., the latest write request) in the data version set, so as to determine the data in the write request as the data to be written.

[0049] Exemplarily, in a vehicle motor detection experiment, the EEPROM system receives multiple high-priority write requests transmitted by multiple sensors. The system classifies multiple write requests into 4 different data version sets according to the different operation objects in the write requests, and sorts the write requests in the data version sets according to the timestamps in each write request in the order of receiving time. When the number of write requests in the data version set corresponding to the rotational speed (hereinafter collectively referred to as the rotational speed data version set) reaches 10, stop inputting newly received rotational speed write requests into the current rotational speed data version set, and at the same time generate a new cycle of rotational speed data version set for continuing to store newly received rotational speed write requests. At the same time, select the latest rotational speed write request from the current rotational speed data version set according to the sorting of the write requests, and determine the rotational speed write request as the data to be written.

[0050] In an alternative embodiment, to implement the storage update of the data version set in the cache area, the method further includes: obtaining multiple data version sets of the same operation object according to the operation object, sorting the data version sets according to the chronological order of the generation time of the data version sets, and simultaneously monitoring the residence time of the data version sets in the cache area in real time through a preset timer. When the duration counted by the timer is equal to a preset duration threshold, the earliest generated data version set is deleted according to the sorting order of the data version sets, so as to release the cache space and ensure that the newer data version sets are retained.

[0051] In an alternative embodiment, to ensure the accuracy of the data to be written, the write requests in the data version set are verified before determining the data to be written, so as to avoid data being tampered with or damaged. Calculate the hash value of each frequently updated request classified according to the operation object according to a strong hash algorithm (such as SHA-256 or a later version of the SHA algorithm), and append the calculated hash value to the front or back of the original frequently updated request to form a new data packet, so as to write the data packet with the hash value into the data version set. When the latest write request is selected, recalculate the hash value in the data packet corresponding to the latest write request, and compare the recalculated hash value with the hash value in the data packet. When the two match, the data has not been tampered with or damaged, and the latest write request is determined as the data to be written; if they do not match, the data may have problems, and a preset error handling measure is taken to reselect the latest write request (for example, obtaining the second-to-last frequently updated request in the sorting as the latest write request).

[0052] Step S14: Determine the storage location of the write request according to the priority.

[0053] It should be understood that critical data will be allocated to the more stable and frequently written first storage area. The first storage area has a higher write rate and lower latency, and has strong durability, suitable for processing data with high-frequency updates. Non-critical data can be stored in the second storage area that is not frequently updated. The second storage area has a lower write frequency and relatively poor storage durability, but is sufficient to meet the storage requirements of data with a low update frequency.

[0054] According to the priority, it can be determined whether the data (i.e., the operation object) to be modified by the write request is critical data, so as to determine the storage location of the data content in the write request. When the write request is a high-priority write request, the data in the write request is critical data, and the write request is confirmed to be stored in the first storage area; when the write request is a low-priority write request, the data in the write request is non-critical data, and the write request is confirmed to be stored in the second storage area.

[0055] Allocating storage locations according to the priority of write requests enables the system to flexibly adapt to different data storage requirements.

[0056] Step S15: Store the data to be written according to the storage location and the first storage space.

[0057] Store the data to be written into the previously allocated storage location according to the calculated size of the first storage space. After the storage operation is completed, update the status information of the storage area. The status information includes, but is not limited to, used space and available space, etc. At the same time, the system will also record the log information of the storage operation for subsequent data management and troubleshooting.

[0058] This application is applied to the field of storage management technology. It determines the priorities of multiple received write requests through a preset data priority classification method, calculates the first storage space for each write request according to a preset dynamic storage calculation formula and the priority, determines the write method for each write request based on the priority to extract the data to be written in each write request, and determines the storage location of the write request based on the priority, so as to store the data to be written according to the storage location and the first storage space. This application classifies the priorities of multiple received write requests, calculates the first storage space for each write request according to the priority, realizes the dynamic allocation of storage space, ensures the reasonable utilization of storage space and avoids the waste of storage resources. At the same time, determines the write method of the write request according to the priority, classifies multiple write requests and generates a data version set, and sorts according to the time stamp to ensure the version control and update order of the data, so as to avoid data chaos and conflicts caused by high-concurrency write operations.

[0059] As Figure 2 shown, it is a functional module diagram of a dynamic storage control device for a motor control system provided by an embodiment of this application.

[0060] In some embodiments, the dynamic storage control device 2 for the motor control system may include multiple functional modules composed of computer program segments. The computer programs of each program segment in the dynamic storage control device 2 for the motor control system may be stored in the memory of the server and executed by at least one processor to execute (see details in Figure 1 the description) the functions of the dynamic storage control method for the motor control system.

[0061] In this embodiment, the dynamic storage control device 2 for the motor control system can be divided into multiple functional modules according to the functions it performs. The functional modules may include: a priority judgment module 21, a storage calculation module 22, a write determination module 23, a position determination module 24, a request execution module 25, a timing clearing module 26, and an emergency storage module 27. The module referred to in the present invention means a series of computer program segments that can be executed by at least one processor and can complete fixed functions, and are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0062] The priority judgment module 21 is configured to determine the priorities of a plurality of received write requests according to a preset data priority classification method.

[0063] The storage calculation module 22 is configured to calculate a first storage space for each write request according to a preset dynamic storage calculation formula and the priority.

[0064] In an optional implementation manner, the storage calculation module 22 is specifically configured to: Calculate the first storage space through the following formula: ; wherein, the is the first storage space of the write request received at time t, the is the storage requirement in the write request, the is the priority, the is the first coefficient corresponding to the priority, the is the available space at time t, and the is the second coefficient corresponding to the available space at time t.

[0065] The write determination module 23 is configured to determine the write method of the write request according to the priority, and determine the data to be written according to the write method and the write request.

[0066] In an optional implementation manner, the write determination module 23 is specifically configured to: Classify the write requests according to the priority; When the priority is a low priority, the write request is a preset real-time update request, and the write method adopts a preset first write method; When the priority is a high priority, the write request is a preset frequent update request, and the write method adopts a preset second write method.

[0067] In an alternative embodiment, when the write request is the real-time update request, the write determination module 23 is further configured to: Obtain the target information in the write request, and record the target information in a preset working log; Generate the data to be written according to the target information in the working log.

[0068] In an alternative embodiment, when the write request is the frequent update request, the write determination module 23 is further configured to: Cache the frequent update request in a preset cache area; Classify multiple write requests according to the operation object in the write request, so as to generate a data version set according to the classification result; Sort the target requests in the data version set according to the time stamps in the write request in the order of reception time; When the number of write requests cached in the data version set reaches a preset first threshold, obtain the latest write request in the data version set according to the sorting order of the time stamps, and determine the data in the write request as the data to be written.

[0069] The location determination module 24 is configured to determine the storage location of the write request according to the priority.

[0070] The request execution module 25 is configured to store the data to be written according to the storage location and the first storage space.

[0071] In an alternative embodiment, the dynamic storage control device 2 for the motor control system further includes a timing clearing module 26, and the timing clearing module 26 is specifically configured to: Obtain multiple data version sets of the same operation object according to the operation object, and sort the data version sets according to the chronological order of the generation time of the data version sets; When the duration counted by a preset timer is equal to a preset duration threshold, delete the earliest generated data version set according to the sorting order of the data version sets.

[0072] In an alternative embodiment, the dynamic storage control device 2 for the motor control system further includes an emergency storage module 27, and the emergency storage module 27 is specifically configured to: Read the currently allocated space, and calculate the pre-allocated storage space according to the currently allocated space and each first storage space; When the pre-allocated storage space reaches a preset second threshold, perform alarm and data storage according to a preset emergency storage method.

[0073] It should be understood that various variations and specific embodiments of the methods provided in the above embodiments are equally applicable to the dynamic storage control device for the motor control system in this embodiment. Through the detailed description of the dynamic storage control method for the motor control system above, those skilled in the art can clearly know the implementation method of the dynamic storage control device for the motor control system in this embodiment. For the sake of brevity of the specification, it will not be elaborated here.

[0074] As Figure 3 shown, it is a schematic structural diagram of an electronic device provided by an embodiment of the present application.

[0075] In a preferred embodiment of the present invention, the electronic device 3 may include, but is not limited to: a memory 31, at least one processor 32, and at least one communication bus 33.

[0076] Those skilled in the art should understand that Figure 3 the structure of the electronic device 3 shown does not constitute a limitation on the embodiments of the present invention. The electronic device 3 may also include more or fewer other hardware or software than shown, or different component arrangements.

[0077] In some embodiments, the electronic device 3 is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits, programmable gate arrays, digital signal processors, and embedded devices, etc.

[0078] It should be noted that the electronic device 3 is only an example, and other existing or future possible electronic products that can be adapted to the present application should also be included within the protection scope of the present application and are included herein by reference.

[0079] In some embodiments, a computer program is stored in the memory 31. When the computer program is executed by the at least one processor 32, all or part of the steps in the dynamic storage control method for the motor control system as described above are implemented. The memory 31 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electrically-erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disc memories, magnetic disk memories, tape memories, or any other computer-readable medium that can be used to carry or store data. Further, the computer-readable storage medium mainly includes a storage program area and a storage data area. Among them, the storage program area can store an operating system, application programs required for at least one function, and the like.

[0080] In some embodiments, the at least one processor 32 is the control core (Control Unit) of the electronic device 3, connecting various components of the entire electronic device 3 through various interfaces and lines. By running or executing the programs or modules stored in the memory 31, and by calling the data stored in the memory 31, various functions of the electronic device 3 are executed and data is processed. For example, when the at least one processor 32 executes the computer program stored in the memory 31, all or part of the steps in the dynamic storage control method for the motor control system described in the embodiments of the present application are implemented; or all or part of the functions of the dynamic storage control device for the motor control system are implemented. The at least one processor 32 may be composed of integrated circuits. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same or different functions packaged, including a combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips.

[0081] In some embodiments, the at least one communication bus 33 is configured to enable connection communication between the memory 31, the at least one processor 32, and the like. Although not shown, the electronic device 3 may further include a power source (such as a battery) for powering each component. Preferably, the power source can be logically connected to the at least one processor 32 through a power management device, so as to implement functions such as management of charging, discharging, and power consumption management through the power management device. The power source may further include any components such as one or more DC or AC power sources, a recharge device, a power failure detection circuit, a power converter or inverter, a power status indicator, etc. The electronic device 3 may further include various sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated herein.

[0082] The integrated unit implemented in the form of a software function module as described above can be stored in a computer-readable storage medium. The above software function module stored in a storage medium includes several instructions for causing an electronic device (which may be a personal computer, an electronic device, or a network device, etc.) or a processor to execute a part of the methods described in various embodiments of the present application.

[0083] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0084] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units. They can be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0085] The above are all preferred embodiments of the present application. Without limiting the protection scope of the present application accordingly, therefore, all equivalent changes made according to the structure, shape, and principle of the present application should be covered within the protection scope of the present application.

Claims

1. A dynamic storage control method for a motor control system, characterized in that: The method comprises: Determine the priorities of the received multiple write requests according to a preset data priority classification method; Calculate the first storage space of each write request according to a preset dynamic storage calculation formula and the priority; Determining a writing mode of the writing request according to the priority, and determining data to be written according to the writing mode and the writing request; determining a storage location of the write request according to the priority; The to-be-written data is stored according to the storage location and the first storage space.

2. The dynamic storage control method for a motor control system according to claim 1, characterized in that: The calculating the first storage space of each write request according to the preset dynamic storage calculation formula and the priority includes: The first storage space is calculated by the following formula: ; Among them, the is the first storage space of the write request received at time t, is the storage requirement in the write request, the is the priority, the is the first coefficient corresponding to the priority, is the available space at time t, is the second coefficient corresponding to the available space at time t.

3. The dynamic storage control method for a motor control system according to claim 2, characterized in that: The step of determining the writing mode of the write request according to the priority level includes: classifying the write requests according to the priority; When the priority is a low priority, the write request is a preset real-time update request, and the write mode adopts a preset first write mode; When the priority is a high priority, the write request is a preset frequent update request, and the write mode adopts a preset second write mode.

4. The dynamic storage control method for a motor control system according to claim 3, characterized in that: When the write request is the real-time update request, determining the data to be written according to the writing mode and the write request includes: Obtaining target information in the write request, and recording the target information in a preset work log; The data to be written is generated according to the target information in the work log.

5. The dynamic storage control method for a motor control system according to claim 3, characterized in that: When the write request is the frequent update request, determining the data to be written according to the writing mode and the write request includes: Cache the frequent update requests in a preset cache area; Classifying the plurality of write requests according to the operation objects in the write requests, so as to generate a data version set according to the classification results; Sorting the target requests in the data version set in the order of receiving time according to the timestamps in the write requests; When the number of write requests cached in the data version set reaches a preset first threshold, the latest write request in the data version set is obtained according to the sorting order of the timestamps, and the data in the write request is determined as the data to be written.

6. The dynamic storage control method for a motor control system according to claim 5, characterized in that: The method further comprises: Acquire multiple data version sets of the same operation object according to the operation object, and sort the data version sets according to the chronological order of generation time of the data version sets; When the duration of the preset timer is equal to the preset duration threshold, the most recently generated data version set is deleted according to the sorting order of the data version sets.

7. The dynamic storage control method for a motor control system according to claim 1, characterized in that: The method further comprises: Reading the current allocated space, and calculating the pre-allocated storage space according to the current allocated space and each first storage space; When the pre-allocated storage space reaches a preset second threshold, an alarm is issued and data is stored according to a preset emergency storage method.

8. A dynamic storage control device for a motor control system, characterized in that: The device comprises: A priority determination module, used to determine the priorities of multiple received write requests according to a preset data priority classification method; A storage calculation module, used to calculate the first storage space of each write request according to a preset dynamic storage calculation formula and the priority; A write determination module, used to determine a write mode of the write request according to the priority, and determine data to be written according to the write mode and the write request; a location determination module, configured to determine a storage location of the write request according to the priority; A request execution module is used to store the data to be written according to the storage location and the first storage space.

9. An electronic device, characterized in that: The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps of the dynamic storage control method for a motor control system according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the dynamic storage control method for a motor control system according to any one of claims 1 to 7 are implemented.