Cache update method, device, medium and program product

By determining the operation type and formulating a processing strategy in the storage management software, and performing an update operation on the cache, the problems of insufficient real-time performance and performance loss when the storage array data changes are solved, and the consistency of cache data and storage array data and system stability are achieved.

CN120354026BActive Publication Date: 2025-09-09INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510837608.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-09-09
Estimated Expiration
2045-06-20

AI Technical Summary

Technical Problem

Existing storage management software lacks a targeted cache processing mechanism when storage array data changes, resulting in insufficient real-time performance and performance loss, and further inconsistency between cached data and actual storage array data.

Method used

By responding to the prompt information received about the change of storage array data, determining the operation type and formulating the corresponding processing strategy, the cache is updated, including distinguishing between configuration and non-configuration types, and using multi-threaded query and predetermined time interval mechanism to ensure the consistency of cache data and storage array data.

Benefits of technology

It achieves accurate updates of cache data and storage array data, improves system stability and response speed, avoids resource waste and lag, and ensures data consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120354026B_ABST
    Figure CN120354026B_ABST
Patent Text Reader

Abstract

The present invention provides a cache update method that can be applied in the field of computer technology, specifically in the field of storage devices. The method includes: in response to receiving a prompt message indicating a change in storage array data, determining the type of operation that caused the change in the storage array data; based on the operation type, determining a processing strategy for handling the prompt message; and performing an update operation on the cache based on the processing strategy. The present invention also provides a device, storage medium, and program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, in particular to the field of storage devices, and more particularly to a cache update method, device, medium and program product. Background Art

[0002] With the rapid development of the internet, particularly cloud computing and the Internet of Things, user and application data are growing rapidly. Storage arrays have emerged as a specialized storage system. Storage management software, used to manage storage arrays, has a direct impact on user experience. Improving storage management software's responsiveness requires data caching.

[0003] During implementation of the embodiments of the present invention, it was discovered that although storage management software relies on data caching to improve response speed, the lack of a targeted cache processing mechanism for operations that cause changes to storage array data can lead to insufficient real-time performance and / or performance loss when improperly processed, resulting in inconsistencies between cached data and actual data in the storage array. Summary of the Invention

[0004] In view of the above problems, the present invention provides a cache update method, device, medium and program product.

[0005] According to a first aspect of the present invention, a cache update method is provided, comprising: in response to receiving prompt information indicating a change in storage array data, determining an operation type of an operation that caused the change in the storage array data; based on the operation type, determining a processing strategy for processing the prompt information; and performing an update operation on the cache based on the processing strategy.

[0006] A second aspect of the present invention provides a cache update device, comprising: a first determination module for determining, in response to receiving prompt information indicating that storage array data has changed, an operation type of an operation that causes the storage array data to change; a second determination module for determining, based on the operation type, a processing strategy for processing the prompt information; and an update module for performing an update operation on the cache based on the processing strategy.

[0007] A third aspect of the present invention provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.

[0008] The fourth aspect of the present invention further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the computer program or instructions are executed by a processor.

[0009] The fifth aspect of the present invention further provides a computer program product, comprising a computer program or instructions, which implement the steps of the above method when executed by a processor.

[0010] Since, upon receiving a prompt message, a processing strategy for handling the prompt message is determined based on the type of operation that caused the storage array data to change, it is possible to flexibly formulate processing strategies for different types of operations that cause the storage array data to change, and to specifically process the prompt message, thereby achieving accurate updates to the cache, ensuring consistency between the data in the cache and the actual data in the storage array, and ensuring stable system operation. This at least partially solves the problem of the present invention, which, due to the lack of a targeted cache processing mechanism, leads to insufficient real-time performance and / or performance loss when improper processing occurs, and thus inconsistency between the data in the cache and the actual data in the storage array. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above contents and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings.

[0012] Figure 1 An application scenario diagram of a cache update method, apparatus, device, medium, and program product according to an embodiment of the present invention is shown.

[0013] Figure 2 A flowchart of a cache updating method according to an embodiment of the present invention is shown.

[0014] Figure 3 A schematic diagram of interaction of a cache update process according to an embodiment of the present invention is shown.

[0015] Figure 4 A schematic diagram of interaction of a cache update process according to an embodiment of the present invention is shown.

[0016] Figure 5 A schematic diagram of interaction of a cache update process according to an embodiment of the present invention is shown.

[0017] Figure 6 A schematic diagram of interaction of a cache update process according to an embodiment of the present invention is shown.

[0018] Figure 7 A structural block diagram of a cache updating device according to an embodiment of the present invention is shown.

[0019] Figure 8 A block diagram of an electronic device suitable for implementing a cache update method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0020] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concept of the present invention.

