Service request processing method and device, equipment, storage medium and product

By configuring storage chains for each controller in the storage system and processing business requests under reliable conditions, the problem of low reliability in processing business requests by hard disk segments is solved, and efficient and reliable data processing is achieved.

CN120508248APending Publication Date: 2025-08-19SUGON INFORMATION IND +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510533715.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

In existing technologies, the reliability of using hard disk segments to process business requests is low, resulting in unstable business request processing.

Method used

In the storage system, a storage chain is configured for each controller. Each storage chain includes at least one available replica. By obtaining the number of available replicas and processing business requests under the condition of meeting reliability service requirements, data redundancy and reliability are ensured by writing and verifying disk segment data and replica security verification data in the storage chain.

Benefits of technology

It improved the reliability and success rate of business request processing, reduced processing time, ensured data security and reliability, and prevented data loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508248A_ABST
    Figure CN120508248A_ABST
Patent Text Reader

Abstract

The invention relates to a service request processing method and device, equipment, a storage medium and a product. The method is applied to a main controller in a storage system, each controller in the storage system is configured with a storage chain corresponding to a hard disk segment, each storage chain comprises at least one available copy, and the method comprises the following steps: in response to a processing instruction of a current service request, obtaining the number of available copies in a current storage chain corresponding to the main controller, and under the condition that the number of the available copies in the current storage chain meets a preset reliability service condition, processing the current service request based on the available copies in the current storage chain. By the adoption of the method, it can be guaranteed that at least one available copy in the current storage chain can be effectively utilized in the process of processing the current service request, and therefore the reliability and success rate of service request processing are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of storage technology, and in particular to a method, apparatus, device, storage medium, and product for processing a service request. Background Art

[0002] With the development of computer technology, enterprises generate more and more business data. In order to ensure the security and reliability of business data, it is necessary to use memory segments to process business requests and write business data into memory segments in the storage system for storage.

[0003] The memory segment is a storage area constructed from multiple memories in the storage system. In addition, the storage system also includes a disk segment, which is a storage area constructed from multiple hard disks in the storage system. In related technologies, if a memory segment is abnormal, all business data written to the memory segment needs to be moved to the disk segment, and the disk segment is used to replace the memory segment to process the corresponding business request.

[0004] However, the related technology has a low reliability problem in the process of using hard disk segments to process business requests. Summary of the Invention

[0005] Based on this, it is necessary to provide a business request processing method, device, equipment, storage medium and product to address the above technical problems, which can improve the reliability of business request processing during the process of using hard disk segments to process business requests.

[0006] In a first aspect, an embodiment of the present application provides a service request processing method, which is applied to a main controller in a storage system, wherein each controller in the storage system is configured with a storage chain corresponding to a hard disk segment, and each storage chain includes at least one available replica; the method comprises:

[0007] In response to a processing instruction of a current service request, obtaining the number of available copies in the current storage chain corresponding to the primary controller;

[0008] When the number of available copies in the current storage chain meets the preset reliability service conditions, the current service request is processed based on the available copies in the current storage chain.

[0009] The technical solution in the embodiment of the present application is applied to a main controller in a storage system, where each controller in the storage system is configured with a storage chain corresponding to a hard disk segment, and each storage chain includes at least one available copy. In response to a processing instruction of a current business request, the number of available copies in the current storage chain corresponding to the main controller is obtained, and when the number of available copies in the current storage chain meets a preset reliability service condition, the current business request is processed based on the available copies in the current storage chain; the above method can process the current business request based on the available copies in the current storage chain when the number of available copies in the current storage chain corresponding to the hard disk segment configured by the main controller meets the reliability condition, thereby ensuring that at least one available copy in the current storage chain can provide effective utilization during the processing of the current business request, thereby improving the reliability and success rate of business request processing; at the same time, the above method does not require human intervention, thereby greatly accelerating the speed of business request processing and improving the timeliness of business request processing.

[0010] In one embodiment, the process of constructing each storage chain includes:

[0011] Create copies of the disk segments to generate original chains corresponding to each controller in the storage system; each original chain includes multiple original copies;

[0012] Obtaining the hard disk segment data and the copy security verification data of the hard disk segment from the current cache of the storage system;

[0013] The hard disk segment data and the copy security verification data are written into each original copy in each original chain in sequence to generate each storage chain.

[0014] The technical solution in the embodiment of the present application creates a copy of the hard disk segment, generates each original copy in the original chain corresponding to each controller in the storage system, obtains the hard disk segment data of the hard disk segment and the copy security verification data of the hard disk segment from the current cache of the storage system, and writes the hard disk segment data and the copy security verification data into each original copy in each original chain in sequence to generate each storage chain; the above method can pre-construct the storage chain of the hard disk segment corresponding to each controller in the storage system to ensure the redundancy of the hard disk segment, so that when any controller, as the main controller, processes the service request corresponding to the hard disk segment, it can directly use the available copy in its own corresponding storage chain to quickly and reliably process the service request, ensuring lossless operation of the service; at the same time, the above method does not require the participation of complex algorithms, thereby improving the construction speed and efficiency of each storage chain.

[0015] In one embodiment, creating a copy of a hard disk segment to generate an original chain corresponding to each controller in the storage system includes:

[0016] For an original chain corresponding to any controller, obtain multiple original available hard disks in a storage pool of the storage system; the number of available storage units in each original available hard disk is greater than or equal to the preset number of storage units;

[0017] selecting at least two candidate hard disks from the plurality of originally available hard disks according to the number of available storage units in each originally available hard disk;

[0018] Based on the available storage units in each candidate hard disk, an original chain corresponding to the controller is generated.

[0019] The technical solution in the embodiment of the present application is to obtain, for the original chain corresponding to any controller, multiple original available hard disks in the storage pool of the storage system, select at least two candidate hard disks from the multiple original available hard disks according to the number of available storage units in each original available hard disk, and generate the original chain corresponding to the controller based on the available storage units in each candidate hard disk, wherein the number of available storage units in each original available hard disk is greater than or equal to the preset number of storage units; the above method can construct the original chain corresponding to the controller based on multiple original available hard disks in the storage pool of the storage system, wherein the number of available storage units is greater than or equal to the preset number of storage units, so as to prepare for further construction of a valid available copy.

[0020] In one embodiment, selecting at least two candidate hard disks from a plurality of originally available hard disks based on the number of available storage units in each originally available hard disk includes:

[0021] Sorting the number of available storage units of each original available hard disk to obtain a sorting result;

[0022] According to the order of the number of available storage units in the sorting results from largest to smallest, original available hard disks with the same number as the target replicas are selected from the original available hard disks to obtain candidate hard disks.

[0023] The technical solution in the embodiment of the present application sorts the number of available storage units of each original available hard disk to obtain a sorting result, and selects original available hard disks equal to the number of target copies from each original available hard disk in the order of the number of available storage units in the sorting result from large to small to obtain each candidate hard disk; the above method does not require the participation of complex algorithms, and the processing process is relatively simple, thereby reducing the amount of data processed in the process of obtaining candidate hard disks, that is, the disk selection process, and speeding up the speed and efficiency of disk selection; at the same time, the above method can select multiple original available hard disks to construct any reliable and redundant original chain, and can create corresponding highly available storage chains based on each constructed original chain, so as to ensure that the hard disk segment data is not lost in the event of a hard disk segment change or failure; in addition, the above method can select multiple candidate hard disks required to construct the original chain according to the size of the number of available storage units of each original available hard disk, thereby improving the balanced distribution of hard disks in the storage pool and ensuring that each hard disk in the storage pool can be used evenly.

[0024] In one embodiment, generating an original chain corresponding to a controller based on available storage units in each candidate hard disk includes:

[0025] Check whether the storage pool has been updated;

[0026] If a storage pool update is detected, the original chain corresponding to the controller is constructed based on the updated hard disk list of the storage pool and the number of available storage units of each currently available hard disk in the storage pool;

[0027] If it is detected that the storage pool has not been updated, the original chain corresponding to the controller is constructed according to the available storage units and the preset number of storage units in each candidate hard disk.

[0028] The technical solution in the embodiment of the present application detects whether the storage pool is updated. If it is detected that the storage pool is updated, the original chain corresponding to the controller is constructed based on the updated hard disk list of the storage pool and the number of available storage units of each currently available hard disk in the storage pool. If it is detected that the storage pool is not updated, the original chain corresponding to the controller is constructed based on the available storage units in each candidate hard disk and the preset number of storage units. The above method can detect whether the storage pool is updated, and adopt corresponding processing methods according to different detection results to construct the original chain corresponding to the controller, so as to improve the success rate of constructing the original chain and ensure the validity of the constructed original chain.

[0029] In one embodiment, constructing an original chain corresponding to the controller according to an updated hard disk list of the storage pool and the number of available storage units of each currently available hard disk in the storage pool includes:

[0030] Check whether each candidate hard disk exists in the updated hard disk list of the storage pool;

[0031] For any candidate hard disk, if the candidate hard disk exists in the updated hard disk list, a new candidate hard disk is selected from the multiple currently available hard disks in the storage pool according to the number of available storage units of the multiple currently available hard disks;

[0032] Based on the available storage units in the new candidate hard disk, the original chain corresponding to the controller is constructed.

[0033] The technical solution in the embodiment of the present application can select available storage units equal to the preset number of storage units from the available storage units in each candidate hard disk as spare storage units in each candidate hard disk, and generate each original copy in the original chain based on the spare storage units in each candidate hard disk to obtain the original chain. This method can construct the original chain corresponding to the controller based on the available storage units in each candidate hard disk with higher reliability, thereby ensuring that the obtained original chain has higher reliability, in preparation for subsequently obtaining a highly reliable and effective storage chain.

[0034] In one embodiment, constructing an original chain corresponding to the controller based on available storage units and a preset number of storage units in each candidate hard disk includes:

[0035] Selecting available storage units equal to the preset number of storage units from the available storage units in each candidate hard disk as spare storage units in each candidate hard disk;

[0036] According to the spare storage units in each candidate hard disk, each original copy in the original chain is generated to obtain the original chain.

[0037] The technical solution in the embodiment of the present application detects whether each candidate hard disk exists in the updated hard disk list of the storage pool. For any candidate hard disk, if the candidate hard disk exists in the updated hard disk list, a new candidate hard disk is selected from the multiple currently available hard disks according to the number of available storage units of the multiple currently available hard disks in the storage pool, and the original chain corresponding to the controller is constructed according to the available storage units in the new candidate hard disk. When the above method detects that the storage pool has been updated, it can first detect whether the selected candidate hard disk is an updated hard disk, and construct the original chain corresponding to the controller using the corresponding processing method according to the detection result to ensure the validity of the original chain finally constructed.

[0038] In one embodiment, the hard disk segment data and the replica security verification data are sequentially written into each original replica in each original chain to generate each storage chain, including:

[0039] Write the hard disk segment data to the tail position of each original copy, and write the copy security verification data to the head position of each original copy;

[0040] Multiple original copies of the hard disk segment data and the replica security verification data that have been successfully written are determined as available copies;

[0041] Determine each storage chain based on the original chain where each available replica is located.

