Retrieval method and device, computer equipment, storage medium and program product
By responding to the search request of the management node in the storage system, obtaining exception search items and matching them with the pre-stored system search items, and directly determining the search results of the exception storage object, solving the problem of slow search speed in the prior art, and achieving faster and more accurate search.
Patent Information
- Application Number
- CN202311803539.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2025-06-27
AI Technical Summary
In the prior art, when retrieving abnormal storage objects of target data, the retrieval speed is slower.
Provide a search method to obtain exception search items by responding to search requests sent by management nodes in the storage system, and directly determine the search results of the exception storage object based on the exception search items and pre-stored system search items, avoiding back-repulsing through other information.
This method can shorten the time of search operations, improve the search speed, reduce search overhead, reduce manual participation errors, and improve the accuracy of search results.
Smart Images

Figure CN120216731A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a retrieval method, apparatus, computer device, storage medium, and program product. Background Art
[0002] With the development of big data technology, data storage and retrieval have become increasingly important and are widely used in various fields, such as the medical field, computer field, financial field, e-commerce field, etc.
[0003] In the related art, mainly each logical disk on each node in the distributed storage system is divided to determine each storage object in each logical disk, and then the target data is stored in the corresponding storage objects of different storage nodes, and then based on the storage result, the abnormal storage objects of the target data stored in the distributed storage system are retrieved.
[0004] However, when using the related art to retrieve the abnormal storage objects of the target data, there will be a problem of slow retrieval speed. Summary of the Invention
[0005] Based on this, it is necessary to provide a retrieval method, apparatus, computer device, storage medium, and program product for the above technical problems, which can improve the retrieval speed when retrieving the abnormal storage objects of the target data.
[0006] In a first aspect, an embodiment of this application provides a retrieval method, which is applied to a target retrieval node in a storage system, and the target retrieval node is any normal service node in the storage system; the method includes:
[0007] In response to a retrieval request sent by a management node in the storage system, obtain an abnormal retrieval item carried in the retrieval request; the abnormal retrieval item represents a retrieval item of abnormal storage objects in each logical disk in the storage system;
[0008] According to the abnormal retrieval item and the pre-stored system retrieval items, determine the retrieval result of the abnormal storage objects; the system retrieval items are used to describe the storage information of the data already stored in each logical disk.
[0009] In the technical solution of the embodiment of the present application, in response to a retrieval request sent by a management node in a storage system, an abnormal retrieval item carried in the retrieval request is obtained, and a retrieval result of an abnormal storage object is determined according to the abnormal retrieval item and a pre-stored system retrieval item; when retrieving an abnormal storage object of target data, the above method can directly determine the retrieval result of the abnormal storage object according to the abnormal retrieval item, that is, the retrieval field and the pre-stored system retrieval item, without the need to perform a retrieval operation by reverse inference based on other information, thereby being able to shorten the time of the retrieval operation, further improve the retrieval speed, and reduce the retrieval overhead; at the same time, this method can implement the retrieval operation without manual participation, which can not only save labor costs, but also reduce manual participation errors and improve the accuracy of the retrieval result.
[0010] In one embodiment, both the system retrieval item and the abnormal retrieval item include multi-level retrieval expressions. Determining the retrieval result of the abnormal storage object according to the abnormal retrieval item and the pre-stored system retrieval item includes:
[0011] Perform layer-by-layer matching on each level of retrieval expressions in the abnormal retrieval item and the corresponding level of retrieval expressions in the system retrieval item in sequence;
[0012] When all levels of retrieval expressions in the abnormal retrieval item and the system retrieval item are successfully matched, determine the retrieval result of the abnormal storage object according to the matching result of the last level of retrieval expression.
[0013] In the technical solution of the embodiment of the present application, perform layer-by-layer matching on each level of retrieval expressions in the abnormal retrieval item and the corresponding level of retrieval expressions in the system retrieval item in sequence. When all levels of retrieval expressions in the abnormal retrieval item and the system retrieval item are successfully matched, determine the retrieval result of the abnormal storage object according to the matching result of the last level of retrieval expression; both the system retrieval item and the abnormal retrieval item in the above method include multi-level retrieval expressions. In practical applications, layer-by-layer matching can be performed on the corresponding level of retrieval expressions in the abnormal retrieval item and the system retrieval item in sequence. Compared with single-level retrieval expressions, the complexity of each level of matching is lower, thereby reducing the complexity of the entire matching process, improving the speed of matching processing, and further being able to improve the speed of determining the retrieval result.
[0014] In one embodiment, the multi-level retrieval expression sequentially includes a system storage pool identifier, a disk identifier, and a logical disk identifier in the order of levels; performing layer-by-layer matching on each level of retrieval expressions in the abnormal retrieval item and the corresponding level of retrieval expressions in the system retrieval item includes:
[0015] Match the system storage pool identifiers in the abnormal retrieval item and the system retrieval item;
[0016] When the system storage pool identifier match is successful, match each disk identifier in the abnormal retrieval item with each disk identifier in the system retrieval item;
[0017] Obtain each disk identifier that matches successfully in the system retrieval item;
[0018] Match each logical disk identifier in the abnormal retrieval item with each logical disk identifier corresponding to each disk identifier that matches successfully in the system retrieval item.
[0019] The technical solution in the embodiment of the present application matches the system storage pool identifiers in the abnormal retrieval item and the system retrieval item. When the system storage pool identifier match is successful, match each disk identifier in the abnormal retrieval item with each disk identifier in the system retrieval item, obtain each disk identifier that matches successfully in the system retrieval item, and match each logical disk identifier in the abnormal retrieval item with each logical disk identifier corresponding to each disk identifier that matches successfully in the system retrieval item; the above method can perform layer-by-layer matching on the abnormal retrieval item and the system retrieval item, thereby reducing the complexity of each layer of matching. Compared with single-layer matching, on the basis of reducing the matching complexity, it can also improve the speed of matching processing.
[0020] In one embodiment, the matching result includes the logical disk identifier matching result; determining the retrieval result of the abnormal storage object according to the matching result of the last-level retrieval formula includes:
[0021] Obtain the logical disk identifiers that match successfully between the abnormal retrieval item and the system retrieval item;
[0022] Determine the retrieval result of the abnormal storage object according to the logical disk identifiers that match successfully.
[0023] The technical solution in the embodiment of the present application obtains the logical disk identifiers that match successfully between the abnormal retrieval item and the system retrieval item, and determines the retrieval result of the abnormal storage object according to the logical disk identifiers that match successfully; the above method can directly determine the retrieval result of the abnormal storage object according to the matching result of the last-level retrieval formula, simplify the process of determining the retrieval result, and reduce the complexity of determining the retrieval result.
[0024] In one embodiment, the above method further includes:
[0025] Obtain the system retrieval items of each data record item storing data in the storage system;
[0026] Store the system retrieval item in the node memory of the target retrieval node;
[0027] When the number of search items in the system search items reaches a preset number threshold, or when the storage duration of the system search items in the node memory reaches a preset duration threshold, the system search items in the node memory are stored to the logical disk corresponding to the target search node.
[0028] In the technical solution of the embodiments of the present application, the system search items of each data record item of the stored data in the storage system are obtained, and the system search items are stored in the node memory of the target search node. When the number of search items in the system search items reaches a preset number threshold, or when the storage duration of the system search items in the node memory reaches a preset duration threshold, the system search items in the node memory are stored to the logical disk corresponding to the target search node; in the above method during the storage process, not only the system search items of the stored data are added, but also during the process of storing the data record items, the system search items of each stored data are synchronously stored in the node memory of the target search node first, and then the system search items are stored in the corresponding logical disk according to specific conditions. In this way, it neither affects the use of the search operation corresponding to the system search items nor affects the storage performance of each data record item, thereby being able to improve the storage speed and the success rate of retrieval.
[0029] In one of the embodiments, the above method further includes:
[0030] Detect whether the system search items in the node memory are consistent with the system search items in the logical disk;
[0031] When the system search items in the node memory are inconsistent with the system search items in the logical disk, synchronize the system search items in the node memory and the system search items in the logical disk.
[0032] In the technical solution of the embodiments of the present application, it is detected whether the system search items in the node memory are consistent with the system search items in the logical disk. When the system search items in the node memory are inconsistent with the system search items in the logical disk, the system search items in the node memory and the system search items in the logical disk are synchronized; this method can synchronize the system search items in the node memory and the system search items in the logical disk, ensure that the system search items in the logical disk are consistent with the system search items in the node memory, and prepare for obtaining accurate system search items from the logical disk during subsequent retrieval, further improving the accuracy of the retrieval results.
[0033] In one of the embodiments, synchronizing the system search items in the node memory and the system search items in the logical disk includes:
[0034] Determine the differential search items in the node memory according to the system search items in the node memory and the system search items in the logical disk;
[0035] Store the differential search items to the logical disk to complete the synchronization.
[0036] In the technical solution of the embodiment of the present application, according to the system search items in the node memory and the system search items in the logical disk, the different search items in the node memory are determined, and the different search items are stored in the logical disk to complete the synchronization; the above method can determine that the logical disk in the node memory does not store the different search items, and then store the different search items in the corresponding logical disk. This process does not require storing the entire system search items in the node memory in the corresponding logical disk, and can ensure the consistency of the system search items in the logical disk and the system search items in the node memory, which can greatly improve the synchronization speed of the system search items.
[0037] In one embodiment, the above method further includes:
[0038] In the case where the system search items in the node memory are inconsistent with the system search items in the logical disk, invalid flags are configured for both the system search items in the node memory and the system search items in the logical disk;
[0039] In the case where the synchronization of the system search items is completed, the invalid flags in the node memory and the invalid flags in the logical disk are both cleared.
[0040] In the technical solution of the embodiment of the present application, in the case where the system search items in the node memory are inconsistent with the system search items in the logical disk, invalid flags are configured for both the system search items in the node memory and the system search items in the logical disk, and in the case where the synchronization of the system search items is completed, the invalid flags in the node memory and the invalid flags in the logical disk are both cleared; the above method can configure and clear invalid flags for the system search items to accurately mark whether the system search items in the node memory are consistent with the system search items in the logical disk. On this basis, the accuracy of the synchronization of the system search items can be improved.
[0041] In one embodiment, when an abnormal service occurs in the target search node, the management node re-obtains a new target search node determined from at least one normal service node in the storage system.
[0042] The technical solution in the embodiment of the present application can, in the case where an abnormal service occurs in the target search node, schedule other normal service nodes in the storage system to continue to execute the search operation, so as to ensure the success rate of the execution of the search operation.
[0043] In a second aspect, an embodiment of the present application provides a search device, and the device includes:
[0044] A response module, configured to obtain the abnormal search items carried in the search request in response to the search request sent by the management node in the storage system; the abnormal search items represent the search items of the abnormal storage objects in each logical disk in the storage system;
[0045] A retrieval result determination module, configured to determine the retrieval result of an abnormal storage object according to the abnormal retrieval item and the pre-stored system retrieval items; the system retrieval items are used to describe the storage information of the data stored in each logical disk.
[0046] In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the method in any one of the above first aspects are implemented.
[0047] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in any one of the above first aspects are implemented.
[0048] In a fifth aspect, an embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the method in any one of the above first aspects are implemented.
[0049] The above description is only an overview of the technical solution of the present application. In order to be able to understand the technical means of the present application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of the present application more obvious and understandable, the specific embodiments of the present application are specifically given below. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is an application environment diagram of the retrieval method in an embodiment;
[0051] Figure 2 It is a flowchart of the retrieval method in an embodiment;
[0052] Figure 3 It is a flowchart of the retrieval method in another embodiment;
[0053] Figure 4 It is a flowchart of the retrieval method in another embodiment;
[0054] Figure 5 It is a relationship structure diagram among the system storage pool, disks, logical disks and storage objects in the storage system in an embodiment;
[0055] Figure 6 It is a flowchart of the retrieval method in another embodiment;
[0056] Figure 7 It is a flowchart of the retrieval method in another embodiment;
[0057] Figure 8Schematic flowchart of a retrieval method in another embodiment;
[0058] Figure 9 Schematic flowchart of a retrieval method in another embodiment;
[0059] Figure 10 Schematic flowchart of a retrieval method in another embodiment;
[0060] Figure 11 Block diagram of the structure of a retrieval device in an embodiment;
[0061] Figure 12 Internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0062] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0063] In the field of big data, data storage and retrieval have become increasingly important. Among them, a large amount of useful data is usually stored first, and then the target data is retrieved from the stored data for use in subsequent processing. Taking the retrieval of abnormal storage objects of stored data as an example, in the related art, mainly each logical disk on each node in the distributed storage system is divided to determine each storage object in each logical disk, and then the target data is stored in the corresponding storage objects of different storage nodes, and then the abnormal storage objects of the target data stored in the distributed storage system are retrieved based on the storage results. However, when retrieving the abnormal storage objects of the target data using the related art, there is a problem of slow retrieval speed. Based on this, the embodiments of the present application provide a retrieval method, which can improve the retrieval speed when retrieving the abnormal storage objects of the target data.
[0064] The retrieval method provided by the embodiments of the present application is applicable to Figure 1 the application environment diagram shown in the figure. The application environment includes a storage system, which may include a management node and multiple service nodes ( Figure 1 taking 3 service nodes as an example, namely service node 1, service node 2, and service node 3), and there may be a communication connection between the management node and each service node, and the communication method may be Wi-Fi, mobile network, or Bluetooth connection, etc.
[0065] Optionally, the above storage system may include a block storage system, an all-flash storage system, a blockchain storage system, an object storage system, a file storage system, etc., which are not limited in the embodiments of the present application. Among them, the above management node and each service node may but are not limited to be implemented by a computer device, an independent server, or a server cluster composed of multiple servers. The embodiments of the present application do not limit the specific forms of the management node and each service node. Optionally, the above computer device may but is not limited to be various personal computers, laptop computers, smart phones, smart watches, smart cameras, and tablet computers, etc.
[0066] In the embodiments of the present application, the management node may select at least one normal service node from multiple service nodes, and then arbitrarily select one from the at least one normal service node as the target retrieval node. The following embodiments introduce the specific process of the retrieval method with the target retrieval node in the storage system as the execution subject of the retrieval method.
[0067] As Figure 2 shown, it is a schematic flowchart of the retrieval method provided by the embodiments of the present application. This method is applied to the target retrieval node in the storage system, and the target retrieval node is any normal service node in the storage system. This method can be implemented through the following steps:
[0068] S100. In response to the retrieval request sent by the management node in the storage system, obtain the abnormal retrieval item carried in the retrieval request. Among them, the abnormal retrieval item represents the retrieval item of the abnormal storage object in each logical disk in the storage system.
[0069] Among them, in the case of a need to obtain the retrieval result of the abnormal storage object, the user can input the abnormal retrieval item to the management node in the storage system. Correspondingly, the management node can generate a retrieval request according to the abnormal retrieval item and send the retrieval request to the target retrieval node in the storage system, so that the target retrieval node responds to the retrieval request.
[0070] Specifically, the target retrieval node can receive the retrieval request sent by the management node and respond to the retrieval request sent by the management node in the storage system to obtain the abnormal retrieval item carried in the retrieval request.
[0071] In one embodiment, the way to obtain the abnormal retrieval item carried in the retrieval request may be to parse the retrieval request to obtain the abnormal retrieval item carried in the retrieval request.
[0072] In another embodiment, the way to obtain the abnormal retrieval item carried in the retrieval request may also be to extract features from all the information in the retrieval request to obtain the abnormal retrieval item carried in the retrieval request.
[0073] Optionally, the above abnormal retrieval items may include retrieval items of multiple abnormal storage objects, and the retrieval items may characterize the storage information of each abnormal storage object, such as storage location, storage space size, storage identifier, etc. Among them, the abnormal storage object may represent a bad object, that is, the storage object storing data has failed, and the data stored in the storage object can no longer be used.
[0074] S200. Determine the retrieval result of the abnormal storage object according to the abnormal retrieval item and the pre-stored system retrieval item. Among them, the system retrieval item is used to describe the storage information of the data already stored in each logical disk.
[0075] In one implementation, the target retrieval node may pre-train an algorithm model, and then input both the abnormal retrieval item and the pre-stored system retrieval item into the algorithm model, and the algorithm model outputs the retrieval result of the abnormal storage object.
[0076] In another implementation, the target retrieval node may perform screening processing and / or information extraction processing according to the abnormal retrieval item and the pre-stored system retrieval item to obtain the retrieval result of the abnormal storage object.
[0077] Among them, the retrieval result of the above abnormal storage object may include the storage space size of the abnormal storage object, the creation time of the abnormal storage object, etc. However, in the embodiments of the present application, the retrieval result may also include information such as the number of abnormal storage objects and the location of the abnormal storage objects.
[0078] In practical applications, the system retrieval item may describe the storage information of the data already stored in each logical disk of each service node in the storage system in different storage objects. Optionally, each logical disk may include multiple storage objects, and each storage object may be understood as a storage area in the corresponding logical disk. At the same time, any stored data may be synchronously stored in the corresponding storage objects of multiple service nodes, that is, the same data may be stored in each storage object to ensure that when one or more service nodes in the storage system, or the service processes on the service nodes are abnormal, the same data can be obtained from other service nodes for subsequent use.
[0079] In one embodiment, when the target retrieval node has an abnormal service, the management node re-obtains a new target retrieval node determined from at least one normal service node in the storage system.
[0080] Optionally, the above abnormal service may be understood as an abnormal target retrieval node or a service process on the target retrieval node.
[0081] It should be noted here that when the management node re-determines a new target retrieval node, the new target retrieval node may be used as the execution subject of the retrieval method, and the steps in S100-S200 above may be started to be executed.
[0082] In this embodiment, when an abnormal service occurs in the target retrieval node, other normal service nodes in the storage system can be scheduled to continue the retrieval operation, so as to ensure the success rate of the retrieval operation.
[0083] The technical solution in the embodiment of the present application responds to a retrieval request sent by a management node in the storage system, obtains the abnormal retrieval item carried in the retrieval request, and determines the retrieval result of the abnormal storage object according to the abnormal retrieval item and the system retrieval item stored in advance; when retrieving the abnormal storage object of the target data, the above method can directly determine the retrieval result of the abnormal storage object according to the abnormal retrieval item, that is, the retrieval field and the system retrieval item stored in advance, without the need to infer through other information to implement the retrieval operation, thereby being able to shorten the time of the retrieval operation, further improve the retrieval speed, and reduce the retrieval overhead; at the same time, this method can implement the retrieval operation without manual participation, which can not only save labor costs, but also reduce the error of manual participation and improve the accuracy of the retrieval result.
[0084] In some scenarios, both the system retrieval item and the abnormal retrieval item can be set as multi-level retrieval expressions, so that the amount of information in each level of the retrieval expression is less, to facilitate subsequent retrieval and improve the speed of determining the retrieval result. Based on this, in one embodiment, both the above system retrieval item and the abnormal retrieval item include multi-level retrieval expressions; as Figure 3 shown, the step of determining the retrieval result of the abnormal storage object according to the abnormal retrieval item and the system retrieval item stored in advance in the above S200 can be implemented in the following manner:
[0085] S210. Layer-by-layer matching is performed on each level of the retrieval expression in the abnormal retrieval item and the corresponding level of the retrieval expression in the system retrieval item in sequence.
[0086] In practical applications, the multi-level retrieval expression can represent the location identifier of the storage object or the abnormal storage object in the storage system (large node) to each service node (small node) in the storage system.
[0087] Specifically, the target retrieval node can pre-train a matching model in advance, and then input each level of the retrieval expression in the abnormal retrieval item and the corresponding level of the retrieval expression in the system retrieval item into the matching model, so that the matching model performs layer-by-layer matching on each level of the retrieval expression in the abnormal retrieval item and the corresponding level of the retrieval expression in the system retrieval item in sequence.
[0088] Optionally, the above matching model can be at least one of a convolutional neural network model, a recurrent neural network model, a graph convolutional neural network model, a fully connected neural network model, a long short-term memory neural network model, etc.
[0089] S220. When all levels of retrieval expressions in the exception retrieval item and the system retrieval item match successfully, determine the retrieval result of the exception storage object according to the matching result of the last-level retrieval expression.
[0090] In the embodiment of the present application, when all levels of retrieval expressions in the exception retrieval item and the system retrieval item match successfully, the retrieval result of the exception storage object can be determined according to the matching result of the last-level retrieval expression.
[0091] Optionally, the matching result of the last-level retrieval expression may include at least one last-level retrieval expression in the system retrieval item that matches the last-level retrieval expression in the exception retrieval item. Among them, the last-level retrieval expression may represent the location where the exception storage object is located.
[0092] The technical solution in the embodiment of the present application performs layer-by-layer matching on each level of retrieval expressions in the exception retrieval item and the corresponding level of retrieval expressions in the system retrieval item in sequence. When all levels of retrieval expressions in the exception retrieval item and the system retrieval item match successfully, determine the retrieval result of the exception storage object according to the matching result of the last-level retrieval expression; both the system retrieval item and the exception retrieval item in the above method include multi-level retrieval expressions. In practical applications, layer-by-layer matching can be performed on the corresponding level of retrieval expressions in the exception retrieval item and the system retrieval item in sequence. Compared with a single-level retrieval expression, the complexity of each level of matching is relatively low, so the complexity of the entire matching process can be reduced, the speed of the matching process can be improved, and further the speed of determining the retrieval result can be improved.
[0093] The following describes the process of performing layer-by-layer matching on each level of retrieval expressions in the exception retrieval item and the corresponding level of retrieval expressions in the system retrieval item in sequence. In one embodiment, the multi-level retrieval expression sequentially includes a system storage pool identifier, a disk identifier, and a logical disk identifier in the order of levels; as Figure 4 shown, the steps in S210 above may include the following steps:
[0094] S211. Match the system storage pool identifiers in the exception retrieval item and the system retrieval item.
[0095] Specifically, the target retrieval node can match the system storage pool identifier in the exception retrieval item with the system storage pool identifier in the system retrieval item, that is, compare the system storage pool identifier in the exception retrieval item with the system storage pool identifier in the system retrieval item.
[0096] S212. When the system storage pool identifier matches successfully, match each disk identifier in the exception retrieval item with each disk identifier in the system retrieval item.
[0097] Optionally, the exception retrieval item may include a system storage pool identifier, at least one disk identifier, and at least one logical disk identifier. In practical applications, each storage system may correspond to a system storage pool. There may be at least one disk on each service node in the storage system. Each disk may be composed of at least one logical disk, and each logical disk may be divided into multiple storage objects.
[0098] Exemplarily, Figure 5 FIG. Figure 5 is a relationship structure diagram among the system storage pool, disks, logical disks, and storage objects in a storage system. Among them, system storage pool 1 is the only system storage pool of the storage system. There are multiple disks (disk P1, disk P2,..., disk PX respectively) on multiple service nodes in system storage pool 1. Disk P1 is composed of logical disks n10, n20,..., n100 (the composition structure diagrams of other disks are not shown in the figure). Logical disk n10 is divided into storage objects m1, m2, and m3. Logical disk n20 is divided into storage objects m4, m13, and m14. Logical disk n100 is divided into storage objects m21 and m24.
[0099] Among them, when the system storage pool identifier matches successfully, for any disk identifier in the exception retrieval item, the disk identifier in the exception retrieval item can be matched with each disk identifier in the system retrieval item.
[0100] S213. Obtain each disk identifier that matches successfully in the system retrieval item.
[0101] It should be noted here that each disk identifier that matches successfully in the system retrieval item may be some disk identifiers in the system retrieval item or all disk identifiers in the system retrieval item. The embodiments of the present application do not make any limitations on this. Among them, each disk identifier that matches successfully in the system retrieval item may include the disk identifiers in all disk identifiers in the system retrieval item that are the same as each disk identifier in the exception retrieval item.
[0102] S214. Match each logical disk identifier in the exception retrieval item with each logical disk identifier corresponding to each disk identifier that matches successfully in the system retrieval item.
[0103] Specifically, for any logical disk identifier in the exception retrieval item, the logical disk identifier in the exception retrieval item can be matched with each logical disk identifier corresponding to each disk identifier that matches successfully in the system retrieval item.
[0104] In the technical solution of the embodiment of the present application, the system storage pool identifiers in the abnormal search item and the system search item are matched. When the system storage pool identifiers are successfully matched, the disk identifiers in the abnormal search item and the disk identifiers in the system search item are matched to obtain the disk identifiers that are successfully matched in the system search item, and the logical disk identifiers in the abnormal search item and the logical disk identifiers corresponding to the disk identifiers that are successfully matched in the system search item are matched; the above method can perform layer-by-layer matching on the abnormal search item and the system search item, thereby reducing the complexity of each layer of matching. Compared with single-layer matching, on the basis of reducing the matching complexity, the matching processing speed can also be improved.
[0105] In one embodiment, the above matching result includes the logical disk identifier matching result; as Figure 6 shown, the step of determining the search result of the abnormal storage object according to the matching result of the last-level search formula in S220 above can be implemented in the following manner:
[0106] S221. Obtain the logical disk identifiers that are successfully matched between the abnormal search item and the system search item.
[0107] Specifically, the logical disk identifiers that are successfully matched between the abnormal search item and the system search item can be determined according to the matching results of the logical disk identifiers in the abnormal search item and the logical disk identifiers corresponding to the disk identifiers that are successfully matched in the system search item.
[0108] Optionally, the successfully matched logical disk identifiers can be part of the logical disk identifiers in the system search item, or can be all of the logical disk identifiers in the system search item. The embodiment of the present application does not limit this.
[0109] It should be noted here that the logical disks corresponding to the successfully matched logical disk identifiers may include abnormal storage objects.
[0110] S222. Determine the search result of the abnormal storage object according to the successfully matched logical disk identifiers.
[0111] In practical applications, if the search result is the number of abnormal storage objects, the number of the successfully matched logical disk identifiers can be determined as the search result of the abnormal storage objects; if the search result is the location of the abnormal storage objects, the corresponding logical disks can be determined according to the successfully matched logical disk identifiers, and the corresponding logical disks can be determined as the logical disks where the abnormal storage objects are located.
[0112] In the technical solution of the embodiment of the present application, the logical disk identifier that matches successfully between the abnormal search item and the system search item is obtained, and the search result of the abnormal storage object is determined according to the successfully matched logical disk identifier; the above method can directly determine the search result of the abnormal storage object according to the matching result of the last-level search formula, which simplifies the process of determining the search result and reduces the complexity of determining the search result.
[0113] In practical applications, before the target search node executes the steps in S200 above, it is necessary to store the system search item first. The process of storing the system search item will be described below. In one embodiment, before executing the steps in S200 above, as Figure 7 shown, the above method may further include the following steps:
[0114] S300. Obtain the system search items of each data record item of the data stored in the storage system.
[0115] In the embodiment of the present application, the system search item can be added during the storage process to prepare for further improving the search speed. Optionally, the above data record item can be used to describe the attribute information of the stored data, and the attribute information may include the volume set identifier, segment number identifier, logical disk group identifier, storage object identifier, etc. on the disk where the stored data is located.
[0116] At the same time, since the stored data and the data record item of the stored data are stored in the same storage object, naturally, the system search item of the data record item of the above stored data can be understood as the system search item of the stored data.
[0117] Specifically, the target search node can obtain the system search items of each data record item of the data stored in the storage system.
[0118] In one implementation, when the target search node is the target search node first determined by the management node, the target search node can directly create the system search items of each data record item of the data stored in the storage system to obtain the system search items.
[0119] In another implementation, when the target search node is the new target search node reselected by the management node after the target search node first determined by the management node appears abnormal, the system search item is equivalent to being lost. At this time, the new target search node can first obtain each data record item of the data stored in the storage system, and then calculate the corresponding system search item according to each data record item to recover the system search item.
[0120] S400. Store the system search item into the node memory of the target search node.
[0121] It should be noted here that in order to improve the retrieval speed, not only the system retrieval items need to be pre-stored, but also the storage speed needs to be improved. Among them, during the storage process, the storage objects include various stored data, the data record items of each stored data, and the system retrieval items of each stored data.
[0122] In practical applications, in order to minimize the storage performance of the data record items of each stored data during the storage process, the data record items of each stored data can be first stored in the logical disk, and then asynchronously, the system retrieval items of each stored data are stored in the corresponding logical disk. Among them, the storage method of the system retrieval items can be a column storage method or a B-tree storage method, etc. In the embodiments of the present application, the storage method of the system retrieval items can be a row storage method.
[0123] In the embodiments of the present application, during the process of storing the data record items of each stored data in the logical disk, the system retrieval items of each stored data can be synchronously stored in the node memory (i.e., the memory) of the target retrieval node first. In this way, it not only does not affect the use of the corresponding retrieval operations of the system retrieval items, but also can minimize the impact on the storage performance of each data record item.
[0124] S500. When the number of retrieval items in the system retrieval items reaches a preset quantity threshold, or when the storage duration of the system retrieval items in the node memory reaches a preset duration threshold, the system retrieval items in the node memory are stored in the logical disk corresponding to the target retrieval node.
[0125] It should be noted here that each retrieval item in the system retrieval items can include multi-level retrieval expressions. The retrieval expressions at the same level in different retrieval expressions can be the same or different. The embodiments of the present application do not make any limitations in this regard.
[0126] For example, the system retrieval items include system storage pool identifier 1, disk identifier 1, disk identifier 2, logical disk identifier 1, logical disk identifier 2, logical disk identifier 3, and logical disk identifier 4. Among them, disk identifier 1 corresponds to logical disk identifier 1 and logical disk identifier 2, and disk identifier 2 corresponds to logical disk identifier 3 and logical disk identifier 4. Correspondingly, there are 4 retrieval expressions in this system retrieval item, namely system storage pool identifier 1 - disk identifier 1 - logical disk identifier 1, system storage pool identifier 1 - disk identifier 1 - logical disk identifier 2, system storage pool identifier 1 - disk identifier 2 - logical disk identifier 3, and system storage pool identifier 1 - disk identifier 2 - logical disk identifier 4.
[0127] Among them, the target retrieval node can determine whether the system retrieval items meet the preset conditions for storing from the node memory to the logical disk corresponding to the target retrieval node. If they meet the conditions, the system retrieval items in the node memory are stored in the logical disk corresponding to the target retrieval node, that is, the system retrieval items in the node memory are synchronized to the logical disk corresponding to the target retrieval node.
[0128] Optionally, the above preset condition may be that the remaining space size of the node memory is lower than a preset threshold. Among them, the remaining space size of the node memory can be detected, and when the remaining space size of the node memory is lower than the preset threshold, it is determined that the system search item meets the preset condition for storing from the node memory to the corresponding logical disk of the target search node.
[0129] In the embodiments of the present application, the above preset condition may be that the number of search items in the system search items stored in the node memory reaches a preset number threshold, or may be that the storage duration of the system search items in the node memory reaches a preset duration threshold.
[0130] Specifically, when the number of search items in the system search items stored in the node memory reaches a preset number threshold, or when the storage duration of the system search items in the node memory reaches a preset duration threshold, the target search node may store the system search items in the node memory to the corresponding logical disk of the target search node.
[0131] Optionally, both the above preset number threshold and preset duration threshold may be user-defined settings, or may be determined according to historical experience values, and the embodiments of the present application do not limit this.
[0132] The technical solution in the embodiments of the present application obtains the system search items of each data record item of the stored data in the storage system, and stores the system search items in the node memory of the target search node. When the number of search items in the system search items reaches a preset number threshold, or when the storage duration of the system search items in the node memory reaches a preset duration threshold, the system search items in the node memory are stored to the corresponding logical disk of the target search node; in the above method during the storage process, not only the system search items of the stored data are added, but also during the process of storing the data record items, the system search items of the stored data do not fall into the corresponding logical disk in real time with the data record items of the stored data. Instead, the system search items of each stored data are first stored in the node memory of the target search node, and then the system search items are stored in the corresponding logical disk according to specific conditions. In this way, it not only does not affect the use of the corresponding search operation of the system search items, but also minimizes the impact on the storage performance of each data record item, thereby being able to improve the storage speed and the success rate of retrieval.
[0133] In some scenarios, the system search items in the node memory and the system search items in the logical disk can be detected and processed to enable the system search items in the node memory to be accurately synchronized to the corresponding logical disk. Based on this, in one embodiment, during the storage process, as Figure 8 shown, the above method may further include the following steps:
[0134] S600. Detect whether the system search items in the node memory are consistent with those in the logical disk.
[0135] In one implementation, the target search node can use a consistency algorithm to detect whether the system search items in the node memory are consistent with those in the logical disk. Optionally, the above consistency algorithm can be the Kappa consistency test method, Kendall's coefficient of concordance method, ICC intraclass correlation coefficient method, etc., and the embodiments of the present application do not limit this.
[0136] In another implementation, the target search node can layer-by-layer compare each level of search expressions in the system search items in the node memory with those in the system search items in the logical disk to detect whether the system search items in the node memory are consistent with those in the logical disk.
[0137] S700. Synchronize the system search items in the node memory and those in the logical disk when they are inconsistent.
[0138] Among them, when it is determined that the system search items in the node memory are inconsistent with those in the logical disk, the system search items in the node memory can be stored in the corresponding logical disk, and the system search items originally stored in the logical disk can be deleted to complete the synchronization of the system search items in the node memory and those in the logical disk.
[0139] In addition, based on the layer-by-layer comparison results in the previous steps, the search items that are inconsistent between the system search items already stored in the node memory and those already stored in the logical disk can be determined, and the inconsistent search items in the logical disk can be modified to the corresponding search items in the node memory. At the same time, the search items in the logical disk that are not stored in the node memory can be determined and deleted from the logical disk to complete the synchronization of the system search items in the node memory and those in the logical disk.
[0140] The technical solution in the embodiments of the present application detects whether the system search items in the node memory are consistent with those in the logical disk, and synchronizes the system search items in the node memory and those in the logical disk when they are inconsistent; this method can synchronize the system search items in the node memory and those in the logical disk, ensure that the system search items in the logical disk are consistent with those in the node memory, and prepare for obtaining accurate system search items from the logical disk during subsequent searches, further improving the accuracy of search results.
[0141] In some scenarios, when there are newly added search items in the system search items in node memory, in order to ensure the consistency between the system search items in the logical disk and those in the node memory and improve the synchronization speed of the system search items, the differential search items in the node memory can be obtained, and then only the differential search items are synchronized to the corresponding logical disk. In one embodiment, as Figure 9 shown, the steps of synchronizing the system search items in the node memory and those in the logical disk in S700 above may include:
[0142] S710. Determine the differential search items in the node memory according to the system search items in the node memory and those in the logical disk.
[0143] Specifically, the target search node can compare each level of search expressions in the system search items in the node memory with those in the system search items in the logical disk layer by layer, and obtain the search items that do not exist in the system search items stored in the logical disk from the system search items already stored in the node memory as differential search items.
[0144] In addition, the target search node can perform subtraction on the system search items in the node memory and those in the logical disk to obtain the differential search items in the node memory.
[0145] S720. Store the differential search items in the logical disk to complete the synchronization.
[0146] Based on the differential search items obtained in the previous steps, the differential search items can be stored in the logical disk to complete the synchronization.
[0147] The technical solution in the embodiment of the present application determines the differential search items in the node memory according to the system search items in the node memory and those in the logical disk, and stores the differential search items in the logical disk to complete the synchronization; the above method can determine that the differential search items not stored in the logical disk in the node memory are then stored in the corresponding logical disk, and this process does not require storing the entire system search items in the node memory in the corresponding logical disk, which can ensure the consistency between the system search items in the logical disk and those in the node memory, thus greatly improving the synchronization speed of the system search items.
[0148] In some scenarios, corresponding invalid flags can be configured for the system search items to improve the accuracy of synchronizing the system search items in the node memory and those in the logical disk. Based on this, in one embodiment, during the process of synchronizing the system search items in the node memory and those in the logical disk, as Figure 10 shown, the above method may further include the following steps:
[0149] S800. When the system search items in the node memory are inconsistent with those in the logical disk, configure invalid flags for both the system search items in the node memory and those in the logical disk.
[0150] Specifically, when it is determined that the system search items in the node memory are inconsistent with those in the logical disk, invalid flags can be configured for both the system search items in the node memory and those in the logical disk simultaneously, to mark that the system search items in the node memory are not stored in the system search items in the logical disk, prevent the system search items in the logical disk from being used, and further, the system search items in the node memory and those in the logical disk need to be synchronized.
[0151] In the embodiments of the present application, configuring invalid flags for the system search items can improve the timeliness of system search item synchronization, and can also ensure the consistency between the system search items in the logical disk and those in the node memory.
[0152] It should be noted here that the system search items can include an index header (i.e., entry / root), and the configured invalid flags can be added to the index header.
[0153] S900. When the system search item synchronization is completed, clear both the invalid flags in the node memory and those in the logical disk.
[0154] In practical applications, when the system search items in the node memory are synchronized with those in the logical disk, the invalid flags in the node memory and those in the logical disk can be cleared to mark that the system search items in the node memory are consistent with those in the logical disk, and the system search items in the logical disk can be used normally, that is, the system search items in the node memory have been stored in the system search items in the logical disk.
[0155] The technical solutions in the embodiments of the present application configure invalid flags for both the system search items in the node memory and those in the logical disk when the system search items in the node memory are inconsistent with those in the logical disk, and clear both the invalid flags in the node memory and those in the logical disk when the system search item synchronization is completed; the above method can configure and clear invalid flags for the system search items to accurately mark whether the system search items in the node memory are consistent with those in the logical disk, and on this basis, can improve the accuracy of system search item synchronization.
[0156] In one embodiment, the embodiments of the present application also provide a search method, which is applied to a target search node in a storage system, and the target search node is any normal service node in the storage system. The method includes the following processes:
[0157] (1) Obtain the system search items of each data record item of the data already stored in the storage system;
[0158] (2) Store the system search items in the node memory of the target search node;
[0159] (3) When the number of search items in the system search items reaches a preset quantity threshold, or when the storage duration of the system search items in the node memory reaches a preset duration threshold, store the system search items in the node memory to the logical disk corresponding to the target search node;
[0160] Wherein, during the process of storing the system search items in step (3), the above method further includes:
[0161] (31) Detect whether the system search items in the node memory are consistent with the system search items in the logical disk;
[0162] (32) When the system search items in the node memory are inconsistent with the system search items in the logical disk, configure invalid flags for both the system search items in the node memory and the system search items in the logical disk;
[0163] (33) Determine the differential search items in the node memory according to the system search items in the node memory and the system search items in the logical disk;
[0164] (34) Store the differential search items in the logical disk to complete the synchronization of the system search items in the node memory and the system search items in the logical disk;
[0165] (35) When the synchronization of the system search items is completed, clear the invalid flags in the node memory and the invalid flags in the logical disk;
[0166] (4) In response to a search request sent by the management node in the storage system, obtain the abnormal search items carried in the search request; the abnormal search items represent the search items of abnormal storage objects in each logical disk in the storage system;
[0167] (5) Match the system storage pool identifiers in the abnormal search items and the system search items; the system search items are used to describe the storage information of the data already stored in each logical disk; both the system search items and the abnormal search items include multi-level search expressions, and the multi-level search expressions sequentially include system storage pool identifiers, disk identifiers, and logical disk identifiers in hierarchical order;
[0168] (6) When the system storage pool identifiers match successfully, match each disk identifier in the abnormal search items and each disk identifier in the system search items;
[0169] (7) Obtain each disk identifier that matches successfully in the system search items;
[0170] (8) Match each logical disk identifier in the abnormal search item with each logical disk identifier corresponding to the disk identifiers that match successfully in the system search item;
[0171] (9) When all levels of search expressions in the abnormal search item and the system search item match successfully, obtain the logical disk identifiers that match successfully between the abnormal search item and the system search item;
[0172] (10) Determine the search result of the abnormal storage object according to the logical disk identifier that matches successfully;
[0173] Among them, when the target search node has an abnormal service, the management node re-obtains a new target search node determined from at least one normal service node in the storage system.
[0174] The execution processes of the above (1) to (10) can specifically refer to the descriptions of the above embodiments. Their implementation principles and technical effects are similar, and will not be elaborated here.
[0175] It should be understood that although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily need to be executed at the same moment, but can be executed at different moments. The execution order of these steps or stages does not necessarily need to be sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0176] Based on the same inventive concept, the embodiments of the present application also provide a retrieval device for implementing the retrieval method involved above. The implementation solution provided by this device to solve problems is similar to the implementation solution described in the above method. Therefore, the specific limitations in one or more of the following retrieval device embodiments can refer to the limitations on the retrieval method in the above text, and will not be elaborated here.
[0177] In one embodiment, Figure 11 is a schematic structural diagram of the retrieval device in an embodiment of the present application. The retrieval device provided by the embodiment of the present application can be applied to the target search node in the storage system, and the target search node is any normal service node in the storage system. As Figure 11 shown, the retrieval device of the embodiment of the present application may include: a response module 11 and a search result determination module 12, where:
[0178] A response module 11, configured to obtain an abnormal retrieval item carried in a retrieval request in response to a retrieval request sent by a management node in a storage system; the abnormal retrieval item represents a retrieval item of abnormal storage objects in each logical disk within the storage system.
[0179] A retrieval result determination module 12, configured to determine a retrieval result of an abnormal storage object according to the abnormal retrieval item and a pre-stored system retrieval item; the system retrieval item is used to describe storage information of stored data in each logical disk.
[0180] Wherein, in the case that an abnormal service occurs in a target retrieval node, the management node re-obtains a new target retrieval node determined from at least one normal service node in the storage system.
[0181] The retrieval device provided in an embodiment of the present application can be used to execute the technical solutions in the above-mentioned retrieval method embodiments of the present application, and its implementation principle and technical effects are similar, which will not be elaborated here.
[0182] In one embodiment, both the system retrieval item and the abnormal retrieval item include multi-level retrieval expressions; the retrieval result determination module 12 includes: a layer-by-layer matching unit and a first determination unit, wherein:
[0183] The layer-by-layer matching unit is configured to perform layer-by-layer matching on each level retrieval expression in the abnormal retrieval item and the corresponding level retrieval expression in the system retrieval item in sequence.
[0184] The first determination unit is configured to, in the case that each level retrieval expression in the abnormal retrieval item and the system retrieval item matches successfully, determine the retrieval result of the abnormal storage object according to the matching result of the last level retrieval expression.
[0185] The retrieval device provided in an embodiment of the present application can be used to execute the technical solutions in the above-mentioned retrieval method embodiments of the present application, and its implementation principle and technical effects are similar, which will not be elaborated here.
[0186] In one embodiment, the multi-level retrieval expression sequentially includes a system storage pool identifier, a disk identifier, and a logical disk identifier in a hierarchical order; the layer-by-layer matching unit includes: a first matching subunit, a second matching subunit, an obtaining subunit, and a third matching subunit, wherein:
[0187] The first matching subunit is configured to match the system storage pool identifiers in the abnormal retrieval item and the system retrieval item.
[0188] The second matching subunit is configured to, in the case that the system storage pool identifier matches successfully, match each disk identifier in the abnormal retrieval item and each disk identifier in the system retrieval item.
[0189] The obtaining subunit is configured to obtain each disk identifier that matches successfully in the system retrieval item.
[0190] A third matching subunit, configured to match each logical disk identifier in the abnormal retrieval item with each logical disk identifier corresponding to each disk identifier successfully matched in the system retrieval item.
[0191] The retrieval device provided by the embodiment of the present application can be used to execute the technical solutions in the above-mentioned retrieval method embodiments of the present application. The implementation principles and technical effects are similar and will not be elaborated here.
[0192] In one embodiment, the matching result includes a logical disk identifier matching result; the determining unit is specifically configured to:
[0193] Obtain the logical disk identifiers that are successfully matched between the abnormal retrieval item and the system retrieval item;
[0194] Determine the retrieval result of the abnormal storage object according to the successfully matched logical disk identifiers.
[0195] The retrieval device provided by the embodiment of the present application can be used to execute the technical solutions in the above-mentioned retrieval method embodiments of the present application. The implementation principles and technical effects are similar and will not be elaborated here.
[0196] In one embodiment, the retrieval device includes: a storage module, wherein the storage module is specifically configured to:
[0197] Obtain the system retrieval items of each data record item of the data already stored in the storage system;
[0198] Store the system retrieval items in the node memory of the target retrieval node;
[0199] When the number of retrieval items in the system retrieval item reaches a preset number threshold, or when the storage duration of the system retrieval item in the node memory reaches a preset duration threshold, store the system retrieval items in the node memory to the logical disk corresponding to the target retrieval node.
[0200] The retrieval device provided by the embodiment of the present application can be used to execute the technical solutions in the above-mentioned retrieval method embodiments of the present application. The implementation principles and technical effects are similar and will not be elaborated here.
[0201] In one embodiment, the retrieval device further includes: a detection module and a synchronization module, wherein:
[0202] The detection module is configured to detect whether the system retrieval items in the node memory are consistent with the system retrieval items in the logical disk;
[0203] The synchronization module is configured to synchronize the system retrieval items in the node memory with the system retrieval items in the logical disk when the system retrieval items in the node memory are inconsistent with the system retrieval items in the logical disk.
[0204] The retrieval device provided by the embodiment of the present application can be used to execute the technical solutions in the above-mentioned retrieval method embodiments of the present application. The implementation principles and technical effects are similar and will not be elaborated here.
[0205] In one embodiment, the synchronization module includes: a second determination unit and a storage unit, where:
[0206] The second determination unit is configured to determine the differential retrieval items in the node memory according to the system retrieval items in the node memory and the system retrieval items in the logical disk;
[0207] The storage unit is configured to store the differential retrieval items to the logical disk to complete the synchronization.
[0208] The retrieval device provided by the embodiment of the present application can be used to execute the technical solutions in the above-mentioned retrieval method embodiments of the present application. The implementation principles and technical effects are similar and will not be elaborated here.
[0209] In one embodiment, the retrieval device further includes: an identification configuration module and an identification clearing module, where:
[0210] The identification configuration module is configured to configure invalid identifications for both the system retrieval items in the node memory and the system retrieval items in the logical disk when the system retrieval items in the node memory are inconsistent with the system retrieval items in the logical disk;
[0211] The identification clearing module is configured to clear the invalid identifications in the node memory and the invalid identifications in the logical disk when the synchronization of the system retrieval items is completed.
[0212] The retrieval device provided by the embodiment of the present application can be used to execute the technical solutions in the above-mentioned retrieval method embodiments of the present application. The implementation principles and technical effects are similar and will not be elaborated here.
[0213] For the specific limitations of the retrieval device, reference can be made to the limitations on the retrieval method in the above text and will not be elaborated here. Each module in the above retrieval device can be implemented in whole or in part by software, hardware, and their combinations. The above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or be stored in the memory of the computer device in software form so that the processor can call and execute the operations corresponding to the above respective modules.
[0214] In one embodiment, a computer device is further provided. The computer device can be a server, and its internal structure diagram can be as Figure 12As shown. The computer device includes a processor, a memory, and a network interface connected by a system bus. Among them, the processor of the computer device is used to provide processing capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store system retrieval items. The network interface of the computer device is used to communicate with an external endpoint through a network connection. When the computer program is executed by the processor, a retrieval method is implemented.
[0215] Those skilled in the art can understand that Figure 12 the structure shown in [figure reference] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0216] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the technical solutions in the above-mentioned retrieval method embodiments of this application are implemented. The implementation principle and technical effects are similar and will not be elaborated here.
[0217] In one embodiment, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by the processor, the technical solutions of the above-mentioned retrieval method of this application are implemented. The implementation principle and technical effects are similar and will not be elaborated here.
[0218] In one embodiment, a computer program product is further provided, including a computer program. When the computer program is executed by the processor, the technical solutions of the above-mentioned retrieval method of this application are implemented. The implementation principle and technical effects are similar and will not be elaborated here.
[0219] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above various methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0220] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0221] The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A retrieval method, characterized in that, A target retrieval node applied to a storage system, where the target retrieval node is any normal service node in the storage system; the method includes: In response to a retrieval request sent by a management node in the storage system, obtain an abnormal retrieval item carried in the retrieval request; the abnormal retrieval item represents a retrieval item of abnormal storage objects in each logical disk in the storage system. Determine a retrieval result of the abnormal storage object according to the abnormal retrieval item and a pre-stored system retrieval item; the system retrieval item is used to describe storage information of stored data in each logical disk.
2. The method according to claim 1, characterized in that Both the system retrieval item and the abnormal retrieval item include multi-level retrieval expressions; the determining the retrieval result of the abnormal storage object according to the abnormal retrieval item and the pre-stored system retrieval item includes: Perform layer-by-layer matching on each level retrieval expression in the abnormal retrieval item and the corresponding level retrieval expression in the system retrieval item in sequence. When all level retrieval expressions in the abnormal retrieval item and the system retrieval item match successfully, determine the retrieval result of the abnormal storage object according to the matching result of the last level retrieval expression.
3. The method according to claim 2, wherein The multi-level retrieval expression sequentially includes a system storage pool identifier, a disk identifier, and a logical disk identifier in hierarchical order; the performing layer-by-layer matching on each level retrieval expression in the abnormal retrieval item and the corresponding level retrieval expression in the system retrieval item includes: Match the system storage pool identifiers in the abnormal retrieval item and the system retrieval item. When the system storage pool identifier matches successfully, match each disk identifier in the abnormal retrieval item and each disk identifier in the system retrieval item. Obtain each disk identifier that matches successfully in the system retrieval item. Match each logical disk identifier in the abnormal retrieval item and each logical disk identifier corresponding to each disk identifier that matches successfully in the system retrieval item.
4. The method according to claim 3, wherein The matching result includes a logical disk identifier matching result; the determining the retrieval result of the abnormal storage object according to the matching result of the last level retrieval expression includes: Obtain the logical disk identifiers that match successfully between the abnormal retrieval item and the system retrieval item. Determine the retrieval result of the abnormal storage object according to the successfully matched logical disk identifiers.
5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: Obtain the system retrieval items of each data record item of the stored data in the storage system. Store the system retrieval item in the node memory of the target retrieval node. When the number of retrieval items in the system retrieval item reaches a preset quantity threshold, or when the storage duration of the system retrieval item in the node memory reaches a preset duration threshold, store the system retrieval item in the node memory to the corresponding logical disk of the target retrieval node.
6. The method according to any one of claims 1-4, characterized in that, The method further includes: Detect whether the system retrieval item in the node memory is consistent with the system retrieval item in the logical disk. When the system retrieval item in the node memory is inconsistent with the system retrieval item in the logical disk, synchronize the system retrieval item in the node memory and the system retrieval item in the logical disk.
7. The method according to claim 6, wherein Synchronizing the system retrieval items in the node memory with the system retrieval items in the logical disk includes: Determining the differential retrieval items in the node memory according to the system retrieval items in the node memory and the system retrieval items in the logical disk; Storing the differential retrieval items in the logical disk to complete the synchronization.
8. The method according to claim 6, wherein The method further includes: When the system retrieval items in the node memory are inconsistent with the system retrieval items in the logical disk, configuring invalid flags for both the system retrieval items in the node memory and the system retrieval items in the logical disk; When the synchronization of the system retrieval items is completed, clearing the invalid flags in the node memory and the invalid flags in the logical disk.
9. The method according to any one of claims 1-4, characterized in that, When an abnormal service occurs in the target retrieval node, the management node re-obtains a new target retrieval node determined from at least one normal service node in the storage system.
10. A retrieval device, characterized in that, The device includes: A response module, configured to obtain the abnormal retrieval items carried in the retrieval request in response to a retrieval request sent by a management node in the storage system; the abnormal retrieval items represent the retrieval items of abnormal storage objects in each logical disk in the storage system; A retrieval result determination module, configured to determine the retrieval result of the abnormal storage object according to the abnormal retrieval items and the pre-stored system retrieval items; the system retrieval items are used to describe the storage information of the data already stored in each logical disk.
11. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1-9 are implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1-9 are implemented.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1-9 are implemented.