[0021] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise," "include," etc. used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0022] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0023] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0024] In the process of implementing the embodiments of the present invention, it was found that although in the relevant examples, for the storage management software data cache, when the storage array data changes, the lower-level core software will notify the storage management software of these changes, and the storage management software will update the cache when receiving the notification, but in a short period of time, when there are many identical notifications, the storage management software will repeatedly execute more updates, wasting a lot of resources, and may also cause more notifications to be queued, thereby causing the storage management software to freeze, etc. For example, if there are 10,000 volumes in the storage array, and 1,000 volumes change within 30 seconds, the management software will receive 1,000 notifications. Each time a notification is received, the storage management software will execute a volume query, for a total of 1,000 times. In fact, it only needs to execute one volume query after the last notification is received. If it takes 0.5 seconds to execute one volume query, it will take about 8.3 minutes in a serially executed storage array, which will cause the storage management software to freeze.

[0025] In other related examples, to address the resource waste and storage management software lag issues in these examples, some real-time performance is sacrificed by first saving the received notifications and not processing them. Identical notifications are then consolidated into a single notification and processed every T time interval (e.g., 30 seconds). However, this results in the storage management software cache being out of sync with the actual data in the storage array, resulting in a time error of T. Therefore, how to specifically achieve consistency between the cache and the actual data in the storage array is an urgent problem that those skilled in the art need to solve.

[0026] In view of this, an embodiment of the present invention provides a cache update method, comprising: in response to receiving prompt information indicating that storage array data has changed, determining the operation type of the operation that caused the storage array data to change; based on the operation type, determining a processing strategy for processing the prompt information; and performing an update operation on the cache based on the processing strategy.

[0027] Figure 1 An application scenario diagram of a cache update method, apparatus, device, medium, and program product according to an embodiment of the present invention is shown.

[0028] like Figure 1 As shown, an application scenario 100 according to this embodiment may include storage management software 101 and a storage array 102. A network may be used as a medium for providing a communication link between the storage management software 101 and the storage array 102. The network may include various connection types, such as wired or wireless communication links or fiber optic cables.

[0029] The storage management software 101 may consist of a user interface, back-end processing logic, a communication module, and the like (for example only). The user interface may provide a command line interface, allowing administrators to perform more flexible and efficient management operations by entering commands. The back-end processing logic may include, but is not limited to, a management engine and a data processing module. The management engine may be used to process user requests and perform storage management tasks, such as creating storage volumes and adjusting configurations. The data processing module may be used to process data read and write requests, manage cached data, and ensure data consistency and integrity. The communication module may, but is not limited to, communicate with the storage array 102 via specific protocols and interfaces, sending instructions and receiving responses.

[0030] The storage array 102 may be a physical storage device, which is composed of hardware such as multiple disk drives and a redundant array of independent disks controller, and provides actual data storage functions.

[0031] The storage management software 101 takes the storage array 102 as the management object and abstracts, organizes and manages the hardware resources of the storage array 102 through software functions, so that users can conveniently use and operate the storage array 102.

[0032] For example, a user, a third-party platform, or the storage management software 101 can cause changes to the storage array data in the storage array 102 by executing commands. When a computing platform or lower-layer core software connected to the storage array 102 monitors changes to the storage array data in the storage array 102, it can send a prompt message indicating the change to the storage array data to the storage management software 101. After receiving the prompt message indicating the change to the storage array data, the storage management software 101 can update its own cache. The lower-layer core software may include, but is not limited to, a command line interface module. The command line interface module is used to send a prompt message to the storage management software 101 when changes to the storage array data in the storage array 102 occur.

[0033] It should be noted that the cache update method provided in the embodiment of the present invention can generally be executed by the storage management software 101. Accordingly, the cache update device provided in the embodiment of the present invention can generally be set in the storage management software 101. The cache update method provided in the embodiment of the present invention can also be executed by software different from the storage management software 101 and capable of communicating with the storage array 102 and / or the storage management software 101. Accordingly, the cache update device provided in the embodiment of the present invention can also be set in software different from the storage management software 101 and capable of communicating with the storage array 102 and / or the storage management software 101.

[0034] It should be understood that Figure 1 The number of storage management software and storage arrays in the embodiment is only for illustration. Any number of storage management software and storage arrays may be provided according to implementation requirements.

[0035] The following will be based on Figure 1 The scene described by Figures 2 to 6 The cache update method of the application embodiment is described in detail.

[0036] Figure 2 A flowchart of a cache updating method according to an embodiment of the present invention is shown.

[0037] like Figure 2 As shown, the cache update method of this embodiment includes operations S210 to S230.

[0038] In operation S210 , in response to receiving prompt information indicating that storage array data has changed, an operation type of an operation causing the storage array data to change is determined.