[0042] The technical solution in the embodiment of the present application writes the hard disk segment data into the tail position of each original copy respectively, and writes the copy security verification data into the head position of each original copy respectively, determines the multiple original copies that have successfully written the hard disk segment data and the copy security verification data as available copies, and determines each storage chain according to the original chain where each available copy is located; in the process of constructing the storage chain, the above method can write the hard disk segment data and the copy security verification data required to verify the correctness of the hard disk segment data into different positions of each original copy in the original chain respectively, so that in subsequent applications, the correctness of the hard disk segment data read from the available copy can be verified based on the copy security verification data in the available copy in the storage chain, thereby improving the security and reliability of the obtained hard disk segment data.

[0043] In one embodiment, writing the hard disk segment data to the tail position of each original copy, and writing the copy security verification data of the hard disk segment data to the head position of each original copy, includes:

[0044] Write the hard disk segment data sequentially to the tail position of each original copy in the current original chain, and write the copy security verification data of the hard disk segment data sequentially to the head position of each original copy in the current original chain; the current original chain is the original chain corresponding to the primary controller;

[0045] When all original copies in the current original chain have been traversed, the hard disk segment data is written sequentially to the tail position of each original copy in other original chains, and the copy security verification data of the hard disk segment data is written sequentially to the head position of each original copy in other original chains; other original chains are original chains other than the current original chain in multiple original chains.

[0046] The technical solution in the embodiment of the present application can, during the process of executing write operations on the original chains corresponding to each controller, give priority to executing write operations on the original chain corresponding to the main controller, so as to preferentially construct the storage chain corresponding to the main controller, so that when any business request needs to be processed, the main controller can process the corresponding business request in a timely manner based on its own corresponding storage chain to speed up the response speed of the business request.

[0047] In one embodiment, the method further includes:

[0048] Detect the working mode of the storage system;

[0049] When it is detected that the operating mode of the storage system is the non-write-through mode, the operating mode of the storage system is adjusted from the non-write-through mode to the write-through mode.

[0050] The technical solution in the embodiment of the present application can detect the working mode of the storage system, and when it is detected that the working mode of the storage system is non-write-through mode, the working mode of the storage system is adjusted from non-write-through mode to write-through mode. In this way, it can ensure that when the memory segment in the storage system is abnormal, the working mode of the storage system is maintained in write-through mode, and business services are provided based on multiple available copies corresponding to the hard disk segment, thereby improving the reliability and success rate of business request processing; at the same time, the above method can dynamically adjust the storage system to be in write-through mode according to the actual working mode of the detected storage system, so that the management method of the working mode of the storage system is more flexible, so as to improve the high availability and high reliability of the hard disk segment, and can put the storage system in write-through mode to improve the availability of the storage system.

[0051] In one embodiment, detecting the operating mode of the storage system includes:

[0052] Obtaining system common data of the storage system; the system common data includes the status of the power protection module in the storage system;

[0053] When the power protection module is in an abnormal state, the storage system is determined to be in a write-through mode.

[0054] When the power protection module is in a normal state, the storage system is determined to be in a non-write-through mode.

[0055] The technical solution in the embodiment of the present application obtains the system public data of the storage system, and when the status of the power protection module is abnormal, determines that the working mode of the storage system is the write-through mode; when the status of the power protection module is normal, determines that the working mode of the storage system is the non-write-through mode, wherein the system public data includes the status of the power protection module in the storage system; the above method can detect the working mode of the storage system without the participation of complex algorithms, thereby reducing the complexity of detecting the working mode of the storage system and accelerating the speed and efficiency of detecting the working mode of the storage system.

[0056] In one embodiment, the method further includes:

[0057] When generating each storage chain, obtain an unavailable copy in the target storage chain; the target storage chain is any storage chain other than the current storage chain, and the unavailable copy is the original copy of the disk segment data and / or the copy security verification data of the disk segment in the target storage chain that failed to write;

[0058] Get the hard disk segment data and copy security verification data from the current cache;

[0059] Based on the hard disk segment data and replica security verification data, an aligned write operation is performed on the unavailable replica to generate the corresponding available replica in the target storage chain.

[0060] The technical solution in the embodiment of the present application, when generating each storage chain, obtains an unavailable copy in the target storage chain, obtains the hard disk segment data and the copy safety verification data from the current cache, and performs an aligned write operation on the unavailable copy based on the hard disk segment data and the copy safety verification data to generate a corresponding available copy in the target storage chain, wherein the target storage chain is any storage chain other than the current storage chain, and the unavailable copy is the original copy of the hard disk segment data and / or the copy safety verification data of the hard disk segment in the target storage chain that fails to be written; the above method can perform an aligned write operation, that is, a rewrite operation, on the unavailable copy in the storage chain, thereby improving the high availability and high reliability of each storage chain.

[0061] In one embodiment, an aligned write operation is performed on an unavailable replica based on the hard disk segment data and the replica security verification data to generate a corresponding available replica, including:

[0062] Send the hard disk segment data and replica safety verification data to the controller corresponding to the target storage chain, instruct the controller corresponding to the target storage chain to write the replica safety verification data to the head position of the unavailable replica, and write the hard disk segment data to the tail position of the unavailable replica, to generate the corresponding available replica in the target storage chain.

[0063] The technical solution in the embodiment of the present application sends hard disk segment data and replica security verification data to the controller corresponding to the target storage chain, instructs the controller corresponding to the target storage chain to write the replica security verification data to the head position of the unavailable replica, and write the hard disk segment data to the tail position of the unavailable replica, to generate the corresponding available replica in the target storage chain; the above method can perform aligned write operations, that is, rewrite operations, on the unavailable replicas in the storage chain, thereby improving the high availability and high reliability of each storage chain.

[0064] In one embodiment, the method further includes:

[0065] In the event that writing of the hard disk segment data and / or the replica security verification data to the unavailable replica fails, the unavailable replica in the target storage chain is repaired.

[0066] The technical solution in the embodiments of the present application is to repair the unavailable copies in the target storage chain when the hard disk segment data and / or copy security verification data fail to be written to the unavailable copies. This can increase the number of available copies ultimately generated in the target storage chain, thereby improving the high reliability of the target storage chain.

[0067] In one embodiment, the method further includes:

[0068] When each storage chain is generated and an unavailable copy in a target storage chain in the storage system needs to be repaired, the unavailable copy in the target storage chain is repaired to obtain a corresponding restored copy in the target storage chain; the target storage chain is any storage chain in each storage chain except the current storage chain;

[0069] Obtaining the hard disk segment data and the copy security verification data of the hard disk segment from the current cache of the storage system;

[0070] Based on the hard disk segment data and the replica security verification data, an aligned write operation is performed on the recovered replica to generate the corresponding available replica in the target storage chain.

[0071] The technical solution in the embodiment of the present application is as follows: when each storage chain is generated and the unavailable copy in the target storage chain in the storage system needs to be repaired, the unavailable copy in the target storage chain is repaired to obtain the corresponding restored copy in the target storage chain, the hard disk segment data of the hard disk segment and the copy safety verification data of the hard disk segment are obtained from the current cache of the storage system, and an alignment write operation is performed on the restored copy according to the hard disk segment data and the copy safety verification data to generate the corresponding available copy in the target storage chain, wherein the target storage chain is any storage chain in each storage chain except the current storage chain; the above method can perform copy repair and alignment write operations on the unavailable copy in the storage chain according to actual application requirements, thereby improving the flexibility of solving the high reliability of the storage chain, and after performing the copy repair and alignment write operations on the unavailable copy in the storage chain, the high reliability of the storage chain can be improved.

[0072] In one embodiment, the method further includes:

[0073] If the number of available copies in the current storage chain does not meet the reliability service condition, detect whether there is a role switching instruction sent by the management device in the storage system;

[0074] If a role switching instruction is detected from the management device, the master controller is switched to the slave controller in the storage system;

[0075] The processing instruction of the current service request is sent to the new main controller in the storage system, instructing the new main controller to process the current service request.

[0076] The technical solution in the embodiment of the present application can realize master-slave switching when the number of available copies in the current storage chain corresponding to the master controller does not meet the reliability service conditions, thereby improving the success rate and timeliness of the business request processing received by the original master controller. At the same time, in this method, the available copies corresponding to the hard disk segment data are configured as multiple storage chain structures. In this way, when the number of available copies in the current storage chain does not meet the reliability service conditions, the current storage chain can be switched to other storage chains that meet the reliability service conditions to provide external business processing services, thereby improving the high availability and high reliability of the hard disk segment.

[0077] In a second aspect, an embodiment of the present application provides a service request processing device, the device comprising:

[0078] An instruction response module is used to obtain the number of available copies in the current storage chain corresponding to the main controller in the storage system in response to the processing instruction of the current business request;

[0079] The request processing module is used to process the current business request based on the available copies in the current storage chain when the number of available copies in the current storage chain meets the preset reliability service conditions.

[0080] In a third aspect, an embodiment of the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method of any embodiment of the first aspect are implemented.

[0081] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method of any embodiment of the first aspect above are implemented.

[0082] In a fifth aspect, an embodiment of the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the method of any embodiment of the first aspect above.

[0083] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] Figure 1 This is an application environment diagram of a service request processing method in one embodiment;

[0085] Figure 2 Schematic diagram of a process flow of a service request processing method in one embodiment;

[0086] Figure 3 Schematic diagram of a flow chart of a method for processing a service request in another embodiment;

[0087] Figure 4 Schematic diagram of a flow chart of a method for processing a service request in another embodiment;

[0088] Figure 5 Schematic diagram of a flow chart of a method for processing a service request in another embodiment;

[0089] Figure 6 Schematic diagram of a flow chart of a method for processing a service request in another embodiment;

[0090] Figure 7 Schematic diagram of a flow chart of a method for processing a service request in another embodiment;

[0091] Figure 8 Schematic diagram of a flow chart of a method for processing a service request in another embodiment;

[0092] Figure 9 Schematic diagram of a flow chart of a method for processing a service request in another embodiment;

[0093] Figure 10 Schematic diagram of a flow chart of a method for processing a service request in another embodiment;

[0094] Figure 11 Schematic diagram of a flow chart of a method for processing a service request in another embodiment;

[0095] Figure 12 Schematic diagram of a flow chart of a method for processing a service request in another embodiment;

[0096] Figure 13 Schematic diagram of a flow chart of a method for processing a service request in another embodiment;

[0097] Figure 14 Schematic diagram of a flow chart of a method for processing a service request in another embodiment;

[0098] Figure 15 Schematic diagram of a flow chart of a method for processing a service request in another embodiment;

[0099] Figure 16 is a structural block diagram of a service request processing device in one embodiment;

[0100] Figure 17 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0101] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0102] In the field of business data storage, in order to ensure the security and reliability of business data, it is necessary to use memory segments to process business requests (write requests for business data) so as to write business data into the memory segments in the storage system for storage. Among them, the memory segment is a storage area constructed by multiple memories in the storage system. In addition, the storage system also includes a hard disk segment, which is a storage area constructed by multiple hard disks in the storage system. In the related art, in the case of an abnormality in the memory segment, it is necessary to move all the business data written in the memory segment to the hard disk segment to ensure that the hard disk segment data is not lost in the fault scenario, and use the hard disk segment to replace the memory segment to process the corresponding business request. However, in the process of using the hard disk segment to process the business request in the related art, there is a problem of low reliability. Based on this, the embodiment of the present application provides a business request processing method, which can improve the reliability of business request processing in the process of using the hard disk segment to process the business request.

