Cache updating method and device, medium and program product
By responding to changes in storage array data in storage management software, distinguishing operation types and formulating processing strategies, and accurately updating the cache, the problems of insufficient real-time and performance losses during storage array data changes are solved, ensuring the consistency between cached data and storage array data is improved, and system stability and response speed are improved.
Patent Information
- Application Number
- CN202510837608.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-06-20
AI Technical Summary
Existing storage management software lacks targeted cache processing mechanisms when storage array data changes, resulting in insufficient real-time and performance losses, and thus cached data is inconsistent with the actual data of the storage array.
By responding to the prompt information about changes in storage array data, the operation type is determined and the corresponding processing strategy is formulated, and the cache is updated, including the distinction between configuration and non-configuration classes, and multi-threaded query and a predetermined time interval mechanism are adopted to ensure the consistency between cached data and storage array data.
It realizes accurate updates of cached data and storage array data, improves system stability and response speed, and avoids resource waste and lag problems.
Smart Images

Figure CN120354026A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technologies, and more particularly to the field of storage devices, and even more particularly to a cache update method, device, medium, and program product. Background Art
[0002] With the rapid development of the Internet, especially the development of cloud computing and the Internet of Things, user and application data have shown a rapid growth trend, and storage arrays have emerged accordingly, which are specifically used to store data. Storage management software is used to manage storage arrays, and its response speed has a direct impact on the user experience. Improving the response speed of storage management software is inseparable from the design of data caches.
[0003] In the process of implementing the embodiments of the present invention, it is found that although storage management software relies on data caches to improve response speed, for operations that cause changes in the data of the storage array, due to the lack of a targeted cache processing mechanism, insufficient real-time performance and / or performance loss may occur when the processing is improper, and further, the data in the cache is inconsistent with the actual data of 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, there is provided a cache update method, including: in response to receiving a prompt message indicating a change in the data of the storage array, determining the operation type of the operation that causes the change in the data of the storage array; based on the operation type, determining a processing strategy for processing the prompt message; and based on the processing strategy, performing an update operation on the cache.
[0006] A second aspect of the present invention provides a cache update device, including: a first determination module, configured to determine the operation type of the operation that causes the change in the data of the storage array in response to receiving a prompt message indicating a change in the data of the storage array; a second determination module, configured to determine a processing strategy for processing the prompt message based on the operation type; and an update module, configured to perform an update operation on the cache based on the processing strategy.
[0007] A third aspect of the present invention provides an electronic device, including: one or more processors; a memory, configured to store 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] A fourth aspect of the present invention further provides a computer-readable storage medium, on which a computer program or instruction is stored, and when the computer program or instruction is executed by a processor, the steps of the above method are implemented.
[0009] The fifth aspect of the present invention further provides a computer program product, including a computer program or instructions, and when the computer program or instructions are executed by a processor, the steps of the above method are implemented.
[0010] Since, when receiving a prompt message, a processing strategy for processing the prompt message is determined based on the operation type of the operation that causes the change in the data of the storage array, it is possible to flexibly formulate a processing strategy for different operation types that cause the change in the data of the storage array, and be able to process the prompt message specifically, realize accurate update of the cache, make the data in the cache consistent with the actual data of the storage array, and the system runs stably. At least partially solve the problem that due to the lack of a targeted cache processing mechanism in the present invention, insufficient real-time performance and / or performance loss occur when processing improperly, and further the data in the cache is inconsistent with the actual data of the storage array. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Through the following description of the embodiments of the present invention with reference to the drawings, the above content and other objects, features and advantages of the present invention will become clearer.
[0012] Figure 1 The application scenario diagram of the cache update method, device, equipment, medium and program product according to the embodiment of the present invention is shown.
[0013] Figure 2 The flowchart of the cache update method according to the embodiment of the present invention is shown.
[0014] Figure 3 The interaction schematic diagram of the cache update process according to an embodiment of the present invention is shown.
[0015] Figure 4 The interaction schematic diagram of the cache update process according to an embodiment of the present invention is shown.
[0016] Figure 5 The interaction schematic diagram of the cache update process according to an embodiment of the present invention is shown.
[0017] Figure 6 The interaction schematic diagram of the cache update process according to an embodiment of the present invention is shown.
[0018] Figure 7 The structural block diagram of the cache update device according to the embodiment of the present invention is shown.
[0019] Figure 8 The block diagram of the electronic device suitable for implementing the cache update method according to the embodiment of the present invention is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS
[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 merely exemplary and are not intended to limit the scope of the present invention. In the following detailed description, for the sake of explanation, numerous specific details are set forth in order to provide a comprehensive understanding of the embodiments of the present invention. However, it is obvious that one or more embodiments can also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present invention.
[0021] The terms used herein are merely for describing specific embodiments and are not intended to limit the present invention. Terms such as "including" and "comprising" 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] In cases where expressions similar to "at least one of A, B, and C, etc." are used, generally, it should be interpreted according to 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 not be limited to, a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).
[0024] In the process of implementing the embodiments of the present invention, it is found that although in related examples, for the storage management software data cache, when the data in the storage array changes, the underlying core software will notify these changes to the storage management software, and the storage management software will update the cache when it receives the notification. However, in a short period of time, when there are many identical notifications, the storage management software will repeat a large number of updates, wasting a large amount of resources and may also cause a large number of notifications to queue up, resulting in the storage management software becoming stuck, etc. For example, if there are 10,000 volumes in the storage array and 1,000 volumes have changed within 30 seconds, the management software will receive 1,000 notifications. Each time it receives a notification, the storage management software will execute a query for the volume, a total of 1,000 times. In fact, it only needs to execute a query for the volume once after receiving the last notification. If it takes 0.5 seconds to execute a query for the volume, it will take about 8.3 minutes in a serial execution storage array, causing the storage management software to become stuck.
[0025] In some other related examples, in order to solve the disadvantages of resource waste and storage management software lag in the related examples, by sacrificing a part of real-time performance, after the storage management software receives a notification, it saves it first without processing, merges the same notifications into one notification, and processes the notification every T time (such as 30 seconds). However, it will cause the cache of the storage management software and the actual data of the storage array to be out of real-time synchronization, with a T-time error. Therefore, how to specifically achieve the consistency of the actual data between the cache and the storage array is an urgent problem for those skilled in the art to solve.
[0026] In view of this, an embodiment of the present invention provides a cache update method, including: in response to receiving a prompt message indicating that the data of the storage array has changed, determining the operation type of the operation that causes the data of the storage array to change; based on the operation type, determining a processing strategy for processing the prompt message; and based on the processing strategy, performing an update operation on the cache.
[0027] Figure 1 The application scenario diagram of the cache update method, device, equipment, medium and program product according to the embodiment of the present invention is shown.
[0028] As Figure 1 shown, the application scenario 100 according to this embodiment may include a storage management software 101 and a storage array 102. A communication link medium may be provided between the storage management software 101 and the storage array 102 through a network. The network may include various connection types, such as wired, wireless communication links or fiber optic cables, etc.
[0029] The storage management software 101 may be composed of a user interface, backend processing logic, a communication module, etc. (only for example). The user interface may provide a command line interface, allowing an administrator to perform more flexible and efficient management operations by inputting commands, etc. The backend 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 execute storage management tasks, such as creating storage volumes, adjusting configurations, etc. The data processing module may be used to process data read and write requests, manage cache data, and ensure data consistency and integrity. The communication module may communicate with the storage array 102 through specific protocols and interfaces, send instructions and receive responses, etc.
[0030] The storage array 102 may be used as a physical storage device, composed of multiple disk drives, independent disk redundant array controllers and other hardware, providing actual data storage functions.
[0031] The storage management software 101 takes the storage array 102 as the management object, abstracts, organizes and manages the hardware resources of the storage array 102 through software functions, enabling users to conveniently use and operate the storage array 102.
[0032] For example, a user, a third-party platform, or the storage management software 101 can all cause changes to the storage array data in the storage array 102 by executing commands. When the computing platform or the underlying core software connected to the storage array 102 monitors the change of the storage array data in the storage array 102, it can send a prompt message indicating the change of the storage array data to the storage management software 101. After receiving the prompt message indicating the change of the storage array data, the storage management software 101 can update its cache. The underlying core software can include, for example, 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 the storage array data in the storage array 102 changes.
[0033] It should be noted that the cache update method provided by the embodiments of the present invention can generally be executed by the storage management software 101. Correspondingly, the cache update device provided by the embodiments of the present invention can generally be set in the storage management software 101. The cache update method provided by the embodiments 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. Correspondingly, the cache update device provided by the embodiments 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 numbers of the storage management software and the storage array are merely illustrative. According to the implementation requirements, any number of storage management software and storage arrays can be provided.
[0035] The following will be based on Figure 1 the scenarios described Figures 2 - 6 to describe in detail the cache update method of the application embodiments.
[0036] Figure 2 shows a flowchart of the cache update method according to an embodiment of the present invention.
[0037] As Figure 2 shown, the cache update method of this embodiment includes operations S210 to S230.
[0038] In operation S210, in response to receiving a prompt message indicating a change in the storage array data, determine the operation type of the operation that causes the change in the storage array data.
[0039] In operation S220, based on the operation type, determine a processing strategy for processing the prompt message.
[0040] In operation S230, based on the processing strategy, perform an update operation on the cache.
[0041] In an embodiment of the present invention, when the data of the storage array changes, the command line interface module connected to the storage array can send a prompt message indicating the change of the storage array data to the storage management software.
[0042] The storage array data may refer to the data stored in the storage array, such as but not limited to user data, system data, and metadata. User data may include but not limited to files, databases, virtual machine disks, application data, etc. User data may be stored in storage volumes in the storage array. System data may include but not limited to configuration files, log files, system status information, etc. Metadata may include but not limited to data describing the attributes and organization methods of user data and system data. The organization method may include, for example, storage volumes, storage pools, and file systems, etc.
[0043] The prompt message may include at least one of the following: the type of changed data, the specific content of the change, the timestamp of the change, and other relevant context information. The data type includes, for example, user data, system data, metadata, etc. The specific content of the change includes, for example, the creation, deletion, or attribute modification of a storage volume. For example, the size of a certain storage volume is adjusted to ***GB, and the change time is ** time.
[0044] The operations that cause the storage array data to change may include user data change operations, system data change operations, and metadata change operations. User data change operations may include, for example, but not limited to file creation, modification, and deletion, database operations, file transfer and synchronization operations, etc. System data change operations may include, for example, but not limited to configuration file modification, software package installation, update, or uninstallation operations, start, stop, or restart system services, etc. Metadata change operations may include, for example, but not limited to file attribute and permission modification, disk formatting, creation or adjustment of file systems, mounting or unmounting of file systems, creation, deletion, adjustment of the size and attributes of storage volumes or storage pools, etc.
[0045] The processing policy can be used to indicate the processing conditions and processing methods for processing the prompt message. The processing conditions may include, for example, time limit conditions, etc. The processing method is used to indicate the method for obtaining the changed storage array data.
[0046] For example, for operations of different operation types, reference parameters can be determined. The reference parameters may include, for example, at least one of the following: the requirement for real-time performance of the operation, the requirement for data consistency, the complexity of the operation, the scope of operation influence, etc. According to the reference parameters, the processing conditions and processing methods for processing the prompt message are determined. For example, for an operation with a high requirement for real-time performance, it can be determined that when the log information recording the execution command is received, the cache is immediately updated by parsing the prompt message.
[0047] Since, when a prompt message is received, a processing strategy for processing the prompt message is determined based on the operation type of the operation that causes changes in the data of the storage array, it is possible to flexibly formulate a processing strategy for different operation types that cause changes in the data of the storage array, be able to process the prompt message specifically, achieve precise update of the cache, make the data in the cache consistent with the actual data of the storage array, and the system runs stably. At least partially solve the problem that due to the lack of a targeted cache processing mechanism in the present invention, insufficient real-time performance and / or performance loss occur when the processing is improper, and thus the data in the cache is inconsistent with the actual data of 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] Exemplarily, the configuration type may indicate an operation for changing the structure, function, performance, or security settings of the storage array, and these operations affect the configuration and behavior of the storage resources but do not directly modify the content of the user data. For example, it may include operations for creating or deleting storage resources such as storage volumes and storage pools, and may also include operations for adjusting the size and attributes of the storage volume, or the capacity and disk composition of the storage pool.
[0050] The non-configuration type may indicate an operation for directly operating on the content of the user data, or an operation for querying, analyzing, etc. the data, or component aging, etc. For example, it may include the creation, modification, and deletion of files, and changes in the component state caused by component aging.
[0051] As above Figure 2 For the operation S210 shown above, determining the operation type of the operation that causes changes in the data of the storage array may include the operations: when a command is executed, determining that the operation type is a configuration type. When no command is executed and no log information recording the execution of the command is received within a predetermined time period, determining that the operation type is a non-configuration type. When no command is executed and log information recording the execution of the command is received, determining that the operation type is a configuration type.
[0052] Exemplarily, for a scenario where changes in the data of the storage array are caused when a storage management software executes a command, it may be determined that the operation type is a configuration type, and the operation is completed by executing the command. For a scenario where changes in the data of the storage array are caused when a user or a third-party platform inputs a command at the command-line interface to execute an operation, it may also be determined that the operation type is a configuration type. For a scenario where changes in the data of the storage array are caused by the storage array data itself, it may be determined that the operation type is a non-configuration type operation. For a non-configuration type operation, the command-line user interface module does not record log information about the execution of the command, and the storage management software has not executed the command.
[0053] Since the operation type of the operation 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 beneficial to flexibly formulate processing strategies for different operation types.
[0054] According to an embodiment of the present invention, as described above Figure 2 For the operation S220 shown, based on the operation type, determining a processing strategy for processing the prompt information may include operations: when it is determined that the command is executed, determining the processing strategy based on the number of times the command is executed. When it is determined that the operation type is a configuration type and the operation of calling the command line is not executed, in response to receiving the log information recording the execution of the command, determining the processing strategy based on the first predetermined time interval. When it is determined that the operation type is a non-configuration type, determining the processing strategy based on the prompt information.
[0055] In one example, the operation type is a configuration type, and when the storage management software executes a command, it corresponds to the scenario of data changes in the storage array caused by the execution of the command by the storage management software. For this scenario, the processing conditions and processing methods for processing the prompt information can be determined according to the number of times the storage management software executes the command.
[0056] For example, the user can initiate a request to create a volume to the storage management software. When the storage management software responds to the request to create a volume, the number of times the create volume command is executed can be determined by parsing the request to create a volume. If multiple volumes are created, then the number of times the create volume command is executed is multiple times, and it can be determined that the processing condition for processing the prompt information is to update the cache according to the prompt information after all multiple volumes are created. If a single volume is created, then the number of times the create volume command is executed is once, and it can be determined that the processing condition for processing the prompt information is to update the cache immediately according to the prompt information after creating a single volume.
[0057] In another example, the operation type is a configuration type, but when the storage management software does not execute a command, it corresponds to the scenario of data changes in the storage array caused by the operation of the user or a third-party software. Since the number of operations of the user or the third-party software cannot be determined in this scenario, the processing strategy can be determined by setting a first predetermined time interval. The first predetermined time interval can be determined according to the requirement for real-time performance. For example, the higher the requirement for real-time performance, the shorter the first predetermined time interval.
[0058] In still another example, when the operation type is a non-configuration type, the data required for performing the update operation can be determined when the prompt information is received.
[0059] Since by analyzing different scenarios and combining the behavioral characteristics of the storage management software, the processing of the prompt information is refined, enhancing the generality of the method for updating the cache.
[0060] According to an embodiment of the present invention, determining the number of times of performing a configuration operation on a storage array by a command-line interface may include the operations of: determining N = 1 when it is determined that the parameters of the executed command include a predetermined parameter; and determining N≠1 when it is determined that the parameters of the executed command do not include a predetermined parameter. The storage management software may determine the specific number of times of the executed command according to the content of other parameters of the executed command.
[0061] The predetermined parameter may be used to identify the execution of a configuration operation once.
[0062] For the scenario of data change in the storage array caused by the execution of a call command operation on the storage management software, if the command-line interface module does not send the log information of the executed command to the storage management software, it is possible that the command execution of the storage management software fails. At this time, if the cache is updated, it will cause the data in the cache to be inconsistent with the data in the storage array and 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, it is determined that the processing policy is to determine the data required for the execution of the update operation based on the prompt information in response to receiving the log information of the executed command. When it is determined that N≠1, it is determined that the processing policy is to determine the data required for the execution of the update operation based on the prompt information received in the previous N times in response to the log information received for the Nth time.
[0064] The log information recording the configuration operation may include but is not limited to the timestamp of the operation, the initiator information of the operation, operation parameters, etc.
[0065] Figure 3 The interaction schematic diagram of the cache update process according to an embodiment of the present invention is shown.
[0066] For the case of N = 1, the interaction method of the cache update process may be as Figure 3 shown in operation S301 to operation S305.
[0067] In operation S301, the storage management software may execute a command to cause a change in the storage array data.
[0068] In operation S302, when the command-line interface module monitors a change in the storage array data, it sends a prompt information to the storage management software.
[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 the log information recording the configuration operation, 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 the data required to perform the update operation based on the prompt information.
[0072] For example, the specific operation may be determined according to the prompt information, and then a query operation may be performed on the operation object targeted by the operation to obtain the data required to perform the update operation, and then the cache is updated.
[0073] For the case where N≠1, the first N received prompt messages may be processed prompt messages. For example, each time a prompt message is received, the storage management software may only retain one of the same prompt messages.
[0074] Figure 4 The interactive schematic diagram of the 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 may be as Figure 4 shown in operations S401 to S410.
[0076] In operation S401, the storage management software may execute the n = 1st command to cause a change in the storage array data.
[0077] In operation S402, when the command line interface module monitors a change in the storage array data, it sends the n = 1st prompt message to the storage management software.
[0078] In operation S403, the storage management software receives the n = 1st prompt message sent by the command line interface module and saves the prompt message.
[0079] In operation S404, the command line interface module records the n = 1st log information of the n = 1st configuration operation, such as audit log information, and sends it to the storage management software.
[0080] In operation S405, in response to receiving the n = 1st log information, the storage management software may discard the log information, and then set n = 2 and repeat operations S401 to S405 until n = N, and then perform operations S406 to S410.
[0081] In operation S406, the storage management software executes the Nth command to cause a change in the storage array data.
[0082] In operation S407, when the command line interface module monitors a change in the storage array data, it sends the Nth prompt message to the storage management software.
[0083] In operation S408, the storage management software receives the Nth prompt message sent by the command line interface module and saves the prompt message.
[0084] In operation S409, the command-line interface module will record the Nth log information of the executed command, such as audit log information, and send it to the storage management software.
[0085] In operation S410, in response to receiving the Nth log information, the storage management software determines the data required for the update operation based on the previously received N pieces of prompt information.
[0086] It should be noted that when performing operations S403 and S408, if there is the same prompt information, there is no need to save it repeatedly. That is, when the prompt information received before determining the current prompt information is the same as the current prompt information, there is no need to save it repeatedly.
[0087] For configuration operations that execute a single command, when the storage management software receives log information, it will determine the data required for the update operation and then perform a cache update operation. For configuration operations that execute batch commands, after receiving the log information for the last time, perform a single processing on the received prompt information, which can avoid the problem of the storage management software getting stuck and ensure the synchronization of the cache data and the storage array data.
[0088] For determining the data required for the update operation based on the previously received N pieces of prompt information, it may include operations: by parsing the prompt information, group the previously received N pieces of prompt information according to the attributes of the operation objects in the prompt information, and then perform query operations on each group of prompt information through multiple threads respectively, so as to compare the attributes of the operation objects in the prompt information with the attributes of the operation objects in the cache, and obtain the attribute names, new values, old values, etc. of the corresponding attributes, and determine the attribute names, new values, and old values of the corresponding attributes as the data required for the update operation.
[0089] For example, taking the operation object as a volume, classified according to the type of volume into three groups: 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, and obtain the names, new values, and old values of the data volume, system volume, and swap volume respectively. Based on the names of the data volume, system volume, and swap volume, use the new values to replace the old values in the cache to complete the cache update.
[0090] Since when there are a large number of prompt information received for configuration operations that execute batch commands, untimely processing of the prompt information may also cause the cache not to be updated in real time. Therefore, querying through multiple threads can speed up the query process and thus improve the user experience.
[0091] Due to configuration operations performed on users or third - party platforms, the storage management software cannot determine the time and frequency of configuration operations. If the storage management software updates the cache in response to receiving a prompt message, when multiple configuration operations are performed within a relatively short adjacent period, the storage management software will update the cache multiple times, consuming resources and prone to jamming problems.
[0092] Based on this, the present invention introduces a first predetermined time interval when performing configuration operations on users or third - party platforms.
[0093] Figure 5 The interactive schematic diagram of the cache update process according to an embodiment of the present invention is shown.
[0094] The interactive method of the cache update process can be as Figure 5 shown in operations S501 to S505.
[0095] In operation S501, the user or the third - party platform performs a configuration operation to change the storage array data.
[0096] In operation S502, when the command - line interface module determines that the storage array data has changed, it sends a prompt message to the storage management software.
[0097] In operation S503, the storage management software saves the prompt message.
[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 of the record operation, based on the first predetermined time interval, a processing strategy is determined.
[0100] In this example, for the above - mentioned operation S505, in response to receiving the log information of the record operation, based on the first predetermined time interval, determining the processing strategy may include the operations: taking the moment when the log information of the record operation is received as the starting moment, in the case where it is determined that no log information is received within the first predetermined time interval starting from the starting moment, determining the processing strategy as determining the data required to perform the update operation based on the prompt message. In the case where it is determined that log information is received within the first predetermined time interval starting from the starting moment and no log information is received within the next first predetermined time interval, determining the processing strategy as at the moment of the next first predetermined time interval from the starting moment, determining the data required to perform the update operation based on the prompt message received before the moment of the next first predetermined time interval from the starting moment.
[0101] For example, timing can start from the starting moment. During the first first predetermined time interval, if log information is received, it can be considered that the configuration operation performed by the user or the third-party platform is an operation to execute a batch command. During the second first predetermined time interval, it can be determined again whether log information is received, and so on, until log information is not received during the Mth first predetermined time interval. Then, according to the specific operation object of the configuration operation performed by the user or the third-party platform recorded in the prompt information, the data required for the update operation can be queried for the specific operation object, 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 can be an empirical value, such as 2 seconds, etc.
[0103] Since a cache update mechanism for the configuration operations performed by the user or the third-party platform is designed, the storage management software can perform the update operation in real time.
[0104] Figure 6 The interaction schematic diagram of the 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 operations S601 to S604 shown. The second predetermined time interval can be represented by K.
[0106] In operation S601, the command line interface module monitors that the storage array data has changed.
[0107] In operation S602, the command line interface module sends the 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 can be repeatedly executed within the time of K.
[0110] In operation S604, the storage management software processes the prompt information every K time.
[0111] Since the non-configuration operations for the change of the storage array data itself may have different degrees of concern for different users, if set in the way of a static threshold, although the cache can also be updated, when there is a deviation from the user's expectation, it will also lead to a poor user experience.
[0112] Based on this, a processing strategy is determined based on the prompt information, which may include operations: based on a predetermined mapping relationship, a second predetermined time interval matching the non-configuration operation is determined, and the predetermined mapping relationship represents the mapping relationship between the non-configuration operation and the second predetermined time interval. According to the moment when the prompt information is received and the second predetermined time interval, the processing strategy is determined to be at the moment of the second predetermined time interval from the start moment, and based on the prompt information, the data required to perform the update operation is determined.
[0113] For example, non-configuration operations can be classified according to the user's degree of concern about them. For example, non-configuration operations with a degree of concern greater than or equal to a first degree threshold are classified as the first category and are considered to have a high degree of concern. Non-configuration operations with a degree of concern greater than or equal to a second degree threshold but less than the first degree threshold are classified as the second category and are considered to have a sub-high degree of concern. Non-configuration operations with a degree of concern less than the second degree threshold are classified as the third category and are considered to have a low degree of concern. The first degree threshold is greater than the second degree threshold.
[0114] The higher the degree of concern, the shorter the setting of the second predetermined time interval. For example, a non-configuration operation causes an alarm event, and the alarm event represents the health of the storage device, which the user cares about very much. This non-configuration operation can be considered as the first category, and the corresponding second predetermined time interval can be 2 seconds. Non-configuration operations may involve these 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 cares about less. This non-configuration operation can be considered as the second category, and the corresponding second predetermined time interval can be 10 seconds. Non-configuration operations may involve objects and components that the user cares about less or are redundant and do not need to be particularly concerned about other than the first and second categories. This non-configuration operation can be considered as the third category, and the corresponding second predetermined time interval can be 30 seconds.
[0115] For example, the storage management software can determine the data required to perform the update operation based on the prompt information at the second predetermined time interval from the moment when the prompt information is received.
[0116] Since a 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 different users' degrees of concern about non-configuration operations.
[0117] The cache update method may further include operations in addition to the operations S210 - S230 shown above Figure 2 Before performing the update operation on the cache based on the processing strategy, determine the data required to perform the update operation based on the prompt information. Display the data required to perform the update operation.
[0118] For example, the prompt information can be parsed. When it is determined that there is a change in the storage array data caused by an operation in the prompt information, it can be determined as the data required for performing the update operation. Then it is displayed on the page side of the storage management software.
[0119] Since, before performing the update operation on the cache based on the processing policy, the data required for performing the update operation is determined based on the prompt information, the data displayed on the page side can be the latest data, ensuring that the user 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. The following will be combined with Figure 7 to describe this device in detail.
[0121] Figure 7 The structural block diagram of the cache update device according to an embodiment of the present invention is shown.
[0122] As Figure 7 shown, the cache update device 700 of this embodiment includes a first determination module 710, a second determination module 720, and an update module 730.
[0123] The first determination module 710 is configured to determine the operation type of the operation that causes the change in the storage array data in response to receiving the prompt information indicating the change in the storage array data. In one embodiment, the first determination module 710 can be used to perform the operation S210 described above, which will not be elaborated here.
[0124] The second determination module 720 is configured to determine the processing policy for processing the prompt information based on the operation type. In one embodiment, the second determination module 720 can be used to perform the operation S220 described above, which will not be elaborated here.
[0125] The update module 730 is configured to perform an update operation on the cache based on the processing policy. In one embodiment, the update module 730 can be used to perform the operation S230 described above, which will not be elaborated here.
[0126] According to an embodiment of the present invention, the operation type can include a configuration type or a non-configuration type.
[0127] The first determination module 710 can 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 no command is executed and no log information recording the execution of the command is received within a predetermined time period. The third determination subunit is configured to determine that the operation type is a configuration type when no command is 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 policy based on the number of times of executing a command when it is determined that a command is to be executed. The fifth determination subunit is configured to determine a processing policy based on a first predetermined time interval in response to receiving log information recording the execution of a command when it is determined that the operation type is a configuration type and no command has been executed. The sixth determination subunit is configured to determine a processing policy based on prompt information when it is determined 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] Exemplarily, determining a processing policy based on the number of times of executing a command may include operations: when it is determined that N = 1, determining the processing policy as determining data required for performing an update operation based on prompt information in response to receiving log information recording the execution of a command; when it is determined that N ≠ 1, determining the processing policy as determining data required for performing an update operation based on the prompt information received in the previous N times in response to the log information received for the Nth time.
[0131] Exemplarily, determining the number of times of executing a command may include operations: when it is determined that the parameters of the executed command include predetermined parameters, determining N = 1; when it is determined that the parameters of the executed command do not include predetermined parameters, determining N ≠ 1.
[0132] Exemplarily, determining a processing policy based on a first predetermined time interval in response to receiving log information recording the execution of a command may include operations: taking the moment when the log information recording the execution of a command is received as the starting moment, and when it is determined that no new log information is received within the first predetermined time interval starting from the starting moment, determining the processing policy as determining data required for performing an update operation based on prompt information; when it is determined that new log information is received within the first predetermined time interval starting from the starting moment and no log information is received within the next first predetermined time interval, determining the processing policy as determining data required for performing an update operation based on the prompt information received before the moment of the next first predetermined time interval from the starting moment at the moment of the next first predetermined time interval from the starting moment.
[0133] Exemplarily, determining a processing policy based on a non-configuration type operation and prompt information may include operations: determining a second predetermined time interval matching the non-configuration type operation based on a predetermined mapping relationship, where the predetermined mapping relationship represents the mapping relationship between the non-configuration type operation and the second predetermined time interval; and determining the processing policy as determining data required for performing an update operation based on prompt information at the moment of the second predetermined time interval from the starting moment according to the moment when the prompt information is received and the second predetermined time interval.
[0134] According to an embodiment of the present invention, the cache update device 700 further includes a data determination module and a display module. The data determination module is configured to determine data required for performing an update operation based on a prompt message before performing an update operation on the cache based on a processing policy. The display module is configured to display the data required for performing the update operation.
[0135] According to an embodiment of the present invention, any plurality of modules among the first determination module 710, the second determination module 720, and the update module 730 may be combined and implemented in one module, or any one of them may be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment 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 chip, a system on substrate, a system on package, an application specific integrated circuit (ASIC), or any other reasonable manner of integrating or packaging circuits, etc., implemented by hardware or firmware, or implemented in any one or a suitable combination of the three implementation manners of software, hardware, and firmware. 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, and when the computer program module is run, it can execute corresponding functions.
[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] As Figure 8 shown, the electronic device 800 according to an embodiment of the present invention includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read only memory (ROM) 802 or a program loaded from a storage section 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application specific integrated circuit (ASIC)), etc. The processor 801 may also include on-board memory for cache 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] In the RAM 803, various programs and data required for the operation of the electronic device 800 are stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. The processor 801 performs various operations of the method flow according to an embodiment of the present invention by executing programs in the ROM 802 and / or the RAM 803. It should be noted that the programs can also be stored in one or more memories other than the ROM 802 and the RAM 803. The processor 801 can also perform various operations of the method flow according to an embodiment of the present invention by executing programs stored in one or more memories.
[0139] According to an embodiment of the present invention, the electronic device 800 may further include an input / output (I / O) interface 805, and the input / output (I / O) interface 805 is also connected to the bus 804. The electronic device 800 may further include one or more of the following components connected to the input / output (I / O) interface 805: an input portion 806 including a keyboard, a mouse, etc.; an output portion 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage portion 808 including a hard disk, etc.; and a communication portion 809 including a network interface card such as a LAN card, a modem, etc. The communication portion 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output (I / O) interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed so that a computer program read from it can be installed into the storage portion 808 as needed.
[0140] The present invention also provides a computer-readable storage medium, which may be included in the device / device / system described in the above embodiments; or may exist separately without being assembled into the device / device / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to an embodiment of the present invention is implemented.
[0141] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present invention, the computer-readable storage medium may be any tangible medium that contains or stores a program, and this program 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, the computer-readable storage medium may include the above-described ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803.
[0142] An embodiment of the present invention also includes a computer program product, which includes a computer program that contains program code for executing the method shown in the flowchart. When the computer program product runs in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiment of the present invention.
[0143] When the computer program is executed by the processor 801, it executes the above functions defined in the system / apparatus of the embodiment of the present invention. According to an embodiment of the present invention, the above-described systems, apparatuses, modules, units, etc. can be implemented by computer program modules.
[0144] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices and magnetic storage devices. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and be downloaded and installed through the communication part 809, and / or be installed from the removable medium 811. The program code contained in the computer program can be transmitted by any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0145] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or be installed from the removable medium 811. When the computer program is executed by the processor 801, it executes the above functions defined in the system of the embodiment of the present invention. According to an embodiment of the present invention, the above-described systems, devices, apparatuses, modules, units, etc. can be implemented by computer program modules.
[0146] According to embodiments of the present invention, program code for executing the computer programs provided by the embodiments of the present invention can be written in any combination of one or more programming languages. Specifically, these computing 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, such as Java, C++, Python, the "C" language, or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's 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's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (for example, by connecting through the Internet using an Internet service provider).
[0147] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the above-mentioned module, program segment, or 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 blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0148] Those skilled in the art can understand that the features described in the various embodiments of the present invention can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, without departing from the spirit and teachings of the present invention, the features described in the various embodiments of the present invention can be combined and / or combined in various ways. All such combinations and / or combinations fall within the scope of the present invention.
[0149] The above describes the 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 the embodiments are described separately above, this does not mean that the measures in each embodiment cannot be used advantageously in combination. Without departing from the scope of the present invention, those skilled in the art can make various substitutions and modifications, and all such substitutions and modifications should fall within the scope of the present invention.
Claims
1. A cache update method, characterized in that, The method includes: In response to receiving a prompt message indicating that the data of the storage array has changed, determining the operation type of the operation that caused the change in the data of the storage array; Based on the operation type, determining a processing strategy for processing the prompt message; Based on the processing strategy, performing an update operation on the cache.
2. The method according to claim 1, characterized in that The operation type includes a configuration type or a non-configuration type; The determining of the operation type of the operation that caused the change in the data of the storage array includes: In the case of executing a command, determining that the operation type is the configuration type; In the case where the command is not executed and no log information recording the execution of the command is received within a predetermined time period, determining that the operation type is the non-configuration type; In the case where the command is not executed and log information recording the execution of the command is received, determining that the operation type is the configuration type.
3. The method according to claim 2, wherein The determining, based on the operation type, of a processing strategy for processing the prompt message includes: In the case of determining that a command is executed, determining the processing strategy based on the number of times the command is executed; In the case of determining 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 of determining that the operation type is the non-configuration type, determining the processing strategy based on the prompt message.
4. The method according to claim 3, characterized in that, The number of times includes N times, where N is a positive integer; The determining of the processing strategy based on the number of times the command is executed includes: In the case of determining that N = 1, determining that the processing strategy is to, in response to receiving log information recording the execution of the command, determine the data required for performing the update operation based on the prompt message; In the case of determining that N ≠ 1, determining that the processing strategy is to, in response to the Nth received log information, determine the data required for performing the update operation based on the previously received N prompt messages.
5. The method according to claim 4, characterized in that, The method further includes: In the case of determining that the parameters of the executed command include predetermined parameters, determining that N = 1; In the case of determining that the parameters of the executed command do not include the predetermined parameters, determining that N ≠ 1.
6. The method according to claim 3, wherein The determining, in response to receiving log information recording the execution of the command, of the processing strategy based on a first predetermined time interval includes: Taking the moment when the log information recording the execution of the command is received as the starting moment, in the case of determining that no log information is received within the first predetermined time interval starting from the starting moment, determining that the processing strategy is to determine the data required for performing the update operation based on the prompt message; In the case of determining that log information is received within the first predetermined time interval starting from the starting moment and no log information is received within the next first predetermined time interval, determining that the processing strategy is to, at the moment of the next first predetermined time interval from the starting moment, determine the data required for performing the update operation based on the prompt messages received before the moment of the next first predetermined time interval from the starting moment.
7. The method according to claim 3, characterized in that, The determining of the processing strategy based on the prompt message includes: Determine a second predetermined time interval matching the non-configuration operation based on a predetermined mapping relationship, where the predetermined mapping relationship represents the mapping relationship between the non-configuration operation and the second predetermined time interval; Based on the moment when the prompt information is received and the second predetermined time interval, determine that the processing strategy is to determine the data required for performing the update operation based on the prompt information at the moment of the second predetermined time interval from the start moment.
8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: Before performing the update operation on the cache based on the processing strategy, Based on the prompt information, determine the data required for performing the update operation; Display the data required for performing the update operation.
9. An electronic device, comprising: One or more processors; A memory for storing one or more computer programs, Characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, The computer program or instruction, when executed by the processor, implements the steps of the method according to any one of claims 1 to 8.
11. A computer program product, comprising a computer program, where the computer program, when executed by the processor, implements the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Software layer cache updating method and system in storage system and related device
CN110795032A
Data caching method, device, computer equipment and storage medium
CN112115166A
Data processing method, data processing device, storage medium and electronic equipment
CN112817989A
Data writing method and device, equipment and storage medium
CN115167784A
Equipment control method and device of storage equipment, storage medium and electronic equipment
CN117008844A