[0039] In operation S220 , a processing strategy for processing the prompt information is determined based on the operation type.

[0040] In operation S230 , an update operation is performed on the cache based on the processing policy.

[0041] In an embodiment of the present invention, when storage array data changes, a command line interface module connected to the storage array may send a prompt message indicating the storage array data change to the storage management software.

[0042] Storage array data may refer to data stored in a storage array, including, but not limited to, user data, system data, and metadata. User data may include, but not limited to, files, databases, virtual machine disks, and application data. User data may be stored in storage volumes within the storage array. System data may include, but not limited to, configuration files, log files, and system status information. Metadata may include, but not limited to, data describing the attributes and organization of user and system data. Examples of such organization include storage volumes, storage pools, and file systems.

[0043] The prompt information may include at least one of the following: the type of data that changed, the specific content of the change, the timestamp of the change, and other relevant contextual information. Examples of data types include user data, system data, and metadata. Examples of specific content of the change include the creation, deletion, or attribute modification of a storage volume. For example, the size of a storage volume was adjusted to ***GB, and the change occurred at time **.

[0044] Operations that cause changes to storage array data may include user data change operations, system data change operations, and metadata change operations. User data change operations may include, but are not limited to, file creation, modification, and deletion, database operations, file transfers, and synchronization operations. System data change operations may include, but are not limited to, configuration file modifications, software package installation, updates, or uninstallation operations, and starting, stopping, or restarting system services. Metadata change operations may include, but are not limited to, file attribute and permission modifications, disk formatting, file system creation or adjustment, file system mounting or unmounting, and the creation, deletion, and adjustment of storage volume or storage pool size and attributes.

[0045] The processing strategy can be used to indicate the processing conditions and processing methods for processing the prompt information. The processing conditions may include, for example, time constraints, etc. The processing method is used to indicate the method for obtaining the changed storage array data.

[0046] For example, reference parameters can be determined for operations of different types. The reference parameters may include at least one of the following: the real-time requirements of the operation, the data consistency requirements, the complexity of the operation, the scope of the operation's impact, etc. Based on the reference parameters, the processing conditions and methods for handling the prompt information are determined. For example, for operations with high real-time requirements, it can be determined that upon receiving log information recording the execution command, the cache is updated immediately by parsing the prompt information.

[0047] Since, upon receiving a prompt message, a processing strategy for handling the prompt message is determined based on the type of operation that caused the storage array data to change, it is possible to flexibly formulate processing strategies for different types of operations that cause the storage array data to change, and to specifically process the prompt message, thereby achieving accurate updates to the cache, ensuring consistency between the data in the cache and the actual data in the storage array, and ensuring stable system operation. This at least partially solves the problem of the present invention, which, due to the lack of a targeted cache processing mechanism, leads to insufficient real-time performance and / or performance loss when improper processing occurs, and thus inconsistency between the data in the cache and the actual data in the storage array.

[0048] According to an embodiment of the present invention, the operation type may include a configuration type or a non-configuration type.

[0049] For example, the configuration class may indicate operations that change the structure, function, performance, or security settings of a storage array. These operations affect the configuration and behavior of storage resources but do not directly modify the content of user data. For example, they may include operations to create or delete storage resources such as storage volumes and storage pools, and may also include operations to adjust the size and properties of storage volumes, or the capacity and disk composition of storage pools.

[0050] The non-configuration class may indicate direct operations on the content of user data, or operations such as querying and analyzing data, or component aging, etc. For example, it may include the creation, modification and deletion of files, changes in component status caused by component aging, etc.

[0051] As above Figure 2 Operation S210, which determines the operation type of the operation that causes the storage array data to change, may include: determining the operation type as a configuration type when a command is executed; determining the operation type as a non-configuration type when the command is not executed and no log information recording the execution of the command is received within a predetermined period; and determining the operation type as a configuration type when the command is not executed and a log information recording the execution of the command is received.

[0052] For example, in a scenario where storage array data changes due to the execution of a command by the storage management software, the operation type can be determined to be a configuration type, and the operation is completed by executing the command. In a scenario where storage array data changes due to a user or a third-party platform entering a command in the command line interface to execute an operation, the operation type can also be determined to be a configuration type. In a scenario where the storage array data itself causes a change, the operation type can be determined to be a non-configuration type operation. For non-configuration types of operations, the command line user interface module does not record the command execution log information, and the storage management software does not execute the command.

[0053] Since the operation type can be accurately distinguished based on whether the command is executed and whether the log information recording the execution of the command is received, it is conducive to flexibly formulating processing strategies for different operation types.