[0103] The service request processing method provided in the embodiment of the present application can be applied to Figure 1 As shown in the application environment diagram, the application environment includes a storage system, which includes a management device and multiple controllers, and the multiple controllers include a master controller and at least one slave controller. Among them, the management device and each controller can be connected for communication, and the communication method can be Wi-Fi, mobile network or Bluetooth connection, etc. Optionally, the above-mentioned storage system can be a block storage system, a file storage system, or an object storage system. In the embodiment of the present application, the storage system is an all-flash storage system as an example for explanation. Among them, the management device and each controller can be a server or a computer device; the server can be, but is not limited to, an independent server or a server cluster composed of multiple servers, and the computer device can be, but is not limited to, a personal computer, a desktop computer, a laptop computer, an iPad, a smart phone, a smart TV, or a smart bracelet. This embodiment does not limit the specific form of the management device and each controller. Figure 1 The following example illustrates that the management device is a personal computer and the storage system includes a master controller and two slave controllers (including slave controller 1 and slave controller 2).

[0104] The following describes the specific process of the service request processing method by taking the main controller in the storage system as the execution subject of the service request processing method.

[0105] like Figure 2FIG. 1 is a flow chart of a service request processing method provided in an embodiment of the present application. The method is applied to a master controller in a storage system. Each controller in the storage system is configured with a storage chain corresponding to a hard disk segment. Each storage chain includes at least one available replica. The method can be implemented by the following steps:

[0106] S101. In response to a processing instruction of a current service request, obtain the number of available copies in the current storage chain corresponding to the primary controller.

[0107] It should be noted that the master controller can be any controller in the storage system, and all controllers in the storage system other than the master controller are slave controllers. During the storage system initialization phase, the management device in the storage system can select a specific controller from multiple controllers according to a preset master controller selection policy, and then send a master controller configuration instruction to the specific controller, instructing it to be configured as the master controller. Optionally, the master controller selection policy may include information such as the configuration information of the master controller, the type of the master controller, and the factory date of the master controller.

[0108] Furthermore, the master controller can configure a storage chain of a hard disk segment for itself, and at the same time, can configure a storage chain of a corresponding hard disk segment for each slave controller in the storage system, that is, there is a one-to-one correspondence between the controller and the storage chain. Optionally, the above-mentioned hard disk segment can be a critical hard disk segment or a non-critical hard disk segment in the storage system, which is not limited in this embodiment of the present application. Each storage chain can include at least one available copy, and the number of available copies in each storage chain can be equal or unequal. In this embodiment of the present application, the storage chain corresponding to the master controller can be called the current storage chain; at the same time, the data stored in the available copy is the same as the data stored in the hard disk segment.

[0109] In actual applications, the storage system may also include a business processing device. In an embodiment of the present application, the above-mentioned current business request may be a business request sent by the business processing device directly received by the master controller, or a business request sent by any slave controller. The business processing device may send different business requests to each controller in the storage system. In an embodiment of the present application, at the same time, any processing instructions for other business requests received by any slave controller in the storage system may be sent to the current master controller, instructing the master controller to respond to the processing instructions for other business requests. Optionally, the above-mentioned current business request may be a business data read request or a business data write request.

[0110] Specifically, the main controller may receive a processing instruction of a current service request sent by a service processing device, and respond to the processing instruction of the current service request to obtain the number of available copies in the current storage chain corresponding to the main controller.

[0111] In one embodiment, the method for obtaining the number of available replicas in the current storage chain corresponding to the master controller may be that the master controller calls an available replica number read instruction to read the number of available replicas in the current storage chain corresponding to the master controller.

[0112] In another embodiment, the method for obtaining the number of available copies in the current storage chain corresponding to the main controller can also be to obtain the valid bitmap of the current storage chain from the key hard disk of the storage system, and then determine the number of available copies in the current storage chain corresponding to the main controller based on the valid bitmap of the current storage chain.

[0113] It should be noted here that the key hard disk is a hard disk used for persistent information in the storage system and is independent of each hard disk in each storage chain.

[0114] S102: When the number of available replicas in the current storage chain meets a preset reliability service condition, the current service request is processed based on the available replicas in the current storage chain.

[0115] In actual applications, the main controller can determine whether the number of available copies in the current storage chain meets the preset reliability service conditions. If it is determined that the number of available copies in the current storage chain meets the preset reliability service conditions, the current business request can be processed based on any available copy in the current storage chain.

[0116] Optionally, the reliability service condition may be that the number of available replicas in the storage chain is greater than a preset threshold; the preset threshold may be greater than 1, may be user-defined, or may be determined based on historical experience.

[0117] The technical solution in the embodiment of the present application is applied to a main controller in a storage system, where each controller in the storage system is configured with a storage chain corresponding to a hard disk segment, and each storage chain includes at least one available copy. In response to a processing instruction of a current business request, the number of available copies in the current storage chain corresponding to the main controller is obtained, and when the number of available copies in the current storage chain meets a preset reliability service condition, the current business request is processed based on the available copies in the current storage chain; the above method can process the current business request based on the available copies in the current storage chain when the number of available copies in the current storage chain corresponding to the hard disk segment configured by the main controller meets the reliability condition, thereby ensuring that at least one available copy in the current storage chain can provide effective utilization during the processing of the current business request, thereby improving the reliability and success rate of business request processing; at the same time, the above method does not require human intervention, thereby greatly accelerating the speed of business request processing and improving the timeliness of business request processing.

[0118] The following describes the construction process of each storage chain. Figure 3 As shown in the figure, the construction process of each storage chain can be achieved in the following ways:

[0119] S103: Create copies of the hard disk segments to generate original chains corresponding to each controller in the storage system, wherein each original chain includes multiple original copies.

[0120] In practice, during the initialization phase, the master controller can invoke a replica creation tool to replicate disk segments, generating origin chains corresponding to each controller in the storage system. Each controller corresponds to one origin chain, and the number of origin replicas in each storage chain can be equal or unequal. It should be noted that each origin replica is in an idle state, meaning that no data is stored in it.

[0121] In addition, the master controller can send a copy creation instruction to the third-party device, instructing the third-party device's copy master controller to create a copy of the hard disk segment and generate an original chain corresponding to each controller in the storage system.

[0122] S104: Obtain the hard disk segment data of the hard disk segment and the copy security verification data of the hard disk segment data from the current cache of the storage system.

[0123] In an embodiment of the present application, the current cache of the storage system can store the hard disk segment data in the hard disk segment and the replica security verification data of the hard disk segment data; wherein the replica security verification data is verification data used to verify whether the hard disk segment data is correct or the latest version. In actual application, when reading the hard disk segment data from any available replica, the replica security verification data of the hard disk segment data in the available replica can be read first, and the CRC data can be calculated in real time. If it is determined that the replica security verification data of the hard disk segment data is consistent with the CRC data, it can be determined that the hard disk segment data in the available replica is consistent with the data in the hard disk segment, and the hard disk segment data in the available replica is the latest version of the hard disk segment data.

[0124] Optionally, the aforementioned disk segment data may include business data stored in the disk segment and key data for storage system operation. It should be noted that to ensure the correctness of the disk segment data subsequently read from the available replica, the replica security verification data used to verify the correctness of the disk segment data may also be synchronously written to the corresponding original replica.

[0125] Specifically, after creating the original chain corresponding to each controller, the master controller may obtain the hard disk segment data of the hard disk segment and the copy security verification data of the hard disk segment data from the current cache of the storage system.

[0126] S105: Write the hard disk segment data and the copy security verification data into each original copy in each original chain in sequence to generate each storage chain.

[0127] Furthermore, when the main controller determines that the storage system is in write-through mode, it can write the hard disk segment data and the copy security verification data into each original copy in each original chain in sequence, that is, traverse each original chain in sequence to perform the write operation, and in the process of performing the write operation on any original chain, perform the write operation on each original copy in the original chain in sequence to generate each storage chain.

[0128] In the embodiment of the present application, in the process of traversing each original chain, the original chain corresponding to the main controller can be traversed first, and then the original chains corresponding to other slave main controllers can be traversed in sequence.

[0129] In addition, when the main controller determines that the storage system is in a non-write-through mode, it can determine that the writing of each original copy has failed.

[0130] It should be noted here that in the process of writing the hard disk segment data and replica security verification data to the original replicas in each original chain, the original replicas in any original chain may fail to write (that is, the hard disk segment data and / or replica security verification data are not successfully written to the original replicas in the original chain). Naturally, the number of original chains can be greater than or equal to the number of storage chains.

[0131] The copy security verification data of the hard disk segment data may be calculated based on the attribute information of the hard disk segment data and may be expressed as a CRC value.

[0132] In addition, after each storage chain is built, the valid bitmap and invalid bitmap (i.e., write failure bitmap) of each storage chain corresponding to the hard disk segment, the description information of each available replica in each storage chain and the description information of the available storage units in each available replica, the current working mode of the storage system, the initialization success status of the storage system, and other information can be persisted to the key hard disk.

[0133] The technical solution in the embodiment of the present application creates a copy of the hard disk segment, generates each original copy in the original chain corresponding to each controller in the storage system, obtains the hard disk segment data of the hard disk segment and the copy security verification data of the hard disk segment from the current cache of the storage system, and writes the hard disk segment data and the copy security verification data into each original copy in each original chain in sequence to generate each storage chain; the above method can pre-construct the storage chain of the hard disk segment corresponding to each controller in the storage system to ensure the redundancy of the hard disk segment, so that when any controller, as the main controller, processes the service request corresponding to the hard disk segment, it can directly use the available copy in its own corresponding storage chain to quickly and reliably process the service request, ensuring lossless operation of the service; at the same time, the above method does not require the participation of complex algorithms, thereby improving the construction speed and efficiency of each storage chain.

[0134] The following describes the process of creating a copy of the hard disk segment to generate the original chain corresponding to each controller in the storage system. Figure 4 As shown, the steps in S103 above can be implemented in the following ways:

[0135] S113: For an original chain corresponding to any controller, obtain multiple original available hard disks in a storage pool of the storage system, wherein the number of available storage units in each original available hard disk is greater than or equal to a preset number of storage units.

[0136] In practical applications, a storage pool in a storage system may include multiple original hard disks, each of which may include multiple available original hard disks. The available original hard disks may be original hard disks each having a number of available storage units greater than or equal to a preset number of storage units, i.e., allocable original hard disks. Optionally, the preset number of storage units may be equal to the minimum number of available storage units in the original replica that ensures the original replica becomes an available replica.

[0137] Specifically, the master controller may obtain each original hard disk in the storage pool of the storage system, and then, based on the number of available storage units in each original hard disk, screen multiple available original hard disks in the storage pool from all original hard disks. Optionally, the number of available storage units in any original hard disk may be greater than, less than, or equal to the preset number of storage units, which is not limited in this embodiment of the present application.