[0054] According to an embodiment of the present invention, as above Figure 2 Operation S220, shown as determining a processing strategy for handling prompt information based on the operation type, may include the following operations: if a command is determined to be executed, determining a processing strategy based on the number of times the command is executed. If the operation type is determined to be a configuration type and the call command line operation is not performed, determining a processing strategy based on a first predetermined time interval in response to receiving log information recording the execution of the command. If the operation type is determined to be non-configuration type, determining a processing strategy based on the prompt information.

[0055] In one example, the operation type is configuration, and the storage management software executes a command, corresponding to a scenario where the storage array data changes as a result of the storage management software executing the command. For this scenario, the processing conditions and method for handling the prompt information can be determined based on the number of times the storage management software executes the command.

[0056] For example, a user may initiate a volume creation request to the storage management software. In response to the volume creation request, the storage management software may parse the volume creation request to determine the number of times the volume creation command is executed. If multiple volumes are to be created, the volume creation command is executed multiple times. The processing condition for processing the prompt information may be determined as follows: after all multiple volumes are created, the cache is updated according to the prompt information. If a single volume is to be created, the volume creation command is executed once. The processing condition for processing the prompt information may be determined as follows: after the single volume is created, the cache is updated immediately according to the prompt information.

[0057] In another example, when the operation type is configuration but the storage management software does not execute the command, this corresponds to a scenario where storage array data changes are caused by user or third-party software operations. Since the number of user or third-party software operations in this scenario cannot be determined, a processing strategy can be determined by setting a first predetermined time interval. The first predetermined time interval can be determined based on real-time requirements. For example, the higher the real-time requirement, the shorter the first predetermined time interval.

[0058] In yet another example, the operation type is non-configuration type, and the data required to perform the update operation can be determined upon receiving the prompt information.

[0059] By analyzing different scenarios and combining the behavioral characteristics of storage management software, the prompt information is processed in a refined manner, thereby enhancing the versatility of the update cache method.

[0060] According to an embodiment of the present invention, determining the number of times a command line interface performs a configuration operation on a storage array may include: if it is determined that parameters of the execution command include predetermined parameters, determining N=1. If it is determined that the parameters of the execution command do not include predetermined parameters, determining N≠1. Storage management software may determine the specific number of times the command is executed based on other parameters of the execution command.

[0061] The predetermined parameters can be used to identify the execution of a configuration operation.

[0062] In the scenario where storage array data changes when storage management software executes command line operations, if the command line interface module does not send log information recording the execution command to the storage management software, the storage management software may fail to execute the command. At this time, updating the cache will cause the data in the cache to be inconsistent with the data in the storage array, which will also waste resources.

[0063] Based on this, the number of times may include N times, where N is a positive integer. When it is determined that N=1, the processing strategy is determined to be, in response to receiving the log information recording the execution command, determining the data required for performing the update operation based on the prompt information. When it is determined that N≠1, the processing strategy is determined to be, in response to the log information received for the Nth time, determining the data required for performing the update operation based on the prompt information received for the previous N times.

[0064] The log information of configuration operations may include but is not limited to the timestamp of the operation, information about the initiator of the operation, and operation parameters.

[0065] Figure 3 A schematic diagram of interaction of a cache update process according to an embodiment of the present invention is shown.

[0066] For the case of N=1, the interactive method of the cache update process can be as follows Figure 3 Operations S301 to S305 are shown.

[0067] In operation S301 , storage management software may execute a command to cause a change in storage array data.

[0068] In operation S302 , the command line interface module sends a prompt message to the storage management software when detecting a change in storage array data transmission.

[0069] In operation S303, the storage management software receives the prompt information sent by the command line interface module and saves the prompt information.

[0070] In operation S304, the command line interface module sends log information recording configuration operations, such as audit log information, to the storage management software.

[0071] In operation S305 , in response to receiving the log information, the storage management software may determine data required to perform the update operation based on the prompt information.

[0072] For example, a specific operation may be determined based on the prompt information, and then a query operation may be performed on the operation object targeted by the operation to obtain data required for performing the update operation, and then the update operation may be performed on the cache.

[0073] For the case where N≠1, the prompt information received the first N times may be the prompt information after processing. For example, each time a prompt information is received, the storage management software may retain only one identical prompt information.

[0074] Figure 4 A schematic diagram of interaction of a cache update process according to an embodiment of the present invention is shown.

[0075] For the case where N≠1, the interactive method of the cache update process can be as follows Figure 4 Operations S401 to S410 are shown.

[0076] In operation S401 , the storage management software may execute an n=1th command to change storage array data.

[0077] In operation S402 , the command line interface module sends an n=1th prompt message to the storage management software when detecting a change in storage array data transmission.

[0078] In operation S403 , the storage management software receives the n=1th prompt information sent by the command line interface module and saves the prompt information.

[0079] In operation S404 , the command line interface module sends the n=1th log information recording the n=1th configuration operation, such as audit log information, to the storage management software.

[0080] In operation S405 , the storage management software may discard the log information in response to receiving the n=1th log information, and then repeat operations S401 to S405 with n=2 until n=N, and then execute operations S406 to S410 .

[0081] In operation S406 , the storage management software executes the Nth command to change the storage array data.

[0082] In operation S407 , the command line interface module sends an Nth prompt message to the storage management software when detecting a change in the storage array data transmission.

[0083] In operation S408 , the storage management software receives the Nth prompt information sent by the command line interface module and saves the prompt information.

[0084] In operation S409 , the command line interface module sends the Nth log information recording the execution of the command, such as audit log information, to the storage management software.

[0085] In operation S410 , in response to receiving the Nth log information, the storage management software determines data required to perform an update operation based on the prompt information received N times previously.

[0086] It should be noted that when performing operations S403 and S408, if the same prompt information exists, it is not necessary to save it again. That is, if the prompt information received before determining that the prompt information is the same as the prompt information of this time, it is not necessary to save it again.

[0087] For configuration operations that execute single commands, the storage management software determines the data required to perform the update operation upon receiving log information, and then performs the cache update operation. For configuration operations that execute batch commands, the received prompt information is processed once after the last log information is received. This can prevent storage management software lags and ensure the synchronization of cache data with storage array data.

[0088] Determining the data required for performing an update operation based on the prompt information received N times previously may include the following operations: parsing the prompt information, grouping the prompt information received N times previously according to the attributes of the operation object in the prompt information, and then performing query operations on each group of prompt information separately through multiple threads, so as to compare the attributes of the operation object in the prompt information with the attributes of the operation object in the cache, and obtain the attribute name, new value, and old value of the corresponding attribute, etc., and determine the attribute name, new value, and old value of the corresponding attribute as the data required for the update operation.

[0089] For example, taking the operation object as a volume, and classifying it into three groups according to volume type: data volume, system volume, and swap volume, three threads can be used to compare the data volume, system volume, and swap volume in the prompt information with the data volume, system volume, and swap volume in the cache, respectively, to obtain the name, new value, and old value of the data volume, system volume, and swap volume, respectively. Based on the name of the data volume, system volume, and swap volume, the new value is used to replace the old value in the cache to complete the cache update.

[0090] When a large number of prompt messages are received for configuration operations that execute batch commands, failure to process the prompt messages in a timely manner may also result in failure to update the cache in real time. Therefore, multi-threaded query can speed up the query process and thus improve the user experience.

[0091] Because the storage management software cannot determine the time and number of configuration operations performed on users or third-party platforms, if the storage management software updates the cache in response to receiving prompt information, it will cause the storage management software to update the cache multiple times when multiple configuration operations are performed in a short adjacent period of time, consuming resources and easily causing lag problems.

[0092] Based on this, the present invention introduces a first predetermined time interval when performing configuration operations on a user or a third-party platform.

[0093] Figure 5 A schematic diagram of interaction of a cache update process according to an embodiment of the present invention is shown.

[0094] The interactive method of cache update process can be as follows Figure 5 Operations S501 to S505 are shown.

[0095] In operation S501 , a user or a third-party platform performs a configuration operation to change storage array data.

[0096] In operation S502 , when determining that storage array data has changed, the command line interface module sends a prompt message to the storage management software.

[0097] In operation S503 , the storage management software saves the prompt information.

[0098] In operation S504 , the command line interface module sends log information to the storage management software.

[0099] In operation S505 , in response to receiving the log information recording the operation, a processing strategy is determined based on a first predetermined time interval.

[0100] In this example, for the above-mentioned operation S505, in response to receiving log information recording an operation, determining a processing strategy based on a first predetermined time interval may include the following operations: taking the moment when the log information recording the operation is received as the starting moment, and if it is determined that no log information is received within the first predetermined time interval from the starting moment, determining the processing strategy to determine the data required for performing the update operation based on the prompt information. If it is determined that the log information is received within the first predetermined time interval from the starting moment and no log information is received within the next first predetermined time interval, determining the processing strategy to determine the data required for performing the update operation at the moment of the next first predetermined time interval from the starting moment based on the prompt information received before the moment of the next first predetermined time interval from the starting moment.

[0101] For example, the time can be counted from the starting moment. If a log message is received within the first first predetermined time interval, then the configuration operation performed by the user or third-party platform can be considered as an operation for executing a batch command. Within the second first predetermined time interval, it can be determined again whether a log message is received. And so on. If no log message is received within the Mth first predetermined time interval, the specific operation object of the configuration operation performed by the user or third-party platform recorded in the prompt information can be queried for the specific operation object to obtain the data required to perform the update operation, and then the update operation can be performed on the cache. M can be an integer greater than or equal to 2.