[0138] Alternatively, the master controller may obtain a list of available hard disks in the storage pool, and then identify each original hard disk in the list as a plurality of original available hard disks in the storage pool. Optionally, the list of available hard disks may include different original hard disk identifiers; and the number of available storage units in each original hard disk in the list of available hard disks may be greater than or equal to a preset number of storage units.

[0139] S123 . Select at least two candidate hard disks from the plurality of originally available hard disks according to the number of available storage units in each originally available hard disk.

[0140] In one embodiment, the main controller may pre-train an algorithm model, and then input the number of available storage units in each originally available hard disk into the algorithm model, and the algorithm model outputs at least two candidate hard disks selected from the multiple originally available hard disks.

[0141] In another embodiment, the main controller may perform operations such as comparison processing and screening processing on the number of available storage units in each original available hard disk, and select at least two candidate hard disks from the multiple original available hard disks based on the processing operation results.

[0142] S133: Generate an original chain corresponding to the controller based on the available storage units in each candidate hard disk.

[0143] Specifically, for any candidate hard disk, the main controller can configure at least one available storage unit in the candidate hard disk into an original copy. Further, the original copies configured based on the available storage units in each candidate hard disk can be organized into an original chain corresponding to the controller.

[0144] In an embodiment of the present application, the sizes of available storage units in the candidate hard disks for constructing the original copy in the original storage chain may be equal.

[0145] The technical solution in the embodiment of the present application is to obtain, for the original chain corresponding to any controller, multiple original available hard disks in the storage pool of the storage system, select at least two candidate hard disks from the multiple original available hard disks according to the number of available storage units in each original available hard disk, and generate the original chain corresponding to the controller based on the available storage units in each candidate hard disk, wherein the number of available storage units in each original available hard disk is greater than or equal to the preset number of storage units; the above method can construct the original chain corresponding to the controller based on multiple original available hard disks in the storage pool of the storage system, wherein the number of available storage units is greater than or equal to the preset number of storage units, so as to prepare for further construction of a valid available copy.

[0146] The following describes the process of selecting at least two candidate hard disks from a plurality of originally available hard disks based on the number of available storage units in each originally available hard disk. Figure 5 As shown, the steps in the above S123 may include:

[0147] S1231. Sort the available storage unit quantities of each original available hard disk to obtain a sorting result.

[0148] In practical applications, the main controller may sort the available storage unit quantities of the original available hard disks in descending order or in ascending order to obtain a sorting result.

[0149] S1232. According to the order of the number of available storage units in the sorting result from largest to smallest, select original available hard disks with the same number as the target replicas from the original available hard disks to obtain candidate hard disks.

[0150] Optionally, the target number of replicas may be equal to the minimum number of available replicas in the storage chain to ensure that the original chain becomes a highly reliable storage chain. Also, the target number of replicas may be equal to the number of candidate hard disks.

[0151] Specifically, the main controller may select original available hard disks with the same number of target copies from the original available hard disks in descending order of the number of available storage units in the sorting result to obtain candidate hard disks.

[0152] In addition, when the number of original available hard disks is less than the target number of replicas, it indicates that the replica creation fails, and the number of available storage units of each original available hard disk remains unchanged.

[0153] The technical solution in the embodiment of the present application sorts the number of available storage units of each original available hard disk to obtain a sorting result, and selects original available hard disks equal to the number of target copies from each original available hard disk in the order of the number of available storage units in the sorting result from large to small to obtain each candidate hard disk; the above method does not require the participation of complex algorithms, and the processing process is relatively simple, thereby reducing the amount of data processed in the process of obtaining candidate hard disks, that is, the disk selection process, and speeding up the speed and efficiency of disk selection; at the same time, the above method can select multiple original available hard disks to construct any reliable and redundant original chain, and can create corresponding highly available storage chains based on each constructed original chain, so as to ensure that the hard disk segment data is not lost in the event of a hard disk segment change or failure; in addition, the above method can select multiple candidate hard disks required to construct the original chain according to the size of the number of available storage units of each original available hard disk, thereby improving the balanced distribution of hard disks in the storage pool and ensuring that each hard disk in the storage pool can be used evenly.

[0154] In some scenarios, after selecting a disk during the process of building the original chain, the selected candidate hard disk may be updated at any time. The following describes the process of building the original chain in this case. Figure 6 As shown, the step of generating the original chain corresponding to the controller based on the available storage units in each candidate hard disk in S133 can be implemented in the following manner:

[0155] S1331. Check whether the storage pool is updated.

[0156] It should be noted here that when the storage system is in write-through mode, the hard disks in the storage pool may be updated. At this time, it is necessary to detect whether the storage pool has been updated to ensure that the original copy in the constructed original chain is available.

[0157] In actual applications, the main controller may detect whether the storage pool is updated in real time, or periodically detect whether the storage pool is updated.

[0158] S1332: If it is detected that the storage pool is updated, construct an original chain corresponding to the controller according to the updated hard disk list of the storage pool and the number of available storage units of each currently available hard disk in the storage pool.

[0159] The updated hard disk list may include the identifier of at least one original hard disk that has been updated in the storage pool, i.e., the updated hard disk identifier. It should be noted that the updated hard disk may be a hard disk whose number of available storage units in an original hard disk has been adjusted, or may be a hard disk newly added to the storage pool, or an original hard disk deleted from the storage pool, or the remaining original available hard disks in the storage pool excluding all candidate hard disks, and this embodiment of the present application does not limit this.

[0160] Specifically, when an update to the storage pool is detected, the main controller can pre-train an original chain construction model, and then input the updated hard disk list of the storage pool and the number of available storage units of each currently available hard disk in the storage pool into the original chain construction model, and the original chain construction model outputs the original chain corresponding to the constructed controller.

[0161] Optionally, the above-mentioned original chain construction model can be implemented by at least one of a convolutional neural network model, a fully connected neural network model, a long short-term memory neural network model, a recurrent neural network model, etc.

[0162] In addition, the main controller can perform analysis, comparison and disk selection based on the updated hard disk list of the storage pool and the number of available storage units of each currently available hard disk in the storage pool, so as to establish the original chain corresponding to the controller.

[0163] S1333: If it is detected that the storage pool has not been updated, construct an original chain corresponding to the controller according to the available storage units and the preset number of storage units in each candidate hard disk.

[0164] In actual applications, when it is detected that the storage pool has not been updated, the main controller can input the available storage units and the preset number of storage units in each candidate hard disk into a pre-built algorithm model, and the algorithm model constructs the original chain corresponding to the controller.

[0165] It should be noted here that after the original chain is constructed, the available hard disk list of the storage pool can be updated based on the available storage units in the selected candidate hard disks, so that the available hard disk list can be used correctly in the future to ensure the reliability of the constructed original copy.

[0166] In one embodiment, if Figure 7 As shown, the step of constructing the original chain corresponding to the controller according to the available storage units and the preset number of storage units in each candidate hard disk in S1333 may include:

[0167] S1333a. Select available storage units equal to the preset number of storage units from the available storage units in each candidate hard disk as spare storage units in each candidate hard disk.

[0168] Specifically, for any candidate hard disk, the main controller can select available storage units equal to the preset number of storage units from the available storage units in the candidate hard disk as spare storage units in the candidate hard disk. The spare storage units in the candidate hard disk can be any number of available storage units in the candidate hard disk.

[0169] S1333b. Generate each original copy in the original chain according to the spare storage unit in each candidate hard disk to obtain the original chain.

[0170] Furthermore, for any candidate hard disk, the main controller can construct each original copy in the corresponding original chain based on the spare storage unit in the candidate hard disk to obtain the original chain. Optionally, one candidate hard disk corresponds to one original copy.

[0171] This embodiment can select available storage units equal to the preset number of storage units from the available storage units in each candidate hard disk as spare storage units in each candidate hard disk, and generate each original copy in the original chain based on the spare storage units in each candidate hard disk to obtain the original chain. This method can construct the original chain corresponding to the controller based on the available storage units in each candidate hard disk with higher reliability, thereby ensuring that the obtained original chain has higher reliability, in preparation for subsequently obtaining a highly reliable and effective storage chain.

[0172] The technical solution in the embodiment of the present application detects whether the storage pool is updated. If it is detected that the storage pool is updated, the original chain corresponding to the controller is constructed based on the updated hard disk list of the storage pool and the number of available storage units of each currently available hard disk in the storage pool. If it is detected that the storage pool is not updated, the original chain corresponding to the controller is constructed based on the available storage units in each candidate hard disk and the preset number of storage units. The above method can detect whether the storage pool is updated, and adopt corresponding processing methods according to different detection results to construct the original chain corresponding to the controller, so as to improve the success rate of constructing the original chain and ensure the validity of the constructed original chain.

[0173] The following describes the process of constructing the original chain corresponding to the controller when an update to the storage pool is detected. Figure 8 As shown, the step of constructing the original chain corresponding to the controller in S1332 according to the updated hard disk list of the storage pool and the number of available storage units of each currently available hard disk in the storage pool can be implemented in the following manner:

[0174] S1332a: Check whether each candidate hard disk exists in the updated hard disk list of the storage pool.

[0175] In one implementation, the main controller can pre-train a detection model, and then for any candidate hard disk, the candidate hard disk identifier of the candidate hard disk and the updated hard disk list of the storage pool are input into the detection model. The detection model detects whether the candidate hard disk exists in the updated hard disk list of the storage pool and then outputs the detection result.

[0176] In another implementation, for any candidate hard disk, the main controller can obtain the candidate hard disk identifier of the candidate hard disk, and then search for the candidate hard disk identifier among the updated hard disk identifiers in the updated hard disk list of the storage pool to detect whether the candidate hard disk exists in the updated hard disk list of the storage pool. If found, it is determined that the candidate hard disk exists in the updated hard disk list; otherwise, the candidate hard disk does not exist in the updated hard disk list.

[0177] S1332b. For any candidate hard disk, if the candidate hard disk exists in the updated hard disk list, a new candidate hard disk is selected from the multiple currently available hard disks in the storage pool according to the number of available storage units of the multiple currently available hard disks.

[0178] The multiple currently available hard disks in the storage pool may include all current hard disks in the storage pool whose available storage unit quantities are greater than or equal to a preset storage unit quantity.

[0179] Specifically, for any candidate hard disk, if the candidate hard disk exists in the updated hard disk list, the main controller can sort the number of available storage units of each currently available hard disk in the storage pool to obtain the sorting result, and select the currently available hard disk with the largest number of available storage units from each currently available hard disk as the new candidate hard disk in the order of the number of available storage units from large to small in the sorting result.

[0180] In addition, the main controller may also calculate the maximum value of the number of available storage units of each currently available hard disk in the storage pool, and then select the currently available hard disk with the largest number of available storage units as a new candidate hard disk.

[0181] S1332c. Build an original chain corresponding to the controller based on the available storage units in the new candidate hard disk.

[0182] Furthermore, the main controller may construct a corresponding original copy in the original chain corresponding to the controller based on the available storage units in the new candidate hard disk. Furthermore, the original chain may be generated based on each original copy in the acquired original chain.

[0183] The technical solution in the embodiment of the present application detects whether each candidate hard disk exists in the updated hard disk list of the storage pool. For any candidate hard disk, if the candidate hard disk exists in the updated hard disk list, a new candidate hard disk is selected from the multiple currently available hard disks according to the number of available storage units of the multiple currently available hard disks in the storage pool, and the original chain corresponding to the controller is constructed according to the available storage units in the new candidate hard disk. When the above method detects that the storage pool has been updated, it can first detect whether the selected candidate hard disk is an updated hard disk, and construct the original chain corresponding to the controller using the corresponding processing method according to the detection result to ensure the validity of the original chain finally constructed.

[0184] The following describes the process of writing the hard disk segment data and the copy security verification data into each original copy in each original chain to generate each storage chain. Figure 9 As shown, the steps in S105 above can be implemented in the following ways:

[0185] S115 , writing the hard disk segment data into the tail position of each original copy, and writing the copy security verification data into the head position of each original copy.

[0186] In an embodiment of the present application, each original copy can be divided into two storage areas, which can be called the tail position and the head position. The storage space size corresponding to the head position in each original copy can be equal; the storage space size corresponding to the head position in each original copy can be equal or unequal.

[0187] Specifically, the master controller can write the acquired hard disk segment data to the tail position of each original copy, and at the same time, write the acquired copy security verification data to the head position of each original copy. It should be noted that the hard disk segment data can be all the data stored in the hard disk segment.

[0188] S125. Determine the multiple original copies that have been successfully written into the hard disk segment data and the copy security verification data as available copies.

[0189] In an embodiment of the present application, the main controller may determine the original copies that have successfully written the hard disk segment data and the replica security verification data as usable copies. Simultaneously, the main controller may determine the original copies that have not successfully written the hard disk segment data and / or the replica security verification data as unusable copies.

[0190] S135. Determine each storage chain according to the original chain where each available replica is located.

[0191] In practical applications, the original chain where each available copy is located can be determined as the corresponding storage chain.

[0192] The technical solution in the embodiment of the present application writes the hard disk segment data into the tail position of each original copy respectively, and writes the copy security verification data into the head position of each original copy respectively, determines the multiple original copies that have successfully written the hard disk segment data and the copy security verification data as available copies, and determines each storage chain according to the original chain where each available copy is located; in the process of constructing the storage chain, the above method can write the hard disk segment data and the copy security verification data required to verify the correctness of the hard disk segment data into different positions of each original copy in the original chain respectively, so that in subsequent applications, the correctness of the hard disk segment data read from the available copy can be verified based on the copy security verification data in the available copy in the storage chain, thereby improving the security and reliability of the obtained hard disk segment data.

[0193] In one embodiment, if Figure 10 As shown, the steps of writing the hard disk segment data to the tail position of each original copy and writing the copy security verification data of the hard disk segment data to the head position of each original copy in S115 may include:

[0194] S1151. Write the hard disk segment data into the tail position of each original copy in the current original chain in sequence, and write the copy security verification data of the hard disk segment data into the head position of each original copy in the current original chain in sequence; the current original chain is the original chain corresponding to the main controller.

[0195] In an embodiment of the present application, when the main controller performs a write operation on each original chain, it can first perform a write operation on its own corresponding original chain (i.e., the current original chain), and then perform a write operation on the original chains corresponding to other controllers in turn.

[0196] Specifically, the main controller may sequentially write the hard disk segment data into the tail position of each original copy in the current original chain, and sequentially write the copy security verification data of the hard disk segment data into the head position of each original copy in the current original chain.

[0197] S1152. When all original copies in the current original chain have been traversed, the hard disk segment data is sequentially written to the tail position of each original copy in other original chains, and the copy security verification data of the hard disk segment data is sequentially written to the head position of each original copy in other original chains; other original chains are original chains other than the current original chain in multiple original chains.

[0198] Among them, the completion of traversal of each original copy in the current original chain can be understood as the completion of the write operation on each original copy in the current original chain; after the completion of traversal of each original copy in the current original chain, the write operation may succeed or fail for any original copy, which is not limited in the embodiment of the present application.

[0199] In actual applications, when all the original copies in the current original chain have been traversed, the main controller can write the hard disk segment data into the tail position of each original copy in other original chains in sequence, and write the copy security verification data of the hard disk segment data into the head position of each original copy in other original chains in sequence.

[0200] The technical solution in the embodiment of the present application can, during the process of executing write operations on the original chains corresponding to each controller, give priority to executing write operations on the original chain corresponding to the main controller, so as to preferentially construct the storage chain corresponding to the main controller, so that when any business request needs to be processed, the main controller can process the corresponding business request in a timely manner based on its own corresponding storage chain to speed up the response speed of the business request.

[0201] In actual applications, the working mode of the storage system can be detected to ensure that the working mode of the storage system is set to the write-through mode to improve the success rate of business request processing. The following describes the process of setting the working mode of the storage system to the write-through mode. In one embodiment, from the process of replica construction to the process of generating each storage chain, Figure 11 As shown, the above method may further include:

[0202] S106: Detect the working mode of the storage system.

[0203] In actual applications, when the storage system is in the initialization phase or after the initialization phase is completed, the main controller can call the storage system's operating mode detection tool to periodically or in real time detect the storage system's operating mode. It should be noted that after the storage system completes the initialization phase, the storage system's operating mode can be automatically switched.

[0204] S107 : When it is detected that the operating mode of the storage system is the non-write-through mode, adjust the operating mode of the storage system from the non-write-through mode to the write-through mode.

[0205] It should be noted here that when the storage system is in write-through mode, it can be understood that the service requests received by the storage system are directly processed by the hard disk segment; when the storage system is in non-write-through mode, it can be understood that the service requests received by the storage system are directly processed by the memory segment.

[0206] Specifically, when the main controller detects that the working mode of the storage system is non-write-through mode, it can call the write-through mode switching tool to adjust the working mode of the storage system from non-write-through mode to write-through mode, or it can respond to the write-through mode switching instruction input from the outside to adjust the working mode of the storage system from non-write-through mode to write-through mode.

[0207] The technical solution in the embodiment of the present application can detect the working mode of the storage system, and when it is detected that the working mode of the storage system is non-write-through mode, the working mode of the storage system is adjusted from non-write-through mode to write-through mode. In this way, it can ensure that when the memory segment in the storage system is abnormal, the working mode of the storage system is maintained in write-through mode, and business services are provided based on multiple available copies corresponding to the hard disk segment, thereby improving the reliability and success rate of business request processing; at the same time, the above method can dynamically adjust the storage system to be in write-through mode according to the actual working mode of the detected storage system, so that the management method of the working mode of the storage system is more flexible, so as to improve the high availability and high reliability of the hard disk segment, and can put the storage system in write-through mode to improve the availability of the storage system.

[0208] The following describes the process of detecting the working mode of the storage system. Figure 12 As shown, the steps in S106 above can be implemented in the following ways:

[0209] S116: Obtain system common data of the storage system, wherein the system common data includes the status of the power protection module in the storage system.

[0210] It should be noted that, in the event of a power module failure in the storage system or a power outage in the storage system, the power protection module can protect the data currently in the cache.

[0211] In practical applications, the storage system's public data may include the status of the storage system's power protection module and business-related data. Specifically, the main controller can obtain the storage system's public data from the dashboard memory and then use an information extraction algorithm to extract the status of the storage system's power protection module from the public data. Optionally, the information extraction algorithm can be a rule-based algorithm, a machine learning algorithm, a statistics-based algorithm, a deep learning-based algorithm, or the like.

[0212] In addition, the main controller may also compare the system common data of the storage system with the status identifier of the power protection module, and use the consistent data as the status of the power protection module in the system common data.

[0213] S126: When the power protection module is in an abnormal state, determine that the operating mode of the storage system is a write-through mode.

[0214] In the case where it is determined that the state of the power protection module is abnormal, the main controller may determine that the working mode of the storage system is the write-through mode.

[0215] S136: When the power protection module is in a normal state, determine that the operating mode of the storage system is a non-write-through mode.

[0216] In addition, when it is determined that the status of the power protection module is normal, the main controller may determine that the operating mode of the storage system is the non-write-through mode.

[0217] The technical solution in the embodiment of the present application obtains the system public data of the storage system, and when the status of the power protection module is abnormal, determines that the working mode of the storage system is the write-through mode; when the status of the power protection module is normal, determines that the working mode of the storage system is the non-write-through mode, wherein the system public data includes the status of the power protection module in the storage system; the above method can detect the working mode of the storage system without the participation of complex algorithms, thereby reducing the complexity of detecting the working mode of the storage system and accelerating the speed and efficiency of detecting the working mode of the storage system.

[0218] In some scenarios, when the storage system is in write-through mode, the reliability of the hard disk in the storage pool is not high, which may cause the original copy constructed to fail to be written for the first time. In this case, it is necessary to rewrite the original copy that failed to be written for the first time, that is, perform an alignment write operation. The following describes the process of performing an alignment write operation on the unavailable copy that failed to be written for the first time in the target storage chain. In one embodiment, after executing the steps in S105 above, as shown in FIG. Figure 13 As shown, the above method may further include the following steps:

[0219] S108: When each storage chain is generated, obtain an unavailable copy in a target storage chain. The target storage chain is any storage chain other than the current storage chain, and the unavailable copy is the original copy of the disk segment data and / or the copy security verification data of the disk segment in the target storage chain that failed to be written.

[0220] In practical applications, the target storage chain can be any storage chain other than the current storage chain, that is, the storage chain corresponding to any controller other than the primary controller in the storage system. The target storage chain can have one or more unavailable replicas, which is not limited in this embodiment of the application.

[0221] Specifically, when generating each storage chain, the main controller may obtain invalid copy information of the target storage chain from the key hard disk of the storage system, and then determine the unavailable copy in the target storage chain according to the invalid copy information of the target storage chain.

[0222] In addition, the main controller can also call an invalid copy identification instruction to read the number of unavailable copies in the target storage chain.

[0223] S109: Obtain the hard disk segment data and the copy security verification data from the current cache.

[0224] Specifically, the main controller may obtain the hard disk segment data of the hard disk segment and the copy security verification data of the hard disk segment data from the current cache of the storage system.

[0225] S110. Perform an alignment write operation on the unavailable replica based on the hard disk segment data and the replica security verification data to generate a corresponding available replica in the target storage chain.

[0226] In an embodiment of the present application, after the slave controller corresponding to the target storage chain clears various tasks (such as data read requests, data write requests, etc.), the master controller can trigger an aligned write operation on the unavailable copies in the target storage chain.

[0227] In one embodiment, the main controller can call an alignment write tool to perform an alignment write operation on the unavailable replicas in the target storage chain based on the hard disk segment data and the replica security verification data to generate corresponding available replicas in the target storage chain.

[0228] In another embodiment, the main controller can send both the hard disk segment data and the replica security verification data to a third-party device, instructing the third-party device to perform an aligned write operation on the unavailable replicas in the target storage chain based on the hard disk segment data and the replica security verification data to generate corresponding available replicas in the target storage chain.