[0102] The first predetermined time interval may be, for example, an empirical value, such as 2 seconds.

[0103] A cache update mechanism is designed for configuration operations performed by users or third-party platforms, enabling storage management software to perform update operations in real time.

[0104] Figure 6 A schematic diagram of interaction of a cache update process according to an embodiment of the present invention is shown.

[0105] For the scenario where the storage array data itself changes, the prompt information can be processed every second predetermined time interval, such as Figure 6 The second predetermined time interval can be represented by K.

[0106] In operation S601 , the command line interface module detects changes in storage array data.

[0107] In operation S602, the command line interface module sends prompt information to the storage management software.

[0108] In operation S603, the storage management software saves the prompt information.

[0109] It should be noted that operations S601 to S603 may be executed cyclically within the K time.

[0110] In operation S604, the storage management software processes the prompt information every K time periods.

[0111] Since different users may be concerned about different non-configuration operations that change the storage array data itself, if a static threshold is set, although the cache can be updated, it will also lead to a poor user experience due to the deviation from user expectations.

[0112] Based on this, determining a processing strategy based on the prompt information may include: determining a second predetermined time interval that matches the non-configuration operation based on a predetermined mapping relationship, where the predetermined mapping relationship represents a mapping relationship between the non-configuration operation and the second predetermined time interval. Based on the time when the prompt information is received and the second predetermined time interval, determining a processing strategy to determine data required for performing the update operation based on the prompt information at a time within the second predetermined time interval from the start time.

[0113] For example, non-configuration operations can be classified based on the user's level of attention to them. For example, non-configuration operations with a level of attention greater than or equal to a first level threshold are classified as a first category, which is considered to have a high level of attention. Non-configuration operations with a level of attention greater than or equal to a second level threshold, but less than the first level threshold, are classified as a second category, which is considered to have a second high level of attention. Non-configuration operations with a level of attention less than the second level threshold are classified as a third category, which is considered to have a low level of attention. The first level threshold is greater than the second level threshold.

[0114] The higher the level of concern, the shorter the second predetermined time interval. For example, if a non-configuration operation results in an alarm event, and the alarm event indicates whether the storage device is healthy, which the user will be very concerned about, this non-configuration operation can be considered the first category, and the corresponding second predetermined time interval can be 2 seconds. Non-configuration operations may involve operation objects and components such as hard disks, pools, redundant arrays of independent disks, volumes, hosts, file systems, network attached storage shares, cabinets, controllers, etc., which the user will be less concerned about. This non-configuration operation can be considered the second category, and the corresponding second predetermined time interval can be 10 seconds. Non-configuration operations may involve objects and components other than the first and second categories that the user is less concerned about or have redundancy and do not require special attention. This non-configuration operation can be considered the third category, and the corresponding second predetermined time interval can be 30 seconds.

[0115] For example, the storage management software may determine the data required to perform the update operation based on the prompt information at a second predetermined time interval from the moment the prompt information is received.

[0116] Since the second predetermined time interval matching the non-configuration operation is determined based on the predetermined mapping relationship, personalized time configuration can be performed according to the degree of attention paid by different users to the non-configuration operation.

[0117] Cache update methods can include the above Figure 2 In addition to the operations S210 to S230 shown, the process may further include: determining data required for performing the update operation based on the prompt information before performing the update operation on the cache based on the processing strategy; and displaying the data required for performing the update operation.

[0118] For example, the prompt information can be parsed, and if it is determined that the prompt information contains storage array data that has been changed due to an operation, it can be determined as data required for performing the update operation and then displayed on the page of the storage management software.

[0119] Because the data required for performing the update operation is determined based on the prompt information before performing the update operation on the cache based on the processing strategy, the data displayed on the page can be the latest data, ensuring that users can obtain real-time information at any time.

[0120] Based on the above cache update method, the present invention also provides a cache update device. Figure 7 The device is described in detail.

[0121] Figure 7 A structural block diagram of a cache updating device according to an embodiment of the present invention is shown.

[0122] like Figure 7 As shown, the cache updating device 700 of this embodiment includes a first determining module 710 , a second determining module 720 and an updating module 730 .

[0123] The first determining module 710 is configured to determine the type of operation that caused the storage array data to change in response to receiving the prompt information indicating that the storage array data has changed. In one embodiment, the first determining module 710 may be configured to perform the operation S210 described above, which will not be described in detail here.

[0124] The second determining module 720 is used to determine a processing strategy for processing the prompt information based on the operation type. In one embodiment, the second determining module 720 can be used to perform the operation S220 described above, which will not be repeated here.