[0229] The technical solution in the embodiment of the present application, when generating each storage chain, obtains an unavailable copy in the target storage chain, obtains the hard disk segment data and the copy safety verification data from the current cache, and performs an aligned write operation on the unavailable copy based on the hard disk segment data and the copy safety verification data to generate a corresponding available copy in the target storage chain, wherein the target storage chain is any storage chain other than the current storage chain, and the unavailable copy is the original copy of the hard disk segment data and / or the copy safety verification data of the hard disk segment in the target storage chain that fails to be written; the above method can perform an aligned write operation, that is, a rewrite operation, on the unavailable copy in the storage chain, thereby improving the high availability and high reliability of each storage chain.

[0230] The following describes the process of performing an aligned write operation on the unavailable replica based on the hard disk segment data and the replica safety verification data to generate a corresponding available replica. In one embodiment, the step in S110 may include: sending the hard disk segment data and the replica safety verification data to the controller corresponding to the target storage chain, instructing the controller corresponding to the target storage chain to write the replica safety verification data to the head position of the unavailable replica, and to write the hard disk segment data to the tail position of the unavailable replica, thereby generating a corresponding available replica in the target storage chain.

[0231] In an embodiment of the present application, the main controller can send hard disk segment data and copy safety verification data to the controller corresponding to the target storage chain, instructing the controller corresponding to the target storage chain to write the copy safety verification data to the head position of the unavailable copy, and write the hard disk segment data to the tail position of the unavailable copy, and if the write is successful, generate the corresponding available copy in the target storage chain, that is, the unavailable copy in the target storage chain becomes the corresponding available copy.

[0232] The technical solution in the embodiment of the present application sends hard disk segment data and replica security verification data to the controller corresponding to the target storage chain, instructs the controller corresponding to the target storage chain to write the replica security verification data to the head position of the unavailable replica, and write the hard disk segment data to the tail position of the unavailable replica, to generate the corresponding available replica in the target storage chain; the above method can perform aligned write operations, that is, rewrite operations, on the unavailable replicas in the storage chain, thereby improving the high availability and high reliability of each storage chain.

[0233] In some scenarios, if an aligned write operation fails on an unavailable replica, it indicates that the unavailable replica has failed, and the unavailable replica needs to be repaired. The following describes the processing process for this scenario. In one embodiment, after executing the steps in S110 above, the method may further include: if writing the disk segment data and / or replica security verification data to the unavailable replica fails, repairing the unavailable replica in the target storage chain.

[0234] It should be noted here that when it is determined that the hard disk segment data and / or replica security verification data have failed to be written to the unavailable replica, it indicates that the alignment write operation on the unavailable replica has failed. At this time, the main controller can call the replica repair tool to perform replica repair on the unavailable replica in the target storage chain.

[0235] In addition, the main controller may also send a replica repair instruction to the third-party device, instructing the third-party device to repair the unavailable replica in the target storage chain.

[0236] The technical solution in the embodiments of the present application is to repair the unavailable copies in the target storage chain when the hard disk segment data and / or copy security verification data fail to be written to the unavailable copies. This can increase the number of available copies ultimately generated in the target storage chain, thereby improving the high reliability of the target storage chain.

[0237] In some scenarios, the unavailable copies in each storage chain can be directly repaired, and then the alignment write operation can be performed on the repaired copies. The following describes this process. Figure 14 As shown, the above method may further include the following steps:

[0238] S111: When each storage chain is generated and an unavailable copy in a target storage chain in the storage system needs to be repaired, repair the unavailable copy in the target storage chain to obtain a corresponding restored copy in the target storage chain. The target storage chain is any storage chain in each storage chain except the current storage chain.

[0239] In actual applications, when each storage chain is generated and the unavailable copy in the target storage chain in the storage system needs to be repaired, the main controller can call the copy repair tool to repair the unavailable copy in the target storage chain and generate the corresponding restored copy in the target storage chain.

[0240] In another embodiment, the main controller can send a copy repair instruction to a third-party device, instructing the third-party device to perform copy repair on the unavailable copy in the target storage chain to generate a corresponding restored copy in the target storage chain, that is, the unavailable copy in the target storage chain is replaced with the restored copy.

[0241] It should be noted here that, for any storage chain, if the number of available copies in the storage chain is less than the target number of copies, it indicates that the unavailable copies in the storage chain need to be repaired; or, if the unavailable copies in the storage chain fail to align write operations multiple times, it can be determined that the unavailable copies in the storage chain need to be repaired. At this time, the unavailable copies in the storage chain can also be repaired; at the same time, the copy repair can be a periodic repair task. When the periodic repair task is triggered, the unavailable copies in the storage chain need to be repaired. In an embodiment of the present application, at least one original copy in each original chain can generate a corresponding available copy, that is, the number of original chains is equal to the number of storage chains.

[0242] In addition, after the unavailable copy in the target storage chain is successfully repaired, the valid bitmap, invalid bitmap, description information of each available copy and description information of available storage units in each available copy in the target storage chain stored in the critical hard disk can be updated.

[0243] S112: Obtain hard disk segment data of the hard disk segment and copy security verification data of the hard disk segment data from the current cache of the storage system.

[0244] S113. Perform an alignment write operation on the restored replica based on the hard disk segment data and the replica security verification data to generate a corresponding available replica in the target storage chain.

[0245] In one embodiment, the main controller can call an alignment write tool to perform an alignment write operation on the recovered copy based on the hard disk segment data and the copy safety verification data, and generate a corresponding available copy in the target storage chain if the alignment write is successful.

[0246] In another embodiment, the main controller can send both the hard disk segment data and the replica security verification data to a third-party device, instructing the third-party device to perform an aligned write operation on the recovered replica based on the hard disk segment data and the replica security verification data to generate a corresponding available replica in the target storage chain.

[0247] In one embodiment, the method of performing aligned write operations on the restored copy can be to write the hard disk segment data to the tail position of the restored copy, and write the copy security verification data to the head position of the restored copy to generate the corresponding available copy in the target storage chain.

[0248] The technical solution in the embodiment of the present application is as follows: when each storage chain is generated and the unavailable copy in the target storage chain in the storage system needs to be repaired, the unavailable copy in the target storage chain is repaired to obtain the corresponding restored copy in the target storage chain, the hard disk segment data of the hard disk segment and the copy safety verification data of the hard disk segment are obtained from the current cache of the storage system, and an alignment write operation is performed on the restored copy according to the hard disk segment data and the copy safety verification data to generate the corresponding available copy in the target storage chain, wherein the target storage chain is any storage chain in each storage chain except the current storage chain; the above method can perform copy repair and alignment write operations on the unavailable copy in the storage chain according to actual application requirements, thereby improving the flexibility of solving the high reliability of the storage chain, and after performing the copy repair and alignment write operations on the unavailable copy in the storage chain, the high reliability of the storage chain can be improved.

[0249] In some scenarios, when the number of available copies in the current storage chain does not meet the reliability service conditions, the main controller needs to implement role switching to ensure that the current service request received by the main controller can be successfully processed. The following describes this process. Figure 15 As shown, after executing the step in S101 above, the above method may further include the following steps:

[0250] S114: If the number of available copies in the current storage chain does not meet the reliability service condition, detect whether there is a role switching instruction sent by a management device in the storage system.

[0251] Specifically, the main controller can determine whether the number of available copies in the current storage chain meets the preset reliability service conditions. If it is determined that the number of available copies in the current storage chain meets the preset reliability service conditions, the main controller can detect whether there is a role switching instruction actively sent by the management device in the storage system.

[0252] S115: If a role switching instruction sent by the management device is detected, an operation of switching from the master controller to a slave controller in the storage system is executed.

[0253] In actual applications, when the master controller detects a role switching instruction sent by the management device, it can execute an operation of switching from the master controller to the slave controller in the storage system.

[0254] In one embodiment, the master controller may switch to a slave controller in the storage system by invoking a master-slave mode switching tool to switch to a slave controller in the storage system.

[0255] In another embodiment, the method for executing the operation of switching from the main controller to the slave controller in the storage system can also be that the main controller outputs relevant messages about the master-slave mode switching to remind the user to input the configuration information of the slave controller. Correspondingly, after receiving the configuration information of the slave controller, the main controller switches its original configuration information to the configuration information of the slave controller to complete the operation of switching from the main controller to the slave controller in the storage system.

[0256] At the same time, the management device may send a role switching instruction to a slave controller selected from the at least one current slave controller, instructing the slave controller to execute an operation of switching from a slave controller to a master controller in the storage system. The slave controller selected from the at least one current slave controller may be selected based on the type of configuration information of each slave controller, or based on the amount of load currently unresponsive to each slave controller, as long as the number of available replicas in the storage chain corresponding to the selected slave controller meets a preset reliability service condition.

[0257] S116: Send a processing instruction for the current service request to a new main controller in the storage system, instructing the new main controller to process the current service request.

[0258] Furthermore, the master controller may send a processing instruction for the current service request to a new master controller in the storage system, instructing the new master controller to process the current service request based on available copies in its corresponding storage chain.

[0259] The technical solution in the embodiment of the present application can realize master-slave switching when the number of available copies in the current storage chain corresponding to the master controller does not meet the reliability service conditions, thereby improving the success rate and timeliness of the business request processing received by the original master controller. At the same time, in this method, the available copies corresponding to the hard disk segment data are configured as multiple storage chain structures. In this way, when the number of available copies in the current storage chain does not meet the reliability service conditions, the current storage chain can be switched to other storage chains that meet the reliability service conditions to provide external business processing services, thereby improving the high availability and high reliability of the hard disk segment.

[0260] In one embodiment, the present application also provides a service request processing method, which is applied to a main controller in a storage system, wherein each controller in the storage system is configured with a storage chain corresponding to a hard disk segment, and each storage chain includes at least one available replica; the method includes the following process:

[0261] (1) In response to the processing instruction of the current business request, obtain the number of available copies in the current storage chain corresponding to the main controller;

[0262] (2) When the number of available replicas in the current storage chain meets the preset reliability service conditions, the current business request is processed based on the available replicas in the current storage chain;

[0263] (3) When the number of available copies in the current storage chain does not meet the reliability service conditions, detect whether there is a role switching instruction sent by the management device in the storage system;

[0264] (4) If a role switching instruction is detected from the management device, the operation of switching from the master controller to the slave controller in the storage system is executed;

[0265] (5) Sending the processing instruction of the current service request to the new main controller in the storage system, instructing the new main controller to process the current service request;

[0266] The construction process of each of the above storage chains may include the following steps:

[0267] (6) Obtaining the system public data of the storage system; the system public data includes the status of the power protection module in the storage system;

[0268] (7) When the power protection module is in an abnormal state, the storage system is determined to be in a write-through mode;

[0269] (8) When the power protection module is in normal state, determine that the working mode of the storage system is non-write-through mode;

[0270] (9) When it is detected that the working mode of the storage system is the non-write-through mode, adjusting the working mode of the storage system from the non-write-through mode to the write-through mode;

[0271] (10) For the original chain corresponding to any controller, obtain multiple original available hard disks in the storage pool of the storage system; the number of available storage units in each original available hard disk is greater than or equal to the preset number of storage units;

[0272] (11) Sort the number of available storage units of each original available hard disk to obtain a sorting result;

[0273] (12) According to the order of the number of available storage units in the sorting results from large to small, select the original available hard disks with the same number of target copies from each original available hard disk to obtain each candidate hard disk;