[0125] The update module 730 is used to perform an update operation on the cache based on the processing strategy. In one embodiment, the update module 730 can be used to perform the operation S230 described above, which will not be repeated here.

[0126] According to an embodiment of the present invention, the operation type may include a configuration type or a non-configuration type.

[0127] The first determination module 710 may include: a first determination subunit, a second determination subunit, and a third determination subunit. The first determination subunit is configured to determine that the operation type is a configuration type when a command is executed. The second determination subunit is configured to determine that the operation type is a non-configuration type when a command is not executed and no log information recording the execution of the command is received within a predetermined period of time. The third determination subunit is configured to determine that the operation type is a configuration type when a command is not executed and log information recording the execution of the command is received.

[0128] According to an embodiment of the present invention, the second determination module 720 may include: a fourth determination subunit, a fifth determination subunit, and a sixth determination subunit. The fourth determination subunit is configured to determine a processing strategy based on the number of times the command is executed when determining that the command is executed. The fifth determination subunit is configured to determine a processing strategy based on a first predetermined time interval in response to receiving log information recording the execution of the command when determining that the operation type is a configuration type and the command is not executed. The sixth determination subunit is configured to determine a processing strategy based on prompt information when determining that the operation type is a non-configuration type.

[0129] According to an embodiment of the present invention, the number of times may include N times, where N is a positive integer.

[0130] Illustratively, determining the processing strategy based on the number of times the command is executed may include the following operations: when it is determined that N=1, determining the processing strategy as determining the data required for performing the update operation based on the prompt information in response to receiving the log information recording the execution command. When it is determined that N≠1, determining the processing strategy as determining the data required for performing the update operation based on the prompt information received the Nth time in response to the log information received.

[0131] Exemplarily, determining the number of times the command is executed may include the following operations: if it is determined that the parameters of the command include the predetermined parameters, determining that N=1. If it is determined that the parameters of the command do not include the predetermined parameters, determining that N≠1.

[0132] Exemplarily, in response to receiving log information that records an execution command, determining a processing strategy based on a first predetermined time interval may include the following operations: taking the moment when the log information that records the execution command is received as the starting moment, and if it is determined that no new log information is received within the first predetermined time interval from the starting moment, determining the processing strategy to determine the data required for performing the update operation based on the prompt information. If it is determined that new log information is received within the first predetermined time interval from the starting moment, and no log information is received within the next first predetermined time interval, determining the processing strategy to determine the data required for performing the update operation at the moment of the next first predetermined time interval from the starting moment, based on the prompt information received before the moment of the next first predetermined time interval from the starting moment.

[0133] Illustratively, determining a processing strategy based on the non-configuration operation and the prompt information may include: determining a second predetermined time interval that matches the non-configuration operation based on a predetermined mapping relationship, where the predetermined mapping relationship represents a mapping relationship between the non-configuration operation and the second predetermined time interval; and determining, based on the time when the prompt information is received and the second predetermined time interval, a processing strategy to determine data required for performing the update operation based on the prompt information at a time within the second predetermined time interval from the start time.

[0134] According to an embodiment of the present invention, the cache update apparatus 700 further includes a data determination module and a display module. The data determination module is configured to determine, based on prompt information, the data required for performing the update operation before performing the update operation on the cache based on the processing strategy. The display module is configured to display the data required for performing the update operation.

[0135] According to embodiments of the present invention, any multiple modules among the first determination module 710, the second determination module 720, and the update module 730 may be combined into a single module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present invention, at least one of the first determination module 710, the second determination module 720, and the update module 730 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or may be implemented in hardware or firmware through any other reasonable means of circuit integration or packaging, or may be implemented in any one of the three implementation methods of software, hardware, and firmware, or any appropriate combination of these. Alternatively, at least one of the first determination module 710, the second determination module 720, and the update module 730 may be at least partially implemented as a computer program module that, when executed, performs the corresponding functionality.

[0136] Figure 8 A block diagram of an electronic device suitable for implementing a cache update method according to an embodiment of the present invention is shown.

[0137] like Figure 8 As shown, an electronic device 800 according to an embodiment of the present invention includes a processor 801, which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 802 or programs loaded from a storage unit 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or related chipsets and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.

[0138] The RAM 803 stores various programs and data required for the operation of the electronic device 800. The processor 801, ROM 802, and RAM 803 are connected to each other via a bus 804. The processor 801 executes the programs in the ROM 802 and / or RAM 803 to perform the various operations of the method flow according to the embodiment of the present invention. It should be noted that the programs may also be stored in one or more memories other than the ROM 802 and RAM 803. The processor 801 may also execute the programs stored in one or more memories to perform the various operations of the method flow according to the embodiment of the present invention.