[0274] (13) Detect whether the storage pool is updated;

[0275] (14) If it is detected that the storage pool is updated, then check whether each candidate hard disk exists in the updated hard disk list of the storage pool;

[0276] (15) For any candidate hard disk, if the candidate hard disk exists in the updated hard disk list, a new candidate hard disk is selected from the multiple currently available hard disks in the storage pool according to the number of available storage units of the multiple currently available hard disks;

[0277] (16) Construct the original chain corresponding to the controller based on the available storage units in the new candidate hard disk;

[0278] (17) If it is detected that the storage pool has not been updated, then a number of available storage units equal to the preset number of storage units are selected from the available storage units in each candidate hard disk as spare storage units in each candidate hard disk;

[0279] (18) Generate each original copy in the original chain according to the spare storage unit in each candidate hard disk to obtain an original chain; each original chain includes multiple original copies;

[0280] (19) Obtaining the hard disk segment data and the copy security verification data of the hard disk segment from the current cache of the storage system;

[0281] (20) Writing the hard disk segment data to the tail position of each original copy in the current original chain, and writing the copy security verification data of the hard disk segment data to the head position of each original copy in the current original chain; the current original chain is the original chain corresponding to the main controller;

[0282] (21) When all original copies in the current original chain have been traversed, the hard disk segment data is written to the tail position of each original copy in the other original chains, and the copy security verification data of the hard disk segment data is written to the head position of each original copy in the other original chains; the other original chains are the original chains other than the current original chain in the multiple original chains;

[0283] (22) Multiple original copies of the hard disk segment data and the copy security verification data that have been successfully written are determined as usable copies;

[0284] (23) Determine each storage chain based on the original chain where each available copy is located;

[0285] (24) Obtaining an unavailable copy in the target storage chain; the target storage chain is any storage chain other than the current storage chain in each storage chain, and the unavailable copy is the original copy of the hard disk segment data and / or the copy security verification data of the hard disk segment data in the target storage chain to which writing fails;

[0286] (25) Obtain the hard disk segment data and copy security verification data from the current cache;

[0287] (26) Sending the hard disk segment data and the replica security verification data to the controller corresponding to the target storage chain, instructing the controller corresponding to the target storage chain to write the replica security verification data to the head position of the unavailable replica, and to write the hard disk segment data to the tail position of the unavailable replica, thereby generating the corresponding available replica in the target storage chain;

[0288] (27) Repair the unavailable replica in the target storage chain if the hard disk segment data and / or replica security verification data fails to be written to the unavailable replica;

[0289] (28) When each storage chain is generated and an unavailable copy in a target storage chain in the storage system needs to be repaired, the unavailable copy in the target storage chain is repaired to obtain a corresponding restored copy in the target storage chain; the target storage chain is any storage chain in each storage chain except the current storage chain;

[0290] (29) Obtaining the hard disk segment data and the copy security verification data of the hard disk segment from the current cache of the storage system;

[0291] (30) Based on the hard disk segment data and the replica security verification data, an alignment write operation is performed on the recovered replica to generate the corresponding available replica in the target storage chain.

[0292] The execution process of the above (1) to (30) can be specifically referred to the description of the above embodiment. The implementation principles and technical effects are similar and will not be repeated here.

[0293] It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0294] Based on the same inventive concept, embodiments of the present application also provide a service request processing device for implementing the aforementioned service request processing method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations in one or more service request processing device embodiments provided below can be found in the aforementioned limitations on the service request processing method and will not be further elaborated here.

[0295] In one embodiment, Figure 16 This is a structural diagram of a service request processing device in one embodiment of the present application. The service request processing device provided in the embodiment of the present application can be applied to the main controller in the storage system. Each controller in the storage system is configured with a storage chain corresponding to a hard disk segment, and each storage chain includes at least one available copy. Figure 16 As shown, the service request processing device of the embodiment of the present application may include: an instruction response module 11 and a request processing module 12, wherein:

[0296] The instruction response module 11 is used to obtain the number of available copies in the current storage chain corresponding to the main controller in the storage system in response to the processing instruction of the current service request;

[0297] The request processing module 12 is configured to process the current service request based on the available copies in the current storage chain when the number of available copies in the current storage chain meets a preset reliability service condition.

[0298] The service request processing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned service request processing method embodiment of the present application. Its implementation principle and technical effects are similar and will not be repeated here.

[0299] In one embodiment, the service request processing device further includes: a replica creation module, a first acquisition module, and a write processing module, wherein:

[0300] The replica creation module is used to create replicas of hard disk segments and generate original chains corresponding to each controller in the storage system; each original chain includes multiple original replicas;

[0301] A first acquisition module is configured to acquire hard disk segment data of a hard disk segment and copy security verification data of the hard disk segment data from a current cache of the storage system;

[0302] The write processing module is used to write the hard disk segment data and the copy security verification data into each original copy in each original chain in sequence to generate each storage chain.

[0303] The service request processing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned service request processing method embodiment of the present application. Its implementation principle and technical effects are similar and will not be repeated here.

[0304] In one embodiment, the replica creation module includes: an acquisition unit, a selection unit, and an original chain generation unit, wherein:

[0305] An acquisition unit is configured to acquire, for an original chain corresponding to any controller, a plurality of original available hard disks in a storage pool of the storage system; the number of available storage units in each original available hard disk is greater than or equal to a preset number of storage units;

[0306] a selection unit, configured to select at least two candidate hard disks from a plurality of originally available hard disks according to the number of available storage units in each originally available hard disk;

[0307] The original chain generating unit is used to generate an original chain corresponding to the controller based on the available storage units in each candidate hard disk.

[0308] The service request processing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned service request processing method embodiment of the present application. Its implementation principle and technical effects are similar and will not be repeated here.

[0309] In one embodiment, the selection unit includes: a sorting subunit and a selection subunit, wherein:

[0310] A sorting subunit, used to sort the number of available storage units of each original available hard disk to obtain a sorting result;

[0311] The sub-unit is selected to select original available hard disks with the same number as the target replicas from the original available hard disks in descending order of the number of available storage units in the sorting result to obtain candidate hard disks.

[0312] The service request processing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned service request processing method embodiment of the present application. Its implementation principle and technical effects are similar and will not be repeated here.

[0313] In one embodiment, the original chain generation unit includes: a detection subunit, a first construction subunit, and a second construction subunit, wherein:

[0314] A detection subunit, used to detect whether the storage pool is updated;

[0315] A first construction subunit is configured to, when detecting that a storage pool is updated, construct an original chain corresponding to the controller according to an updated hard disk list of the storage pool and the number of available storage units of each currently available hard disk in the storage pool;

[0316] The second construction subunit is configured to construct an original chain corresponding to the controller according to available storage units and a preset number of storage units in each candidate hard disk when detecting that the storage pool has not been updated.

[0317] The service request processing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned service request processing method embodiment of the present application. Its implementation principle and technical effects are similar and will not be repeated here.

[0318] In one embodiment, the first construction subunit is specifically used to:

[0319] Check whether each candidate hard disk exists in the updated hard disk list of the storage pool;

[0320] For any candidate hard disk, if the candidate hard disk exists in the updated hard disk list, a new candidate hard disk is selected from the multiple currently available hard disks in the storage pool according to the number of available storage units of the multiple currently available hard disks;

[0321] Based on the available storage units in the new candidate hard disk, the original chain corresponding to the controller is constructed.

[0322] The service request processing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned service request processing method embodiment of the present application. Its implementation principle and technical effects are similar and will not be repeated here.

[0323] In one embodiment, the second construction subunit is specifically used to:

[0324] Selecting available storage units equal to the preset number of storage units from the available storage units in each candidate hard disk as spare storage units in each candidate hard disk;

[0325] According to the spare storage units in each candidate hard disk, each original copy in the original chain is generated to obtain the original chain.

[0326] The service request processing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned service request processing method embodiment of the present application. Its implementation principle and technical effects are similar and will not be repeated here.

[0327] In one embodiment, the write processing module includes: a write processing unit, a first determining unit, and a second determining unit, wherein:

[0328] A write processing unit, configured to write the hard disk segment data to the tail position of each original copy, and to write the copy security verification data to the head position of each original copy;

[0329] A first determining unit, configured to determine multiple original copies of the hard disk segment data and the copy security verification data that have been successfully written as usable copies;

[0330] The second determining unit is configured to determine each storage chain according to the original chain where each available replica is located.

[0331] The service request processing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned service request processing method embodiment of the present application. Its implementation principle and technical effects are similar and will not be repeated here.

[0332] In one embodiment, the write processing unit is specifically configured to:

[0333] Write the hard disk segment data sequentially to the tail position of each original copy in the current original chain, and write the copy security verification data of the hard disk segment data sequentially to the head position of each original copy in the current original chain; the current original chain is the original chain corresponding to the primary controller;

[0334] When all original copies in the current original chain have been traversed, the hard disk segment data is written sequentially to the tail position of each original copy in other original chains, and the copy security verification data of the hard disk segment data is written sequentially to the head position of each original copy in other original chains; other original chains are original chains other than the current original chain in multiple original chains.

[0335] The service request processing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned service request processing method embodiment of the present application. Its implementation principle and technical effects are similar and will not be repeated here.

[0336] In one embodiment, the service request processing device includes: a detection module and a mode adjustment module, wherein:

[0337] A detection module, used to detect the working mode of the storage system;

[0338] The mode adjustment module is used to adjust the working mode of the storage system from the non-write-through mode to the write-through mode when detecting that the working mode of the storage system is the non-write-through mode.

[0339] The service request processing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned service request processing method embodiment of the present application. Its implementation principle and technical effects are similar and will not be repeated here.

[0340] In one embodiment, the detection module is specifically configured to:

[0341] Obtaining system common data of the storage system; the system common data includes the status of the power protection module in the storage system;

[0342] When the power protection module is in an abnormal state, the storage system is determined to be in a write-through mode.

[0343] When the power protection module is in a normal state, the storage system is determined to be in a non-write-through mode.

[0344] The service request processing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned service request processing method embodiment of the present application. Its implementation principle and technical effects are similar and will not be repeated here.

[0345] In one embodiment, the service request processing device further includes: an unavailable replica acquisition module, a second acquisition module, and an available replica generation module, wherein:

[0346] An unavailable copy acquisition module is used to acquire an unavailable copy in a target storage chain when each storage chain is generated; the target storage chain is any storage chain other than the current storage chain, and the unavailable copy is the original copy of the disk segment data and / or the copy security verification data of the disk segment data of the target storage chain that failed to be written;

[0347] The second acquisition module is used to obtain the hard disk segment data and the copy security verification data from the current cache;

[0348] The available replica generation module is used to align write operations on unavailable replicas based on hard disk segment data and replica security verification data, and generate corresponding available replicas in the target storage chain.

[0349] The service request processing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned service request processing method embodiment of the present application. Its implementation principle and technical effects are similar and will not be repeated here.

[0350] In one embodiment, the replica generation module is specifically used to:

[0351] Send the hard disk segment data and replica safety verification data to the controller corresponding to the target storage chain, instruct the controller corresponding to the target storage chain to write the replica safety verification data to the head position of the unavailable replica, and write the hard disk segment data to the tail position of the unavailable replica, to generate the corresponding available replica in the target storage chain.

[0352] The service request processing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned service request processing method embodiment of the present application. Its implementation principle and technical effects are similar and will not be repeated here.

[0353] In one embodiment, the service request processing device further includes: a replica repair module, wherein:

[0354] The replica repair module is used to repair the unavailable replica in the target storage chain when the hard disk segment data and / or replica security verification data fail to be written to the unavailable replica.

[0355] The service request processing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned service request processing method embodiment of the present application. Its implementation principle and technical effects are similar and will not be repeated here.

[0356] In one embodiment, the service request processing device includes: a replica repair module, a third acquisition module, and an alignment write operation, wherein:

[0357] A replica repair module is configured to, when each storage chain is generated and an unavailable replica in a target storage chain in the storage system needs to be repaired, repair the unavailable replica in the target storage chain to obtain a corresponding restored replica in the target storage chain; the target storage chain is any storage chain in each storage chain except the current storage chain;

[0358] A third acquisition module is used to obtain the hard disk segment data of the hard disk segment and the copy security verification data of the hard disk segment data from the current cache of the storage system;

[0359] The aligned write operation is used to perform an aligned write operation on the recovered replica based on the hard disk segment data and the replica security verification data to generate the corresponding available replica in the target storage chain.

[0360] The service request processing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned service request processing method embodiment of the present application. Its implementation principle and technical effects are similar and will not be repeated here.

[0361] In one embodiment, the service request processing device includes: a detection module, a switching module and an instruction sending module, wherein:

[0362] A detection module is used to detect whether there is a role switching instruction sent by a management device in the storage system when the number of available copies in the current storage chain does not meet the reliability service condition;

[0363] A switching module, configured to switch from a master controller to a slave controller in the storage system upon detecting a role switching instruction sent by a management device;

[0364] The instruction sending module is used to send a processing instruction of the current service request to a new main controller in the storage system, instructing the new main controller to process the current service request.

[0365] The service request processing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned service request processing method embodiment of the present application. Its implementation principle and technical effects are similar and will not be repeated here.

[0366] For specific definitions of the service request processing device, please refer to the definitions of the service request processing method above and will not be repeated here. Each module in the above-mentioned service request processing device can be implemented in whole or in part through software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each of the above modules.

[0367] In one embodiment, a computer device is also provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 17 As shown. The computer device includes a processor, a memory, a network interface and a display unit connected via a system bus. 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 hard disk segment data of the hard disk segment and copy security verification data of the hard disk segment data. The network interface of the computer device is used to communicate with an external endpoint via a network connection. When the computer program is executed by the processor, a service request processing method is implemented.

[0368] Those skilled in the art will understand that Figure 17 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0369] In one embodiment, a computer device is also provided, including a memory and a processor, wherein a computer program is stored in the memory. When the processor executes the computer program, the technical solution in the above-mentioned business request processing method embodiment of the present application is implemented. The implementation principle and technical effect are similar and will not be repeated here.

[0370] In one embodiment, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, the technical solution of the above-mentioned business request processing method of the present application is implemented. Its implementation principle and technical effect are similar and will not be repeated here.

[0371] In one embodiment, a computer program product is also provided, including a computer program. When the computer program is executed by a processor, the technical solution of the above-mentioned business request processing method of the present application is implemented. The implementation principle and technical effect are similar and will not be repeated here.

[0372] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media used in the embodiments provided herein may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage. Volatile memory may 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).

[0373] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, 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, they should be considered to be within the scope of this specification.

[0374] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A method for processing a business request, characterized in that: The method is applied to a main controller in a storage system, wherein each controller in the storage system is configured with a storage chain corresponding to a hard disk segment, and each storage chain includes at least one available replica; the method includes: In response to a processing instruction of a current service request, obtaining the number of available copies in the current storage chain corresponding to the master controller; When the number of available replicas in the current storage chain meets a preset reliability service condition, the current service request is processed based on the available replicas in the current storage chain.

2. The method according to claim 1, characterized in that The construction process of each storage chain includes: Creating a copy of the hard disk segment to generate an original chain corresponding to each controller in the storage system; each original chain includes multiple original copies; Obtaining hard disk segment data of the hard disk segment and copy security verification data of the hard disk segment data from a current cache of the storage system; The hard disk segment data and the copy security verification data are sequentially written into each original copy in each original chain to generate each storage chain.

3. The method according to claim 2, characterized in that The step of creating a copy of the hard disk segment to generate an original chain corresponding to each controller in the storage system includes: For an original chain corresponding to any controller, obtain multiple original available hard disks in a storage pool of the storage system; the number of available storage units in each of the original available hard disks is greater than or equal to a preset number of storage units; Selecting at least two candidate hard disks from the plurality of originally available hard disks according to the number of available storage units in each of the originally available hard disks; Based on the available storage units in each of the candidate hard disks, an original chain corresponding to the controller is generated.

4. The method according to claim 3, characterized in that The selecting at least two candidate hard disks from the plurality of originally available hard disks according to the number of available storage units in each of the originally available hard disks comprises: Sorting the number of available storage units of each of the original available hard disks to obtain a sorting result; According to the order of the number of available storage units in the sorting results from largest to smallest, original available hard disks with the same number as the target copies are selected from the original available hard disks to obtain the candidate hard disks.

5. The method according to claim 3, characterized in that The generating of the original chain corresponding to the controller based on the available storage units in each of the candidate hard disks includes: Detecting whether the storage pool is updated; If it is detected that the storage pool is updated, constructing an original chain corresponding to the controller according to the updated hard disk list of the storage pool and the number of available storage units of each currently available hard disk in the storage pool; If it is detected that the storage pool has not been updated, an original chain corresponding to the controller is constructed according to the available storage units in each candidate hard disk and the preset number of storage units.

6. The method according to claim 5, characterized in that The step of constructing the original chain corresponding to the controller according to the updated hard disk list of the storage pool and the number of available storage units of each currently available hard disk in the storage pool includes: Detecting whether each candidate hard disk exists in an updated hard disk list of the storage pool; For any candidate hard disk, if the candidate hard disk exists in the updated hard disk list, a new candidate hard disk is selected from the multiple currently available hard disks in the storage pool according to the number of available storage units of the multiple currently available hard disks; An original chain corresponding to the controller is constructed according to available storage units in the new candidate hard disk.

7. The method according to claim 5, characterized in that The step of constructing the original chain corresponding to the controller according to the available storage units in each candidate hard disk and the preset number of storage units includes: Selecting available storage units equal to the preset number of storage units from the available storage units in each candidate hard disk as spare storage units in each candidate hard disk; Each original copy in the original chain is generated according to the spare storage unit in each candidate hard disk to obtain the original chain.

8. The method according to any one of claims 2 to 7, characterized in that The step of writing the hard disk segment data and the copy security verification data into each original copy in each original chain in sequence to generate each storage chain includes: Writing the hard disk segment data into the tail position of each original copy, and writing the copy security verification data into the head position of each original copy; Determine the multiple original copies that have successfully written the hard disk segment data and the copy security verification data as available copies; The storage chains are determined according to the original chains where the available copies are located.

9. The method according to claim 8, characterized in that Writing the hard disk segment data into the tail position of each original copy, and writing the copy security verification data of the hard disk segment data into the head position of each original copy, respectively, includes: Writing the hard disk segment data sequentially to the tail position of each original copy in the current original chain, and writing the copy security verification data of the hard disk segment data sequentially to the head position of each original copy in the current original chain; the current original chain is the original chain corresponding to the master controller; When all original copies in the current original chain have been traversed, the hard disk segment data is sequentially written into the tail position of each original copy in other original chains, and the copy security verification data of the hard disk segment data is sequentially written into the head position of each original copy in other original chains; the other original chains are original chains other than the current original chain in multiple original chains.

10. The method according to any one of claims 2 to 7, characterized in that The method further comprises: detecting an operating mode of the storage system; When it is detected that the operating mode of the storage system is the non-write-through mode, the operating mode of the storage system is adjusted from the non-write-through mode to the write-through mode.

11. The method according to claim 10, characterized in that The detecting the operating mode of the storage system includes: Acquire system common data of the storage system; the system common data includes the status of the power protection module in the storage system; When the state of the power protection module is abnormal, determining that the working mode of the storage system is the write-through mode; When the state of the power protection module is normal, the operating mode of the storage system is determined to be the non-write-through mode.

12. The method according to any one of claims 2 to 7, characterized in that The method further comprises: When generating each of the storage chains, obtaining an unavailable copy in a target storage chain; the target storage chain is any storage chain in the storage chains except the current storage chain, and the unavailable copy is the original copy of the hard disk segment data of the hard disk segment in the target storage chain and / or the copy security verification data of the hard disk segment data to which writing fails; Obtaining the hard disk segment data and the copy security verification data from the current cache; According to the hard disk segment data and the replica security verification data, an alignment write operation is performed on the unavailable replica to generate a corresponding available replica in the target storage chain.

13. The method according to claim 12, characterized in that The step of performing an alignment write operation on the unavailable replica according to the hard disk segment data and the replica security verification data to generate a corresponding available replica in the target storage chain includes: Send the hard disk segment data and the replica safety verification data to the controller corresponding to the target storage chain, instruct the controller corresponding to the target storage chain to write the replica safety verification data to the head position of the unavailable replica, and write the hard disk segment data to the tail position of the unavailable replica, to generate the corresponding available replica in the target storage chain.

14. The method according to claim 12, characterized in that The method further comprises: In the event that writing the hard disk segment data and / or the replica security verification data to the unavailable replica fails, the unavailable replica in the target storage chain is repaired.

15. The method according to any one of claims 2 to 7, characterized in that The method further comprises: When each of the storage chains is generated and an unavailable copy in a target storage chain in the storage system needs to be repaired, repairing the unavailable copy in the target storage chain to obtain a corresponding restored copy in the target storage chain; the target storage chain is any storage chain in each of the storage chains except the current storage chain; Obtaining hard disk segment data of the hard disk segment and copy security verification data of the hard disk segment data from a current cache of the storage system; According to the hard disk segment data and the replica security verification data, an alignment write operation is performed on the restored replica to generate a corresponding available replica in the target storage chain.

16. The method according to any one of claims 1 to 7, characterized in that The method further comprises: If the number of available replicas in the current storage chain does not meet the reliability service condition, detecting whether there is a role switching instruction sent by a management device in the storage system; If a role switching instruction sent by the management device is detected, executing an operation of switching from the master controller to a slave controller in the storage system; A processing instruction for the current service request is sent to a new main controller in the storage system, instructing the new main controller to process the current service request.

17. A service request processing device, characterized in that: The device comprises: An instruction response module is used to obtain the number of available copies in the current storage chain corresponding to the main controller in the storage system in response to the processing instruction of the current business request; The request processing module is used to process the current business request based on the available copies in the current storage chain when the number of available copies in the current storage chain meets a preset reliability service condition.

18. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 16 are implemented.

19. 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 to 16 are implemented.

20. 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 to 16 are implemented.