[0139] According to an embodiment of the present invention, electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to bus 804. Electronic device 800 may also include one or more of the following components connected to I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 808 including a hard disk; and a communication section 809 including a network interface card such as a LAN card or modem. Communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to I / O interface 805 as needed. Removable media 811, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 810 as needed, so that computer programs read from the removable media can be installed into storage section 808 as needed.

[0140] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of the present invention.

[0141] According to an embodiment of the present invention, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present invention, a computer-readable storage medium may include the ROM 802 and / or RAM 803 described above, and / or one or more memories other than ROM 802 and RAM 803.

[0142] The embodiments of the present invention further include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to cause the computer system to implement the method provided by the embodiments of the present invention.

[0143] The computer program executes the above functions defined in the system / device of the embodiment of the present invention when executed by the processor 801. According to the embodiment of the present invention, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0144] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 809, and / or installed from a removable medium 811. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0145] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 809 and / or installed from a removable medium 811. When the computer program is executed by the processor 801, the above-described functions defined in the system of the embodiment of the present invention are performed. According to the embodiment of the present invention, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.

[0146] According to an embodiment of the present invention, the program code for executing the computer program provided by the embodiment of the present invention can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).

[0147] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0148] It will be understood by those skilled in the art that the features described in the various embodiments of the present invention may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in the present invention. In particular, the features described in the various embodiments of the present invention may be combined and / or coupled in various ways without departing from the spirit and teachings of the present invention. All such combinations and / or couplings fall within the scope of the present invention.

[0149] The above describes embodiments of the present invention. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present invention. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.

Claims

1. A cache update method, characterized in that: The method comprises: In response to receiving prompt information indicating that storage array data has changed, determining an operation type of an operation that causes the storage array data to change, the operation type including a configuration type or a non-configuration type; In the case of determining to execute the command, determining a processing strategy based on the number of times the command is executed; In a case where it is determined that the operation type is the configuration type and the command is not executed, in response to receiving log information recording the execution of the command, determining the processing strategy based on a first predetermined time interval; In the case where it is determined that the operation type is the non-configuration type, determining the processing strategy based on the prompt information; Based on the processing strategy, an update operation is performed on the cache.

2. The method according to claim 1, characterized in that Determining the operation type of the operation that causes the storage array data to be changed includes: In the case of executing a command, determining that the operation type is the configuration class; If the command is not executed and no log information recording the execution of the command is received within a predetermined period of time, determining that the operation type is the non-configuration type; If the command is not executed and log information recording the execution of the command is received, it is determined that the operation type is the configuration type.

3. The method according to claim 1, characterized in that The number of times includes N times, where N is a positive integer; The determining of a processing strategy based on the number of times the command is executed includes: In the case where N=1, determining the processing strategy is to determine data required for performing the update operation based on the prompt information in response to receiving the log information recording the execution command; When it is determined that N≠1, the processing strategy is determined to be, in response to the log information received for the Nth time, determining data required for performing an update operation based on the prompt information received for the previous N times.

4. The method according to claim 3, characterized in that The method further comprises: In the case where it is determined that the parameters of the execution command include the predetermined parameters, N=1 is determined; In a case where it is determined that the parameters of the execution command do not include the predetermined parameter, it is determined that N≠1.

5. The method according to claim 1, wherein The step of determining the processing strategy based on a first predetermined time interval in response to receiving the log information recording the execution command includes: Taking the time when the log information recording the execution command is received as the starting time, if it is determined that no log information is received within a first predetermined time interval from the starting time, determining the processing strategy to determine the data required to perform the update operation based on the prompt information; When it is determined that log information is received within a first predetermined time interval from the starting moment and no log information is received within a next first predetermined time interval, the processing strategy is determined to be to determine the data required to perform the update operation at a moment of the next first predetermined time interval from the starting moment based on prompt information received before a moment of the next first predetermined time interval from the starting moment.

6. The method according to claim 1, characterized in that The determining the processing strategy based on the prompt information includes: Determining a second predetermined time interval that matches the non-configuration operation based on a predetermined mapping relationship, wherein the predetermined mapping relationship represents a mapping relationship between the non-configuration operation and the second predetermined time interval; According to the time when the prompt information is received and the second predetermined time interval, the processing strategy is determined to determine the data required for performing the update operation based on the prompt information at the time of the second predetermined time interval from the start time.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Before performing an update operation on the cache based on the processing strategy, Based on the prompt information, determining the data required to perform the update operation; Presents the data needed to perform an update operation.

8. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, The method further comprises the step of executing the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Software layer cache updating method and system in storage system and related device

    CN110795032A